@codexhost/cli-darwin-x64 0.3.4 → 0.3.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.
@@ -15014,7 +15014,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15014
15014
  productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional()
15015
15015
  }).strict();
15016
15016
  var threadUsageInspectionParamsSchema = external_exports.object({
15017
- threadId: hostThreadIdSchema
15017
+ threadId: hostThreadIdSchema,
15018
+ refresh: external_exports.literal("exact").optional()
15018
15019
  }).strict();
15019
15020
  var threadUsageInspectionSchema = external_exports.object({
15020
15021
  threadId: hostThreadIdSchema,
@@ -17003,12 +17004,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17003
17004
  control.trigger.setAttribute("aria-expanded", "false");
17004
17005
  }
17005
17006
  function openPopover(control) {
17007
+ const wasOpen = control.trigger.getAttribute("aria-expanded") === "true";
17006
17008
  positionPopover(control);
17007
17009
  control.popover.hidden = false;
17008
17010
  if (typeof control.popover.showPopover === "function" && !popoverIsOpen(control.popover)) {
17009
17011
  control.popover.showPopover();
17010
17012
  }
17011
17013
  control.trigger.setAttribute("aria-expanded", "true");
17014
+ if (!wasOpen) control.onOpen?.();
17012
17015
  }
17013
17016
  function togglePopover(control) {
17014
17017
  if (control.trigger.getAttribute("aria-expanded") === "true") closePopover(control);
@@ -17073,6 +17076,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17073
17076
  popover,
17074
17077
  anchor: null,
17075
17078
  label,
17079
+ onOpen: null,
17076
17080
  dispose() {
17077
17081
  closePopover(control);
17078
17082
  if (closeTimer !== null) window.clearTimeout(closeTimer);
@@ -21562,23 +21566,6 @@ ${error51.stderrTail}`] : []
21562
21566
  };
21563
21567
  }
21564
21568
 
21565
- // src/compatibility-update.ts
21566
- async function startCompatibilityUpdate(client) {
21567
- if (!client) return "unavailable";
21568
- try {
21569
- const check2 = await client.checkUpdate();
21570
- if (check2.updateAvailable && check2.installationAvailable) {
21571
- void client.startUpdate().catch(() => void 0);
21572
- return "update-started";
21573
- }
21574
- if (check2.error === null && check2.latestVersion !== null && check2.currentVersion === check2.latestVersion) {
21575
- return "current";
21576
- }
21577
- } catch {
21578
- }
21579
- return "unavailable";
21580
- }
21581
-
21582
21569
  // src/renderer-binding-probe.ts
21583
21570
  var externalHarnessIds = {
21584
21571
  pi: harnessIdSchema.parse("pi"),
@@ -21886,6 +21873,12 @@ ${error51.stderrTail}`] : []
21886
21873
  mounted.usage,
21887
21874
  mounted.accountCredits
21888
21875
  );
21876
+ if (mounted.control.usage) {
21877
+ mounted.control.usage.onOpen = () => {
21878
+ if (controller.get(mounted.composer).agent === "codex") return;
21879
+ void refreshThreadUsage(mounted, "exact");
21880
+ };
21881
+ }
21889
21882
  };
21890
21883
  const refreshCommands = async (mounted) => {
21891
21884
  const state = controller.get(mounted.composer);
@@ -21931,7 +21924,7 @@ ${error51.stderrTail}`] : []
21931
21924
  renderMounted(mounted);
21932
21925
  }
21933
21926
  };
21934
- const refreshThreadUsage = async (mounted) => {
21927
+ const refreshThreadUsage = async (mounted, refresh) => {
21935
21928
  const threadId = threadIdFromComposerModelTarget(mounted.modelTarget);
21936
21929
  if (!threadId || !modelControl) {
21937
21930
  mounted.usage = null;
@@ -21942,7 +21935,10 @@ ${error51.stderrTail}`] : []
21942
21935
  }
21943
21936
  const generation = ++mounted.usageRequestGeneration;
21944
21937
  try {
21945
- const result = await modelControl.inspectThreadUsage({ threadId });
21938
+ const result = await modelControl.inspectThreadUsage({
21939
+ threadId,
21940
+ ...refresh ? { refresh } : {}
21941
+ });
21946
21942
  if (disposed || mountedByComposer.get(mounted.composer) !== mounted || !mounted.composer.isConnected || mounted.usageRequestGeneration !== generation || threadIdFromComposerModelTarget(mounted.modelTarget) !== threadId || result.threadId !== threadId) {
21947
21943
  return;
21948
21944
  }
@@ -23259,9 +23255,6 @@ ${error51.stderrTail}`] : []
23259
23255
  ...permissionModeId ? { permissionModeId } : {}
23260
23256
  };
23261
23257
  },
23262
- requestCompatibilityUpdate() {
23263
- return startCompatibilityUpdate(modelControl);
23264
- },
23265
23258
  setAdapter(status, dispose, applyAgent, nextModelControl) {
23266
23259
  usageNotificationDispose?.();
23267
23260
  usageNotificationDispose = null;
package/bin/codexhost CHANGED
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codexhost/cli-darwin-x64",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "Run Pi and Claude Code as first-class external harnesses inside Codex Desktop.",
5
5
  "type": "module",
6
6
  "files": [