@liberseek/boft-cli-linux-x64 0.7.6 → 0.7.8

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.
@@ -15040,6 +15040,71 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15040
15040
  initializeOnly: external_exports.boolean().optional()
15041
15041
  });
15042
15042
 
15043
+ // ../shared-contracts/dist/ids.js
15044
+ var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
15045
+ message: "Identifier must not be empty or whitespace"
15046
+ });
15047
+ var harnessIdSchema = opaqueIdSchema.brand();
15048
+ var hostThreadIdSchema = opaqueIdSchema.brand();
15049
+ var hostTurnIdSchema = opaqueIdSchema.brand();
15050
+ var hostItemIdSchema = opaqueIdSchema.brand();
15051
+ var hostInteractionIdSchema = opaqueIdSchema.brand();
15052
+
15053
+ // ../shared-contracts/dist/harness-plugins.js
15054
+ var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
15055
+ var HARNESS_PLUGIN_ICON_MAX_BYTES = 128 * 1024;
15056
+ var HARNESS_PLUGIN_LIMIT = 128;
15057
+ var harnessPluginIdSchema = external_exports.string().min(1).max(128).regex(/^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/u).refine((id) => id !== "codex", "The official Codex identity is reserved").pipe(harnessIdSchema);
15058
+ var relativeResourceSchema = external_exports.string().min(1).max(512).refine((value) => !/[\\\u0000:#?]/u.test(value) && !value.startsWith("/") && !value.split("/").some((part) => part === ".." || part === ""), "Plugin resources must be relative paths inside the plugin");
15059
+ var documentationUrlSchema = external_exports.url().refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Plugin documentation links must be credential-free HTTPS URLs");
15060
+ var pluginPresentationShape = {
15061
+ id: harnessPluginIdSchema,
15062
+ name: external_exports.string().trim().min(1).max(128),
15063
+ version: external_exports.string().min(1).max(128),
15064
+ /** The factory accepts a persisted local entrypoint through its construction context. */
15065
+ launchCommand: external_exports.literal(true).optional(),
15066
+ links: external_exports.object({
15067
+ documentation: documentationUrlSchema.optional(),
15068
+ installation: documentationUrlSchema.optional()
15069
+ }).strict().optional()
15070
+ };
15071
+ var harnessPluginManifestSchema = external_exports.object({
15072
+ manifestVersion: external_exports.literal(1),
15073
+ ...pluginPresentationShape,
15074
+ adapterApiVersion: external_exports.number().int().positive(),
15075
+ entry: relativeResourceSchema,
15076
+ icon: relativeResourceSchema.optional()
15077
+ }).strict();
15078
+ var harnessPluginIconSchema = external_exports.string().max(Math.ceil(HARNESS_PLUGIN_ICON_MAX_BYTES / 3) * 4 + 64).regex(/^data:image\/(?:png|jpeg|webp|svg\+xml);base64,[A-Za-z0-9+/]+={0,2}$/u);
15079
+ var harnessPluginDescriptorSchema = external_exports.object({
15080
+ ...pluginPresentationShape,
15081
+ icon: harnessPluginIconSchema.optional()
15082
+ }).strict();
15083
+ var harnessPluginListParamsSchema = external_exports.object({}).strict();
15084
+ var harnessPluginListResultSchema = external_exports.object({
15085
+ plugins: external_exports.array(harnessPluginDescriptorSchema).max(HARNESS_PLUGIN_LIMIT)
15086
+ }).strict();
15087
+ var harnessPluginConfigurationSchema = external_exports.object({
15088
+ version: external_exports.literal(1),
15089
+ enabled: external_exports.array(harnessPluginIdSchema).max(HARNESS_PLUGIN_LIMIT)
15090
+ }).strict().refine((value) => new Set(value.enabled).size === value.enabled.length, {
15091
+ message: "Enabled plugin IDs must be unique",
15092
+ path: ["enabled"]
15093
+ });
15094
+
15095
+ // ../shared-contracts/dist/harness-long-context.js
15096
+ var HARNESS_LONG_CONTEXT_GET_METHOD = "codexhost/harness/long-context/get";
15097
+ var HARNESS_LONG_CONTEXT_SET_METHOD = "codexhost/harness/long-context/set";
15098
+ var harnessLongContextGetSchema = external_exports.object({
15099
+ harnessId: harnessPluginIdSchema
15100
+ }).strict();
15101
+ var harnessLongContextSetSchema = harnessLongContextGetSchema.extend({
15102
+ enabled: external_exports.boolean()
15103
+ });
15104
+ var harnessLongContextSchema = external_exports.object({
15105
+ enabled: external_exports.boolean()
15106
+ }).strict();
15107
+
15043
15108
  // ../shared-contracts/dist/console.js
15044
15109
  var consoleAnnouncementSchema = external_exports.strictObject({
15045
15110
  title: external_exports.string().trim().min(1).max(200),
@@ -15057,8 +15122,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15057
15122
  "codexhost/harness/display-settings/get",
15058
15123
  "codexhost/harness/display-settings/set",
15059
15124
  "codexhost/harness/inspect",
15125
+ "codexhost/harness/installation",
15060
15126
  "codexhost/harness/launch-settings/get",
15061
15127
  "codexhost/harness/launch-settings/set",
15128
+ HARNESS_LONG_CONTEXT_GET_METHOD,
15129
+ HARNESS_LONG_CONTEXT_SET_METHOD,
15062
15130
  "codexhost/harness/web-ui/open",
15063
15131
  "codexhost/harness/accounts/sources",
15064
15132
  "codexhost/harness/accounts/list",
@@ -15120,16 +15188,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15120
15188
  inactiveMs: external_exports.number().nonnegative()
15121
15189
  }));
15122
15190
 
15123
- // ../shared-contracts/dist/ids.js
15124
- var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
15125
- message: "Identifier must not be empty or whitespace"
15126
- });
15127
- var harnessIdSchema = opaqueIdSchema.brand();
15128
- var hostThreadIdSchema = opaqueIdSchema.brand();
15129
- var hostTurnIdSchema = opaqueIdSchema.brand();
15130
- var hostItemIdSchema = opaqueIdSchema.brand();
15131
- var hostInteractionIdSchema = opaqueIdSchema.brand();
15132
-
15133
15191
  // ../shared-contracts/dist/manual-compaction.js
15134
15192
  var THREAD_MANUAL_COMPACTION_STARTED_METHOD = "codexhost/thread/manual-compaction/started";
15135
15193
  var threadManualCompactionStartedSchema = external_exports.strictObject({
@@ -15669,48 +15727,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15669
15727
  }
15670
15728
  });
15671
15729
 
15672
- // ../shared-contracts/dist/harness-plugins.js
15673
- var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
15674
- var HARNESS_PLUGIN_ICON_MAX_BYTES = 128 * 1024;
15675
- var HARNESS_PLUGIN_LIMIT = 128;
15676
- var harnessPluginIdSchema = external_exports.string().min(1).max(128).regex(/^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/u).refine((id) => id !== "codex", "The official Codex identity is reserved").pipe(harnessIdSchema);
15677
- var relativeResourceSchema = external_exports.string().min(1).max(512).refine((value) => !/[\\\u0000:#?]/u.test(value) && !value.startsWith("/") && !value.split("/").some((part) => part === ".." || part === ""), "Plugin resources must be relative paths inside the plugin");
15678
- var documentationUrlSchema = external_exports.url().refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Plugin documentation links must be credential-free HTTPS URLs");
15679
- var pluginPresentationShape = {
15680
- id: harnessPluginIdSchema,
15681
- name: external_exports.string().trim().min(1).max(128),
15682
- version: external_exports.string().min(1).max(128),
15683
- /** The factory accepts a persisted local entrypoint through its construction context. */
15684
- launchCommand: external_exports.literal(true).optional(),
15685
- links: external_exports.object({
15686
- documentation: documentationUrlSchema.optional(),
15687
- installation: documentationUrlSchema.optional()
15688
- }).strict().optional()
15689
- };
15690
- var harnessPluginManifestSchema = external_exports.object({
15691
- manifestVersion: external_exports.literal(1),
15692
- ...pluginPresentationShape,
15693
- adapterApiVersion: external_exports.number().int().positive(),
15694
- entry: relativeResourceSchema,
15695
- icon: relativeResourceSchema.optional()
15696
- }).strict();
15697
- var harnessPluginIconSchema = external_exports.string().max(Math.ceil(HARNESS_PLUGIN_ICON_MAX_BYTES / 3) * 4 + 64).regex(/^data:image\/(?:png|jpeg|webp|svg\+xml);base64,[A-Za-z0-9+/]+={0,2}$/u);
15698
- var harnessPluginDescriptorSchema = external_exports.object({
15699
- ...pluginPresentationShape,
15700
- icon: harnessPluginIconSchema.optional()
15701
- }).strict();
15702
- var harnessPluginListParamsSchema = external_exports.object({}).strict();
15703
- var harnessPluginListResultSchema = external_exports.object({
15704
- plugins: external_exports.array(harnessPluginDescriptorSchema).max(HARNESS_PLUGIN_LIMIT)
15705
- }).strict();
15706
- var harnessPluginConfigurationSchema = external_exports.object({
15707
- version: external_exports.literal(1),
15708
- enabled: external_exports.array(harnessPluginIdSchema).max(HARNESS_PLUGIN_LIMIT)
15709
- }).strict().refine((value) => new Set(value.enabled).size === value.enabled.length, {
15710
- message: "Enabled plugin IDs must be unique",
15711
- path: ["enabled"]
15712
- });
15713
-
15714
15730
  // ../shared-contracts/dist/harness-route.js
15715
15731
  var HARNESS_PLUGIN_ROUTE_PREFIX = "codexhost/plugin-v1@";
15716
15732
  var MAX_ROUTE_LENGTH = 4096;
@@ -15762,14 +15778,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15762
15778
  var HARNESS_INSTALLATION_METHOD = "codexhost/harness/installation";
15763
15779
  var harnessInstallationParamsSchema = external_exports.object({
15764
15780
  harnessId: harnessIdSchema,
15765
- action: external_exports.enum(["check", "update"])
15781
+ action: external_exports.enum(["check", "update", "install"])
15766
15782
  }).strict();
15767
15783
  var harnessInstallationStateSchema = external_exports.object({
15768
15784
  currentVersion: external_exports.string().min(1).max(128),
15769
15785
  latestVersion: external_exports.string().min(1).max(128),
15770
15786
  updateAvailable: external_exports.boolean(),
15771
15787
  canUpdate: external_exports.boolean(),
15772
- message: external_exports.string().max(2048).optional()
15788
+ // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
15789
+ message: external_exports.string().max(2048).optional(),
15790
+ messageCode: external_exports.string().min(1).max(128).optional(),
15791
+ latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
15773
15792
  }).strict();
15774
15793
 
15775
15794
  // ../shared-contracts/dist/codex-accounts.js
@@ -16065,7 +16084,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16065
16084
  }
16066
16085
  });
16067
16086
  var updateEmptyParamsSchema = external_exports.strictObject({});
