@karlorz/codexhost-cli-darwin-x64 0.19.0-2 → 0.20.0-1

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 (57) hide show
  1. package/README.md +1 -1
  2. package/app/codexhost-distribution.json +1 -1
  3. package/app/console-server.mjs +60 -11
  4. package/app/console-web.js +1280 -826
  5. package/app/cpa-live-voice-hook.js +24 -3
  6. package/app/desktop-controller.mjs +24 -3
  7. package/app/host-runtime.mjs +1586 -1189
  8. package/app/plugins/antigravity/plugin.mjs +8782 -4311
  9. package/app/plugins/claude-code/plugin.mjs +26 -3
  10. package/app/plugins/codebuddy/plugin.mjs +41 -5
  11. package/app/plugins/codex-usage/plugin.mjs +26 -3
  12. package/app/plugins/copilot/plugin.mjs +26 -3
  13. package/app/plugins/cursor-cli/plugin.mjs +26 -3
  14. package/app/plugins/deepseek-harness/plugin.mjs +26 -3
  15. package/app/plugins/devin/plugin.mjs +25 -3
  16. package/app/plugins/grok/plugin.mjs +26 -3
  17. package/app/plugins/hermes/plugin.mjs +25 -3
  18. package/app/plugins/kimi-code/plugin.mjs +26 -3
  19. package/app/plugins/kiro-cli/plugin.mjs +26 -3
  20. package/app/plugins/omp/plugin.mjs +43 -5
  21. package/app/plugins/opencode/plugin.mjs +26 -3
  22. package/app/plugins/pi/plugin.mjs +45 -6
  23. package/app/plugins/qoder/plugin.mjs +48 -4
  24. package/app/plugins/qoder-cn/plugin.mjs +48 -4
  25. package/app/plugins/qwen-code/plugin.mjs +26 -3
  26. package/app/plugins/workbuddy/plugin.mjs +45 -8
  27. package/app/plugins/zcode/plugin.mjs +26 -3
  28. package/app/renderer-extension.js +1698 -983
  29. package/app/web/assets/index-B5OfOGb8.js +201 -0
  30. package/app/web/assets/index-D6-hvggd.css +1 -0
  31. package/app/web/assets/langs/{graphql-B8vkg11W.js → graphql-ChAeyPkT.js} +1 -1
  32. package/app/web/assets/langs/{http-DmoDEjMt.js → http-BvreBIbD.js} +1 -1
  33. package/app/web/assets/langs/{php-DJ5ovfAM.js → php-D8omCIuJ.js} +1 -1
  34. package/app/web/assets/langs/{rst-U5-R5x3p.js → rst-Do7RLLCS.js} +1 -1
  35. package/app/web/assets/langs/{ruby-VKVsnS0H.js → ruby-rH_O_vse.js} +1 -1
  36. package/app/web/assets/langs/{svelte-C20lOv9V.js → svelte-xZy73wAj.js} +1 -1
  37. package/app/web/assets/langs/{vue-z6Y-lzP-.js → vue-C4DW8agZ.js} +1 -1
  38. package/app/web/assets/{vendor-dSL872WO.js → vendor-C9g2bw8s.js} +3 -3
  39. package/app/web/codexhost-settings.js +1285 -827
  40. package/app/web/index.html +4 -3
  41. package/app/web/plugins/deepseek-ai__dsh-api-gateway/client.js +2 -2
  42. package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +1 -1
  43. package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +68 -68
  44. package/app/web/plugins/deepseek-ai__dsh-client-connection/client.js +1 -1
  45. package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +74 -69
  46. package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +3 -3
  47. package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +13 -13
  48. package/app/web/plugins/deepseek-ai__dsh-client-ui-session/client.js +1 -1
  49. package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
  50. package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +7 -7
  51. package/app/web-modules/server.mjs +135 -69
  52. package/bin/codexhost +0 -0
  53. package/libexec/codexhost-shim +0 -0
  54. package/libexec/codexhost-updater +0 -0
  55. package/package.json +1 -1
  56. package/app/web/assets/index-BCyiiDDL.js +0 -199
  57. package/app/web/assets/index-BNQIOOHE.css +0 -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.19.0-2
