@karlorz/codexhost-cli-linux-x64 0.20.0-0 → 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 +62 -14
  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
package/README.md CHANGED
@@ -7,7 +7,7 @@ Run Pi and Claude Code as first-class external harnesses inside Codex Desktop.
7
7
  ## Install
8
8
 
9
9
  ```bash
10
- npm install -g @karlorz/codexhost-cli@0.20.0-0
10
+ npm install -g @karlorz/codexhost-cli@0.21.0-0
11
11
  ```
12
12
 
13
13
  Do not install this package directly. npm selects it through the optional dependencies of `@karlorz/codexhost-cli`.
@@ -1 +1 @@
1
- {"schemaVersion":1,"version":"0.20.0-0","distribution":"npm","target":"linux-x64"}
1
+ {"schemaVersion":1,"version":"0.21.0-0","distribution":"npm","target":"linux-x64"}
@@ -15992,7 +15992,7 @@ var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonneg
15992
15992
  var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
15993
15993
  var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
15994
15994
  var usageOutputTimingSchema = external_exports.object({
15995
- version: external_exports.literal(3).optional(),
15995
+ version: external_exports.union([external_exports.literal(3), external_exports.literal(4)]).optional(),
15996
15996
  requestId: external_exports.string().min(1),
15997
15997
  turnId: external_exports.string().min(1).max(1024),
15998
15998
  outputTokens: nonNegativeSafeIntegerSchema,
@@ -16000,16 +16000,16 @@ var usageOutputTimingSchema = external_exports.object({
16000
16000
  completedAtMs: nonNegativeSafeIntegerSchema
16001
16001
  }).strict().refine((value) => value.completedAtMs > value.startedAtMs);
16002
16002
  var usageMeasurementSchema = external_exports.object({
16003
- version: external_exports.union([external_exports.literal(2), external_exports.literal(3)]).optional(),
16003
+ version: external_exports.union([external_exports.literal(2), external_exports.literal(3), external_exports.literal(4)]).optional(),
16004
16004
  value: finiteNonNegativeNumberSchema,
16005
16005
  turnId: external_exports.string().min(1).max(1024),
16006
16006
  at: nonNegativeSafeIntegerSchema
16007
16007
  }).strict();
16008
16008
  var usageMeasurementsSchema = external_exports.object({
16009
- // Unversioned intervals can omit hidden thinking time; do not restore them into averages.
16010
- outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 3)).optional(),
16009
+ // Older intervals can omit hidden thinking time; do not restore them into averages.
16010
+ outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 4)).optional(),
16011
16011
  // Retain independent TTFT facts when dropping incompatible speed measurements.
16012
- outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 3).optional().catch(void 0),
16012
+ outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
16013
16013
  timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
16014
16014
  }).strict();
16015
16015
  var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
@@ -16524,6 +16524,11 @@ var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
16524
16524
  cursor: clientChannelCursorSchema,
16525
16525
  cwd: external_exports.string().optional()
16526
16526
  }),
16527
+ external_exports.object({
16528
+ type: external_exports.literal("harness-inspection-changed"),
16529
+ cursor: clientChannelCursorSchema,
16530
+ harnessId: external_exports.string().min(1)
16531
+ }),
16527
16532
  external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