16068
- var githubReleaseNotesUrlSchema = external_exports.string().max(300).regex(/^https:\/\/github\.com\/LiberSeek\/BOFT-CLI\/releases\/tag\/v[0-9A-Za-z.+-]+$/u, "release notes URL must identify a codexhost GitHub Release");
16087
+ var githubReleaseNotesUrlSchema = external_exports.string().max(300).regex(/^https:\/\/github\.com\/(LiberSeek|LIBERSEEK)\/BOFT-CLI\/releases\/tag\/v[0-9A-Za-z.+-]+$/u, "release notes URL must identify a codexhost GitHub Release");
16069
16088
  var updateCheckResultSchema = external_exports.strictObject({
16070
16089
  currentVersion: updateSemanticVersionSchema,
16071
16090
  installation: updateInstallationSchema.nullable(),
@@ -17220,11 +17239,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17220
17239
  },
17221
17240
  "deepseek-harness": {
17222
17241
  url: "https://github.com/deepseek-ai/deepseek-harness#run",
17223
- // Must match the Adapter's exact supported range, not npm's latest tag.
17224
- commands: npm("@deepseek-ai/dsh@0.1.5-rc.1"),
17242
+ commands: npm("@deepseek-ai/dsh@latest"),
17225
17243
  before: [
17226
- "Requires Node.js. Installs the compatible version 0.1.5-rc.1.",
17227
- "\u9700\u5148\u5B89\u88C5 Node.js\u3002\u4E0B\u65B9\u547D\u4EE4\u5B89\u88C5\u517C\u5BB9\u7248\u672C 0.1.5-rc.1\u3002"
17244
+ "Requires Node.js. Installs npm's latest version; connection still requires native protocol validation.",
17245
+ "\u9700\u5148\u5B89\u88C5 Node.js\u3002\u5B89\u88C5 npm \u6700\u65B0\u7248\u672C\uFF1B\u8FDE\u63A5\u4ECD\u9700\u901A\u8FC7\u539F\u751F\u534F\u8BAE\u6821\u9A8C\u3002"
17228
17246
  ],
17229
17247
  after: [
17230
17248
  "Check again, then open Web UI to configure your provider. Stop any manually started dsh web first.",
@@ -17283,17 +17301,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17283
17301
  url: "https://www.workbuddy.ai/docs/workbuddy/Quickstart",
17284
17302
  commands: [],
17285
17303
  before: [
17286
- "Install the WorkBuddy desktop app. codexhost uses its bundled CLI, not the standalone CodeBuddy CLI.",
17287
- "\u8BF7\u5B89\u88C5 WorkBuddy \u684C\u9762\u5E94\u7528\u3002codexhost \u4F7F\u7528\u5E94\u7528\u5185\u7F6E CLI\uFF0C\u4E0D\u80FD\u7528 CodeBuddy CLI \u4EE3\u66FF\u3002"
17304
+ "Download and install the WorkBuddy desktop app.",
17305
+ "\u8BF7\u4E0B\u8F7D\u5E76\u5B89\u88C5 WorkBuddy \u684C\u9762\u5E94\u7528\u3002"
17288
17306
  ],
17289
17307
  downloads: [
17290
17308
  {
17291
- label: "macOS",
17292
- url: "https://www.workbuddy.ai/docs/workbuddy/From-Beginner-to-Expert-Guide/Installation-Mac-Guide"
17293
- },
17294
- {
17295
- label: "Windows",
17296
- url: "https://www.workbuddy.ai/docs/workbuddy/From-Beginner-to-Expert-Guide/Installation-Win-Guide"
17309
+ label: "WorkBuddy",
17310
+ url: "https://www.workbuddy.ai/"
17297
17311
  }
17298
17312
  ],
17299
17313
  after: [
@@ -17362,7 +17376,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17362
17376
  }
17363
17377
 
17364
17378
  // src/settings/harness-installation-panel.ts
17365
- function createHarnessInstallationPanel(document2, agent, hostId, messages, copy, refresh) {
17379
+ function createHarnessInstallationPanel(document2, agent, hostId, messages, copy, installation, refresh) {
17366
17380
  const zh = messages.locale === "zh-CN";
17367
17381
  const guide = harnessInstallationGuide(agent, messages.locale);
17368
17382
  const panel = document2.createElement("div");
@@ -17376,6 +17390,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17376
17390
  paragraph(zh ? "\u8BF7\u5728\u8FDC\u7A0B Host \u4E0A\u5B89\u88C5\u3002" : "Install on the remote Host.");
17377
17391
  }
17378
17392
  if (guide.before) paragraph(guide.before);
17393
+ const install2 = installation && guide.commands.length > 0 ? document2.createElement("button") : null;
17394
+ if (install2 && installation) {
17395
+ install2.type = "button";
17396
+ install2.className = "settings-command-button";
17397
+ install2.dataset.connectionAction = "install";
17398
+ install2.disabled = installation.status !== "idle";
17399
+ install2.textContent = installation.status === "installing" ? messages.connectionStatusInstalling : installation.status === "checking" ? messages.connectionStatusChecking : zh ? "\u4E00\u952E\u5B89\u88C5" : "Install automatically";
17400
+ install2.addEventListener("click", () => {
17401
+ if (install2.disabled) return;
17402
+ install2.disabled = true;
17403
+ install2.textContent = messages.connectionStatusInstalling;
17404
+ installation.run();
17405
+ });
17406
+ if (guide.commands.length > 1) panel.append(install2);
17407
+ }
17379
17408
  for (const { terminal, command } of guide.commands) {
17380
17409
  const block = document2.createElement("div");
17381
17410
  block.className = "settings-harness-installation-command";
@@ -17393,7 +17422,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17393
17422
  button.setAttribute("aria-label", `${copyLabel}: ${terminal}`);
17394
17423
  button.append(createRendererSettingsIcon("copy", 16), copyLabel);
17395
17424
  button.addEventListener("click", () => copy(button, command, copyLabel));
17396
- block.append(label, pre, button);
17425
+ const actions = document2.createElement("div");
17426
+ actions.className = "settings-harness-installation-actions";
17427
+ if (install2 && guide.commands.length === 1) actions.append(install2);
17428
+ actions.append(button);
17429
+ block.append(label, pre, actions);
17397
17430
  panel.append(block);
17398
17431
  }
17399
17432
  const link = (url2, label) => {
@@ -17412,21 +17445,81 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17412
17445
  );
17413
17446
  }
17414
17447
  paragraph(guide.after);
17415
- const check2 = document2.createElement("button");
17416
- check2.type = "button";
17417
- check2.className = "settings-command-button";
17418
- check2.dataset.connectionAction = "check-install";
17419
- check2.textContent = zh ? "\u91CD\u65B0\u68C0\u6D4B" : "Check again";
17420
- check2.addEventListener("click", () => {
17421
- check2.disabled = true;
17422
- check2.textContent = messages.connectionRefreshing;
17423
- refresh();
17424
- });
17425
- panel.append(check2);
17448
+ if (refresh) {
17449
+ const check2 = document2.createElement("button");
17450
+ check2.type = "button";
17451
+ check2.className = "settings-command-button";
17452
+ check2.dataset.connectionAction = "check-install";
17453
+ check2.textContent = zh ? "\u91CD\u65B0\u68C0\u6D4B" : "Check again";
17454
+ check2.addEventListener("click", () => {
17455
+ check2.disabled = true;
17456
+ check2.textContent = messages.connectionRefreshing;
17457
+ refresh();
17458
+ });
17459
+ panel.append(check2);
17460
+ }
17426
17461
  link(guide.url, zh ? "\u67E5\u770B\u5B98\u65B9\u5B89\u88C5\u8BF4\u660E" : "View official installation instructions");
17427
17462
  return panel;
17428
17463
  }
17429
17464
 
17465
+ // src/settings/harness-install-store.ts
17466
+ function errorMessage(error51) {
17467
+ return typeof error51 === "object" && error51 !== null && "message" in error51 && typeof error51.message === "string" ? error51.message.slice(0, 2048) : "Could not install the Harness. Check the official installation guide and retry.";
17468
+ }
17469
+ var stores = /* @__PURE__ */ new WeakMap();
17470
+ function createStore(diagnostics) {
17471
+ const states = /* @__PURE__ */ new Map();
17472
+ const listeners = /* @__PURE__ */ new Set();
17473
+ const key = (host, agent) => JSON.stringify([host, agent]);
17474
+ const notify = () => listeners.forEach((listener) => listener());
17475
+ return {
17476
+ get: (host, agent) => states.get(key(host, agent)),
17477
+ clearErrors() {
17478
+ for (const [id, state] of states) if (state.status === "error") states.delete(id);
17479
+ notify();
17480
+ },
17481
+ subscribe(listener) {
17482
+ listeners.add(listener);
17483
+ return () => {
17484
+ listeners.delete(listener);
17485
+ };
17486
+ },
17487
+ async install(host, agent) {
17488
+ const id = key(host, agent);
17489
+ const previous = states.get(id);
17490
+ if (!diagnostics.installation || previous && previous.status !== "error") return;
17491
+ states.set(id, { status: "installing" });
17492
+ notify();
17493
+ let failure;
17494
+ try {
17495
+ await diagnostics.installation(host, agent, "install");
17496
+ states.set(id, { status: "checking" });
17497
+ notify();
17498
+ } catch (error51) {
17499
+ failure = errorMessage(error51);
17500
+ }
17501
+ try {
17502
+ await diagnostics.refresh(host);
17503
+ const refreshed = diagnostics.snapshot().hosts.find((candidate) => candidate.hostId === host)?.agents.find((candidate) => candidate.agent === agent);
17504
+ if (refreshed?.availability === "ready") failure = void 0;
17505
+ } catch (error51) {
17506
+ failure ??= errorMessage(error51);
17507
+ }
17508
+ if (failure) states.set(id, { status: "error", error: failure });
17509
+ else states.delete(id);
17510
+ notify();
17511
+ }
17512
+ };
17513
+ }
17514
+ function harnessInstallStore(diagnostics) {
17515
+ let store = stores.get(diagnostics);
17516
+ if (!store) {
17517
+ store = createStore(diagnostics);
17518
+ stores.set(diagnostics, store);
17519
+ }
17520
+ return store;
17521
+ }
17522
+
17430
17523
  // src/settings/harness-launch-controls.ts
17431
17524
  function createHarnessLaunchControls(document2, messages, agent, settings) {
17432
17525
  const section = document2.createElement("section");
@@ -17504,6 +17597,210 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17504
17597
  return section;
17505
17598
  }
17506
17599
 
17600
+ // src/settings/claude-long-context-control.ts
17601
+ var CLAUDE_LONG_CONTEXT_MODELS = [{ id: "claude-opus-5-5", window: "1M" }];
17602
+ var tooltipSequence = 0;
17603
+ function popoverOpen(tooltip) {
17604
+ try {
17605
+ return tooltip.matches(":popover-open");
17606
+ } catch {
17607
+ return false;
17608
+ }
17609
+ }
17610
+ function createClaudeLongContextControl(document2, messages, actions) {
17611
+ const control = document2.createElement("span");
17612
+ control.className = "settings-connection-long-context";
17613
+ const label = document2.createElement("label");
17614
+ label.className = "settings-connection-long-context__control";
17615
+ const text = document2.createElement("span");
17616
+ text.textContent = messages.connectionLongContextLabel;
17617
+ const input = document2.createElement("input");
17618
+ input.type = "checkbox";
17619
+ input.checked = true;
17620
+ input.setAttribute("role", "switch");
17621
+ input.setAttribute("aria-checked", "true");
17622
+ input.setAttribute("aria-label", messages.connectionLongContextLabel);
17623
+ input.dataset.connectionAction = "long-context";
17624
+ const tooltip = document2.createElement("div");
17625
+ tooltip.id = `settings-long-context-tooltip-${++tooltipSequence}`;
17626
+ tooltip.className = "settings-connection-long-context__tooltip";
17627
+ tooltip.setAttribute("role", "tooltip");
17628
+ tooltip.setAttribute("popover", "manual");
17629
+ tooltip.hidden = true;
17630
+ const on = document2.createElement("p");
17631
+ on.textContent = messages.connectionLongContextOn;
17632
+ const off = document2.createElement("p");
17633
+ off.textContent = messages.connectionLongContextOff;
17634
+ const modelsLabel = document2.createElement("p");
17635
+ modelsLabel.textContent = messages.connectionLongContextModelsLabel;
17636
+ const models = document2.createElement("ul");
17637
+ for (const model of CLAUDE_LONG_CONTEXT_MODELS) {
17638
+ const item = document2.createElement("li");
17639
+ item.textContent = `${model.id} (${model.window})`;
17640
+ models.append(item);
17641
+ }
17642
+ tooltip.append(on, off, modelsLabel, models);
17643
+ input.setAttribute("aria-describedby", tooltip.id);
17644
+ const stop = (event) => {
17645
+ event.stopPropagation();
17646
+ };
17647
+ control.addEventListener("click", stop);
17648
+ label.addEventListener("click", stop);
17649
+ input.addEventListener("click", stop);
17650
+ let surfaceReady = false;
17651
+ const applyTooltipSurface = () => {
17652
+ if (surfaceReady) return;
17653
+ const probe = document2.createElement("span");
17654
+ probe.style.cssText = "position:absolute;visibility:hidden;color:var(--settings-text);background-color:var(--settings-elevated);border-top-color:var(--settings-border)";
17655
+ control.append(probe);
17656
+ const computed = document2.defaultView?.getComputedStyle(probe);
17657
+ const color = computed?.color;
17658
+ const background = computed?.backgroundColor;
17659
+ const borderColor = computed?.borderTopColor;
17660
+ probe.remove();
17661
+ if (color) tooltip.style.color = color;
17662
+ if (background && background !== "rgba(0, 0, 0, 0)") tooltip.style.backgroundColor = background;
17663
+ if (borderColor) tooltip.style.border = `1px solid ${borderColor}`;
17664
+ surfaceReady = true;
17665
+ };
17666
+ const showTooltip = () => {
17667
+ const root = control.getRootNode();
17668
+ const host = root instanceof ShadowRoot ? root : document2.body ?? control;
17669
+ if (tooltip.parentNode !== host) host.append(tooltip);
17670
+ applyTooltipSurface();
17671
+ tooltip.hidden = false;
17672
+ if (typeof tooltip.showPopover === "function" && !popoverOpen(tooltip)) {
17673
+ try {
17674
+ tooltip.showPopover();
17675
+ } catch {
17676
+ tooltip.removeAttribute("popover");
17677
+ }
17678
+ }
17679
+ tooltip.style.position = "fixed";
17680
+ tooltip.style.inset = "auto";
17681
+ tooltip.style.zIndex = "80";
17682
+ tooltip.style.margin = "0";
17683
+ tooltip.style.height = "auto";
17684
+ tooltip.style.overflow = "visible";
17685
+ const rect = control.getBoundingClientRect();
17686
+ const margin = 8;
17687
+ const width = Math.min(280, Math.max(160, window.innerWidth - margin * 2));
17688
+ tooltip.style.width = `${width}px`;
17689
+ const preferredLeft = Math.min(
17690
+ Math.max(margin, rect.right - width),
17691
+ window.innerWidth - width - margin
17692
+ );
17693
+ const height = tooltip.offsetHeight;
17694
+ const below = rect.bottom + 8;
17695
+ const preferredTop = below + height <= window.innerHeight - margin ? below : Math.max(margin, rect.top - height - 8);
17696
+ tooltip.style.left = `${preferredLeft}px`;
17697
+ tooltip.style.top = `${preferredTop}px`;
17698
+ const placed = tooltip.getBoundingClientRect();
17699
+ const shiftX = preferredLeft - placed.left;
17700
+ const shiftY = preferredTop - placed.top;
17701
+ if (Math.abs(shiftX) > 0.5 || Math.abs(shiftY) > 0.5) {
17702
+ tooltip.style.left = `${preferredLeft + shiftX}px`;
17703
+ tooltip.style.top = `${preferredTop + shiftY}px`;
17704
+ }
17705
+ };
17706
+ const hideTooltip = () => {
17707
+ if (typeof tooltip.hidePopover === "function" && popoverOpen(tooltip)) {
17708
+ try {
17709
+ tooltip.hidePopover();
17710
+ } catch {
17711
+ }
17712
+ }
17713
+ tooltip.hidden = true;
17714
+ };
17715
+ control.addEventListener("mouseenter", showTooltip);
17716
+ control.addEventListener("mouseleave", hideTooltip);
17717
+ control.addEventListener("focusin", showTooltip);
17718
+ control.addEventListener("focusout", (event) => {
17719
+ const next = event.relatedTarget;
17720
+ if (next instanceof Node && control.contains(next)) return;
17721
+ hideTooltip();
17722
+ });
17723
+ let generation = 0;
17724
+ input.addEventListener("change", () => {
17725
+ const next = input.checked;
17726
+ generation += 1;
17727
+ const request = generation;
17728
+ input.disabled = true;
17729
+ input.setAttribute("aria-checked", String(next));
17730
+ void actions.set(next).then(
17731
+ (result) => {
17732
+ if (request !== generation) return;
17733
+ input.checked = result.enabled;
17734
+ input.setAttribute("aria-checked", String(result.enabled));
17735
+ input.disabled = false;
17736
+ },
17737
+ () => {
17738
+ if (request !== generation) return;
17739
+ input.checked = !next;
17740
+ input.setAttribute("aria-checked", String(!next));
17741
+ input.disabled = false;
17742
+ }
17743
+ );
17744
+ });
17745
+ void actions.get().then(
17746
+ (result) => {
17747
+ if (generation !== 0) return;
17748
+ input.checked = result.enabled;
17749
+ input.setAttribute("aria-checked", String(result.enabled));
17750
+ },
17751
+ () => void 0
17752
+ );
17753
+ label.append(text, input);
17754
+ control.append(label, tooltip);
17755
+ return control;
17756
+ }
17757
+
17758
+ // src/settings/harness-version-messages.ts
17759
+ var harnessVersionEnglish = Object.freeze({
17760
+ unknown: "Unknown",
17761
+ trackingBranch: "Tracking branch (new commits)",
17762
+ notes: Object.freeze({
17763
+ "original-installer": "Use the original installer, package manager, or launcher to update this installation.",
17764
+ "claude-policy-restricted": "Claude updates are restricted by the installation's settings or policy.",
17765
+ "codebuddy-npm-required": "Use CodeBuddy's native updater or original package manager. Latest-version checks here require an identified npm installation.",
17766
+ "deepseek-original-installer": "Update with the original installer. Python, desktop, and project-local installations are not upgraded through global npm.",
17767
+ "kiro-native-updater": "Use Kiro CLI's original installer or native updater to check for and install updates.",
17768
+ "qoder-check-unavailable": "This Qoder China release does not expose a non-installing update check. Use its original installer.",
17769
+ "hermes-update-plan-unavailable": "This Hermes release does not expose a safe update plan. Use the original installer.",
17770
+ "hermes-externally-managed": "This Hermes installation is managed externally. Update it through its desktop app, container, or original package manager.",
17771
+ "hermes-update-channel": "Uses Hermes's configured update channel. Gateway restarts are deferred; existing processes keep their running code.",
17772
+ "hermes-manual-update": "Use the native updater manually. Safe non-interactive updates require a clean source checkout, commit identity, and Gateway restart deferral."
17773
+ })
17774
+ });
17775
+ var harnessVersionChinese = Object.freeze({
17776
+ unknown: "\u672A\u77E5",
17777
+ trackingBranch: "\u8DDF\u8E2A\u5206\u652F\uFF08\u6709\u65B0\u63D0\u4EA4\uFF09",
17778
+ notes: Object.freeze({
17779
+ "original-installer": "\u8BF7\u4F7F\u7528\u539F\u5B89\u88C5\u7A0B\u5E8F\u3001\u5305\u7BA1\u7406\u5668\u6216\u542F\u52A8\u5668\u66F4\u65B0\u6B64\u5B89\u88C5\u3002",
17780
+ "claude-policy-restricted": "\u6B64 Claude \u5B89\u88C5\u7684\u8BBE\u7F6E\u6216\u7B56\u7565\u9650\u5236\u4E86\u66F4\u65B0\u3002",
17781
+ "codebuddy-npm-required": "\u8BF7\u4F7F\u7528 CodeBuddy \u539F\u751F\u66F4\u65B0\u5668\u6216\u539F\u5305\u7BA1\u7406\u5668\u66F4\u65B0\u3002\u6B64\u5904\u4EC5\u80FD\u67E5\u8BE2\u5DF2\u8BC6\u522B\u7684 npm \u5B89\u88C5\u7684\u6700\u65B0\u7248\u672C\u3002",
17782
+ "deepseek-original-installer": "\u8BF7\u4F7F\u7528\u539F\u5B89\u88C5\u65B9\u5F0F\u66F4\u65B0\u3002Python\u3001\u684C\u9762\u5E94\u7528\u53CA\u9879\u76EE\u5185\u5B89\u88C5\u4E0D\u4F1A\u901A\u8FC7\u5168\u5C40 npm \u66F4\u65B0\u3002",
17783
+ "kiro-native-updater": "\u8BF7\u4F7F\u7528 Kiro CLI \u539F\u5B89\u88C5\u7A0B\u5E8F\u6216\u539F\u751F\u66F4\u65B0\u5668\u68C0\u67E5\u5E76\u5B89\u88C5\u66F4\u65B0\u3002",
17784
+ "qoder-check-unavailable": "\u6B64 Qoder \u4E2D\u56FD\u7248\u5C1A\u4E0D\u652F\u6301\u53EA\u68C0\u67E5\u3001\u4E0D\u5B89\u88C5\u7684\u66F4\u65B0\u67E5\u8BE2\uFF0C\u8BF7\u4F7F\u7528\u539F\u5B89\u88C5\u65B9\u5F0F\u66F4\u65B0\u3002",
17785
+ "hermes-update-plan-unavailable": "\u6B64 Hermes \u7248\u672C\u4E0D\u63D0\u4F9B\u5B89\u5168\u7684\u66F4\u65B0\u8BA1\u5212\uFF0C\u8BF7\u4F7F\u7528\u539F\u5B89\u88C5\u65B9\u5F0F\u66F4\u65B0\u3002",
17786
+ "hermes-externally-managed": "\u6B64 Hermes \u5B89\u88C5\u7531\u5916\u90E8\u5DE5\u5177\u7BA1\u7406\uFF0C\u8BF7\u901A\u8FC7\u5176\u684C\u9762\u5E94\u7528\u3001\u5BB9\u5668\u6216\u539F\u5305\u7BA1\u7406\u5668\u66F4\u65B0\u3002",
17787
+ "hermes-update-channel": "\u4F7F\u7528 Hermes \u914D\u7F6E\u7684\u66F4\u65B0\u6E20\u9053\uFF0C\u6682\u4E0D\u91CD\u542F Gateway\uFF1B\u73B0\u6709\u8FDB\u7A0B\u7EE7\u7EED\u8FD0\u884C\u539F\u6709\u4EE3\u7801\u3002",
17788
+ "hermes-manual-update": "\u8BF7\u624B\u52A8\u4F7F\u7528\u539F\u751F\u66F4\u65B0\u5668\u3002\u5B89\u5168\u7684\u975E\u4EA4\u4E92\u66F4\u65B0\u8981\u6C42\u6E90\u7801\u76EE\u5F55\u65E0\u672A\u63D0\u4EA4\u4FEE\u6539\u3001\u53EF\u8BC6\u522B\u5F53\u524D\u63D0\u4EA4\uFF0C\u5E76\u652F\u6301\u63A8\u8FDF Gateway \u91CD\u542F\u3002"
17789
+ })
17790
+ });
17791
+ function harnessVersionLabel(state, messages) {
17792
+ if (!state) return "\u2014";
17793
+ if (state.latestVersionKind === "unknown" || state.latestVersion === "Unknown")
17794
+ return messages.unknown;
17795
+ if (state.latestVersionKind === "tracking-branch" || state.latestVersion === "Tracking branch (new commits)")
17796
+ return messages.trackingBranch;
17797
+ return state.latestVersion;
17798
+ }
17799
+ function harnessVersionNote(state, messages) {
17800
+ const code = state?.messageCode;
17801
+ return code && Object.hasOwn(messages.notes, code) ? messages.notes[code] : void 0;
17802
+ }
17803
+
17507
17804
  // src/settings/harness-version-panel.ts
17508
17805
  function createHarnessVersionPanel(document2, messages, signal, agent, client) {
17509
17806
  const panel = document2.createElement("section");
@@ -17524,29 +17821,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17524
17821
  update.type = "button";
17525
17822
  update.className = "settings-command-button settings-command-button--secondary";
17526
17823
  update.dataset.harnessVersionAction = "update";
17527
- const guide = document2.createElement("a");
17528
- guide.className = update.className;
17529
- guide.href = harnessInstallationGuide(agent, messages.locale).url;
17530
- guide.target = "_blank";
17531
- guide.rel = "noopener noreferrer";
17532
- guide.append(
17533
- messages.connectionOpenInstallation,
17534
- createRendererSettingsIcon("external-link", 14)
17535
- );
17536
17824
  const note = document2.createElement("p");
17537
17825
  note.className = "settings-connection-issue-note";
17538
17826
  note.textContent = messages.harnessVersionNote;
17539
- actions.append(update, guide);
17827
+ actions.append(update);
17540
17828
  panel.append(heading, versions, status, actions, note);
17541
17829
  let state;
17542
17830
  let busy = false;
17543
17831
  let unsupported = false;
17544
17832
  const render = () => {
17545
17833
  current.textContent = `${messages.harnessVersionCurrent}: ${state?.currentVersion ?? "\u2014"}`;
17546
- latest.textContent = `${messages.harnessVersionLatest}: ${state?.latestVersion ?? "\u2014"}`;
17834
+ latest.textContent = `${messages.harnessVersionLatest}: ${harnessVersionLabel(state, messages.harnessVersion)}`;
17547
17835
  update.disabled = busy || signal.aborted || !state?.canUpdate || !state.updateAvailable;
17548
17836
  update.textContent = state?.canUpdate && state.latestVersion !== "Unknown" && !state.updateAvailable ? messages.harnessVersionUpToDate : messages.harnessVersionUpdate;
17549
- note.textContent = state?.message ? `${state.message} ${messages.harnessVersionNote}` : messages.harnessVersionNote;
17837
+ const detail = harnessVersionNote(state, messages.harnessVersion);
17838
+ note.textContent = detail ? `${detail} ${messages.harnessVersionNote}` : messages.harnessVersionNote;
17550
17839
  };
17551
17840
  const run = async (action) => {
17552
17841
  if (busy || unsupported || signal.aborted) return;
@@ -17614,16 +17903,6 @@ ${error51.stderrTail}`] : []
17614
17903
  ] : []
17615
17904
  ].join("\n");
17616
17905
  }
17617
- function detailLine(document2, label, value) {
17618
- const line = document2.createElement("div");
17619
- line.className = "settings-connection-detail-line";
17620
- const name = document2.createElement("span");
17621
- name.textContent = label;
17622
- const content = document2.createElement("code");
17623
- content.textContent = value;
17624
- line.append(name, content);
17625
- return line;
17626
- }
17627
17906
  function setActionButtonLabel(button, icon2, label) {
17628
17907
  button.replaceChildren(createRendererSettingsIcon(icon2, 16), label);
17629
17908
  }
@@ -17815,30 +18094,15 @@ ${error51.stderrTail}`] : []
17815
18094
  }
17816
18095
  return body;
17817
18096
  }
18097
+ const needsLogin = item.error.code === "authenticationRequired";
18098
+ const needsConfiguration = item.error.code === "configurationRequired";
17818
18099
  const summary = document2.createElement("div");
17819
18100
  summary.className = "settings-connection-error-summary";
17820
18101
  const title = document2.createElement("strong");
17821
- title.textContent = messages.connectionErrorTitle;
18102
+ title.textContent = needsLogin ? messages.connectionLoginRequired : needsConfiguration ? messages.connectionConfigurationRequired : messages.connectionErrorTitle;
17822
18103
  const description = document2.createElement("p");
17823
- description.textContent = item.error.message;
18104
+ description.textContent = needsLogin ? messages.connectionLoginDescription : needsConfiguration ? messages.connectionConfigurationDescription : item.error.message;
17824
18105
  summary.append(title, description);
17825
- const metadata = document2.createElement("div");
17826
- metadata.className = "settings-connection-error-metadata";
17827
- metadata.append(
17828
- detailLine(document2, messages.connectionErrorCode, item.error.code),
17829
- detailLine(document2, messages.connectionRetryable, String(item.error.retryable))
17830
- );
17831
- if (item.error.stage) {
17832
- metadata.append(detailLine(document2, messages.connectionFailureStage, item.error.stage));
17833
- }
17834
- if (item.error.durationMs !== void 0) {
17835
- metadata.append(
17836
- detailLine(document2, messages.connectionDuration, `${item.error.durationMs} ms`)
17837
- );
17838
- }
17839
- if (item.error.diagnostic) {
17840
- metadata.append(detailLine(document2, messages.connectionDiagnostic, item.error.diagnostic));
17841
- }
17842
18106
  const logHeader = document2.createElement("div");
17843
18107
  logHeader.className = "settings-connection-error-log-header";
17844
18108
  const logTitle = document2.createElement("strong");
@@ -17854,7 +18118,7 @@ ${error51.stderrTail}`] : []
17854
18118
  logHeader.append(logTitle, copy);
17855
18119
  const log = document2.createElement("pre");
17856
18120
  log.className = "settings-connection-stderr";
17857
- log.textContent = item.error.stderrTail ?? item.error.diagnostic ?? report;
18121
+ log.textContent = report;
17858
18122
  const actions = document2.createElement("div");
17859
18123
  actions.className = "settings-connection-error-actions";
17860
18124
  const issue2 = document2.createElement("a");
@@ -17867,10 +18131,10 @@ ${error51.stderrTail}`] : []
17867
18131
  const issueNote = document2.createElement("p");
17868
18132
  issueNote.className = "settings-connection-issue-note";
17869
18133
  issueNote.textContent = messages.connectionIssueDescription;
17870
- body.append(summary, metadata, logHeader, log, actions, issueNote);
18134
+ body.append(summary, logHeader, log, actions, issueNote);
17871
18135
  return body;
17872
18136
  }
17873
- function createConnectionBlock(document2, item, hostId, messages, expanded, toggleExpand, group = null, launchControls = null, versionCapable = false, detailNodes = []) {
18137
+ function createConnectionBlock(document2, item, hostId, messages, expanded, toggleExpand, group = null, launchControls = null, versionCapable = false, detailNodes = [], longContext = null) {
17874
18138
  const block = document2.createElement("div");
17875
18139
  block.className = "settings-connection-block";
17876
18140
  block.dataset.connectionItem = item.key;
@@ -17898,7 +18162,7 @@ ${error51.stderrTail}`] : []
17898
18162
  status.className = "settings-connection-row__status";
17899
18163
  status.dataset.connectionTone = connectionStatusTone(item.availability, item.error !== null);
17900
18164
  status.setAttribute("role", "cell");
17901
- status.textContent = connectionStatusLabel(item.availability, messages, item.error !== null);
18165
+ status.textContent = item.error?.code === "authenticationRequired" ? messages.connectionLoginRequired : item.error?.code === "configurationRequired" ? messages.connectionConfigurationRequired : connectionStatusLabel(item.availability, messages, item.error !== null);
17902
18166
  const action = document2.createElement("div");
17903
18167
  action.className = "settings-connection-row__action";
17904
18168
  action.setAttribute("role", "cell");
@@ -17929,6 +18193,7 @@ ${error51.stderrTail}`] : []
17929
18193
  });
17930
18194
  action.append(viewError);
17931
18195
  }
18196
+ if (longContext) action.append(longContext);
17932
18197
  if (group) {
17933
18198
  const toggle = document2.createElement("button");
17934
18199
  toggle.type = "button";
@@ -17947,6 +18212,8 @@ ${error51.stderrTail}`] : []
17947
18212
  }
17948
18213
  row.addEventListener("keydown", (event) => {
17949
18214
  if (event.key !== "Enter" && event.key !== " ") return;
18215
+ const keyTarget = event.target;
18216
+ if (keyTarget?.closest?.("a, button, label, input")) return;
17950
18217
  if (!canExpand) return;
17951
18218
  event.preventDefault();
17952
18219
  toggleExpand();
@@ -17970,7 +18237,7 @@ ${error51.stderrTail}`] : []
17970
18237
  }