10
+ npm install -g @karlorz/codexhost-cli@0.20.0-1
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.19.0-2","distribution":"npm","target":"macos-x64"}
1
+ {"schemaVersion":1,"version":"0.20.0-1","distribution":"npm","target":"macos-x64"}
@@ -15991,13 +15991,25 @@ var threadPermissionModeSelectParamsSchema = external_exports.object({
15991
15991
  var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
15992
15992
  var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
15993
15993
  var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
15994
+ var usageOutputTimingSchema = external_exports.object({
15995
+ version: external_exports.literal(3).optional(),
15996
+ requestId: external_exports.string().min(1),
15997
+ turnId: external_exports.string().min(1).max(1024),
15998
+ outputTokens: nonNegativeSafeIntegerSchema,
15999
+ startedAtMs: nonNegativeSafeIntegerSchema,
16000
+ completedAtMs: nonNegativeSafeIntegerSchema
16001
+ }).strict().refine((value) => value.completedAtMs > value.startedAtMs);
15994
16002
  var usageMeasurementSchema = external_exports.object({
16003
+ version: external_exports.union([external_exports.literal(2), external_exports.literal(3)]).optional(),
15995
16004
  value: finiteNonNegativeNumberSchema,
15996
16005
  turnId: external_exports.string().min(1).max(1024),
15997
16006
  at: nonNegativeSafeIntegerSchema
15998
16007
  }).strict();
15999
16008
  var usageMeasurementsSchema = external_exports.object({
16000
- outputTokensPerSecond: usageMeasurementSchema.optional(),
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(),
16011
+ // Retain independent TTFT facts when dropping incompatible speed measurements.
16012
+ outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 3).optional().catch(void 0),
16001
16013
  timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
16002
16014
  }).strict();
16003
16015
  var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
@@ -16017,6 +16029,7 @@ var threadUsageSnapshotSchema = external_exports.object({
16017
16029
  cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
16018
16030
  outputTokens: nonNegativeSafeIntegerSchema.optional(),
16019
16031
  outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
16032
+ sessionOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
16020
16033
  apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
16021
16034
  reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
16022
16035
  totalTokens: nonNegativeSafeIntegerSchema.optional(),
@@ -16477,6 +16490,10 @@ var voiceSettingsStateSchema = external_exports.strictObject({
16477
16490
  })
16478
16491
  });
16479
16492
 
16493
+ // packages/shared-contracts/dist/thread-archive-confirm.js
16494
+ var threadArchiveConfirmParamsSchema = external_exports.object({ threadId: hostThreadIdSchema }).strict();
16495
+ var threadArchiveConfirmResultSchema = external_exports.object({ confirmed: external_exports.boolean() }).strict();
16496
+
16480
16497
  // packages/shared-contracts/dist/client-channel.js
16481
16498
  var CLIENT_CHANNEL_VERSION = 1;
16482
16499
  var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
@@ -16616,7 +16633,12 @@ var clientThreadSnapshotSchema = external_exports.object({
16616
16633
  /** Current interruptible Host Turn, including command Turns omitted from client history. */
16617
16634
  activeTurnId: external_exports.string().min(1).nullable().optional(),
16618
16635
  /** Most recent explicit command in this Host process; not native conversation history. */
16619
- command: external_exports.object({ name: external_exports.string().min(1), turn: clientTurnSchema }).optional(),
16636
+ command: external_exports.object({
16637
+ name: external_exports.string().min(1),
16638
+ turn: clientTurnSchema,
16639
+ /** First ordinary Turn started after this command; its retained result is not a new event. */
16640
+ subsequentTurnId: external_exports.string().min(1).optional()
16641
+ }).optional(),
16620
16642
  thread: external_exports.object({
16621
16643
  id: external_exports.string().min(1),
16622
16644
  cwd: external_exports.string(),
@@ -16824,7 +16846,6 @@ var webAccessStateSchema = external_exports.object({
16824
16846
  quotaUntil: external_exports.string().optional()
16825
16847
  }).strict().optional()
16826
16848
  }).strict();
16827
- var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
16828
16849
 
16829
16850
  // packages/shared-contracts/dist/delegation-read.js
16830
16851
  var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
@@ -20411,6 +20432,17 @@ function headerValue(value) {
20411
20432
  }
20412
20433
 
20413
20434
  // packages/console-server/src/open.ts
20435
+ var CONSOLE_STOPPING_SERVICE = `${CONSOLE_SERVICE}-stopping`;
20436
+ function isConsoleService(service) {
20437
+ return service === CONSOLE_SERVICE || service === CONSOLE_STOPPING_SERVICE;
20438
+ }
20439
+ function terminateConsole(pid) {
20440
+ try {
20441
+ process.kill(pid, "SIGTERM");
20442
+ } catch (error51) {
20443
+ if (error51.code !== "ESRCH") throw error51;
20444
+ }
20445
+ }
20414
20446
  function refused(error51) {
20415
20447
  let current = error51;
20416
20448
  for (let depth = 0; depth < 4 && current; depth += 1) {
@@ -20425,9 +20457,10 @@ async function probeConsole(port) {
20425
20457
  signal: AbortSignal.timeout(1500)
20426
20458
  });
20427
20459
  const body = await response.json().catch(() => null);
20428
- if (response.ok && body?.service === CONSOLE_SERVICE && typeof body.appDirectory === "string" && typeof body.pid === "number") {
20460
+ if (response.ok && isConsoleService(body?.service) && typeof body.appDirectory === "string" && typeof body.pid === "number") {
20429
20461
  return {
20430
20462
  kind: "console",
20463
+ stopping: body.service === CONSOLE_STOPPING_SERVICE,
20431
20464
  appDirectory: body.appDirectory,
20432
20465
  pid: body.pid,
20433
20466
  buildId: typeof body.buildId === "string" ? body.buildId : null
@@ -20455,12 +20488,28 @@ async function requestShutdown(port) {
20455
20488
  });
20456
20489
  if (!response.ok) throw new Error(`console shutdown failed: HTTP ${response.status}`);
20457
20490
  }
20491
+ async function waitUntilConsoleGone(port, pid) {
20492
+ let probe = await waitFor(port, (next) => next.kind !== "console", 5e3);
20493
+ if (probe.kind !== "console") return probe;
20494
+ terminateConsole(pid);
20495
+ probe = await waitFor(port, (next) => next.kind !== "console", 5e3);
20496
+ if (probe.kind === "console") throw new Error(`codexhost console did not stop on port ${port}`);
20497
+ return probe;
20498
+ }
20458
20499
  async function stopConsole(environment = process.env) {
20459
20500
  const port = consolePort(environment);
20460
- if ((await probeConsole(port)).kind !== "console") return false;
20501
+ const first = await probeConsole(port);
20502
+ if (first.kind !== "console") return false;
20503
+ if (first.stopping) {
20504
+ await requestShutdown(port).catch(() => void 0);
20505
+ await waitUntilConsoleGone(port, first.pid);
20506
+ return true;
20507
+ }
20461
20508
  await requestShutdown(port);
20462
- const probe = await waitFor(port, (next) => next.kind !== "console", 5e3);
20463
- if (probe.kind === "console") throw new Error(`codexhost console did not stop on port ${port}`);
20509
+ const probe = await waitFor(port, (next) => next.kind !== "console" || next.stopping, 5e3);
20510
+ if (probe.kind === "console" && !probe.stopping) {
20511
+ await waitUntilConsoleGone(port, first.pid);
20512
+ }
20464
20513
  return true;
20465
20514
  }
20466
20515
  async function consoleBuildId(entryPath2, environment = process.env) {
@@ -20499,9 +20548,9 @@ async function ensureConsole(options) {
20499
20548
  const port = consolePort(environment);
20500
20549
  let probe = await probeConsole(port);
20501
20550
  const ownBuildId = await consoleBuildId(options.entryPath, environment);
20502
- if (probe.kind === "console" && (probe.appDirectory !== options.appDirectory || probe.buildId !== ownBuildId)) {
20551
+ if (probe.kind === "console" && (probe.stopping || probe.appDirectory !== options.appDirectory || probe.buildId !== ownBuildId)) {
20503
20552
  await requestShutdown(port).catch(() => void 0);
20504
- probe = await waitFor(port, (next) => next.kind !== "console", 5e3);
20553
+ probe = await waitUntilConsoleGone(port, probe.pid);
20505
20554
  }
20506
20555
  if (probe.kind === "foreign") {
20507
20556
  throw new Error(
@@ -20510,8 +20559,8 @@ async function ensureConsole(options) {
20510
20559
  }
20511
20560
  if (probe.kind === "free") {
20512
20561
  startDetachedServer(options.entryPath, environment);
20513
- probe = await waitFor(port, (next) => next.kind === "console", 1e4);
20514
- if (probe.kind !== "console") {
20562
+ probe = await waitFor(port, (next) => next.kind === "console" && !next.stopping, 1e4);
20563
+ if (probe.kind !== "console" || probe.stopping) {
20515
20564
  throw new Error(`codexhost console did not start on port ${port}`);
20516
20565
  }
20517
20566
  }