16528
16533
  external_exports.object({
16529
16534
  type: external_exports.literal("preferences-changed"),
@@ -16595,6 +16600,8 @@ var clientItemTruncationSchema = external_exports.object({
16595
16600
  var clientTurnSchema = external_exports.object({
16596
16601
  id: external_exports.string().min(1),
16597
16602
  status: external_exports.string().min(1),
16603
+ /** Native history has no terminal evidence; Desktop's status vocabulary cannot express this. */
16604
+ codexhostTurnOutcome: external_exports.object({ status: external_exports.literal("unknown"), reason: external_exports.string() }).optional(),
16598
16605
  items: external_exports.array(external_exports.object({ id: external_exports.string().min(1), type: external_exports.string().min(1) }).passthrough()),
16599
16606
  /** Original file operations, independent of the cumulative Desktop fileChange card.
16600
16607
  * Insert before the named non-file Item; null appends at the end of the Turn.
@@ -17868,6 +17875,7 @@ var THREAD_WATCH_NOTICE_OUTCOMES = [
17868
17875
  "completed",
17869
17876
  "failed",
17870
17877
  "interrupted",
17878
+ "needsInput",
17871
17879
  "timedOut",
17872
17880
  "unreadable",
17873
17881
  "notFound"
@@ -17914,13 +17922,25 @@ var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
17914
17922
  var thread = { ...target, threadId: identity };
17915
17923
  var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
17916
17924
  external_exports.strictObject({ kind: external_exports.literal("hosts") }),
17925
+ external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
17917
17926
  external_exports.strictObject({
17918
17927
  kind: external_exports.literal("list"),
17919
17928
  ...target,
17920
17929
  cursor: external_exports.string().nullable(),
17921
17930
  archived: external_exports.boolean()
17922
17931
  }),
17923
- external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
17932
+ external_exports.strictObject({
17933
+ kind: external_exports.literal("read"),
17934
+ ...thread,
17935
+ page: external_exports.strictObject({
17936
+ cursor: external_exports.string().min(1).max(8192).nullable(),
17937
+ epoch: identity.optional(),
17938
+ sortDirection: external_exports.enum(["asc", "desc"]).optional(),
17939
+ limit: external_exports.number().int().min(1).max(20).optional()
17940
+ }).refine((page) => page.cursor === null || page.epoch !== void 0, {
17941
+ message: "A history continuation requires its connection epoch"
17942
+ }).optional()
17943
+ }),
17924
17944
  external_exports.strictObject({
17925
17945
  kind: external_exports.literal("configure"),
17926
17946
  ...thread,
@@ -20432,6 +20452,17 @@ function headerValue(value) {
20432
20452
  }
20433
20453
 
20434
20454
  // packages/console-server/src/open.ts
20455
+ var CONSOLE_STOPPING_SERVICE = `${CONSOLE_SERVICE}-stopping`;
20456
+ function isConsoleService(service) {
20457
+ return service === CONSOLE_SERVICE || service === CONSOLE_STOPPING_SERVICE;
20458
+ }
20459
+ function terminateConsole(pid) {
20460
+ try {
20461
+ process.kill(pid, "SIGTERM");
20462
+ } catch (error51) {
20463
+ if (error51.code !== "ESRCH") throw error51;
20464
+ }
20465
+ }
20435
20466
  function refused(error51) {
20436
20467
  let current = error51;
20437
20468
  for (let depth = 0; depth < 4 && current; depth += 1) {
@@ -20446,9 +20477,10 @@ async function probeConsole(port) {
20446
20477
  signal: AbortSignal.timeout(1500)
20447
20478
  });
20448
20479
  const body = await response.json().catch(() => null);
20449
- if (response.ok && body?.service === CONSOLE_SERVICE && typeof body.appDirectory === "string" && typeof body.pid === "number") {
20480
+ if (response.ok && isConsoleService(body?.service) && typeof body.appDirectory === "string" && typeof body.pid === "number") {
20450
20481
  return {
20451
20482
  kind: "console",
20483
+ stopping: body.service === CONSOLE_STOPPING_SERVICE,
20452
20484
  appDirectory: body.appDirectory,
20453
20485
  pid: body.pid,
20454
20486
  buildId: typeof body.buildId === "string" ? body.buildId : null
@@ -20476,12 +20508,28 @@ async function requestShutdown(port) {
20476
20508
  });
20477
20509
  if (!response.ok) throw new Error(`console shutdown failed: HTTP ${response.status}`);
20478
20510
  }
20511
+ async function waitUntilConsoleGone(port, pid) {
20512
+ let probe = await waitFor(port, (next) => next.kind !== "console", 5e3);
20513
+ if (probe.kind !== "console") return probe;
20514
+ terminateConsole(pid);
20515
+ probe = await waitFor(port, (next) => next.kind !== "console", 5e3);
20516
+ if (probe.kind === "console") throw new Error(`codexhost console did not stop on port ${port}`);
20517
+ return probe;
20518
+ }
20479
20519
  async function stopConsole(environment = process.env) {
20480
20520
  const port = consolePort(environment);
20481
- if ((await probeConsole(port)).kind !== "console") return false;
20521
+ const first = await probeConsole(port);
20522
+ if (first.kind !== "console") return false;
20523
+ if (first.stopping) {
20524
+ await requestShutdown(port).catch(() => void 0);
20525
+ await waitUntilConsoleGone(port, first.pid);
20526
+ return true;
20527
+ }
20482
20528
  await requestShutdown(port);
20483
- const probe = await waitFor(port, (next) => next.kind !== "console", 5e3);
20484
- if (probe.kind === "console") throw new Error(`codexhost console did not stop on port ${port}`);
20529
+ const probe = await waitFor(port, (next) => next.kind !== "console" || next.stopping, 5e3);
20530
+ if (probe.kind === "console" && !probe.stopping) {
20531
+ await waitUntilConsoleGone(port, first.pid);
20532
+ }
20485
20533
  return true;
20486
20534
  }
20487
20535
  async function consoleBuildId(entryPath2, environment = process.env) {
@@ -20520,9 +20568,9 @@ async function ensureConsole(options) {
20520
20568
  const port = consolePort(environment);
20521
20569
  let probe = await probeConsole(port);
20522
20570
  const ownBuildId = await consoleBuildId(options.entryPath, environment);
20523
- if (probe.kind === "console" && (probe.appDirectory !== options.appDirectory || probe.buildId !== ownBuildId)) {
20571
+ if (probe.kind === "console" && (probe.stopping || probe.appDirectory !== options.appDirectory || probe.buildId !== ownBuildId)) {
20524
20572
  await requestShutdown(port).catch(() => void 0);
20525
- probe = await waitFor(port, (next) => next.kind !== "console", 5e3);
20573
+ probe = await waitUntilConsoleGone(port, probe.pid);
20526
20574
  }
20527
20575
  if (probe.kind === "foreign") {
20528
20576
  throw new Error(
@@ -20531,8 +20579,8 @@ async function ensureConsole(options) {
20531
20579
  }
20532
20580
  if (probe.kind === "free") {
20533
20581
  startDetachedServer(options.entryPath, environment);
20534
- probe = await waitFor(port, (next) => next.kind === "console", 1e4);
20535
- if (probe.kind !== "console") {
20582
+ probe = await waitFor(port, (next) => next.kind === "console" && !next.stopping, 1e4);
20583
+ if (probe.kind !== "console" || probe.stopping) {
20536
20584
  throw new Error(`codexhost console did not start on port ${port}`);
20537
20585
  }
20538
20586
  }
@@ -15144,7 +15144,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15144
15144
  var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
15145
15145
  var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
15146
15146
  var usageOutputTimingSchema = external_exports.object({
15147
- version: external_exports.literal(3).optional(),
15147
+ version: external_exports.union([external_exports.literal(3), external_exports.literal(4)]).optional(),
15148
15148
  requestId: external_exports.string().min(1),
15149
15149
  turnId: external_exports.string().min(1).max(1024),
15150
15150
  outputTokens: nonNegativeSafeIntegerSchema,
@@ -15152,16 +15152,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15152
15152
  completedAtMs: nonNegativeSafeIntegerSchema
15153
15153
  }).strict().refine((value) => value.completedAtMs > value.startedAtMs);
15154
15154
  var usageMeasurementSchema = external_exports.object({
15155
- version: external_exports.union([external_exports.literal(2), external_exports.literal(3)]).optional(),
15155
+ version: external_exports.union([external_exports.literal(2), external_exports.literal(3), external_exports.literal(4)]).optional(),
15156
15156
  value: finiteNonNegativeNumberSchema,
15157
15157
  turnId: external_exports.string().min(1).max(1024),
15158
15158
  at: nonNegativeSafeIntegerSchema
15159
15159
  }).strict();
15160
15160
  var usageMeasurementsSchema = external_exports.object({
15161
- // Unversioned intervals can omit hidden thinking time; do not restore them into averages.
15162
- outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 3)).optional(),
15161
+ // Older intervals can omit hidden thinking time; do not restore them into averages.
15162
+ outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 4)).optional(),
15163
15163
  // Retain independent TTFT facts when dropping incompatible speed measurements.
15164
- outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 3).optional().catch(void 0),
15164
+ outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
15165
15165
  timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
15166
15166
  }).strict();
15167
15167
  var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
@@ -15676,6 +15676,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15676
15676
  cursor: clientChannelCursorSchema,
15677
15677
  cwd: external_exports.string().optional()
15678
15678
  }),
15679
+ external_exports.object({
15680
+ type: external_exports.literal("harness-inspection-changed"),
15681
+ cursor: clientChannelCursorSchema,
15682
+ harnessId: external_exports.string().min(1)
15683
+ }),
15679
15684
  external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
15680
15685
  external_exports.object({
15681
15686
  type: external_exports.literal("preferences-changed"),
@@ -15747,6 +15752,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15747
15752
  var clientTurnSchema = external_exports.object({
15748
15753
  id: external_exports.string().min(1),
15749
15754
  status: external_exports.string().min(1),
15755
+ /** Native history has no terminal evidence; Desktop's status vocabulary cannot express this. */
15756
+ codexhostTurnOutcome: external_exports.object({ status: external_exports.literal("unknown"), reason: external_exports.string() }).optional(),
15750
15757
  items: external_exports.array(external_exports.object({ id: external_exports.string().min(1), type: external_exports.string().min(1) }).passthrough()),
15751
15758
  /** Original file operations, independent of the cumulative Desktop fileChange card.
15752
15759
  * Insert before the named non-file Item; null appends at the end of the Turn.
@@ -17062,6 +17069,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17062
17069
  "completed",
17063
17070
  "failed",
17064
17071
  "interrupted",
17072
+ "needsInput",
17065
17073
  "timedOut",
17066
17074
  "unreadable",
17067
17075
  "notFound"
@@ -17111,13 +17119,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17111
17119
  var thread = { ...target, threadId: identity };
17112
17120
  var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
17113
17121
  external_exports.strictObject({ kind: external_exports.literal("hosts") }),
17122
+ external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
17114
17123
  external_exports.strictObject({
17115
17124
  kind: external_exports.literal("list"),
17116
17125
  ...target,
17117
17126
  cursor: external_exports.string().nullable(),
17118
17127
  archived: external_exports.boolean()
17119
17128
  }),
17120
- external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
17129
+ external_exports.strictObject({
17130
+ kind: external_exports.literal("read"),
17131
+ ...thread,
17132
+ page: external_exports.strictObject({
17133
+ cursor: external_exports.string().min(1).max(8192).nullable(),
17134
+ epoch: identity.optional(),
17135
+ sortDirection: external_exports.enum(["asc", "desc"]).optional(),
17136
+ limit: external_exports.number().int().min(1).max(20).optional()
17137
+ }).refine((page) => page.cursor === null || page.epoch !== void 0, {
17138
+ message: "A history continuation requires its connection epoch"
17139
+ }).optional()
17140
+ }),
17121
17141
  external_exports.strictObject({
17122
17142
  kind: external_exports.literal("configure"),
17123
17143
  ...thread,
@@ -18241,11 +18261,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18241
18261
  const webUi = /* @__PURE__ */ new Map();
18242
18262
  const listeners = /* @__PURE__ */ new Set();
18243
18263
  let pending = null;
18264
+ let queuedRefresh = null;
18244
18265
  const publish = () => {
18245
18266
  for (const listener of [...listeners]) listener();
18246
18267
  };
18247
18268
  const inspectAll = (refresh) => {
18248
- if (pending) return pending;
18269
+ if (pending) {
18270
+ if (!refresh) return pending;
18271
+ queuedRefresh ??= pending.then(() => inspectAll(true)).finally(() => {
18272
+ queuedRefresh = null;
18273
+ });
18274
+ return queuedRefresh;
18275
+ }
18249
18276
  pending = Promise.resolve().then(async () => {
18250
18277
  try {
18251
18278
  if (!client.listHarnessPlugins)
@@ -15047,7 +15047,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15047
15047
  var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
15048
15048
  var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
15049
15049
  var usageOutputTimingSchema = external_exports.object({
15050
- version: external_exports.literal(3).optional(),
15050
+ version: external_exports.union([external_exports.literal(3), external_exports.literal(4)]).optional(),
15051
15051
  requestId: external_exports.string().min(1),
15052
15052
  turnId: external_exports.string().min(1).max(1024),
15053
15053
  outputTokens: nonNegativeSafeIntegerSchema,
@@ -15055,16 +15055,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15055
15055
  completedAtMs: nonNegativeSafeIntegerSchema
15056
15056
  }).strict().refine((value) => value.completedAtMs > value.startedAtMs);
15057
15057
  var usageMeasurementSchema = external_exports.object({
15058
- version: external_exports.union([external_exports.literal(2), external_exports.literal(3)]).optional(),
15058
+ version: external_exports.union([external_exports.literal(2), external_exports.literal(3), external_exports.literal(4)]).optional(),
15059
15059
  value: finiteNonNegativeNumberSchema,
15060
15060
  turnId: external_exports.string().min(1).max(1024),
15061
15061
  at: nonNegativeSafeIntegerSchema
15062
15062
  }).strict();
15063
15063
  var usageMeasurementsSchema = external_exports.object({
15064
- // Unversioned intervals can omit hidden thinking time; do not restore them into averages.
15065
- outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 3)).optional(),
15064
+ // Older intervals can omit hidden thinking time; do not restore them into averages.
15065
+ outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 4)).optional(),
15066
15066
  // Retain independent TTFT facts when dropping incompatible speed measurements.
15067
- outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 3).optional().catch(void 0),
15067
+ outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
15068
15068
  timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
15069
15069
  }).strict();
15070
15070
  var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
@@ -15580,6 +15580,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15580
15580
  cursor: clientChannelCursorSchema,
15581
15581
  cwd: external_exports.string().optional()
15582
15582
  }),
15583
+ external_exports.object({
15584
+ type: external_exports.literal("harness-inspection-changed"),
15585
+ cursor: clientChannelCursorSchema,
15586
+ harnessId: external_exports.string().min(1)
15587
+ }),
15583
15588
  external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
15584
15589
  external_exports.object({
15585
15590
  type: external_exports.literal("preferences-changed"),
@@ -15651,6 +15656,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15651
15656
  var clientTurnSchema = external_exports.object({
15652
15657
  id: external_exports.string().min(1),
15653
15658
  status: external_exports.string().min(1),
15659
+ /** Native history has no terminal evidence; Desktop's status vocabulary cannot express this. */
15660
+ codexhostTurnOutcome: external_exports.object({ status: external_exports.literal("unknown"), reason: external_exports.string() }).optional(),
15654
15661
  items: external_exports.array(external_exports.object({ id: external_exports.string().min(1), type: external_exports.string().min(1) }).passthrough()),
15655
15662
  /** Original file operations, independent of the cumulative Desktop fileChange card.
15656
15663
  * Insert before the named non-file Item; null appends at the end of the Turn.
@@ -16912,6 +16919,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16912
16919
  "completed",
16913
16920
  "failed",
16914
16921
  "interrupted",
16922
+ "needsInput",
16915
16923
  "timedOut",
16916
16924
  "unreadable",
16917
16925
  "notFound"
@@ -16958,13 +16966,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16958
16966
  var thread = { ...target, threadId: identity };
16959
16967
  var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
16960
16968
  external_exports.strictObject({ kind: external_exports.literal("hosts") }),
16969
+ external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
16961
16970
  external_exports.strictObject({
16962
16971
  kind: external_exports.literal("list"),
16963
16972
  ...target,
16964
16973
  cursor: external_exports.string().nullable(),
16965
16974
  archived: external_exports.boolean()
16966
16975
  }),
16967
- external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
16976
+ external_exports.strictObject({
16977
+ kind: external_exports.literal("read"),
16978
+ ...thread,
16979
+ page: external_exports.strictObject({
16980
+ cursor: external_exports.string().min(1).max(8192).nullable(),
16981
+ epoch: identity.optional(),
16982
+ sortDirection: external_exports.enum(["asc", "desc"]).optional(),
16983
+ limit: external_exports.number().int().min(1).max(20).optional()
16984
+ }).refine((page) => page.cursor === null || page.epoch !== void 0, {
16985
+ message: "A history continuation requires its connection epoch"
16986
+ }).optional()
16987
+ }),
16968
16988
  external_exports.strictObject({
16969
16989
  kind: external_exports.literal("configure"),
16970
16990
  ...thread,