17971
18238
  block.addEventListener("click", (event) => {
17972
18239
  const target = event.target;
17973
- if (target?.closest?.("a, button")) return;
18240
+ if (target?.closest?.("a, button, label, input")) return;
17974
18241
  if (!canExpand) return;
17975
18242
  toggleExpand();
17976
18243
  });
@@ -18053,6 +18320,7 @@ ${error51.stderrTail}`] : []
18053
18320
  let latestSnapshot = null;
18054
18321
  let launchControls = null;
18055
18322
  const versionPanels = /* @__PURE__ */ new Map();
18323
+ const longContextControls = /* @__PURE__ */ new Map();
18056
18324
  const launchControlsFor = (hostId, item) => {
18057
18325
  const getLaunchSettings = diagnostics?.getLaunchSettings;
18058
18326
  const setLaunchSettings = diagnostics?.setLaunchSettings;
@@ -18069,7 +18337,26 @@ ${error51.stderrTail}`] : []
18069
18337
  launchControls = { hostId, itemKey: item.key, element };
18070
18338
  return element;
18071
18339
  };
18340
+ const longContextControlFor = (hostId, item) => {
18341
+ const agent = item.agentSnapshot?.agent;
18342
+ const availability = item.agentSnapshot?.availability;
18343
+ const getLongContext = diagnostics?.getLongContext;
18344
+ const setLongContext = diagnostics?.setLongContext;
18345
+ if (agent !== "claude-code" || availability === "notInstalled" || availability === "checking" || !getLongContext || !setLongContext) {
18346
+ return null;
18347
+ }
18348
+ const key = JSON.stringify([hostId, agent]);
18349
+ const cached2 = longContextControls.get(key);
18350
+ if (cached2) return cached2;
18351
+ const element = createClaudeLongContextControl(document2, messages, {
18352
+ get: () => getLongContext(hostId, agent),
18353
+ set: (enabled) => setLongContext(hostId, agent, enabled)
18354
+ });
18355
+ longContextControls.set(key, element);
18356
+ return element;
18357
+ };
18072
18358
  const diagnostics = getDiagnostics();
18359
+ const installs = diagnostics ? harnessInstallStore(diagnostics) : null;
18073
18360
  const runRefresh = () => {
18074
18361
  if (pending || !diagnostics) return;
18075
18362
  pending = true;
@@ -18080,6 +18367,7 @@ ${error51.stderrTail}`] : []
18080
18367
  );
18081
18368
  void context.runLatest(() => diagnostics.refresh(), {
18082
18369
  success() {
18370
+ installs?.clearErrors();
18083
18371
  pending = false;
18084
18372
  refresh.disabled = false;
18085
18373
  refresh.replaceChildren(
@@ -18181,6 +18469,9 @@ ${error51.stderrTail}`] : []
18181
18469
  const nodes = [];
18182
18470
  const agent = item.agentSnapshot?.agent;
18183
18471
  if (expanded && agent && item.availability === "notInstalled") {
18472
+ const installState = installs?.get(selectedHost.hostId, agent);
18473
+ const canInstall = selectedHost.hostId === "local" && agent !== "workbuddy" && diagnostics?.installation !== void 0;
18474
+ const installStatus = installState?.status === "installing" || installState?.status === "checking" ? installState.status : "idle";
18184
18475
  nodes.push(
18185
18476
  createHarnessInstallationPanel(
18186
18477
  document2,
@@ -18188,9 +18479,27 @@ ${error51.stderrTail}`] : []
18188
18479
  selectedHost.hostId,
18189
18480
  messages,
18190
18481
  (button, command, label) => copyTextToClipboard(document2, button, command, messages, label),
18482
+ canInstall ? {
18483
+ run: () => {
18484
+ void installs?.install(selectedHost.hostId, agent);
18485
+ },
18486
+ status: installStatus
18487
+ } : void 0,
18191
18488
  runRefresh
18192
18489
  )
18193
18490
  );
18491
+ if (canInstall && installState?.error) {
18492
+ const error51 = document2.createElement("p");
18493
+ error51.className = "settings-connection-install-error";
18494
+ error51.setAttribute("role", "alert");
18495
+ error51.textContent = installState.error;
18496
+ nodes.push(error51);
18497
+ }
18498
+ if (canInstall && installStatus !== "idle") {
18499
+ const note = document2.createElement("p");
18500
+ note.textContent = messages.connectionInstallRunning;
18501
+ nodes.push(note);
18502
+ }
18194
18503
  }
18195
18504
  const installation = diagnostics?.installation?.bind(diagnostics);
18196
18505
  const versionCapable = Boolean(
@@ -18351,7 +18660,8 @@ ${error51.stderrTail}`] : []
18351
18660
  createGroupController(agent, section),
18352
18661
  launchControlsFor(selectedHost.hostId, item),
18353
18662
  supplements.versionCapable,
18354
- supplements.nodes
18663
+ supplements.nodes,
18664
+ longContextControlFor(selectedHost.hostId, item)
18355
18665
  );
18356
18666
  rowElements.set(item.key, row);
18357
18667
  rows.append(block);
@@ -18426,7 +18736,8 @@ ${error51.stderrTail}`] : []
18426
18736
  createGroupController(entry.agent, "more"),
18427
18737
  launchControlsFor(selectedHost.hostId, item),
18428
18738
  supplements.versionCapable,
18429
- supplements.nodes
18739
+ supplements.nodes,
18740
+ longContextControlFor(selectedHost.hostId, item)
18430
18741
  );
18431
18742
  rowElements.set(item.key, row);
18432
18743
  zone.append(block);
@@ -18446,10 +18757,14 @@ ${error51.stderrTail}`] : []
18446
18757
  const unsubscribeGroup = groupPreference.subscribe(
18447
18758
  () => render(diagnostics?.snapshot() ?? latestSnapshot)
18448
18759
  );
18760
+ const unsubscribeInstalls = installs?.subscribe(
18761
+ () => render(diagnostics?.snapshot() ?? latestSnapshot)
18762
+ );
18449
18763
  if (!diagnostics) {
18450
18764
  refresh.disabled = true;
18451
18765
  return () => {
18452
18766
  unsubscribeGroup();
18767
+ unsubscribeInstalls?.();
18453
18768
  };
18454
18769
  }
18455
18770
  refresh.addEventListener("click", runRefresh);
@@ -18457,6 +18772,7 @@ ${error51.stderrTail}`] : []
18457
18772
  return () => {
18458
18773
  unsubscribe();
18459
18774
  unsubscribeGroup();
18775
+ unsubscribeInstalls?.();
18460
18776
  };
18461
18777
  }
18462
18778
  });
@@ -18674,19 +18990,20 @@ ${error51.stderrTail}`] : []
18674
18990
  connectionCopyDetails: "Copy diagnostics",
18675
18991
  connectionCopied: "Copied",
18676
18992
  connectionCopyFailed: "Copy failed",
18677
- connectionErrorCode: "Error code",
18678
18993
  connectionErrorMessage: "Error message",
18679
- connectionRetryable: "Retryable",
18680
- connectionFailureStage: "Failure stage",
18681
- connectionDuration: "Duration",
18682
- connectionDiagnostic: "Diagnostic",
18683
18994
  connectionNoRuntime: "The renderer request bridge is not available yet.",
18684
18995
  connectionStatusReady: "Ready",
18996
+ connectionStatusConnected: "Connected",
18997
+ connectionLoginRequired: "Login required",
18998
+ connectionConfigurationRequired: "Setup required",
18999
+ connectionConfigurationDescription: "Configure a Provider and its required credentials in this Harness on the selected Host, then check the connection again.",
19000
+ connectionLoginDescription: "Complete login or authentication setup in this Harness on the selected Host, then check the connection again.",
18685
19001
  connectionStatusChecking: "Checking",
18686
19002
  connectionStatusNotInstalled: "Not installed",
18687
19003
  connectionStatusUnavailable: "Unavailable",
18688
19004
  connectionStatusError: "Error",
18689
19005
  connectionStatusInstalling: "Installing",
19006
+ connectionStatusUpdating: "Updating",
18690
19007
  connectionStatusUnsupported: "Unsupported",
18691
19008
  connectionComponent: "Component",
18692
19009
  connectionStatus: "Status",
@@ -18705,14 +19022,21 @@ ${error51.stderrTail}`] : []
18705
19022
  launchPathLoading: "Loading launch settings\u2026",
18706
19023
  launchPathLoadError: "Could not load launch settings. Reopen this detail panel to retry.",
18707
19024
  launchPathSaveError: "Could not save. Enter an existing absolute installation folder on this Host and check configuration permissions.",
19025
+ connectionOfficialWebsite: "Visit official website",
18708
19026
  connectionOpenInstallation: "Open official installation page",
18709
19027
  connectionOpenHarnessWeb: "Open DeepSeek Harness Web",
18710
- connectionDeepSeekTestedVersions: "Supported DSH versions: 0.1.2-rc.1, 0.1.5-rc.1, 0.1.5-rc.2, 0.1.5-rc.3, 0.1.7-rc.1 and 0.1.7-rc.2. Other versions may connect after native protocol checks, but are not listed as supported.",
19028
+ connectionDeepSeekTestedVersions: "Supported DSH versions: 0.1.7-rc.1, 0.1.7-rc.2, 0.2.0-rc.1 and 0.2.0-rc.2. Versions newer than 0.2.0-rc.2 can be tried, but compatibility may be limited; versions older than 0.1.7-rc.1 must be upgraded first.",
18711
19029
  connectionInstall: "Install",
19030
+ connectionLongContextLabel: "1M",
19031
+ connectionLongContextOn: "On: Claude models use a 1M context window. Claude CLI uses that larger window locally.",
19032
+ connectionLongContextOff: "Off: Claude models use the 200k window.",
19033
+ connectionLongContextModelsLabel: "Models:",
18712
19034
  connectionInstallDescription: "This Harness was not detected. Copy the official install command, copy an install prompt for another Agent, or open the official installation page. After installing, return here and run the check again.",
18713
19035
  connectionInstallCommand: "Install command",
18714
19036
  connectionCopyPrompt: "Copy prompt",
18715
19037
  connectionInstallPrompt: "Please install {name} (CLI command: {binary}) on this machine.\n\nUse the official install method and run:\n{command}\n\nOfficial installation page: {url}\n\nAfter installation, verify that `{binary}` is available in the terminal and report the result.",
19038
+ connectionInstallRunning: "Installing on the selected Host. You can leave this page; login or setup may still be required afterward.",
19039
+ harnessVersion: harnessVersionEnglish,
18716
19040
  harnessVersionTitle: "Harness CLI version",
18717
19041
  harnessVersionCurrent: "Current version",
18718
19042
  harnessVersionLatest: "Latest version",
@@ -18968,19 +19292,20 @@ ${error51.stderrTail}`] : []
18968
19292
  connectionCopyDetails: "\u590D\u5236\u8BCA\u65AD\u4FE1\u606F",
18969
19293
  connectionCopied: "\u5DF2\u590D\u5236",
18970
19294
  connectionCopyFailed: "\u590D\u5236\u5931\u8D25",
18971
- connectionErrorCode: "\u9519\u8BEF\u7801",
18972
19295
  connectionErrorMessage: "\u9519\u8BEF\u4FE1\u606F",
18973
- connectionRetryable: "\u53EF\u91CD\u8BD5",
18974
- connectionFailureStage: "\u5931\u8D25\u9636\u6BB5",
18975
- connectionDuration: "\u68C0\u67E5\u8017\u65F6",
18976
- connectionDiagnostic: "\u8BCA\u65AD\u4FE1\u606F",
18977
19296
  connectionNoRuntime: "Renderer \u8BF7\u6C42\u6865\u5C1A\u672A\u53EF\u7528\u3002",
18978
19297
  connectionStatusReady: "\u6B63\u5E38",
19298
+ connectionStatusConnected: "\u5DF2\u8FDE\u63A5",
19299
+ connectionLoginRequired: "\u9700\u8981\u767B\u5F55",
19300
+ connectionConfigurationRequired: "\u9700\u8981\u914D\u7F6E",
19301
+ connectionConfigurationDescription: "\u8BF7\u5728\u6240\u9009 Host \u4E0A\u914D\u7F6E\u8BE5 Harness \u7684 Provider \u53CA\u6240\u9700\u8BA4\u8BC1\u4FE1\u606F\uFF0C\u7136\u540E\u91CD\u65B0\u68C0\u6D4B\u8FDE\u63A5\u3002",
19302
+ connectionLoginDescription: "\u8BF7\u5728\u6240\u9009 Host \u4E0A\u5B8C\u6210\u8BE5 Harness \u7684\u767B\u5F55\u6216\u8BA4\u8BC1\u914D\u7F6E\uFF0C\u7136\u540E\u91CD\u65B0\u68C0\u6D4B\u8FDE\u63A5\u3002",
18979
19303
  connectionStatusChecking: "\u68C0\u67E5\u4E2D",
18980
19304
  connectionStatusNotInstalled: "\u672A\u5B89\u88C5",
18981
19305
  connectionStatusUnavailable: "\u4E0D\u53EF\u7528",
18982
19306
  connectionStatusError: "\u9519\u8BEF",
18983
19307
  connectionStatusInstalling: "\u5B89\u88C5\u4E2D",
19308
+ connectionStatusUpdating: "\u66F4\u65B0\u4E2D",
18984
19309
  connectionStatusUnsupported: "\u4E0D\u652F\u6301",
18985
19310
  connectionComponent: "\u7EC4\u4EF6",
18986
19311
  connectionStatus: "\u72B6\u6001",
@@ -18999,14 +19324,21 @@ ${error51.stderrTail}`] : []
18999
19324
  launchPathLoading: "\u6B63\u5728\u8BFB\u53D6\u542F\u52A8\u8BBE\u7F6E\u2026",
19000
19325
  launchPathLoadError: "\u65E0\u6CD5\u8BFB\u53D6\u542F\u52A8\u8BBE\u7F6E\uFF0C\u8BF7\u91CD\u65B0\u6253\u5F00\u6B64\u8BE6\u60C5\u9762\u677F\u91CD\u8BD5\u3002",
19001
19326
  launchPathSaveError: "\u4FDD\u5B58\u5931\u8D25\u3002\u8BF7\u586B\u5199\u6B64 Host \u4E0A\u5B9E\u9645\u5B58\u5728\u7684\u5B89\u88C5\u76EE\u5F55\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u5E76\u786E\u8BA4\u914D\u7F6E\u76EE\u5F55\u53EF\u5199\u3002",
19327
+ connectionOfficialWebsite: "\u8BBF\u95EE\u5B98\u7F51",
19002
19328
  connectionOpenInstallation: "\u524D\u5F80\u5B98\u65B9\u5B89\u88C5\u9875\u9762",
19003
19329
  connectionOpenHarnessWeb: "\u6253\u5F00 DeepSeek Harness Web",
19004
- connectionDeepSeekTestedVersions: "\u652F\u6301 DSH \u7248\u672C\uFF1A0.1.2-rc.1\u30010.1.5-rc.1\u30010.1.5-rc.2\u30010.1.5-rc.3\u30010.1.7-rc.1 \u548C 0.1.7-rc.2\u3002\u5176\u4ED6\u7248\u672C\u53EF\u4EE5\u5728\u901A\u8FC7\u539F\u751F\u534F\u8BAE\u68C0\u67E5\u540E\u5C1D\u8BD5\u8FDE\u63A5\uFF0C\u4F46\u5C1A\u672A\u5217\u5165\u652F\u6301\u5217\u8868\u3002",
19330
+ connectionDeepSeekTestedVersions: "\u652F\u6301 DSH \u7248\u672C\uFF1A0.1.7-rc.1\u30010.1.7-rc.2\u30010.2.0-rc.1 \u548C 0.2.0-rc.2\u3002\u9AD8\u4E8E 0.2.0-rc.2 \u7684\u7248\u672C\u53EF\u4EE5\u5C1D\u8BD5\u8FDE\u63A5\uFF0C\u4F46\u9002\u914D\u5EA6\u53EF\u80FD\u6709\u9650\uFF1B\u4F4E\u4E8E 0.1.7-rc.1 \u7684\u7248\u672C\u9700\u8981\u5148\u5347\u7EA7\u3002",
19005
19331
  connectionInstall: "\u5B89\u88C5",
19332
+ connectionLongContextLabel: "1M",
19333
+ connectionLongContextOn: "\u5F00\u542F\u540E: Claude \u6A21\u578B\u4F7F\u7528 1M \u4E0A\u4E0B\u6587\u3002Claude CLI \u4F1A\u5728\u672C\u5730\u6309\u8FD9\u4E2A\u66F4\u5927\u7684\u7A97\u53E3\u5DE5\u4F5C\u3002",
19334
+ connectionLongContextOff: "\u5173\u95ED\u540E: Claude \u6A21\u578B\u5C06\u4F7F\u7528 200k \u7A97\u53E3\u3002",
19335
+ connectionLongContextModelsLabel: "\u9002\u914D\u6A21\u578B:",
19006
19336
  connectionInstallDescription: "\u5C1A\u672A\u68C0\u6D4B\u5230\u8BE5 Harness\u3002\u53EF\u4EE5\u590D\u5236\u5B98\u65B9\u5B89\u88C5\u547D\u4EE4\u3001\u590D\u5236\u5B89\u88C5 Prompt \u4EA4\u7ED9\u5176\u4ED6 Agent \u6267\u884C\uFF0C\u6216\u524D\u5F80\u5B98\u65B9\u5B89\u88C5\u9875\u9762\u3002\u5B89\u88C5\u5B8C\u6210\u540E\u8BF7\u8FD4\u56DE\u6B64\u9875\u9762\u91CD\u65B0\u68C0\u67E5\u3002",
19007
19337
  connectionInstallCommand: "\u5B89\u88C5\u547D\u4EE4",
19008
19338
  connectionCopyPrompt: "\u590D\u5236 Prompt",
19009
19339
  connectionInstallPrompt: "\u8BF7\u5E2E\u6211\u5728\u672C\u673A\u5B89\u88C5 {name}\uFF08CLI \u547D\u4EE4\uFF1A{binary}\uFF09\u3002\n\n\u8BF7\u6309\u5B98\u65B9\u5B89\u88C5\u65B9\u5F0F\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\uFF0C\u5E76\u5904\u7406 PATH\u3001\u6743\u9650\u548C\u4F9D\u8D56\u95EE\u9898\uFF1A\n{command}\n\n\u5B98\u65B9\u5B89\u88C5\u9875\u9762\uFF1A{url}\n\n\u5B89\u88C5\u5B8C\u6210\u540E\u8BF7\u9A8C\u8BC1 `{binary}` \u53EF\u4EE5\u5728\u7EC8\u7AEF\u4E2D\u8FD0\u884C\uFF0C\u5E76\u544A\u8BC9\u6211\u7ED3\u679C\u3002",
19340
+ connectionInstallRunning: "\u6B63\u5728\u6240\u9009 Host \u4E0A\u5B89\u88C5\uFF0C\u79BB\u5F00\u9875\u9762\u4E0D\u4F1A\u4E2D\u65AD\u3002\u5B89\u88C5\u540E\u53EF\u80FD\u4ECD\u9700\u767B\u5F55\u6216\u914D\u7F6E\u3002",
19341
+ harnessVersion: harnessVersionChinese,
19010
19342
  harnessVersionTitle: "Harness CLI \u7248\u672C",
19011
19343
  harnessVersionCurrent: "\u5F53\u524D\u7248\u672C",
19012
19344
  harnessVersionLatest: "\u6700\u65B0\u7248\u672C",
@@ -19209,7 +19541,7 @@ ${error51.stderrTail}`] : []
19209
19541
  control.menu.style.left = `${placement.left}px`;
19210
19542
  control.menu.style.bottom = `${placement.bottom}px`;
19211
19543
  }
19212
- function popoverOpen(menu) {
19544
+ function popoverOpen2(menu) {
19213
19545
  try {
19214
19546
  return menu.matches(":popover-open");
19215
19547
  } catch {
@@ -19294,7 +19626,7 @@ ${error51.stderrTail}`] : []
19294
19626
  const rowsByAgent = /* @__PURE__ */ new Map();
19295
19627
  const groupMessages = pickerGroupMessages();
19296
19628
  const close = () => {
19297
- if (!popoverOpen(menu)) return;
19629
+ if (!popoverOpen2(menu)) return;
19298
19630
  if (typeof menu.hidePopover === "function") menu.hidePopover();
19299
19631
  else menu.hidden = true;
19300
19632
  trigger.setAttribute("aria-expanded", "false");
@@ -19308,7 +19640,7 @@ ${error51.stderrTail}`] : []
19308
19640
  target?.focus();
19309
19641
  };
19310
19642
  const open = (focus = "selected") => {
19311
- if (trigger.disabled || popoverOpen(menu)) return;
19643
+ if (trigger.disabled || popoverOpen2(menu)) return;
19312
19644
  setMenuPosition(control);
19313
19645
  if (typeof menu.showPopover === "function") menu.showPopover();
19314
19646
  else menu.hidden = false;
@@ -19589,7 +19921,7 @@ ${error51.stderrTail}`] : []
19589
19921
  menu.append(mainGroup, morePanel, moreRow, cta);
19590
19922
  root.append(trigger, menu);
19591
19923
  const onTriggerClick = () => {
19592
- if (popoverOpen(menu)) close();
19924
+ if (popoverOpen2(menu)) close();
19593
19925
  else open();
19594
19926
  };
19595
19927
  const onTriggerKeyDown = (event) => {
@@ -19618,10 +19950,10 @@ ${error51.stderrTail}`] : []
19618
19950
  target?.focus();
19619
19951
  };
19620
19952
  const onToggle = () => {
19621
- trigger.setAttribute("aria-expanded", String(popoverOpen(menu)));
19953
+ trigger.setAttribute("aria-expanded", String(popoverOpen2(menu)));
19622
19954
  };
19623
19955
  const onViewportChange = () => {
19624
- if (popoverOpen(menu)) setMenuPosition(control);
19956
+ if (popoverOpen2(menu)) setMenuPosition(control);
19625
19957
  };
19626
19958
  trigger.addEventListener("click", onTriggerClick);
19627
19959
  trigger.addEventListener("keydown", onTriggerKeyDown);
@@ -20562,7 +20894,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
20562
20894
  var OPTION_CLASSES = "flex w-full cursor-interaction items-center gap-2 rounded-lg px-2 py-2 text-left text-sm text-token-foreground outline-none enabled:hover:bg-token-list-hover-background enabled:active:bg-token-foreground/15 disabled:cursor-not-allowed disabled:opacity-40";
20563
20895
  var HEADING_CLASSES = "px-2 pb-1 pt-1.5 text-sm text-token-text-tertiary";
20564
20896
  var MODEL_SCROLLBAR_STYLE_ATTRIBUTE = "data-codexhost-model-picker-scrollbar";
20565
- function popoverOpen2(menu) {
20897
+ function popoverOpen3(menu) {
20566
20898
  return menu.matches(":popover-open");
20567
20899
  }
20568
20900
  function ensureModelScrollbarStyle(ownerDocument) {
@@ -20836,31 +21168,31 @@ Codex Fast mode prioritizes requests and may increase usage.`
20836
21168
  searchInput.addEventListener(type, silenceForHarness);
20837
21169
  }
20838
21170
  const onSearchBlur = () => {
20839
- if (!popoverOpen2(modelMenu)) return;
21171
+ if (!popoverOpen3(modelMenu)) return;
20840
21172
  const active = document.activeElement;
20841
21173
  const movedToComposer = active === document.body || active instanceof Element && (active.matches('textarea, [contenteditable="true"], [role="textbox"]') || active.closest('textarea, [contenteditable="true"], [role="textbox"]') !== null);
20842
21174
  if (!movedToComposer) return;
20843
21175
  requestAnimationFrame(() => {
20844
- if (popoverOpen2(modelMenu) && searchInput.isConnected && !modelMenu.contains(document.activeElement))
21176
+ if (popoverOpen3(modelMenu) && searchInput.isConnected && !modelMenu.contains(document.activeElement))
20845
21177
  searchInput.focus();
20846
21178
  });
20847
21179
  };
20848
21180
  searchInput.addEventListener("blur", onSearchBlur);
20849
21181
  const closeModelMenu = () => {
20850
- if (popoverOpen2(modelMenu)) modelMenu.hidePopover();
21182
+ if (popoverOpen3(modelMenu)) modelMenu.hidePopover();
20851
21183
  modelButton.setAttribute("aria-expanded", "false");
20852
21184
  if (searchInput.value !== "") {
20853
21185
  searchInput.value = "";
20854
21186
  applyModelSearchFilter(control);
20855
21187
  }
20856
21188
  };
20857
- const pickerOpen = () => popoverOpen2(menu) || popoverOpen2(modelMenu);
21189
+ const pickerOpen = () => popoverOpen3(menu) || popoverOpen3(modelMenu);
20858
21190
  const close = () => {
20859
21191
  closeModelMenu();
20860
- if (popoverOpen2(menu)) menu.hidePopover();
21192
+ if (popoverOpen3(menu)) menu.hidePopover();
20861
21193
  };
20862
21194
  const openModelMenu = (standalone = false) => {
20863
- if (!standalone && !popoverOpen2(menu) || popoverOpen2(modelMenu)) return;
21195
+ if (!standalone && !popoverOpen3(menu) || popoverOpen3(modelMenu)) return;
20864
21196
  control.favorites = readModelFavorites(control.harnessId);
20865
21197
  orderModelFavorites(control);
20866
21198
  modelMenu.scrollTop = 0;
@@ -20882,16 +21214,16 @@ Codex Fast mode prioritizes requests and may increase usage.`
20882
21214
  else open();
20883
21215
  };
20884
21216
  const onToggle = () => {
20885
- const openState = popoverOpen2(menu);
20886
- trigger.setAttribute("aria-expanded", String(openState || popoverOpen2(modelMenu)));
21217
+ const openState = popoverOpen3(menu);
21218
+ trigger.setAttribute("aria-expanded", String(openState || popoverOpen3(modelMenu)));
20887
21219
  trigger.setAttribute("data-state", openState ? "open" : "closed");
20888
21220
  if (!openState) closeModelMenu();
20889
21221
  };
20890
21222
  const onModelToggle = () => {
20891
- const openState = popoverOpen2(modelMenu);
21223
+ const openState = popoverOpen3(modelMenu);
20892
21224
  modelButton.setAttribute("aria-expanded", String(openState));
20893
- trigger.setAttribute("aria-expanded", String(openState || popoverOpen2(menu)));
20894
- trigger.setAttribute("data-state", openState || popoverOpen2(menu) ? "open" : "closed");
21225
+ trigger.setAttribute("aria-expanded", String(openState || popoverOpen3(menu)));
21226
+ trigger.setAttribute("data-state", openState || popoverOpen3(menu) ? "open" : "closed");
20895
21227
  };
20896
21228
  const onRootClick = (event) => {
20897
21229
  const target = event.target instanceof Element ? event.target.closest("button") : null;
@@ -20931,7 +21263,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
20931
21263
  };
20932
21264
  const onModelHover = () => openModelMenu();
20933
21265
  const onDocumentPointerDown = (event) => {
20934
- if (!popoverOpen2(menu) && !popoverOpen2(modelMenu)) return;
21266
+ if (!popoverOpen3(menu) && !popoverOpen3(modelMenu)) return;
20935
21267
  const target = event.target instanceof Node ? event.target : null;
20936
21268
  if (target && (root.contains(target) || menu.contains(target) || modelMenu.contains(target))) {
20937
21269
  return;
@@ -20940,14 +21272,14 @@ Codex Fast mode prioritizes requests and may increase usage.`
20940
21272
  };
20941
21273
  const onDocumentKeyDown = (event) => {
20942
21274
  if (event.key !== "Escape") return;
20943
- if (!popoverOpen2(menu) && !popoverOpen2(modelMenu)) return;
21275
+ if (!popoverOpen3(menu) && !popoverOpen3(modelMenu)) return;
20944
21276
  event.preventDefault();
20945
21277
  close();
20946
21278
  trigger.focus();
20947
21279
  };
20948
21280
  const onViewportChange = () => {
20949
- if (popoverOpen2(menu)) positionAdvancedMenus(control);
20950
- else if (popoverOpen2(modelMenu)) positionModelMenu(control, true);
21281
+ if (popoverOpen3(menu)) positionAdvancedMenus(control);
21282
+ else if (popoverOpen3(modelMenu)) positionModelMenu(control, true);
20951
21283
  };
20952
21284
  trigger.addEventListener("click", onTriggerClick);
20953
21285
  menu.addEventListener("toggle", onToggle);
@@ -21081,7 +21413,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
21081
21413
  }
21082
21414
  orderModelFavorites(control);
21083
21415
  applyModelSearchFilter(control);
21084
- if (popoverOpen2(control.modelMenu)) control.searchInput.focus();
21416
+ if (popoverOpen3(control.modelMenu)) control.searchInput.focus();
21085
21417
  }
21086
21418
  function renderRendererModelPicker(control, view, visible, harnessId = "", locale = "en") {
21087
21419
  if (control.harnessId !== harnessId) {
@@ -21108,7 +21440,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
21108
21440
  showThinkingSection: presentation.showThinkingSection,
21109
21441
  modelLabel: presentation.modelLabel
21110
21442
  });
21111
- const keepOpenMenu = popoverOpen2(control.menu) && isTransientPickerState(view);
21443
+ const keepOpenMenu = popoverOpen3(control.menu) && isTransientPickerState(view);
21112
21444
  if (control.root.dataset.catalogSignature !== catalogSignature && !keepOpenMenu) {
21113
21445
  rebuildOptions(control, view);
21114
21446
  control.root.dataset.catalogSignature = catalogSignature;
@@ -21352,7 +21684,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
21352
21684
  strokeWidth: 1.8
21353
21685
  });
21354
21686
  }
21355
- function popoverOpen3(menu) {
21687
+ function popoverOpen4(menu) {
21356
21688
  try {
21357
21689
  return menu.matches(":popover-open");
21358
21690
  } catch {
@@ -21467,7 +21799,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
21467
21799
  trigger.setAttribute("aria-controls", menu.id);
21468
21800
  const options = /* @__PURE__ */ new Map();
21469
21801
  const close = () => {
21470
- if (!popoverOpen3(menu)) return;
21802
+ if (!popoverOpen4(menu)) return;
21471
21803
  if (typeof menu.hidePopover === "function") menu.hidePopover();
21472
21804
  else menu.hidden = true;
21473
21805
  trigger.setAttribute("aria-expanded", "false");
@@ -21480,7 +21812,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
21480
21812
  target?.focus();
21481
21813
  };
21482
21814
  const open = (focus = "selected") => {
21483
- if (trigger.disabled || popoverOpen3(menu)) return;
21815
+ if (trigger.disabled || popoverOpen4(menu)) return;
21484
21816
  positionMenu(control);
21485
21817
  if (typeof menu.showPopover === "function") menu.showPopover();
21486
21818
  else menu.hidden = false;
@@ -21489,7 +21821,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
21489
21821
  queueMicrotask(() => focusOption(focus));
21490
21822
  };
21491
21823
  const onTriggerClick = () => {
21492
- if (popoverOpen3(menu)) close();
21824
+ if (popoverOpen4(menu)) close();
21493
21825
  else open();
21494
21826
  };
21495
21827
  const onTriggerKeyDown = (event) => {
@@ -21524,12 +21856,12 @@ Codex Fast mode prioritizes requests and may increase usage.`
21524
21856
  target?.focus();
21525
21857
  };
21526
21858
  const onToggle = () => {
21527
- const openState = popoverOpen3(menu);
21859
+ const openState = popoverOpen4(menu);
21528
21860
  trigger.setAttribute("aria-expanded", String(openState));
21529
21861
  trigger.setAttribute("data-state", openState ? "open" : "closed");
21530
21862
  };
21531
21863
  const onViewportChange = () => {
21532
- if (popoverOpen3(menu)) positionMenu(control);
21864
+ if (popoverOpen4(menu)) positionMenu(control);
21533
21865
  };
21534
21866
  trigger.addEventListener("click", onTriggerClick);
21535
21867
  trigger.addEventListener("keydown", onTriggerKeyDown);
@@ -23282,6 +23614,18 @@ Codex Fast mode prioritizes requests and may increase usage.`
23282
23614
  };
23283
23615
  }
23284
23616
 
23617
+ // src/renderer-native-thread.ts
23618
+ function isRecord3(value) {
23619
+ return typeof value === "object" && value !== null && !Array.isArray(value);
23620
+ }
23621
+ async function verifyNativeCodexThread(sendRequest, threadId) {
23622
+ const native = await sendRequest("thread/read", { threadId, includeTurns: false });
23623
+ const thread = isRecord3(native) ? native.thread : null;
23624
+ if (!isRecord3(thread) || thread.id !== threadId || typeof thread.modelProvider !== "string" || !thread.modelProvider || thread.modelProvider === "codexhost" || typeof thread.cliVersion !== "string" || !thread.cliVersion || thread.cliVersion === "codexhost") {
23625
+ throw new Error("Native Thread response cannot establish Codex ownership");
23626
+ }
23627
+ }
23628
+
23285
23629
  // src/renderer-session-import-client.ts
23286
23630
  var RendererSessionImportUnavailableError = class extends Error {
23287
23631
  constructor() {
@@ -23357,15 +23701,15 @@ Codex Fast mode prioritizes requests and may increase usage.`
23357
23701
  var CODEX_ACCOUNT_LIST_METHOD = "codexhost/account/list";
23358
23702
  var CODEX_ACCOUNT_REFRESH_METHOD = "codexhost/account/refresh";
23359
23703
  var CODEX_ACCOUNT_CHANGED_METHOD = "codexhost/account/changed";
23360
- function isRecord3(value) {
23704
+ function isRecord4(value) {
23361
23705
  return typeof value === "object" && value !== null && !Array.isArray(value);
23362
23706
  }
23363
23707
  function notifiedThreadId(notification) {
23364
- if (!isRecord3(notification) || !THREAD_USAGE_REFRESH_METHODS.includes(notification.method)) {
23708
+ if (!isRecord4(notification) || !THREAD_USAGE_REFRESH_METHODS.includes(notification.method)) {
23365
23709
  return null;
23366
23710
  }
23367
23711
  const params = notification.params;
23368
- if (!isRecord3(params)) return null;
23712
+ if (!isRecord4(params)) return null;
23369
23713
  const parsed = hostThreadIdSchema.safeParse(params.threadId);
23370
23714
  return parsed.success ? parsed.data : null;
23371
23715
  }
@@ -23502,6 +23846,22 @@ Codex Fast mode prioritizes requests and may increase usage.`
23502
23846
  )
23503
23847
  );
23504
23848
  },
23849
+ async getHarnessLongContext(input) {
23850
+ return harnessLongContextSchema.parse(
23851
+ await manager.sendRequest(
23852
+ HARNESS_LONG_CONTEXT_GET_METHOD,
23853
+ harnessLongContextGetSchema.parse(input)
23854
+ )
23855
+ );
23856
+ },
23857
+ async setHarnessLongContext(input) {
23858
+ return harnessLongContextSchema.parse(
23859
+ await manager.sendRequest(
23860
+ HARNESS_LONG_CONTEXT_SET_METHOD,
23861
+ harnessLongContextSetSchema.parse(input)
23862
+ )
23863
+ );
23864
+ },
23505
23865
  async listLoadedSessions() {
23506
23866
  return loadedSessionsSchema.parse(await manager.sendRequest(LOADED_SESSIONS_METHOD, {}));
23507
23867
  },
@@ -23537,14 +23897,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
23537
23897
  result = await manager.sendRequest(THREAD_INSPECT_METHOD, params);
23538
23898
  } catch (error51) {
23539
23899
  if (!(error51 instanceof RendererMethodUnavailableError)) throw error51;
23540
- const native = await manager.sendRequest("thread/read", {
23541
- threadId: params.threadId,
23542
- includeTurns: false
23543
- });
23544
- const thread = isRecord3(native) ? native.thread : null;
23545
- if (!isRecord3(thread) || thread.id !== params.threadId || typeof thread.modelProvider !== "string" || !thread.modelProvider || thread.modelProvider === "codexhost" || typeof thread.cliVersion !== "string" || !thread.cliVersion || thread.cliVersion === "codexhost") {
23546
- throw new Error("Native Thread response cannot establish Codex ownership");
23547
- }
23900
+ await verifyNativeCodexThread(manager.sendRequest, params.threadId);
23548
23901
  return { owner: "codex", locked: true };
23549
23902
  }
23550
23903
  return threadInspectionSchema.parse(result);
@@ -23682,7 +24035,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
23682
24035
  throw new Error("Renderer Account notification callback is unavailable");
23683
24036
  }
23684
24037
  return notifications.addNotificationCallback(CODEX_ACCOUNT_CHANGED_METHOD, (notification) => {
23685
- if (!isRecord3(notification) || notification.method !== CODEX_ACCOUNT_CHANGED_METHOD) return;
24038
+ if (!isRecord4(notification) || notification.method !== CODEX_ACCOUNT_CHANGED_METHOD) return;
23686
24039
  const state = codexAccountChangedSchema.safeParse(notification.params);
23687
24040
  if (state.success) listener(state.data);
23688
24041
  });
@@ -23691,16 +24044,16 @@ Codex Fast mode prioritizes requests and may increase usage.`
23691
24044
  }
23692
24045
 
23693
24046
  // src/renderer-external-queue.ts
23694
- function isRecord4(value) {
24047
+ function isRecord5(value) {
23695
24048
  return value !== null && typeof value === "object" && !Array.isArray(value);
23696
24049
  }
23697
24050
  function installRendererExternalQueue(target) {
23698
- if (!isRecord4(target) || typeof target.getTurnCoordinator !== "function" || typeof target.getConversation !== "function") {
24051
+ if (!isRecord5(target) || typeof target.getTurnCoordinator !== "function" || typeof target.getConversation !== "function") {
23699
24052
  return null;
23700
24053
  }
23701
24054
  const coordinator = target.getTurnCoordinator();
23702
- const queue = isRecord4(coordinator) ? coordinator.serverQueue : null;
23703
- if (!isRecord4(queue) || typeof queue.isEnabled !== "function") return null;
24055
+ const queue = isRecord5(coordinator) ? coordinator.serverQueue : null;
24056
+ if (!isRecord5(queue) || typeof queue.isEnabled !== "function") return null;
23704
24057
  const descriptor = Object.getOwnPropertyDescriptor(queue, "isEnabled");
23705
24058
  if (!descriptor?.writable) return null;
23706
24059
  const original = queue.isEnabled;
@@ -23709,7 +24062,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
23709
24062
  const threadId = args[0];
23710
24063
  if (typeof threadId === "string") {
23711
24064
  const conversation = getConversation.call(target, threadId);
23712
- if (isRecord4(conversation) && conversation.id === threadId && // Reserved transport marker from externalThreadValue, retained by
24065
+ if (isRecord5(conversation) && conversation.id === threadId && // Reserved transport marker from externalThreadValue, retained by
23713
24066
  // Desktop in both newly created and hydrated conversation metadata.
23714
24067
  conversation.modelProvider === "codexhost") {
23715
24068
  return false;
@@ -23724,19 +24077,20 @@ Codex Fast mode prioritizes requests and may increase usage.`
23724
24077
  }
23725
24078
 
23726
24079
  // src/renderer-external-steering.ts
23727
- function isRecord5(value) {
24080
+ var THREAD_OWNERSHIP_LIST_METHOD2 = "codexhost/thread/ownership/list";
24081
+ function isRecord6(value) {
23728
24082
  return value !== null && typeof value === "object" && !Array.isArray(value);
23729
24083
  }
23730
24084
  function isManager(value) {
23731
- return isRecord5(value) && ["sendRequest", "steerTurn", "startTurn", "getTurnCoordinator"].every(
24085
+ return isRecord6(value) && ["sendRequest", "steerTurn", "startTurn", "getTurnCoordinator"].every(
23732
24086
  (key) => typeof value[key] === "function"
23733
24087
  );
23734
24088
  }
23735
24089
  function submissionHost(manager) {
23736
24090
  const coordinator = manager.getTurnCoordinator();
23737
- const options = isRecord5(coordinator) ? coordinator.options : null;
23738
- const host = isRecord5(options) ? options.submissionHost : null;
23739
- if (!isRecord5(host) || typeof host.getActiveTurnId !== "function" || typeof host.hasPendingTurnStart !== "function") {
24091
+ const options = isRecord6(coordinator) ? coordinator.options : null;
24092
+ const host = isRecord6(options) ? options.submissionHost : null;
24093
+ if (!isRecord6(host) || typeof host.getActiveTurnId !== "function" || typeof host.hasPendingTurnStart !== "function") {
23740
24094
  throw new Error("Desktop turn submission binding is unavailable");
23741
24095
  }
23742
24096
  return {
@@ -23778,20 +24132,20 @@ Codex Fast mode prioritizes requests and may increase usage.`
23778
24132
  var INTERRUPTED_QUEUE_REASON = "Interrupted before the steer was accepted.";
23779
24133
  async function preserveQueuedFollowUps(manager, threadId) {
23780
24134
  const coordinator = manager.getTurnCoordinator();
23781
- if (!isRecord5(coordinator) || typeof coordinator.loadMessages !== "function" || typeof coordinator.readMessages !== "function" || typeof coordinator.mutate !== "function") {
24135
+ if (!isRecord6(coordinator) || typeof coordinator.loadMessages !== "function" || typeof coordinator.readMessages !== "function" || typeof coordinator.mutate !== "function") {
23782
24136
  throw new Error("Desktop follow-up queue binding is unavailable");
23783
24137
  }
23784
24138
  await coordinator.loadMessages.call(coordinator, threadId);
23785
24139
  const messages = coordinator.readMessages.call(coordinator, threadId);
23786
24140
  if (!Array.isArray(messages)) throw new Error("Desktop follow-up queue is unavailable");
23787
24141
  const alreadyPaused = new Set(
23788
- messages.filter((message) => isRecord5(message) && message.pausedReason != null).map((message) => message.id)
24142
+ messages.filter((message) => isRecord6(message) && message.pausedReason != null).map((message) => message.id)
23789
24143
  );
23790
24144
  return () => {
23791
24145
  coordinator.mutate.call(coordinator, threadId, (current) => {
23792
24146
  if (!Array.isArray(current)) return current;
23793
24147
  return current.map((message) => {
23794
- if (!isRecord5(message) || alreadyPaused.has(message.id) || message.pausedReason !== INTERRUPTED_QUEUE_REASON)
24148
+ if (!isRecord6(message) || alreadyPaused.has(message.id) || message.pausedReason !== INTERRUPTED_QUEUE_REASON)
23795
24149
  return message;
23796
24150
  const resumed = { ...message };
23797
24151
  delete resumed.pausedReason;
@@ -23809,9 +24163,9 @@ Codex Fast mode prioritizes requests and may increase usage.`
23809
24163
  const pending = /* @__PURE__ */ new Map();
23810
24164
  let disposed = false;
23811
24165
  const send = function(method, params, options) {
23812
- const messageId = isRecord5(params) ? params.clientUserMessageId : null;
23813
- const route = typeof messageId === "string" && isRecord5(params) ? routes.get(`${params.threadId}\0${messageId}`) : void 0;
23814
- if (method !== "turn/start" || !isRecord5(params) || !route || route.threadId !== params.threadId) {
24166
+ const messageId = isRecord6(params) ? params.clientUserMessageId : null;
24167
+ const route = typeof messageId === "string" && isRecord6(params) ? routes.get(`${params.threadId}\0${messageId}`) : void 0;
24168
+ if (method !== "turn/start" || !isRecord6(params) || !route || route.threadId !== params.threadId) {
23815
24169
  return originalSend.call(manager, method, params, options);
23816
24170
  }
23817
24171
  if (disposed) return Promise.reject(new Error("External steering binding was disposed"));
@@ -23830,7 +24184,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
23830
24184
  options
23831
24185
  )
23832
24186
  ).then((response) => {
23833
- if (!isRecord5(response) || typeof response.turnId !== "string" || !response.turnId) {
24187
+ if (!isRecord6(response) || typeof response.turnId !== "string" || !response.turnId) {
23834
24188
  throw new Error("External steering returned no replacement Turn identity");
23835
24189
  }
23836
24190
  return {
@@ -23861,7 +24215,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
23861
24215
  ] = args;
23862
24216
  if (typeof threadId !== "string") return originalSteer.apply(manager, args);
23863
24217
  const role = manager.getStreamRole?.(threadId);
23864
- if (isRecord5(role) && role.role === "follower") return originalSteer.apply(manager, args);
24218
+ if (isRecord6(role) && role.role === "follower") return originalSteer.apply(manager, args);
23865
24219
  let host = null;
23866
24220
  let expectedTurnId;
23867
24221
  try {
@@ -23869,26 +24223,36 @@ Codex Fast mode prioritizes requests and may increase usage.`
23869
24223
  expectedTurnId = host.getActiveTurnId(threadId);
23870
24224
  } catch {
23871
24225
  }
23872
- const ownership = threadOwnershipListResultSchema.parse(
23873
- await originalSend.call(manager, "codexhost/thread/ownership/list", {
24226
+ let ownershipResponse;
24227
+ try {
24228
+ ownershipResponse = await originalSend.call(manager, THREAD_OWNERSHIP_LIST_METHOD2, {
23874
24229
  threadIds: [threadId]
23875
- })
23876
- );
24230
+ });
24231
+ } catch (error51) {
24232
+ if (!isUnsupportedMethod(error51, THREAD_OWNERSHIP_LIST_METHOD2)) throw error51;
24233
+ await verifyNativeCodexThread(
24234
+ (method, params) => originalSend.call(manager, method, params),
24235
+ threadId
24236
+ );
24237
+ if (disposed) throw new Error("External steering binding was disposed");
24238
+ return originalSteer.apply(manager, args);
24239
+ }
24240
+ const ownership = threadOwnershipListResultSchema.parse(ownershipResponse);
23877
24241
  const owner = ownership.threads.find((thread) => thread.threadId === threadId)?.owner;
23878
24242
  if (!owner) throw new Error("Thread ownership could not be resolved for steering");
23879
24243
  if (disposed) throw new Error("External steering binding was disposed");
23880
24244
  if (owner === "codex") return originalSteer.apply(manager, args);
23881
24245
  if (!host) throw new Error("Desktop turn submission binding is unavailable");
23882
24246
  const currentRole = manager.getStreamRole?.(threadId);
23883
- if (isRecord5(currentRole) && currentRole.role === "follower")
24247
+ if (isRecord6(currentRole) && currentRole.role === "follower")
23884
24248
  return originalSteer.apply(manager, args);
23885
24249
  if (!Array.isArray(input) || input.length === 0 || input.some(
23886
- (item) => !isRecord5(item) || item.type !== "text" || typeof item.text !== "string"
23887
- ) || !input.some((item) => isRecord5(item) && typeof item.text === "string" && item.text.trim())) {
24250
+ (item) => !isRecord6(item) || item.type !== "text" || typeof item.text !== "string"
24251
+ ) || !input.some((item) => isRecord6(item) && typeof item.text === "string" && item.text.trim())) {
23888
24252
  throw new Error("External steering requires non-empty text input");
23889
24253
  }
23890
24254
  if (toolOutput != null) throw new Error("External steering cannot replace a tool response");
23891
- if (!isRecord5(restoreMessage) || !isRecord5(restoreMessage.context)) {
24255
+ if (!isRecord6(restoreMessage) || !isRecord6(restoreMessage.context)) {
23892
24256
  throw new Error("Desktop steering message context is unavailable");
23893
24257
  }
23894
24258
  const messageId = typeof clientUserMessageId === "string" && clientUserMessageId ? clientUserMessageId : typeof restoreMessage.id === "string" && restoreMessage.id ? restoreMessage.id : crypto.randomUUID();
@@ -23936,7 +24300,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
23936
24300
  },
23937
24301
  onMessageAdded
23938
24302
  );
23939
- if (!isRecord5(response) || !isRecord5(response.turn) || typeof response.turn.id !== "string") {
24303
+ if (!isRecord6(response) || !isRecord6(response.turn) || typeof response.turn.id !== "string") {
23940
24304
  throw new Error("Desktop returned no replacement Turn identity");
23941
24305
  }
23942
24306
  try {
@@ -24004,11 +24368,11 @@ Codex Fast mode prioritizes requests and may increase usage.`
24004
24368
  }
24005
24369
 
24006
24370
  // src/renderer-manual-compaction.ts
24007
- function isRecord6(value) {
24371
+ function isRecord7(value) {
24008
24372
  return value !== null && typeof value === "object" && !Array.isArray(value);
24009
24373
  }
24010
24374
  function installRendererManualCompaction(target, hostId, messages) {
24011
- if (!messages || typeof messages.addEventListener !== "function" || typeof messages.removeEventListener !== "function" || !isRecord6(target) || typeof target.registerPendingManualContextCompaction !== "function" || typeof target.getConversation !== "function") {
24375
+ if (!messages || typeof messages.addEventListener !== "function" || typeof messages.removeEventListener !== "function" || !isRecord7(target) || typeof target.registerPendingManualContextCompaction !== "function" || typeof target.getConversation !== "function") {
24012
24376
  return null;
24013
24377
  }
24014
24378
  const register = target.registerPendingManualContextCompaction;
@@ -24017,18 +24381,18 @@ Codex Fast mode prioritizes requests and may increase usage.`
24017
24381
  const listener = (event) => {
24018
24382
  if (event.source != null && event.source !== messages) return;
24019
24383
  const message = event.data;
24020
- if (!isRecord6(message) || message.type !== "mcp-notification" || message.hostId !== hostId || message.method !== THREAD_MANUAL_COMPACTION_STARTED_METHOD) {
24384
+ if (!isRecord7(message) || message.type !== "mcp-notification" || message.hostId !== hostId || message.method !== THREAD_MANUAL_COMPACTION_STARTED_METHOD) {
24021
24385
  return;
24022
24386
  }
24023
24387
  const params = threadManualCompactionStartedSchema.safeParse(message.params);
24024
24388
  if (!params.success) return;
24025
24389
  const { threadId } = params.data;
24026
24390
  const conversation = getConversation.call(target, threadId);
24027
- if (!isRecord6(conversation) || conversation.id !== threadId || conversation.modelProvider !== "codexhost") {
24391
+ if (!isRecord7(conversation) || conversation.id !== threadId || conversation.modelProvider !== "codexhost") {
24028
24392
  return;
24029
24393
  }
24030
24394
  const role = getStreamRole?.call(target, threadId);
24031
- if (isRecord6(role) && role.role === "follower") return;
24395
+ if (isRecord7(role) && role.role === "follower") return;
24032
24396
  register.call(target, threadId);
24033
24397
  };
24034
24398
  messages.addEventListener("message", listener);
@@ -24208,7 +24572,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
24208
24572
  var SIDEBAR_EXTERNAL_THREAD_ATTRIBUTE = "data-codexhost-sidebar-external-thread";
24209
24573
  var OWNERSHIP_RETRY_DELAYS_MS = [100, 300, 800, 1500, 3e3];
24210
24574
  var PIN_REPLAY_RETRY_DELAYS_MS = [50, 150, 300];
24211
- function isRecord7(value) {
24575
+ function isRecord8(value) {
24212
24576
  return typeof value === "object" && value !== null && !Array.isArray(value);
24213
24577
  }
24214
24578
  function sidebarThreadAttributes(element) {
@@ -24235,19 +24599,19 @@ Codex Fast mode prioritizes requests and may increase usage.`
24235
24599
  const fiberName = fiberNames[0];
24236
24600
  if (fiberNames.length !== 1 || !fiberName) return null;
24237
24601
  const firstFiber2 = Object.getOwnPropertyDescriptor(element, fiberName)?.value;
24238
- if (!isRecord7(firstFiber2)) return null;
24602
+ if (!isRecord8(firstFiber2)) return null;
24239
24603
  const candidates = /* @__PURE__ */ new Set();
24240
24604
  let fiber = firstFiber2;
24241
24605
  for (let depth = 0; fiber && depth < 12; depth += 1) {
24242
24606
  const props = fiber.memoizedProps;
24243
- if (isRecord7(props) && isRecord7(props.dataAttributes)) {
24607
+ if (isRecord8(props) && isRecord8(props.dataAttributes)) {
24244
24608
  const dataAttributes = props.dataAttributes;
24245
24609
  const threadId = hostThreadIdSchema.safeParse(props.conversationId);
24246
24610
  if (threadId.success && dataAttributes[SIDEBAR_THREAD_ROW_ATTRIBUTE] === rowMarker && dataAttributes[SIDEBAR_THREAD_ID_ATTRIBUTE] === taskKey && dataAttributes[SIDEBAR_THREAD_HOST_ID_ATTRIBUTE] === hostId) {
24247
24611
  candidates.add(threadId.data);
24248
24612
  }
24249
24613
  }
24250
- fiber = isRecord7(fiber.return) ? fiber.return : null;
24614
+ fiber = isRecord8(fiber.return) ? fiber.return : null;
24251
24615
  }
24252
24616
  return candidates.size === 1 ? candidates.values().next().value ?? null : null;
24253
24617
  }
@@ -24676,7 +25040,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
24676
25040
  if (row) finish(row);
24677
25041
  });
24678
25042
  }
24679
- function isRecord8(value) {
25043
+ function isRecord9(value) {
24680
25044
  return typeof value === "object" && value !== null && !Array.isArray(value);
24681
25045
  }
24682
25046
  function firstFiber(element) {
@@ -24686,7 +25050,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
24686
25050
  const name = names[0];
24687
25051
  if (names.length !== 1 || !name) return null;
24688
25052
  const value = Object.getOwnPropertyDescriptor(element, name)?.value;
24689
- return isRecord8(value) ? value : null;
25053
+ return isRecord9(value) ? value : null;
24690
25054
  }
24691
25055
  function directForkAncestors(first) {
24692
25056
  const ancestors = [];
@@ -24696,7 +25060,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
24696
25060
  if (seen.has(fiber)) return [];
24697
25061
  seen.add(fiber);
24698
25062
  ancestors.push(fiber);
24699
- fiber = isRecord8(fiber.return) ? fiber.return : null;
25063
+ fiber = isRecord9(fiber.return) ? fiber.return : null;
24700
25064
  }
24701
25065
  return ancestors;
24702
25066
  }
@@ -24714,7 +25078,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
24714
25078
  let hasForkCallback = false;
24715
25079
  for (const fiber of ancestors) {
24716
25080
  const props = fiber.memoizedProps;
24717
- if (!isRecord8(props)) continue;
25081
+ if (!isRecord9(props)) continue;
24718
25082
  if (!hasForkCallback && typeof props.onFork !== "function" && ownsOtherCallback(fiber, props)) {
24719
25083
  return null;
24720
25084
  }
@@ -24746,7 +25110,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
24746
25110
  if (!threadId.success || !turnId.success) return null;
24747
25111
  const fiber = firstFiber(button);
24748
25112
  const buttonProps = fiber?.memoizedProps;
24749
- if (!fiber || !isRecord8(buttonProps) || !Object.hasOwn(buttonProps, "aria-busy")) return null;
25113
+ if (!fiber || !isRecord9(buttonProps) || !Object.hasOwn(buttonProps, "aria-busy")) return null;
24750
25114
  return forkTargetFromAncestors(button, threadId.data, turnId.data, directForkAncestors(fiber)) ?? forkTargetFromAncestors(button, threadId.data, turnId.data, committedReactAncestors(fiber));
24751
25115
  }
24752
25116
  var BrowserRendererForkDom = class {
@@ -24854,7 +25218,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
24854
25218
  if (agent === "codex") return null;
24855
25219
  return encodeHarnessPluginRoute({ harnessId: harnessPluginIdSchema.parse(agent) });
24856
25220
  }
24857
- function isRecord9(value) {
25221
+ function isRecord10(value) {
24858
25222
  return typeof value === "object" && value !== null && !Array.isArray(value);
24859
25223
  }
24860
25224
  function piTransportModelId(model, thinkingOptionId) {
@@ -25113,7 +25477,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
25113
25477
  let fiber = findComposerFiber(composer);
25114
25478
  for (let depth = 0; fiber && depth < 120; depth += 1) {
25115
25479
  const props = fiber.memoizedProps;
25116
- if (isRecord9(props) && "conversationId" in props && props.conversationId != null) {
25480
+ if (isRecord10(props) && "conversationId" in props && props.conversationId != null) {
25117
25481
  const candidate = hostThreadIdSchema.safeParse(props.conversationId);
25118
25482
  if (!candidate.success || threadId !== void 0 && threadId !== candidate.data) {
25119
25483
  return null;
@@ -25126,12 +25490,12 @@ Codex Fast mode prioritizes requests and may increase usage.`
25126
25490
  return threadId;
25127
25491
  }
25128
25492
  function isLegacySevenSlotDraftWrapper(value) {
25129
- if (!Array.isArray(value) || value.length !== 7 || value[3] !== value[5] || value[3] !== value[6] || !isRecord9(value[3]) || typeof value[3].get !== "function" || typeof value[2] !== "string" && value[2] !== null) {
25493
+ if (!Array.isArray(value) || value.length !== 7 || value[3] !== value[5] || value[3] !== value[6] || !isRecord10(value[3]) || typeof value[3].get !== "function" || typeof value[2] !== "string" && value[2] !== null) {
25130
25494
  return false;
25131
25495
  }
25132
25496
  try {
25133
25497
  const draft = value[3].get();
25134
- return isRecord9(draft) && "modelSettings" in draft && "isManuallyChanged" in draft;
25498
+ return isRecord10(draft) && "modelSettings" in draft && "isManuallyChanged" in draft;
25135
25499
  } catch {
25136
25500
  return false;
25137
25501
  }
@@ -25165,8 +25529,8 @@ Codex Fast mode prioritizes requests and may increase usage.`
25165
25529
  let fiber = findComposerFiber(composer);
25166
25530
  for (let depth = 0; fiber && depth < 120; depth += 1) {
25167
25531
  const updateQueue = fiber.updateQueue;
25168
- const memoCache = isRecord9(updateQueue) ? updateQueue.memoCache : null;
25169
- const data = isRecord9(memoCache) && Array.isArray(memoCache.data) ? memoCache.data : [];
25532
+ const memoCache = isRecord10(updateQueue) ? updateQueue.memoCache : null;
25533
+ const data = isRecord10(memoCache) && Array.isArray(memoCache.data) ? memoCache.data : [];
25170
25534
  for (const value of data) {
25171
25535
  const draftId = draftIdFromMemoValue(value);
25172
25536
  if (draftId) draftIds.add(draftId);
@@ -25193,7 +25557,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
25193
25557
  return ["default", draftIds.values().next().value];
25194
25558
  }
25195
25559
  function isDraftPrewarmPolicyReady(value) {
25196
- return isRecord9(value) && value.state === "ready" && typeof value.hostId === "string" && value.hostId.length > 0 && typeof value.select === "function" && typeof value.clear === "function";
25560
+ return isRecord10(value) && value.state === "ready" && typeof value.hostId === "string" && value.hostId.length > 0 && typeof value.select === "function" && typeof value.clear === "function";
25197
25561
  }
25198
25562
  async function waitForRendererDraftPrewarmPolicy(target, composer) {
25199
25563
  const deadline = Date.now() + DRAFT_PREWARM_POLICY_WAIT_TIMEOUT_MS;
@@ -25249,13 +25613,15 @@ Codex Fast mode prioritizes requests and may increase usage.`
25249
25613
  const route = disposed ? null : window.__codexhostHostRoutingV1?.forComposer() ?? null;
25250
25614
  const client = clients.forRoute(route);
25251
25615
  usageSubscription.connect(client);
25252
- idleReleaseSync.connect(
25253
- disposed ? null : route?.hostId === "local" ? client : clients.forHost("local")
25254
- );
25616
+ const localClient = disposed ? null : route?.hostId === "local" ? client : clients.forHost("local");
25617
+ idleReleaseSync.connect(localClient);
25618
+ const connected = !disposed && (client !== null || localClient !== null || (window.__codexhostHostRoutingV1?.knownHostIds?.() ?? []).some(
25619
+ (hostId) => window.__codexhostHostRoutingV1?.forHost(hostId) != null
25620
+ ));
25255
25621
  updateStatus(
25256
- route ? "ready" : "installing",
25257
- route ? "ready" : fiberWalkLimited ? "react-fiber-walk-limit-exceeded" : "draft-routing-policy-unavailable",
25258
- route ? "request-bridge" : null
25622
+ connected ? "ready" : "installing",
25623
+ connected ? "ready" : fiberWalkLimited ? "react-fiber-walk-limit-exceeded" : "draft-routing-policy-unavailable",
25624
+ connected ? "request-bridge" : null
25259
25625
  );
25260
25626
  return route;
25261
25627
  };
@@ -25270,10 +25636,14 @@ Codex Fast mode prioritizes requests and may increase usage.`
25270
25636
  return client;
25271
25637
  };
25272
25638
  const modelControl = Object.freeze({
25273
- currentHostId: () => {
25639
+ currentHostId: (composer) => {
25640
+ if (composer) {
25641
+ return disposed ? null : window.__codexhostHostRoutingV1?.hostIdForComposer(composer) ?? null;
25642
+ }
25274
25643
  const route = currentRequestRoute();
25275
25644
  return disposed ? null : route?.hostId ?? window.__codexhostHostRoutingV1?.hostIdForComposer() ?? null;
25276
25645
  },
25646
+ knownHostIds: () => disposed ? [] : window.__codexhostHostRoutingV1?.knownHostIds?.() ?? [],
25277
25647
  clientForHost: (hostId) => disposed ? null : clients.forHost(hostId),
25278
25648
  listHarnessPlugins: async () => {
25279
25649
  const client = settingsModelClient();
@@ -25437,16 +25807,16 @@ Codex Fast mode prioritizes requests and may increase usage.`
25437
25807
  }
25438
25808
 
25439
25809
  // src/renderer-subagent-thread-model.ts
25440
- function isRecord10(value) {
25810
+ function isRecord11(value) {
25441
25811
  return typeof value === "object" && value !== null && !Array.isArray(value);
25442
25812
  }
25443
25813
  function nonBlank(value) {
25444
25814
  return typeof value === "string" && value.trim().length > 0;
25445
25815
  }
25446
25816
  function threadFromReadResult(value, expectedThreadId) {
25447
- if (!isRecord10(value)) return null;
25448
- const directThread = isRecord10(value.thread) ? value.thread : null;
25449
- const nestedThread = isRecord10(value.result) && isRecord10(value.result.thread) ? value.result.thread : null;
25817
+ if (!isRecord11(value)) return null;
25818
+ const directThread = isRecord11(value.thread) ? value.thread : null;
25819
+ const nestedThread = isRecord11(value.result) && isRecord11(value.result.thread) ? value.result.thread : null;
25450
25820
  const thread = directThread ?? nestedThread;
25451
25821
  if (!thread) return null;
25452
25822
  if (expectedThreadId && (!nonBlank(thread.id) || thread.id.trim() !== expectedThreadId)) {
@@ -25460,7 +25830,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
25460
25830
  if (typeof policy?.requestTarget !== "function") return null;
25461
25831
  try {
25462
25832
  const target = policy.requestTarget();
25463
- return isRecord10(target) && typeof target.sendRequest === "function" ? target : null;
25833
+ return isRecord11(target) && typeof target.sendRequest === "function" ? target : null;
25464
25834
  } catch {
25465
25835
  return null;
25466
25836
  }
@@ -25501,10 +25871,10 @@ Codex Fast mode prioritizes requests and may increase usage.`
25501
25871
  function subagentStatusFromReadResult(value, expectedThreadId) {
25502
25872
  const thread = threadFromReadResult(value, expectedThreadId);
25503
25873
  if (!thread) return null;
25504
- const threadStatus = isRecord10(thread.status) && nonBlank(thread.status.type) ? thread.status.type : void 0;
25874
+ const threadStatus = isRecord11(thread.status) && nonBlank(thread.status.type) ? thread.status.type : void 0;
25505
25875
  if (threadStatus === "systemError") return "failed";
25506
25876
  const turns = Array.isArray(thread.turns) ? thread.turns : [];
25507
- const lastTurn = [...turns].reverse().find(isRecord10);
25877
+ const lastTurn = [...turns].reverse().find(isRecord11);
25508
25878
  const turnStatus = lastTurn && nonBlank(lastTurn.status) ? lastTurn.status : void 0;
25509
25879
  if (turnStatus === "completed") return "completed";
25510
25880
  if (turnStatus === "failed") return "failed";
@@ -25648,7 +26018,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
25648
26018
  var SUBAGENT_ROW_COPY_ATTRIBUTE = "data-codexhost-subagent-copy";
25649
26019
  var SUBAGENT_ITEM_BUTTON_SELECTOR = 'button[data-slot="thread-summary-panel-item-button"]';
25650
26020
  var SUBAGENT_ITEM_LABEL_SELECTOR = '[data-slot="thread-summary-panel-item-label"]';
25651
- function isRecord11(value) {
26021
+ function isRecord12(value) {
25652
26022
  return typeof value === "object" && value !== null && !Array.isArray(value);
25653
26023
  }
25654
26024
  function nonBlank2(value) {
@@ -25766,12 +26136,12 @@ Codex Fast mode prioritizes requests and may increase usage.`
25766
26136
  if (nonBlank2(source.status) && !target.status) {
25767
26137
  target.status = source.status.trim();
25768
26138
  }
25769
- if (isRecord11(source.agentState) && nonBlank2(source.agentState.status) && !target.status) {
26139
+ if (isRecord12(source.agentState) && nonBlank2(source.agentState.status) && !target.status) {
25770
26140
  target.status = source.agentState.status.trim();
25771
26141
  }
25772
- if (isRecord11(source.agentsStates) && target.conversationId) {
26142
+ if (isRecord12(source.agentsStates) && target.conversationId) {
25773
26143
  const state = source.agentsStates[target.conversationId];
25774
- if (isRecord11(state) && nonBlank2(state.status) && !target.status) {
26144
+ if (isRecord12(state) && nonBlank2(state.status) && !target.status) {
25775
26145
  target.status = state.status.trim();
25776
26146
  }
25777
26147
  }
@@ -25782,28 +26152,28 @@ Codex Fast mode prioritizes requests and may increase usage.`
25782
26152
  if (Array.isArray(item.receiverThreadIds) && item.receiverThreadIds.includes(conversationId)) {
25783
26153
  return true;
25784
26154
  }
25785
- return isRecord11(item.agentsStates) && conversationId in item.agentsStates;
26155
+ return isRecord12(item.agentsStates) && conversationId in item.agentsStates;
25786
26156
  }
25787
26157
  function harvestFromValue(value, target) {
25788
- if (!isRecord11(value)) return;
26158
+ if (!isRecord12(value)) return;
25789
26159
  contribute(target, value);
25790
26160
  const nested = [
25791
- isRecord11(value.row) ? value.row : null,
25792
- isRecord11(value.backgroundAgent) ? value.backgroundAgent : null,
25793
- isRecord11(value.item) ? value.item : null,
25794
- isRecord11(value.item) && isRecord11(value.item.backgroundAgent) ? value.item.backgroundAgent : null,
25795
- isRecord11(value.thread) && (!target.conversationId || nonBlank2(value.thread.id) && value.thread.id.trim() === target.conversationId) ? value.thread : null,
25796
- isRecord11(value.childConversation) ? value.childConversation : null
26161
+ isRecord12(value.row) ? value.row : null,
26162
+ isRecord12(value.backgroundAgent) ? value.backgroundAgent : null,
26163
+ isRecord12(value.item) ? value.item : null,
26164
+ isRecord12(value.item) && isRecord12(value.item.backgroundAgent) ? value.item.backgroundAgent : null,
26165
+ isRecord12(value.thread) && (!target.conversationId || nonBlank2(value.thread.id) && value.thread.id.trim() === target.conversationId) ? value.thread : null,
26166
+ isRecord12(value.childConversation) ? value.childConversation : null
25797
26167
  ];
25798
26168
  for (const source of nested) {
25799
26169
  if (source) contribute(target, source);
25800
26170
  }
25801
26171
  if (!target.conversationId) return;
25802
26172
  const items = Array.isArray(value.items) ? value.items : Array.isArray(value.turns) ? value.turns.flatMap(
25803
- (turn) => isRecord11(turn) && Array.isArray(turn.items) ? turn.items : []
26173
+ (turn) => isRecord12(turn) && Array.isArray(turn.items) ? turn.items : []
25804
26174
  ) : [];
25805
26175
  for (const item of items) {
25806
- if (!isRecord11(item)) continue;
26176
+ if (!isRecord12(item)) continue;
25807
26177
  if (collabMatches(item, target.conversationId)) contribute(target, item, true);
25808
26178
  }
25809
26179
  }
@@ -25870,7 +26240,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
25870
26240
  const name = names[0];
25871
26241
  if (!name) return null;
25872
26242
  const fiber = Object.getOwnPropertyDescriptor(element, name)?.value ?? element[name];
25873
- return isRecord11(fiber) ? fiber : null;
26243
+ return isRecord12(fiber) ? fiber : null;
25874
26244
  }
25875
26245
  function metaFromFiberProps(fiber) {
25876
26246
  if (!fiber) return null;
@@ -25899,7 +26269,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
25899
26269
  };
25900
26270
  }
25901
26271
  function metaFromDescendants(start2) {
25902
- if (!start2 || !isRecord11(start2.child)) return null;
26272
+ if (!start2 || !isRecord12(start2.child)) return null;
25903
26273
  const stack = [start2.child];
25904
26274
  const seen = /* @__PURE__ */ new Set();
25905
26275
  let found = null;
@@ -25910,8 +26280,8 @@ Codex Fast mode prioritizes requests and may increase usage.`
25910
26280
  seen.add(fiber);
25911
26281
  steps += 1;
25912
26282
  found = mergeRow(found, metaFromFiberProps(fiber));
25913
- if (isRecord11(fiber.child)) stack.push(fiber.child);
25914
- if (isRecord11(fiber.sibling)) stack.push(fiber.sibling);
26283
+ if (isRecord12(fiber.child)) stack.push(fiber.child);
26284
+ if (isRecord12(fiber.sibling)) stack.push(fiber.sibling);
25915
26285
  }
25916
26286
  return found;
25917
26287
  }
@@ -25920,7 +26290,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
25920
26290
  let found = metaFromDescendants(fiber);
25921
26291
  for (let depth = 0; fiber && depth < 12; depth += 1) {
25922
26292
  found = mergeRow(found, metaFromFiberProps(fiber));
25923
- fiber = isRecord11(fiber.return) ? fiber.return : null;
26293
+ fiber = isRecord12(fiber.return) ? fiber.return : null;
25924
26294
  }
25925
26295
  return found;
25926
26296
  }
@@ -26107,11 +26477,11 @@ Codex Fast mode prioritizes requests and may increase usage.`
26107
26477
  return null;
26108
26478
  }
26109
26479
  }
26110
- function isRecord12(value) {
26480
+ function isRecord13(value) {
26111
26481
  return typeof value === "object" && value !== null && !Array.isArray(value);
26112
26482
  }
26113
26483
  function parseExternalConfiguration(value) {
26114
- if (!isRecord12(value)) return void 0;
26484
+ if (!isRecord13(value)) return void 0;
26115
26485
  const model = harnessModelRefSchema.safeParse(value.model);
26116
26486
  if (!model.success) return void 0;
26117
26487
  const thinkingOptionId = harnessThinkingOptionIdSchema.safeParse(value.thinkingOptionId);
@@ -26128,9 +26498,9 @@ Codex Fast mode prioritizes requests and may increase usage.`
26128
26498
  const raw = storage.getItem(RENDERER_NEW_THREAD_PREFERENCE_KEY);
26129
26499
  if (!raw) return void 0;
26130
26500
  const parsed = JSON.parse(raw);
26131
- if (!isRecord12(parsed) || parsed.version !== 1) return void 0;
26501
+ if (!isRecord13(parsed) || parsed.version !== 1) return void 0;
26132
26502
  if (!KNOWN_RENDERER_AGENTS.some((agent) => agent === parsed.lastAgent)) return void 0;
26133
- const externalByAgent = isRecord12(parsed.externalByAgent) ? parsed.externalByAgent : {};
26503
+ const externalByAgent = isRecord13(parsed.externalByAgent) ? parsed.externalByAgent : {};
26134
26504
  const parsedExternal = Object.fromEntries(
26135
26505
  KNOWN_RENDERER_AGENTS.filter(
26136
26506
  (agent) => agent !== "codex"
@@ -26258,7 +26628,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
26258
26628
  var GET_LOCALE_OVERRIDE_URL = "vscode://codex/get-setting";
26259
26629
  var GET_LOCALE_INFO_URL = "vscode://codex/locale-info";
26260
26630
  var DEFAULT_LOCALE_REQUEST_TIMEOUT_MS = 750;
26261
- function isRecord13(value) {
26631
+ function isRecord14(value) {
26262
26632
  return typeof value === "object" && value !== null && !Array.isArray(value);
26263
26633
  }
26264
26634
  function canonicalLocale(value) {
@@ -26280,7 +26650,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
26280
26650
  return new DOMException("The operation was aborted", "AbortError");
26281
26651
  }
26282
26652
  function parseLocaleOverride(value) {
26283
- if (!isRecord13(value) || !("value" in value)) {
26653
+ if (!isRecord14(value) || !("value" in value)) {
26284
26654
  throw new Error("Codex locale override response is malformed");
26285
26655
  }
26286
26656
  if (value.value === null) return { value: null };
@@ -26295,7 +26665,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
26295
26665
  return locale;
26296
26666
  }
26297
26667
  function parseLocaleInfo(value) {
26298
- if (!isRecord13(value)) throw new Error("Codex locale info response is malformed");
26668
+ if (!isRecord14(value)) throw new Error("Codex locale info response is malformed");
26299
26669
  return {
26300
26670
  ideLocale: optionalLocale(value.ideLocale, "IDE locale"),
26301
26671
  systemLocale: optionalLocale(value.systemLocale, "system locale")
@@ -26324,7 +26694,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
26324
26694
  const onAbort = () => settle(() => reject(abortError2()));
26325
26695
  const onMessage = (event) => {
26326
26696
  const message2 = event.data;
26327
- if (!isRecord13(message2) || message2.type !== "fetch-response") return;
26697
+ if (!isRecord14(message2) || message2.type !== "fetch-response") return;
26328
26698
  if (message2.requestId !== requestId) return;
26329
26699
  if (message2.responseType !== "success" || typeof message2.status !== "number" || message2.status < 200 || message2.status >= 300 || typeof message2.bodyJsonString !== "string") {
26330
26700
  settle(() => reject(new Error("Codex locale request failed")));
@@ -28972,7 +29342,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
28972
29342
  }
28973
29343
 
28974
29344
  // src/settings/accounts-page.ts
28975
- function errorMessage(error51, fallback) {
29345
+ function errorMessage2(error51, fallback) {
28976
29346
  return error51 instanceof Error && error51.message ? error51.message : fallback;
28977
29347
  }
28978
29348
  function createAccountsSettingsPage(messages, getClient) {
@@ -29272,7 +29642,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
29272
29642
  refreshInBackground();
29273
29643
  },
29274
29644
  failure(error51) {
29275
- loadMessage = errorMessage(error51, messages.accountLoadFailed);
29645
+ loadMessage = errorMessage2(error51, messages.accountLoadFailed);
29276
29646
  render();
29277
29647
  }
29278
29648
  });
@@ -29709,6 +30079,16 @@ Codex Fast mode prioritizes requests and may increase usage.`
29709
30079
  messages.updateDownloadFromReleases,
29710
30080
  createRendererSettingsIcon("external-link", 14)
29711
30081
  );
30082
+ releaseLink.addEventListener("click", (event) => {
30083
+ const open = getClient()?.openExternalUrl;
30084
+ if (!open) return;
30085
+ event.preventDefault();
30086
+ const url2 = releaseLink.href;
30087
+ void open(url2).catch((error51) => {
30088
+ console.error("codexhost external URL open failed", error51);
30089
+ document2.defaultView?.open(url2, "_blank", "noopener,noreferrer");
30090
+ });
30091
+ });
29712
30092
  actions.append(releaseLink);
29713
30093
  controls.append(manualTitle, manualNpm, manualWindowsInstaller, actions);
29714
30094
  const notes = document2.createElement("div");
@@ -31062,6 +31442,12 @@ Codex Fast mode prioritizes requests and may increase usage.`
31062
31442
  border-radius: 10px;
31063
31443
  }
31064
31444
 
31445
+ .settings-harness-installation-actions {
31446
+ display: flex;
31447
+ flex-wrap: wrap;
31448
+ gap: 8px;
31449
+ }
31450
+
31065
31451
  .settings-harness-installation-command pre {
31066
31452
  white-space: pre-wrap;
31067
31453
  overflow-wrap: anywhere;
@@ -31069,6 +31455,27 @@ Codex Fast mode prioritizes requests and may increase usage.`
31069
31455
  font-size: 12px;
31070
31456
  }
31071
31457
 
31458
+ .settings-connection-website {
31459
+ display: inline-flex;
31460
+ align-items: center;
31461
+ justify-content: center;
31462
+ flex: none;
31463
+ width: 22px;
31464
+ height: 22px;
31465
+ color: var(--settings-muted);
31466
+ border-radius: 4px;
31467
+ }
31468
+
31469
+ .settings-connection-website:hover {
31470
+ color: var(--settings-focus);
31471
+ background: var(--settings-hover);
31472
+ }
31473
+
31474
+ .settings-connection-website:focus-visible {
31475
+ outline: 2px solid var(--settings-focus);
31476
+ outline-offset: 1px;
31477
+ }
31478
+
31072
31479
  .settings-connection-install-link {
31073
31480
  display: inline-flex;
31074
31481
  align-items: center;
@@ -31085,6 +31492,11 @@ Codex Fast mode prioritizes requests and may increase usage.`
31085
31492
  cursor: pointer;
31086
31493
  }
31087
31494
 
31495
+ .settings-connection-install-link:disabled {
31496
+ opacity: 0.45;
31497
+ cursor: wait;
31498
+ }
31499
+
31088
31500
  .settings-connection-install-link:hover,
31089
31501
  .settings-connection-install-link:focus-visible {
31090
31502
  color: var(--settings-focus);
@@ -31092,6 +31504,113 @@ Codex Fast mode prioritizes requests and may increase usage.`
31092
31504
  border-color: var(--settings-border);
31093
31505
  }
31094
31506
 
31507
+ .settings-connection-long-context {
31508
+ position: relative;
31509
+ display: inline-flex;
31510
+ }
31511
+
31512
+ .settings-connection-long-context__control {
31513
+ display: inline-flex;
31514
+ align-items: center;
31515
+ gap: 6px;
31516
+ margin: 0;
31517
+ color: var(--settings-text);
31518
+ font-size: 12px;
31519
+ font-weight: 600;
31520
+ line-height: 1;
31521
+ cursor: pointer;
31522
+ user-select: none;
31523
+ background: transparent;
31524
+ border: 0;
31525
+ }
31526
+
31527
+ .settings-connection-long-context__tooltip {
31528
+ position: fixed;
31529
+ inset: auto;
31530
+ z-index: 80;
31531
+ box-sizing: border-box;
31532
+ width: min(280px, calc(100vw - 16px));
31533
+ height: auto;
31534
+ max-height: none;
31535
+ margin: 0;
31536
+ overflow: visible;
31537
+ padding: 8px 10px;
31538
+ color: var(--settings-text);
31539
+ font-size: 12px;
31540
+ font-weight: 400;
31541
+ line-height: 1.45;
31542
+ text-align: left;
31543
+ white-space: normal;
31544
+ display: grid;
31545
+ gap: 6px;
31546
+ background: var(--settings-elevated);
31547
+ border: 1px solid var(--settings-border);
31548
+ border-radius: 8px;
31549
+ box-shadow: 0 10px 24px rgb(0 0 0 / 28%);
31550
+ pointer-events: none;
31551
+ }
31552
+
31553
+ .settings-connection-long-context__tooltip p,
31554
+ .settings-connection-long-context__tooltip ul {
31555
+ margin: 0;
31556
+ }
31557
+
31558
+ .settings-connection-long-context__tooltip ul {
31559
+ padding-left: 0;
31560
+ list-style: none;
31561
+ }
31562
+
31563
+ .settings-connection-long-context__tooltip li + li {
31564
+ margin-top: 2px;
31565
+ }
31566
+
31567
+ .settings-connection-long-context__tooltip li::before {
31568
+ content: "- ";
31569
+ }
31570
+
31571
+ .settings-connection-long-context input {
31572
+ position: relative;
31573
+ flex: none;
31574
+ width: 32px;
31575
+ height: 18px;
31576
+ margin: 0;
31577
+ appearance: none;
31578
+ background: var(--settings-surface-hover);
31579
+ border: 0;
31580
+ border-radius: 999px;
31581
+ cursor: pointer;
31582
+ }
31583
+
31584
+ .settings-connection-long-context input::before {
31585
+ position: absolute;
31586
+ top: 2px;
31587
+ left: 2px;
31588
+ width: 14px;
31589
+ height: 14px;
31590
+ content: "";
31591
+ background: #fff;
31592
+ border-radius: 50%;
31593
+ box-shadow: 0 1px 2px rgb(0 0 0 / 30%);
31594
+ }
31595
+
31596
+ .settings-connection-long-context input:checked {
31597
+ background: var(--settings-focus);
31598
+ }
31599
+
31600
+ .settings-connection-long-context input:checked::before {
31601
+ transform: translateX(14px);
31602
+ }
31603
+
31604
+ .settings-connection-long-context input:focus-visible {
31605
+ outline: 2px solid var(--settings-focus);
31606
+ outline-offset: 2px;
31607
+ }
31608
+
31609
+ .settings-connection-long-context input:disabled {
31610
+ cursor: default;
31611
+ opacity: 0.6;
31612
+ }
31613
+
31095
31614
  .settings-connection-row__group-toggle {
31096
31615
  display: inline-flex;
31097
31616
  align-items: center;
@@ -31159,6 +31678,10 @@ Codex Fast mode prioritizes requests and may increase usage.`
31159
31678
  padding: 12px;
31160
31679
  }
31161
31680
 
31681
+ .settings-connection-inspector__body:empty {
31682
+ display: none;
31683
+ }
31684
+
31162
31685
  .settings-harness-version {
31163
31686
  display: grid;
31164
31687
  gap: 10px;
@@ -31347,33 +31870,6 @@ Codex Fast mode prioritizes requests and may increase usage.`
31347
31870
  border-radius: 10px;
31348
31871
  }
31349
31872
 
31350
- .settings-connection-error-metadata {
31351
- display: grid;
31352
- gap: 7px;
31353
- padding: 12px;
31354
- background: var(--settings-inset);
31355
- border: 1px solid var(--settings-border);
31356
- border-radius: 9px;
31357
- }
31358
-
31359
- .settings-connection-detail-line {
31360
- display: grid;
31361
- grid-template-columns: 92px minmax(0, 1fr);
31362
- gap: 10px;
31363
- min-width: 0;
31364
- color: var(--settings-muted);
31365
- font-size: 10px;
31366
- line-height: 16px;
31367
- }
31368
-
31369
- .settings-connection-detail-line code {
31370
- min-width: 0;
31371
- overflow-wrap: anywhere;
31372
- color: var(--settings-text);
31373
- font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
31374
- white-space: pre-wrap;
31375
- }
31376
-
31377
31873
  .settings-connection-error-log-header {
31378
31874
  display: flex;
31379
31875
  align-items: center;
@@ -33118,7 +33614,7 @@ Codex Fast mode prioritizes requests and may increase usage.`
33118
33614
  `;
33119
33615
 
33120
33616
  // src/settings/tailwind.css
33121
- var tailwind_default = '@layer properties, theme, base, components, utilities;\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-content:"";--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}}@layer theme{:root,:host{--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}}@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.relative{position:relative}.top-full{top:100%}.left-0{left:0}.z-20{z-index:20}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-7{margin-top:calc(var(--spacing) * 7)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-16{margin-top:calc(var(--spacing) * 16)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-\\[45px\\]{margin-left:45px}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.list-item{display:list-item}.table{display:table}.size-1\\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-8{height:calc(var(--spacing) * 8)}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-\\[60px\\]{min-height:60px}.w-9{width:calc(var(--spacing) * 9)}.w-14{width:calc(var(--spacing) * 14)}.w-80{width:calc(var(--spacing) * 80)}.w-full{width:100%}.w-px{width:1px}.max-w-64{max-width:calc(var(--spacing) * 64)}.min-w-0{min-width:0}.flex-shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-disc{list-style-type:disc}.appearance-none{appearance:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.overflow-x-auto{overflow-x:auto}.rounded-\\[10px\\]{border-radius:10px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-settings-border{border-color:var(--settings-border)}.border-settings-divider{border-color:var(--settings-divider)}.bg-settings-panel{background-color:var(--settings-panel)}.bg-settings-subtle{background-color:var(--settings-subtle)}.bg-settings-surface{background-color:var(--settings-surface)}.bg-settings-surface-hover{background-color:var(--settings-surface-hover)}.bg-transparent{background-color:#0000}.p-0{padding:0}.p-4{padding:calc(var(--spacing) * 4)}.\\!px-0{padding-inline:0!important}.px-1{padding-inline:var(--spacing)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pl-4{padding-left:calc(var(--spacing) * 4)}.\\!text-right{text-align:right!important}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-7{--tw-leading:calc(var(--spacing) * 7);line-height:calc(var(--spacing) * 7)}.leading-\\[18px\\]{--tw-leading:18px;line-height:18px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-pre-wrap{white-space:pre-wrap}.text-settings-muted{color:var(--settings-muted)}.text-settings-subtle{color:var(--settings-subtle)}.text-settings-text{color:var(--settings-text)}.lowercase{text-transform:lowercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_10px_30px_rgb\\(0_0_0\\/0\\.22\\)\\]{--tw-shadow:0 10px 30px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-settings-border{--tw-ring-color:var(--settings-border)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.ring-inset{--tw-ring-inset:inset}.group-focus-within\\:visible:is(:where(.group):focus-within *){visibility:visible}.group-focus-within\\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media (hover:hover){.group-hover\\:visible:is(:where(.group):hover *){visibility:visible}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-data-\\[state\\=failed\\]\\/status\\:bg-settings-danger:is(:where(.group\\/status)[data-state=failed] *){background-color:var(--settings-danger)}.group-data-\\[state\\=unavailable\\]\\/status\\:bg-settings-warning:is(:where(.group\\/status)[data-state=unavailable] *){background-color:var(--settings-warning)}.marker\\:text-settings-subtle ::marker{color:var(--settings-subtle)}.marker\\:text-settings-subtle::marker{color:var(--settings-subtle)}.marker\\:text-settings-subtle ::-webkit-details-marker{color:var(--settings-subtle)}.marker\\:text-settings-subtle::-webkit-details-marker{color:var(--settings-subtle)}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:top-0\\.5:before{content:var(--tw-content);top:calc(var(--spacing) * .5)}.before\\:left-0\\.5:before{content:var(--tw-content);left:calc(var(--spacing) * .5)}.before\\:size-4:before{content:var(--tw-content);width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.before\\:rounded-full:before{content:var(--tw-content);border-radius:3.40282e38px}.before\\:bg-white:before{content:var(--tw-content);background-color:#fff}.before\\:shadow-\\[0_1px_2px_rgb\\(0_0_0\\/0\\.3\\)\\]:before{content:var(--tw-content);--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.before\\:transition-transform:before{content:var(--tw-content);transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.first\\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.first-of-type\\:mt-0:first-of-type{margin-top:0}.checked\\:bg-settings-focus:checked{background-color:var(--settings-focus)}.checked\\:ring-transparent:checked{--tw-ring-color:transparent}.checked\\:before\\:translate-x-4:checked:before{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.focus-within\\:border-settings-focus:focus-within{border-color:var(--settings-focus)}@media (hover:hover){.hover\\:text-settings-text:hover{color:var(--settings-text)}}.focus-visible\\:text-settings-text:focus-visible{color:var(--settings-text)}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-settings-focus:focus-visible{outline-color:var(--settings-focus)}.data-\\[invalid\\=true\\]\\:border-settings-danger[data-invalid=true]{border-color:var(--settings-danger)}.data-\\[invalid\\=true\\]\\:text-settings-danger[data-invalid=true],.data-\\[state\\=failed\\]\\:text-settings-danger[data-state=failed]{color:var(--settings-danger)}.data-\\[state\\=unavailable\\]\\:text-settings-warning[data-state=unavailable]{color:var(--settings-warning)}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@layer properties{\n *, ::before, ::after, ::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-alpha:100%;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-drop-shadow-alpha:100%;--tw-content:"";--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}\n';
33617
+ var tailwind_default = '@layer properties, theme, base, components, utilities;\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-content:"";--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}}@layer theme{:root,:host{--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}}@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.top-full{top:100%}.left-0{left:0}.z-20{z-index:20}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-7{margin-top:calc(var(--spacing) * 7)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-16{margin-top:calc(var(--spacing) * 16)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-\\[45px\\]{margin-left:45px}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.list-item{display:list-item}.table{display:table}.size-1\\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-8{height:calc(var(--spacing) * 8)}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-\\[60px\\]{min-height:60px}.w-9{width:calc(var(--spacing) * 9)}.w-14{width:calc(var(--spacing) * 14)}.w-80{width:calc(var(--spacing) * 80)}.w-full{width:100%}.w-px{width:1px}.max-w-64{max-width:calc(var(--spacing) * 64)}.min-w-0{min-width:0}.flex-shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-disc{list-style-type:disc}.appearance-none{appearance:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.overflow-x-auto{overflow-x:auto}.rounded-\\[10px\\]{border-radius:10px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-settings-border{border-color:var(--settings-border)}.border-settings-divider{border-color:var(--settings-divider)}.bg-settings-panel{background-color:var(--settings-panel)}.bg-settings-subtle{background-color:var(--settings-subtle)}.bg-settings-surface{background-color:var(--settings-surface)}.bg-settings-surface-hover{background-color:var(--settings-surface-hover)}.bg-transparent{background-color:#0000}.p-0{padding:0}.p-4{padding:calc(var(--spacing) * 4)}.\\!px-0{padding-inline:0!important}.px-1{padding-inline:var(--spacing)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pl-4{padding-left:calc(var(--spacing) * 4)}.\\!text-right{text-align:right!important}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-7{--tw-leading:calc(var(--spacing) * 7);line-height:calc(var(--spacing) * 7)}.leading-\\[18px\\]{--tw-leading:18px;line-height:18px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-pre-wrap{white-space:pre-wrap}.text-settings-muted{color:var(--settings-muted)}.text-settings-subtle{color:var(--settings-subtle)}.text-settings-text{color:var(--settings-text)}.lowercase{text-transform:lowercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_10px_30px_rgb\\(0_0_0\\/0\\.22\\)\\]{--tw-shadow:0 10px 30px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-settings-border{--tw-ring-color:var(--settings-border)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.ring-inset{--tw-ring-inset:inset}.group-focus-within\\:visible:is(:where(.group):focus-within *){visibility:visible}.group-focus-within\\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media (hover:hover){.group-hover\\:visible:is(:where(.group):hover *){visibility:visible}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-data-\\[state\\=failed\\]\\/status\\:bg-settings-danger:is(:where(.group\\/status)[data-state=failed] *){background-color:var(--settings-danger)}.group-data-\\[state\\=unavailable\\]\\/status\\:bg-settings-warning:is(:where(.group\\/status)[data-state=unavailable] *){background-color:var(--settings-warning)}.marker\\:text-settings-subtle ::marker{color:var(--settings-subtle)}.marker\\:text-settings-subtle::marker{color:var(--settings-subtle)}.marker\\:text-settings-subtle ::-webkit-details-marker{color:var(--settings-subtle)}.marker\\:text-settings-subtle::-webkit-details-marker{color:var(--settings-subtle)}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:top-0\\.5:before{content:var(--tw-content);top:calc(var(--spacing) * .5)}.before\\:left-0\\.5:before{content:var(--tw-content);left:calc(var(--spacing) * .5)}.before\\:size-4:before{content:var(--tw-content);width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.before\\:rounded-full:before{content:var(--tw-content);border-radius:3.40282e38px}.before\\:bg-white:before{content:var(--tw-content);background-color:#fff}.before\\:shadow-\\[0_1px_2px_rgb\\(0_0_0\\/0\\.3\\)\\]:before{content:var(--tw-content);--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.before\\:transition-transform:before{content:var(--tw-content);transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.first\\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.first-of-type\\:mt-0:first-of-type{margin-top:0}.checked\\:bg-settings-focus:checked{background-color:var(--settings-focus)}.checked\\:ring-transparent:checked{--tw-ring-color:transparent}.checked\\:before\\:translate-x-4:checked:before{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.focus-within\\:border-settings-focus:focus-within{border-color:var(--settings-focus)}@media (hover:hover){.hover\\:text-settings-text:hover{color:var(--settings-text)}}.focus-visible\\:text-settings-text:focus-visible{color:var(--settings-text)}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-settings-focus:focus-visible{outline-color:var(--settings-focus)}.data-\\[invalid\\=true\\]\\:border-settings-danger[data-invalid=true]{border-color:var(--settings-danger)}.data-\\[invalid\\=true\\]\\:text-settings-danger[data-invalid=true],.data-\\[state\\=failed\\]\\:text-settings-danger[data-state=failed]{color:var(--settings-danger)}.data-\\[state\\=unavailable\\]\\:text-settings-warning[data-state=unavailable]{color:var(--settings-warning)}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@layer properties{\n *, ::before, ::after, ::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-alpha:100%;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-drop-shadow-alpha:100%;--tw-content:"";--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}\n';
33122
33618
 
33123
33619
  // src/settings/trigger.ts
33124
33620
  var SETTINGS_TRIGGER_ATTRIBUTE = "data-codexhost-settings-trigger";
@@ -34443,7 +34939,7 @@ ${accounts_default}`;
34443
34939
  openedFor = { node: trigger.node, start: trigger.start };
34444
34940
  options.onOpen?.(trigger.editor);
34445
34941
  }
34446
- const allTargets = options.readTargets();
34942
+ const allTargets = options.readTargets(trigger.editor);
34447
34943
  syncChipStyle(ownerDocument, allTargets, iconCache);
34448
34944
  const targets = filterDelegationTargets(allTargets, trigger.query);
34449
34945
  const source = options.readCommands(trigger.editor);
@@ -34662,8 +35158,13 @@ ${accounts_default}`;
34662
35158
  return state === "ready";
34663
35159
  }
34664
35160
  var rendererUsageRefreshDelays = [250, 500, 1e3, 2e3, 4e3, 8e3];
34665
- function refreshConnectionHosts(hostIds, refreshHost) {
34666
- return Promise.all([...hostIds].map((hostId) => refreshHost(hostId))).then(() => void 0);
35161
+ function refreshConnectionHosts(hostIds, refreshHost, pendingHost) {
35162
+ return Promise.all(
35163
+ [...hostIds].map(async (hostId) => {
35164
+ if (pendingHost) await pendingHost(hostId)?.catch(() => void 0);
35165
+ await refreshHost(hostId);
35166
+ })
35167
+ ).then(() => void 0);
34667
35168
  }
34668
35169
  function rendererUsageRefreshDelay(attempt) {
34669
35170
  const index = Math.max(0, Math.min(Math.trunc(attempt), rendererUsageRefreshDelays.length - 1));
@@ -34972,19 +35473,23 @@ ${accounts_default}`;
34972
35473
  let adapterDispose = null;
34973
35474
  let applyAdapterAgent = null;
34974
35475
  let modelControl = null;
34975
- const activeModelHostId = () => {
35476
+ const activeModelHostId = (composer) => {
34976
35477
  if (!modelControl) return null;
34977
- return modelControl.currentHostId ? modelControl.currentHostId() : "local";
35478
+ return modelControl.currentHostId ? modelControl.currentHostId(composer) : "local";
34978
35479
  };
34979
35480
  const controllerTarget = (target, hostId) => scopedComposerTarget(target, hostId);
34980
- let usageNotificationDispose = null;
35481
+ const usageSubscriptions = /* @__PURE__ */ new Map();
35482
+ const usageNotificationDispose = () => {
35483
+ for (const subscription of usageSubscriptions.values()) subscription.dispose();
35484
+ usageSubscriptions.clear();
35485
+ };
34981
35486
  const localAgentForSidebarThread = (input) => {
34982
35487
  for (const mounted of mountedByComposer.values()) {
34983
35488
  const target = mounted.modelTarget;
34984
35489
  const matchesDraft = target?.[0] === "default" && input.draftId !== null && target[1] === input.draftId;
34985
35490
  const matchesConversation = target?.[0] === "conversation" && input.threadId !== null && target[1] === input.threadId && mounted.ownershipStatus === "ready";
34986
35491
  if (!matchesDraft && !matchesConversation) continue;
34987
- const mountedHostId = modelControl?.currentHostId?.() ?? "local";
35492
+ const mountedHostId = activeModelHostId(mounted.composer);
34988
35493
  if (input.hostId !== mountedHostId) return null;
34989
35494
  return controller.get(mounted.composer).agent;
34990
35495
  }
@@ -35136,6 +35641,9 @@ ${accounts_default}`;
35136
35641
  const title = status === "unsupported" ? rendererHarnessMessages(settingsLifecycle.locale).codexUsageGateUnavailable : "";
35137
35642
  if (mounted.control.root.title !== title) mounted.control.root.title = title;
35138
35643
  };
35644
+ const composerClient = (mounted) => mounted.hostId ? modelClientForHost(mounted.hostId) : null;
35645
+ const composerAvailability = (mounted) => mounted.hostId ? hostHarnessAvailabilityState(mounted.hostId).availability : {};
35646
+ const composerAdapterState = (mounted) => composerClient(mounted) ? "ready" : "installing";
35139
35647
  const renderMounted = (mounted) => {
35140
35648
  const accounts = composerCodexAccounts(mounted.composer);
35141
35649
  const currentCodexAccount = accounts?.accounts.find(
@@ -35144,9 +35652,9 @@ ${accounts_default}`;
35144
35652
  const externalSubmissionReady = renderComposerAgentControl(
35145
35653
  mounted.control,
35146
35654
  controller.get(mounted.composer),
35147
- adapterStatus.state,
35655
+ composerAdapterState(mounted),
35148
35656
  controller.isSwitching(mounted.composer) || mounted.ownershipStatus === "loading",
35149
- activeHarnessAvailabilityState().availability,
35657
+ composerAvailability(mounted),
35150
35658
  mounted.modelView,
35151
35659
  mounted.permissionModeView,
35152
35660
  mounted.usage,
@@ -35179,7 +35687,7 @@ ${accounts_default}`;
35179
35687
  const generation = ++mounted.commandRequestGeneration;
35180
35688
  const agent = controller.get(mounted.composer).agent;
35181
35689
  const threadId = threadIdFromComposerModelTarget(mounted.modelTarget);
35182
- const hostId = threadId ? mounted.hostId : activeModelHostId();
35690
+ const hostId = threadId ? mounted.hostId : activeModelHostId(mounted.composer);
35183
35691
  const requestControl = modelControl;
35184
35692
  const client = modelClientForHostFrom(requestControl, hostId);
35185
35693
  if (!keepCurrent || agent === "codex") mounted.control.harnessCommands.setCommands([]);
@@ -35189,7 +35697,7 @@ ${accounts_default}`;
35189
35697
  harnessId: externalHarnessIds[agent],
35190
35698
  ...hostId && draftWorkspaces.has(hostId) ? { cwd: draftWorkspaces.get(hostId) } : {}
35191
35699
  });
35192
- if (disposed || mountedByComposer.get(mounted.composer) !== mounted || mounted.commandRequestGeneration !== generation || requestControl !== modelControl || (threadIdFromComposerModelTarget(mounted.modelTarget) ? mounted.hostId : activeModelHostId()) !== hostId || controller.get(mounted.composer).agent !== agent)
35700
+ if (disposed || mountedByComposer.get(mounted.composer) !== mounted || mounted.commandRequestGeneration !== generation || requestControl !== modelControl || (threadIdFromComposerModelTarget(mounted.modelTarget) ? mounted.hostId : activeModelHostId(mounted.composer)) !== hostId || controller.get(mounted.composer).agent !== agent)
35193
35701
  return;
35194
35702
  mounted.control.harnessCommands.setCommands(
35195
35703
  catalog.commands,
@@ -35203,9 +35711,11 @@ ${accounts_default}`;
35203
35711
  const executeCommand = async (mounted, command) => {
35204
35712
  const threadId = threadIdFromComposerModelTarget(mounted.modelTarget);
35205
35713
  if (!threadId || !modelControl || controller.get(mounted.composer).agent === "codex") return;
35714
+ const client = composerClient(mounted);
35715
+ if (!client) return;
35206
35716
  mounted.control.harnessCommands.setExecuting(command.id);
35207
35717
  try {
35208
- await modelControl.executeThreadCommand({ threadId, commandId: command.id });
35718
+ await client.executeThreadCommand({ threadId, commandId: command.id });
35209
35719
  } catch (error51) {
35210
35720
  console.error(
35211
35721
  "codexhost Harness command failed",
@@ -35227,9 +35737,10 @@ ${accounts_default}`;
35227
35737
  }
35228
35738
  console.error("codexhost Harness command could not claim the current Composer editor");
35229
35739
  };
35230
- const applyThreadUsageUpdate = (update) => {
35740
+ const applyThreadUsageUpdate = (hostId, update) => {
35231
35741
  for (const mounted of mountedByComposer.values()) {
35232
- if (threadIdFromComposerModelTarget(mounted.modelTarget) !== update.threadId) continue;
35742
+ if (mounted.hostId !== hostId || threadIdFromComposerModelTarget(mounted.modelTarget) !== update.threadId)
35743
+ continue;
35233
35744
  mounted.usageRequestGeneration += 1;
35234
35745
  mounted.usage = update.usage;
35235
35746
  mounted.accountCredits = composerAccountCredits(update.accountCredits);
@@ -35273,13 +35784,16 @@ ${accounts_default}`;
35273
35784
  renderMounted(mounted);
35274
35785
  return;
35275
35786
  }
35787
+ const hostId = mounted.hostId;
35788
+ const client = composerClient(mounted);
35789
+ if (!client) return;
35276
35790
  const generation = ++mounted.usageRequestGeneration;
35277
35791
  try {
35278
- const result = await modelControl.inspectThreadUsage({
35792
+ const result = await client.inspectThreadUsage({
35279
35793
  threadId,
35280
35794
  ...refresh ? { refresh } : {}
35281
35795
  });
35282
- if (disposed || mountedByComposer.get(mounted.composer) !== mounted || !mounted.composer.isConnected || mounted.usageRequestGeneration !== generation || threadIdFromComposerModelTarget(mounted.modelTarget) !== threadId || result.threadId !== threadId) {
35796
+ if (disposed || mountedByComposer.get(mounted.composer) !== mounted || !mounted.composer.isConnected || mounted.usageRequestGeneration !== generation || mounted.hostId !== hostId || composerClient(mounted) !== client || threadIdFromComposerModelTarget(mounted.modelTarget) !== threadId || result.threadId !== threadId) {
35283
35797
  return;
35284
35798
  }
35285
35799
  mounted.usage = result.usage;
@@ -35348,7 +35862,7 @@ ${accounts_default}`;
35348
35862
  return;
35349
35863
  }
35350
35864
  const requestModelControl = modelControl;
35351
- const requestHostId = activeModelHostId();
35865
+ const requestHostId = activeModelHostId(mounted.composer);
35352
35866
  const client = modelClientForHostFrom(requestModelControl, requestHostId);
35353
35867
  const generation = controller.beginOwnershipRequest(mounted.composer);
35354
35868
  const usageGeneration = mounted.usageRequestGeneration;
@@ -35358,7 +35872,7 @@ ${accounts_default}`;
35358
35872
  if (!client || !requestHostId) throw new Error("Thread ownership control is unavailable");
35359
35873
  mounted.hostId = requestHostId;
35360
35874
  const inspection = await client.inspectThread({ threadId });
35361
- if (!isCurrentOwnershipRequest(mounted, generation) || mountedByComposer.get(mounted.composer) !== mounted || threadIdFromComposerModelTarget(mounted.modelTarget) !== threadId || mounted.hostId !== requestHostId || modelControl !== requestModelControl || activeModelHostId() !== requestHostId) {
35875
+ if (!isCurrentOwnershipRequest(mounted, generation) || mountedByComposer.get(mounted.composer) !== mounted || threadIdFromComposerModelTarget(mounted.modelTarget) !== threadId || mounted.hostId !== requestHostId || modelControl !== requestModelControl || activeModelHostId(mounted.composer) !== requestHostId) {
35362
35876
  return;
35363
35877
  }
35364
35878
  const { agent, model, thinkingOptionId, permissionModeId } = restoredThreadOwnership(inspection);
@@ -35424,7 +35938,7 @@ ${accounts_default}`;
35424
35938
  );
35425
35939
  if (resolution === "none") return false;
35426
35940
  const previousTarget = mounted.modelTarget;
35427
- const nextHostId = activeModelHostId() ?? mounted.hostId;
35941
+ const nextHostId = activeModelHostId(mounted.composer);
35428
35942
  const nextControllerTarget = controllerTarget(currentTarget, nextHostId);
35429
35943
  mounted.modelTarget = currentTarget;
35430
35944
  mounted.hostId = nextHostId;
@@ -35463,7 +35977,7 @@ ${accounts_default}`;
35463
35977
  const agent = state.agent;
35464
35978
  const requestModelControl = modelControl;
35465
35979
  const isDraft = !threadIdFromComposerModelTarget(mounted.modelTarget);
35466
- const requestHostId = isDraft ? activeModelHostId() : mounted.hostId;
35980
+ const requestHostId = isDraft ? activeModelHostId(mounted.composer) : mounted.hostId;
35467
35981
  if (!requestHostId) {
35468
35982
  mounted.modelView = {
35469
35983
  status: "waitingForAdapter",
@@ -35477,7 +35991,7 @@ ${accounts_default}`;
35477
35991
  const availability = hostHarnessAvailabilityState(requestHostId).availability[agent];
35478
35992
  if (availability !== "ready" && availability !== "checking") {
35479
35993
  mounted.modelView = {
35480
- status: adapterStatus.state === "ready" ? "error" : "waitingForAdapter",
35994
+ status: composerAdapterState(mounted) === "ready" ? "error" : "waitingForAdapter",
35481
35995
  thinkingSelectionSupported: false,
35482
35996
  ...availability ? { error: `${agent} runtime is ${availability}` } : {}
35483
35997
  };
@@ -35486,12 +36000,12 @@ ${accounts_default}`;
35486
36000
  return;
35487
36001
  }
35488
36002
  mounted.modelView = {
35489
- status: adapterStatus.state === "ready" ? "loading" : "waitingForAdapter",
36003
+ status: composerAdapterState(mounted) === "ready" ? "loading" : "waitingForAdapter",
35490
36004
  thinkingSelectionSupported: false
35491
36005
  };
35492
36006
  mounted.permissionModeView = { status: "idle" };
35493
36007
  renderMounted(mounted);
35494
- if (adapterStatus.state !== "ready") return;
36008
+ if (!composerClient(mounted)) return;
35495
36009
  const generation = controller.beginModelRequest(mounted.composer);
35496
36010
  let catalogRequest;
35497
36011
  try {
@@ -35507,7 +36021,7 @@ ${accounts_default}`;
35507
36021
  const inspection = await client.inspectHarness({
35508
36022
  harnessId: externalHarnessIds[agent]
35509
36023
  });
35510
- if (!isCurrentModelRequest(mounted, generation) || controller.get(mounted.composer).agent !== agent || mounted.hostId !== requestHostId || modelControl !== requestModelControl || modelClientForHostFrom(requestModelControl, requestHostId) !== client || activeModelHostId() !== requestHostId) {
36024
+ if (!isCurrentModelRequest(mounted, generation) || controller.get(mounted.composer).agent !== agent || mounted.hostId !== requestHostId || modelControl !== requestModelControl || modelClientForHostFrom(requestModelControl, requestHostId) !== client || activeModelHostId(mounted.composer) !== requestHostId) {
35511
36025
  return;
35512
36026
  }
35513
36027
  if (inspection.status !== "ready") throw new Error(inspection.error.message);
@@ -35736,7 +36250,10 @@ ${accounts_default}`;
35736
36250
  if (!threadId) {
35737
36251
  throw new Error("External Thread identity is unavailable for Model selection");
35738
36252
  }
35739
- const state = await modelControl.selectThreadModel({ threadId, model: selected });
36253
+ const client = composerClient(mounted);
36254
+ if (!client) throw new Error("Thread Host is unavailable");
36255
+ const state = await client.selectThreadModel({ threadId, model: selected });
36256
+ if (composerClient(mounted) !== client) return;
35740
36257
  if (!isCurrentModelRequest(mounted, generation) || controller.get(mounted.composer).agent !== agent) {
35741
36258
  return;
35742
36259
  }
@@ -35860,10 +36377,13 @@ ${accounts_default}`;
35860
36377
  if (!threadId) {
35861
36378
  throw new Error("External Thread identity is unavailable for Permission Mode selection");
35862
36379
  }
35863
- const state = await modelControl.selectThreadPermissionMode({
36380
+ const client = composerClient(mounted);
36381
+ if (!client) throw new Error("Thread Host is unavailable");
36382
+ const state = await client.selectThreadPermissionMode({
35864
36383
  threadId,
35865
36384
  permissionModeId: selectedPermissionModeId
35866
36385
  });
36386
+ if (composerClient(mounted) !== client) return;
35867
36387
  if (!isCurrentModelRequest(mounted, generation) || controller.get(mounted.composer).agent !== agent) {
35868
36388
  return;
35869
36389
  }
@@ -35974,10 +36494,13 @@ ${accounts_default}`;
35974
36494
  if (!threadId || !modelControl) {
35975
36495
  throw new Error("External Thread identity is unavailable for Thinking selection");
35976
36496
  }
35977
- const state = await modelControl.selectThreadThinking({
36497
+ const client = composerClient(mounted);
36498
+ if (!client) throw new Error("Thread Host is unavailable");
36499
+ const state = await client.selectThreadThinking({
35978
36500
  threadId,
35979
36501
  thinkingOptionId: selectedThinkingOptionId
35980
36502
  });
36503
+ if (composerClient(mounted) !== client) return;
35981
36504
  if (!isCurrentModelRequest(mounted, generation) || controller.get(mounted.composer).agent !== agent) {
35982
36505
  return;
35983
36506
  }
@@ -36037,7 +36560,7 @@ ${accounts_default}`;
36037
36560
  }
36038
36561
  };
36039
36562
  const switchComposerAgent = async (mounted, agent) => {
36040
- if (agent !== "codex" && activeHarnessAvailabilityState().availability[agent] !== "ready") {
36563
+ if (agent !== "codex" && composerAvailability(mounted)[agent] !== "ready") {
36041
36564
  return false;
36042
36565
  }
36043
36566
  controller.clearPendingSubmission(mounted.composer);
@@ -36074,16 +36597,20 @@ ${accounts_default}`;
36074
36597
  }
36075
36598
  };
36076
36599
  const loadCodexAccounts = async () => {
36077
- const hostId = activeModelHostId();
36078
- const accounts = codexAccountsForHost(hostId);
36079
- if (!accounts) return;
36080
- await accounts.refresh();
36081
- if (disposed || codexAccountsForHost(hostId) !== accounts) return;
36082
- for (const mounted of mountedByComposer.values()) {
36083
- if (mounted.hostId !== hostId) continue;
36084
- renderMounted(mounted);
36085
- void refreshDraftCodexUsage(mounted);
36086
- }
36600
+ const hostIds = new Set([...mountedByComposer.values()].map((mounted) => mounted.hostId));
36601
+ await Promise.all(
36602
+ [...hostIds].map(async (hostId) => {
36603
+ const accounts = codexAccountsForHost(hostId);
36604
+ if (!accounts) return;
36605
+ await accounts.refresh();
36606
+ if (disposed || codexAccountsForHost(hostId) !== accounts) return;
36607
+ for (const mounted of mountedByComposer.values()) {
36608
+ if (mounted.hostId !== hostId) continue;
36609
+ renderMounted(mounted);
36610
+ void refreshDraftCodexUsage(mounted);
36611
+ }
36612
+ })
36613
+ );
36087
36614
  };
36088
36615
  function resetHarnessAvailabilityRetry(hostId) {
36089
36616
  const state = hostHarnessAvailabilityState(hostId);
@@ -36123,7 +36650,7 @@ ${accounts_default}`;
36123
36650
  state.requestGeneration += 1;
36124
36651
  state.request = null;
36125
36652
  }
36126
- if (force || activeModelHostId() === hostId) {
36653
+ if (force || [...mountedByComposer.values()].some((mounted) => mounted.hostId === hostId)) {
36127
36654
  for (const agent of externalAgents) {
36128
36655
  state.availability[agent] = "error";
36129
36656
  state.errors[agent] = {
@@ -36197,17 +36724,15 @@ ${accounts_default}`;
36197
36724
  state.errors[agent] = nextError;
36198
36725
  state.availability = { ...state.availability, [agent]: status };
36199
36726
  state.webUi = { ...state.webUi, [agent]: webUiAvailable };
36200
- if (hostId !== activeAvailabilityHostId) {
36201
- publishConnectionStatus();
36202
- return;
36203
- }
36204
36727
  for (const mounted of mountedByComposer.values()) {
36728
+ if (mounted.hostId !== hostId) continue;
36205
36729
  const composerState = controller.get(mounted.composer);
36206
- if (adapterStatus.state === "ready" && composerState.phase === "draft" && composerState.agent === agent && status !== "ready") {
36730
+ if (composerAdapterState(mounted) === "ready" && composerState.phase === "draft" && composerState.agent === agent && status !== "ready") {
36207
36731
  await switchComposerAgent(mounted, "codex");
36208
36732
  }
36209
36733
  }
36210
36734
  for (const mounted of mountedByComposer.values()) {
36735
+ if (mounted.hostId !== hostId) continue;
36211
36736
  const composerState = controller.get(mounted.composer);
36212
36737
  const pendingCatalog = catalogRequests.get(mounted);
36213
36738
  const loadingCurrentCatalog = pendingCatalog?.client === client && pendingCatalog.hostId === hostId && pendingCatalog.agent === agent && isCurrentModelRequest(mounted, pendingCatalog.generation);
@@ -36243,9 +36768,10 @@ ${accounts_default}`;
36243
36768
  );
36244
36769
  return promise2;
36245
36770
  }
36246
- const reloadMountedOwnershipForHost = (hostId) => {
36771
+ const reloadMountedOwnershipForHost = () => {
36247
36772
  for (const mounted of mountedByComposer.values()) {
36248
- if (mounted.hostId === hostId) continue;
36773
+ const hostId = activeModelHostId(mounted.composer);
36774
+ if (!hostId || mounted.hostId === hostId) continue;
36249
36775
  if (!threadIdFromComposerModelTarget(mounted.modelTarget)) {
36250
36776
  controller.clearPendingSubmission(mounted.composer);
36251
36777
  controller.beginModelRequest(mounted.composer);
@@ -36289,19 +36815,46 @@ ${accounts_default}`;
36289
36815
  sidebarAgentIcons.refresh();
36290
36816
  };
36291
36817
  function reconcileHarnessAvailabilityHost() {
36818
+ for (const hostId2 of modelControl?.knownHostIds?.() ?? []) {
36819
+ hostHarnessAvailabilityState(hostId2);
36820
+ }
36821
+ reloadMountedOwnershipForHost();
36822
+ for (const target of new Set([...mountedByComposer.values()].map((m) => m.hostId))) {
36823
+ if (!target) continue;
36824
+ const client = modelClientForHost(target);
36825
+ const previous = usageSubscriptions.get(target);
36826
+ if (previous?.client === client) continue;
36827
+ previous?.dispose();
36828
+ usageSubscriptions.delete(target);
36829
+ if (!client?.subscribeThreadUsage) continue;
36830
+ try {
36831
+ const dispose = client.subscribeThreadUsage((update) => {
36832
+ if (usageSubscriptions.get(target)?.client !== client) return;
36833
+ if (modelClientForHost(target) !== client) return;
36834
+ applyThreadUsageUpdate(target, update);
36835
+ });
36836
+ usageSubscriptions.set(target, { client, dispose });
36837
+ } catch {
36838
+ }
36839
+ }
36292
36840
  const hostId = activeModelHostId();
36293
36841
  if (!hostId || hostId === activeAvailabilityHostId && [...mountedByComposer.values()].every((mounted) => mounted.hostId !== null))
36294
36842
  return;
36295
36843
  activeAvailabilityHostId = hostId;
36296
36844
  hostHarnessAvailabilityState(hostId);
36297
- reloadMountedOwnershipForHost(hostId);
36298
36845
  publishConnectionStatus();
36299
36846
  for (const mounted of mountedByComposer.values()) renderMounted(mounted);
36300
36847
  void refreshHarnessAvailabilityForHost(hostId);
36301
36848
  }
36302
- const refreshHarnessAvailability = (refresh = false) => {
36849
+ const refreshHarnessAvailability = async (refresh = false) => {
36303
36850
  reconcileHarnessAvailabilityHost();
36304
- return refreshHarnessAvailabilityForHost(activeAvailabilityHostId, refresh);
36851
+ const hostIds = /* @__PURE__ */ new Set([activeAvailabilityHostId]);
36852
+ for (const mounted of mountedByComposer.values()) {
36853
+ if (mounted.hostId) hostIds.add(mounted.hostId);
36854
+ }
36855
+ await Promise.all(
36856
+ [...hostIds].map((hostId) => refreshHarnessAvailabilityForHost(hostId, refresh))
36857
+ );
36305
36858
  };
36306
36859
  connectionDiagnostics = {
36307
36860
  snapshot() {
@@ -36326,11 +36879,18 @@ ${accounts_default}`;
36326
36879
  })
36327
36880
  };
36328
36881
  },
36329
- refresh() {
36882
+ refresh(hostId) {
36883
+ if (hostId !== void 0) {
36884
+ return refreshConnectionHosts(
36885
+ [hostId],
36886
+ (target) => refreshHarnessAvailabilityForHost(target, true, false, true),
36887
+ (target) => hostHarnessAvailabilityState(target).request?.promise
36888
+ );
36889
+ }
36330
36890
  reconcileHarnessAvailabilityHost();
36331
36891
  return refreshConnectionHosts(
36332
36892
  harnessAvailabilityByHost.keys(),
36333
- (hostId) => refreshHarnessAvailabilityForHost(hostId, true, false, true)
36893
+ (target) => refreshHarnessAvailabilityForHost(target, true, false, true)
36334
36894
  );
36335
36895
  },
36336
36896
  async installation(hostId, agent, action) {
@@ -36349,6 +36909,16 @@ ${accounts_default}`;
36349
36909
  if (!client?.setHarnessLaunchSettings) throw new Error("Launch settings are unavailable");
36350
36910
  return client.setHarnessLaunchSettings({ harnessId: externalHarnessIds[agent], path });
36351
36911
  },
36912
+ async getLongContext(hostId, agent) {
36913
+ const client = modelClientForHost(hostId);
36914
+ if (!client?.getHarnessLongContext) throw new Error("1M context is unavailable");
36915
+ return client.getHarnessLongContext({ harnessId: externalHarnessIds[agent] });
36916
+ },
36917
+ async setLongContext(hostId, agent, enabled) {
36918
+ const client = modelClientForHost(hostId);
36919
+ if (!client?.setHarnessLongContext) throw new Error("1M context is unavailable");
36920
+ return client.setHarnessLongContext({ harnessId: externalHarnessIds[agent], enabled });
36921
+ },
36352
36922
  async openWebUi(hostId, agent) {
36353
36923
  const state = hostHarnessAvailabilityState(hostId);
36354
36924
  const client = hostId === "local" ? modelClientForHost(hostId) : null;
@@ -36377,7 +36947,7 @@ ${accounts_default}`;
36377
36947
  const sendButton = sendButtonWithin(composer) ?? allButtons.at(-1) ?? null;
36378
36948
  if (!sendButton) return;
36379
36949
  const modelTarget = findComposerModelTarget(composer);
36380
- const hostId = activeModelHostId();
36950
+ const hostId = activeModelHostId(composer);
36381
36951
  const editor = composer.querySelector(EDITOR_SELECTOR);
36382
36952
  if (!editor) return;
36383
36953
  const state = controller.mount(
@@ -36460,7 +37030,7 @@ ${accounts_default}`;
36460
37030
  for (const [target, replacement] of pendingReplacements) {
36461
37031
  const sourceState = controller.get(replacement.source.composer);
36462
37032
  const replacementTarget = findComposerModelTarget(target);
36463
- const replacementHostId = activeModelHostId() ?? replacement.source.hostId;
37033
+ const replacementHostId = activeModelHostId(target);
36464
37034
  if (!shouldTransferComposerState(
36465
37035
  replacement.sourceModelTarget,
36466
37036
  replacementTarget,
@@ -36503,8 +37073,8 @@ ${accounts_default}`;
36503
37073
  void refreshHarnessAvailabilityForHost("local");
36504
37074
  }
36505
37075
  reconcileHarnessAvailabilityHost();
36506
- if (externalAgents.some(
36507
- (agent) => activeHarnessAvailabilityState().availability[agent] === "checking"
37076
+ if ([...mountedByComposer.values()].some(
37077
+ (mounted) => externalAgents.some((agent) => composerAvailability(mounted)[agent] === "checking")
36508
37078
  )) {
36509
37079
  void refreshHarnessAvailability();
36510
37080
  }
@@ -36656,8 +37226,8 @@ ${accounts_default}`;
36656
37226
  scheduleScan(relevant.some(mutationMayChangeComposerTarget));
36657
37227
  });
36658
37228
  const onHostRouteChange = () => {
36659
- const hostId = activeModelHostId();
36660
37229
  for (const mounted of mountedByComposer.values()) {
37230
+ const hostId = activeModelHostId(mounted.composer);
36661
37231
  if (hostId && mounted.hostId === hostId && !threadIdFromComposerModelTarget(mounted.modelTarget) && controller.get(mounted.composer).agent !== "codex" && !controller.isSwitching(mounted.composer) && isExternalConfigurationStable(mounted.modelView, mounted.permissionModeView)) {
36662
37232
  applyComposerAgent(mounted.composer);
36663
37233
  }
@@ -36680,14 +37250,14 @@ ${accounts_default}`;
36680
37250
  sidebarAgentIcons.refresh();
36681
37251
  void refreshHarnessAvailabilityForHost("local");
36682
37252
  void refreshHarnessAvailability();
36683
- for (const mounted of mountedByComposer.values()) {
36684
- if (mounted.modelView.status === "waitingForAdapter" && mounted.composer.isConnected) {
36685
- applyComposerAgent(mounted.composer);
36686
- void loadExternalCatalog(mounted);
36687
- }
37253
+ }
37254
+ for (const mounted of mountedByComposer.values()) {
37255
+ if (mounted.modelView.status === "waitingForAdapter" && mounted.composer.isConnected && composerClient(mounted)) {
37256
+ applyComposerAgent(mounted.composer);
37257
+ void loadExternalCatalog(mounted);
36688
37258
  }
37259
+ renderMounted(mounted);
36689
37260
  }
36690
- for (const mounted of mountedByComposer.values()) renderMounted(mounted);
36691
37261
  };
36692
37262
  mutationObserver.observe(document.documentElement, {
36693
37263
  attributes: true,
@@ -36704,7 +37274,7 @@ ${accounts_default}`;
36704
37274
  reconcileHarnessAvailabilityHost();
36705
37275
  void loadCodexAccounts();
36706
37276
  for (const mounted of mountedByComposer.values()) {
36707
- if (mounted.hostId === activeModelHostId() && mounted.ownershipStatus === "error") {
37277
+ if (mounted.hostId === activeModelHostId(mounted.composer) && mounted.ownershipStatus === "error") {
36708
37278
  void loadThreadOwnership(mounted);
36709
37279
  }
36710
37280
  }
@@ -36712,8 +37282,9 @@ ${accounts_default}`;
36712
37282
  if (externalAgents.some((agent) => local.availability[agent] !== "ready")) {
36713
37283
  void refreshHarnessAvailabilityForHost("local", true);
36714
37284
  }
36715
- const active = activeHarnessAvailabilityState();
36716
- if (externalAgents.some((agent) => active.availability[agent] !== "ready")) {
37285
+ if ([...mountedByComposer.values()].some(
37286
+ (mounted) => externalAgents.some((agent) => composerAvailability(mounted)[agent] !== "ready")
37287
+ )) {
36717
37288
  void refreshHarnessAvailability(true);
36718
37289
  }
36719
37290
  };
@@ -36724,7 +37295,7 @@ ${accounts_default}`;
36724
37295
  if (typeof hostId !== "string" || typeof cwd !== "string" || cwd.length === 0) return;
36725
37296
  draftWorkspaces.set(hostId, cwd);
36726
37297
  for (const mounted of mountedByComposer.values()) {
36727
- if (!threadIdFromComposerModelTarget(mounted.modelTarget) && activeModelHostId() === hostId && controller.get(mounted.composer).agent !== "codex") {
37298
+ if (!threadIdFromComposerModelTarget(mounted.modelTarget) && activeModelHostId(mounted.composer) === hostId && controller.get(mounted.composer).agent !== "codex") {
36728
37299
  void refreshCommands(mounted, { keepCurrent: true });
36729
37300
  }
36730
37301
  }
@@ -36741,8 +37312,10 @@ ${accounts_default}`;
36741
37312
  void refreshCommands(mounted, { keepCurrent: true });
36742
37313
  }
36743
37314
  },
36744
- readTargets: () => {
36745
- const availability = activeHarnessAvailabilityState().availability;
37315
+ readTargets: (editor) => {
37316
+ const composer = composerForElement(editor);
37317
+ const mounted = composer ? mountedByComposer.get(composer) : void 0;
37318
+ const availability = mounted ? composerAvailability(mounted) : {};
36746
37319
  return enabledAgents.filter((agent) => agent === "codex" || availability[agent] === "ready").map((agent) => ({ agent, label: RENDERER_AGENT_LABELS[agent] }));
36747
37320
  },
36748
37321
  isComposerEditor: (editor) => {
@@ -36811,17 +37384,11 @@ ${accounts_default}`;
36811
37384
  };
36812
37385
  },
36813
37386
  setAdapter(status, dispose, applyAgent, nextModelControl) {
36814
- usageNotificationDispose?.();
36815
- usageNotificationDispose = null;
37387
+ usageNotificationDispose();
36816
37388
  adapterDispose?.();
36817
37389
  adapterDispose = dispose ?? null;
36818
37390
  applyAdapterAgent = applyAgent ?? null;
36819
37391
  modelControl = nextModelControl ?? null;
36820
- try {
36821
- usageNotificationDispose = modelControl?.subscribeThreadUsage?.(applyThreadUsageUpdate) ?? null;
36822
- } catch {
36823
- usageNotificationDispose = null;
36824
- }
36825
37392
  adapterStatus = status;
36826
37393
  publishConnectionStatus();
36827
37394
  const installedModelControl = modelControl;
@@ -36850,7 +37417,7 @@ ${accounts_default}`;
36850
37417
  if (mounted) {
36851
37418
  const state = controller.get(mounted.composer);
36852
37419
  if (!threadIdFromComposerModelTarget(mounted.modelTarget)) {
36853
- mounted.hostId = activeModelHostId();
37420
+ mounted.hostId = activeModelHostId(mounted.composer);
36854
37421
  }
36855
37422
  if (threadIdFromComposerModelTarget(mounted.modelTarget) && mounted.ownershipStatus !== "ready") {
36856
37423
  void loadThreadOwnership(mounted);
@@ -36871,8 +37438,7 @@ ${accounts_default}`;
36871
37438
  disposed = true;
36872
37439
  disposeApprovalStyle();
36873
37440
  subagentRowMeta.dispose();
36874
- usageNotificationDispose?.();
36875
- usageNotificationDispose = null;
37441
+ usageNotificationDispose();
36876
37442
  adapterDispose?.();
36877
37443
  adapterDispose = null;
36878
37444
  applyAdapterAgent = null;