@liberseek/boft-cli-win32-arm64 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.
@@ -27178,6 +27178,71 @@ var harnessDisplaySetSchema = external_exports.strictObject({
27178
27178
  initializeOnly: external_exports.boolean().optional()
27179
27179
  });
27180
27180
 
27181
+ // ../../shared-contracts/dist/ids.js
27182
+ var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
27183
+ message: "Identifier must not be empty or whitespace"
27184
+ });
27185
+ var harnessIdSchema = opaqueIdSchema.brand();
27186
+ var hostThreadIdSchema = opaqueIdSchema.brand();
27187
+ var hostTurnIdSchema = opaqueIdSchema.brand();
27188
+ var hostItemIdSchema = opaqueIdSchema.brand();
27189
+ var hostInteractionIdSchema = opaqueIdSchema.brand();
27190
+
27191
+ // ../../shared-contracts/dist/harness-plugins.js
27192
+ var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
27193
+ var HARNESS_PLUGIN_ICON_MAX_BYTES = 128 * 1024;
27194
+ var HARNESS_PLUGIN_LIMIT = 128;
27195
+ 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);
27196
+ 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");
27197
+ var documentationUrlSchema = external_exports.url().refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Plugin documentation links must be credential-free HTTPS URLs");
27198
+ var pluginPresentationShape = {
27199
+ id: harnessPluginIdSchema,
27200
+ name: external_exports.string().trim().min(1).max(128),
27201
+ version: external_exports.string().min(1).max(128),
27202
+ /** The factory accepts a persisted local entrypoint through its construction context. */
27203
+ launchCommand: external_exports.literal(true).optional(),
27204
+ links: external_exports.object({
27205
+ documentation: documentationUrlSchema.optional(),
27206
+ installation: documentationUrlSchema.optional()
27207
+ }).strict().optional()
27208
+ };
27209
+ var harnessPluginManifestSchema = external_exports.object({
27210
+ manifestVersion: external_exports.literal(1),
27211
+ ...pluginPresentationShape,
27212
+ adapterApiVersion: external_exports.number().int().positive(),
27213
+ entry: relativeResourceSchema,
27214
+ icon: relativeResourceSchema.optional()
27215
+ }).strict();
27216
+ 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);
27217
+ var harnessPluginDescriptorSchema = external_exports.object({
27218
+ ...pluginPresentationShape,
27219
+ icon: harnessPluginIconSchema.optional()
27220
+ }).strict();
27221
+ var harnessPluginListParamsSchema = external_exports.object({}).strict();
27222
+ var harnessPluginListResultSchema = external_exports.object({
27223
+ plugins: external_exports.array(harnessPluginDescriptorSchema).max(HARNESS_PLUGIN_LIMIT)
27224
+ }).strict();
27225
+ var harnessPluginConfigurationSchema = external_exports.object({
27226
+ version: external_exports.literal(1),
27227
+ enabled: external_exports.array(harnessPluginIdSchema).max(HARNESS_PLUGIN_LIMIT)
27228
+ }).strict().refine((value) => new Set(value.enabled).size === value.enabled.length, {
27229
+ message: "Enabled plugin IDs must be unique",
27230
+ path: ["enabled"]
27231
+ });
27232
+
27233
+ // ../../shared-contracts/dist/harness-long-context.js
27234
+ var HARNESS_LONG_CONTEXT_GET_METHOD = "codexhost/harness/long-context/get";
27235
+ var HARNESS_LONG_CONTEXT_SET_METHOD = "codexhost/harness/long-context/set";
27236
+ var harnessLongContextGetSchema = external_exports.object({
27237
+ harnessId: harnessPluginIdSchema
27238
+ }).strict();
27239
+ var harnessLongContextSetSchema = harnessLongContextGetSchema.extend({
27240
+ enabled: external_exports.boolean()
27241
+ });
27242
+ var harnessLongContextSchema = external_exports.object({
27243
+ enabled: external_exports.boolean()
27244
+ }).strict();
27245
+
27181
27246
  // ../../shared-contracts/dist/console.js
27182
27247
  var consoleAnnouncementSchema = external_exports.strictObject({
27183
27248
  title: external_exports.string().trim().min(1).max(200),
@@ -27194,8 +27259,11 @@ var CONSOLE_HOST_METHODS = Object.freeze([
27194
27259
  "codexhost/harness/display-settings/get",
27195
27260
  "codexhost/harness/display-settings/set",
27196
27261
  "codexhost/harness/inspect",
27262
+ "codexhost/harness/installation",
27197
27263
  "codexhost/harness/launch-settings/get",
27198
27264
  "codexhost/harness/launch-settings/set",
27265
+ HARNESS_LONG_CONTEXT_GET_METHOD,
27266
+ HARNESS_LONG_CONTEXT_SET_METHOD,
27199
27267
  "codexhost/harness/web-ui/open",
27200
27268
  "codexhost/harness/accounts/sources",
27201
27269
  "codexhost/harness/accounts/list",
@@ -27255,16 +27323,6 @@ var loadedSessionsSchema = external_exports.array(external_exports.strictObject(
27255
27323
  inactiveMs: external_exports.number().nonnegative()
27256
27324
  }));
27257
27325
 
27258
- // ../../shared-contracts/dist/ids.js
27259
- var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
27260
- message: "Identifier must not be empty or whitespace"
27261
- });
27262
- var harnessIdSchema = opaqueIdSchema.brand();
27263
- var hostThreadIdSchema = opaqueIdSchema.brand();
27264
- var hostTurnIdSchema = opaqueIdSchema.brand();
27265
- var hostItemIdSchema = opaqueIdSchema.brand();
27266
- var hostInteractionIdSchema = opaqueIdSchema.brand();
27267
-
27268
27326
  // ../../shared-contracts/dist/manual-compaction.js
27269
27327
  var threadManualCompactionStartedSchema = external_exports.strictObject({
27270
27328
  threadId: hostThreadIdSchema,
@@ -27794,48 +27852,6 @@ var threadOwnershipListResultSchema = external_exports.object({
27794
27852
  }
27795
27853
  });
27796
27854
 
27797
- // ../../shared-contracts/dist/harness-plugins.js
27798
- var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
27799
- var HARNESS_PLUGIN_ICON_MAX_BYTES = 128 * 1024;
27800
- var HARNESS_PLUGIN_LIMIT = 128;
27801
- 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);
27802
- 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");
27803
- var documentationUrlSchema = external_exports.url().refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Plugin documentation links must be credential-free HTTPS URLs");
27804
- var pluginPresentationShape = {
27805
- id: harnessPluginIdSchema,
27806
- name: external_exports.string().trim().min(1).max(128),
27807
- version: external_exports.string().min(1).max(128),
27808
- /** The factory accepts a persisted local entrypoint through its construction context. */
27809
- launchCommand: external_exports.literal(true).optional(),
27810
- links: external_exports.object({
27811
- documentation: documentationUrlSchema.optional(),
27812
- installation: documentationUrlSchema.optional()
27813
- }).strict().optional()
27814
- };
27815
- var harnessPluginManifestSchema = external_exports.object({
27816
- manifestVersion: external_exports.literal(1),
27817
- ...pluginPresentationShape,
27818
- adapterApiVersion: external_exports.number().int().positive(),
27819
- entry: relativeResourceSchema,
27820
- icon: relativeResourceSchema.optional()
27821
- }).strict();
27822
- 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);
27823
- var harnessPluginDescriptorSchema = external_exports.object({
27824
- ...pluginPresentationShape,
27825
- icon: harnessPluginIconSchema.optional()
27826
- }).strict();
27827
- var harnessPluginListParamsSchema = external_exports.object({}).strict();
27828
- var harnessPluginListResultSchema = external_exports.object({
27829
- plugins: external_exports.array(harnessPluginDescriptorSchema).max(HARNESS_PLUGIN_LIMIT)
27830
- }).strict();
27831
- var harnessPluginConfigurationSchema = external_exports.object({
27832
- version: external_exports.literal(1),
27833
- enabled: external_exports.array(harnessPluginIdSchema).max(HARNESS_PLUGIN_LIMIT)
27834
- }).strict().refine((value) => new Set(value.enabled).size === value.enabled.length, {
27835
- message: "Enabled plugin IDs must be unique",
27836
- path: ["enabled"]
27837
- });
27838
-
27839
27855
  // ../../shared-contracts/dist/harness-route.js
27840
27856
  var harnessPluginRouteSchema = external_exports.object({
27841
27857
  harnessId: harnessPluginIdSchema,
@@ -27860,14 +27876,17 @@ var harnessLaunchSettingsSchema = external_exports.object({
27860
27876
  // ../../shared-contracts/dist/harness-installation.js
27861
27877
  var harnessInstallationParamsSchema = external_exports.object({
27862
27878
  harnessId: harnessIdSchema,
27863
- action: external_exports.enum(["check", "update"])
27879
+ action: external_exports.enum(["check", "update", "install"])
27864
27880
  }).strict();
27865
27881
  var harnessInstallationStateSchema = external_exports.object({
27866
27882
  currentVersion: external_exports.string().min(1).max(128),
27867
27883
  latestVersion: external_exports.string().min(1).max(128),
27868
27884
  updateAvailable: external_exports.boolean(),
27869
27885
  canUpdate: external_exports.boolean(),
27870
- message: external_exports.string().max(2048).optional()
27886
+ // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
27887
+ message: external_exports.string().max(2048).optional(),
27888
+ messageCode: external_exports.string().min(1).max(128).optional(),
27889
+ latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
27871
27890
  }).strict();
27872
27891
 
27873
27892
  // ../../shared-contracts/dist/codex-accounts.js
@@ -28162,7 +28181,7 @@ var updateStatusSchema = external_exports.strictObject({
28162
28181
  }
28163
28182
  });
28164
28183
  var updateEmptyParamsSchema = external_exports.strictObject({});
28165
- 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");
28184
+ 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");
28166
28185
  var updateCheckResultSchema = external_exports.strictObject({
28167
28186
  currentVersion: updateSemanticVersionSchema,
28168
28187
  installation: updateInstallationSchema.nullable(),
@@ -28520,6 +28539,75 @@ function createInstallationManager(options) {
28520
28539
  return updating;
28521
28540
  };
28522
28541
  }
28542
+ async function fetchInstallationText(url2) {
28543
+ const request = async () => {
28544
+ const response = await fetch(url2, { signal: AbortSignal.timeout(15e3) });
28545
+ if (!response.ok)
28546
+ throw new Error("Could not check the latest Harness version");
28547
+ return response.text();
28548
+ };
28549
+ try {
28550
+ return await request();
28551
+ } catch (error51) {
28552
+ if (error51 instanceof DOMException && (error51.name === "AbortError" || error51.name === "TimeoutError"))
28553
+ throw error51;
28554
+ return request();
28555
+ }
28556
+ }
28557
+
28558
+ // ../../harness-discovery/dist/installer.js
28559
+ import { mkdtemp, rm, writeFile } from "node:fs/promises";
28560
+ import { tmpdir } from "node:os";
28561
+ import { join } from "node:path";
28562
+ function createHarnessInstaller(environment, source) {
28563
+ return async () => {
28564
+ if (!["darwin", "linux", "win32"].includes(process.platform))
28565
+ throw new Error("Unsupported installation platform");
28566
+ const env = withNodeRuntimeOnPath(environment);
28567
+ if ("npm" in source) {
28568
+ const npm = resolveHarnessExecutable({
28569
+ id: "npm",
28570
+ command: "npm",
28571
+ installRoots: {
28572
+ posix: [
28573
+ "~/.npm-global/bin",
28574
+ "~/.local/bin",
28575
+ VERSION_MANAGER_ROOTS,
28576
+ "/opt/homebrew/bin",
28577
+ "/usr/local/bin",
28578
+ "/usr/bin"
28579
+ ],
28580
+ windows: [
28581
+ "${APPDATA}/npm",
28582
+ VERSION_MANAGER_ROOTS,
28583
+ "${ProgramFiles}/nodejs",
28584
+ "${LOCALAPPDATA}/Programs/nodejs"
28585
+ ]
28586
+ }
28587
+ }, { environment: env });
28588
+ if (!npm)
28589
+ throw new Error("Install Node.js and npm first");
28590
+ await runInstallationCommand(npm.executable, ["install", "--global", source.npm], {
28591
+ ...env,
28592
+ ...source.allowScripts ? { npm_config_allow_scripts: source.allowScripts } : {}
28593
+ }, 6e5);
28594
+ return;
28595
+ }
28596
+ const windows = process.platform === "win32";
28597
+ const url2 = windows ? source.windows : source.posix;
28598
+ if (new URL(url2).protocol !== "https:")
28599
+ throw new Error("Installer requires HTTPS");
28600
+ const script = await fetchInstallationText(url2);
28601
+ const directory = await mkdtemp(join(tmpdir(), "codexhost-installer-"));
28602
+ try {
28603
+ const file2 = join(directory, windows ? "install.ps1" : "install.sh");
28604
+ await writeFile(file2, script, { mode: 384 });
28605
+ await runInstallationCommand(windows ? "powershell.exe" : source.shell ?? "bash", windows ? ["-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-File", file2] : [file2], env, 6e5);
28606
+ } finally {
28607
+ await rm(directory, { recursive: true, force: true });
28608
+ }
28609
+ };
28610
+ }
28523
28611
 
28524
28612
  // ../qoder/dist/qoder-command.js
28525
28613
  var QoderExecutableError = class extends Error {
@@ -28777,6 +28865,26 @@ function mapQoderException(error51) {
28777
28865
  };
28778
28866
  }
28779
28867
 
28868
+ // ../qoder/dist/qoder-login-check.js
28869
+ import { execFile as execFile2 } from "node:child_process";
28870
+ function qoderLoginRequired(text) {
28871
+ return /\bnot logged in\b|\bauthentication (?:required|expired)\b/i.test(text);
28872
+ }
28873
+ function checkQoderLogin(executable, environment, cwd) {
28874
+ return new Promise((resolve) => {
28875
+ execFile2(executable, ["--list-models"], {
28876
+ env: environment,
28877
+ cwd,
28878
+ timeout: 1e4,
28879
+ maxBuffer: 64 * 1024,
28880
+ windowsHide: true
28881
+ }, (error51, stdout, stderr) => {
28882
+ resolve(Boolean(error51 && !error51.killed && qoderLoginRequired(`${stdout}
28883
+ ${stderr}`)));
28884
+ });
28885
+ });
28886
+ }
28887
+
28780
28888
  // ../../harness-adapter/dist/approval.js
28781
28889
  function invalidRequest(message) {
28782
28890
  return { code: "invalidRequest", message, retryable: false };
@@ -52449,11 +52557,15 @@ var QoderAdapter = class {
52449
52557
  } catch {
52450
52558
  }
52451
52559
  } else {
52560
+ let stderr = "";
52452
52561
  try {
52453
52562
  const probeQuery = this.#queryFactory({
52454
52563
  prompt: "",
52455
52564
  options: {
52456
52565
  cwd: input?.cwd ?? process.cwd(),
52566
+ stderr: (chunk) => {
52567
+ stderr = (stderr + chunk).slice(-8192);
52568
+ },
52457
52569
  pathToQoderCLIExecutable: executable,
52458
52570
  ...this.#environment ? { env: this.#environment } : {},
52459
52571
  auth: qoderAuthForEnvironment(this.#variant, this.#environment)
@@ -52470,9 +52582,14 @@ var QoderAdapter = class {
52470
52582
  }
52471
52583
  }
52472
52584
  } catch (error51) {
52585
+ const needsLogin = qoderLoginRequired(stderr) || error51 instanceof Error && error51.message === "Transport closed" && qoderAuthForEnvironment(this.#variant, this.#environment).type === "qodercli" && await checkQoderLogin(executable, this.#environment, input?.cwd);
52473
52586
  const result2 = {
52474
52587
  status: "unavailable",
52475
- error: mapQoderException(error51)
52588
+ error: needsLogin ? {
52589
+ code: "authenticationRequired",
52590
+ message: `Please run ${this.#variant === "cn" ? "qoderclicn" : "qodercli"} login to authenticate.`,
52591
+ retryable: false
52592
+ } : mapQoderException(error51)
52476
52593
  };
52477
52594
  return result2;
52478
52595
  }
@@ -52760,6 +52877,7 @@ function createQoderInstallation(environment, command, variant = "global") {
52760
52877
  latestVersion: "Unknown",
52761
52878
  updateAvailable: false,
52762
52879
  canUpdate: false,
52880
+ messageCode: "qoder-check-unavailable",
52763
52881
  message: "This Qoder China release does not expose a non-installing update check. Use its original installer."
52764
52882
  };
52765
52883
  const output = await run(["update", "--check"]);
@@ -52795,7 +52913,13 @@ function createHarnessAdapter(context, variant = "global") {
52795
52913
  variant,
52796
52914
  environment,
52797
52915
  platform: context.platform
52798
- }), { installation: createQoderInstallation(environment, command, variant) });
52916
+ }), {
52917
+ installation: createQoderInstallation(environment, command, variant),
52918
+ install: createHarnessInstaller(environment, variant === "cn" ? {
52919
+ posix: "https://static.qoder.com.cn/qoder-cli-cn/install.sh",
52920
+ windows: "https://static.qoder.com.cn/qoder-cli-cn/install.ps1"
52921
+ } : { posix: "https://qoder.com/install", windows: "https://qoder.com/install.ps1" })
52922
+ });
52799
52923
  }
52800
52924
 
52801
52925
  // dist/plugin.js
@@ -14594,6 +14594,71 @@ var harnessDisplaySetSchema = external_exports.strictObject({
14594
14594
  initializeOnly: external_exports.boolean().optional()
14595
14595
  });
14596
14596
 
14597
+ // ../../shared-contracts/dist/ids.js
14598
+ var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
14599
+ message: "Identifier must not be empty or whitespace"
14600
+ });
14601
+ var harnessIdSchema = opaqueIdSchema.brand();
14602
+ var hostThreadIdSchema = opaqueIdSchema.brand();
14603
+ var hostTurnIdSchema = opaqueIdSchema.brand();
14604
+ var hostItemIdSchema = opaqueIdSchema.brand();
14605
+ var hostInteractionIdSchema = opaqueIdSchema.brand();
14606
+
14607
+ // ../../shared-contracts/dist/harness-plugins.js
14608
+ var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
14609
+ var HARNESS_PLUGIN_ICON_MAX_BYTES = 128 * 1024;
14610
+ var HARNESS_PLUGIN_LIMIT = 128;
14611
+ 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);
14612
+ 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");
14613
+ var documentationUrlSchema = external_exports.url().refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Plugin documentation links must be credential-free HTTPS URLs");
14614
+ var pluginPresentationShape = {
14615
+ id: harnessPluginIdSchema,
14616
+ name: external_exports.string().trim().min(1).max(128),
14617
+ version: external_exports.string().min(1).max(128),
14618
+ /** The factory accepts a persisted local entrypoint through its construction context. */
14619
+ launchCommand: external_exports.literal(true).optional(),
14620
+ links: external_exports.object({
14621
+ documentation: documentationUrlSchema.optional(),
14622
+ installation: documentationUrlSchema.optional()
14623
+ }).strict().optional()
14624
+ };
14625
+ var harnessPluginManifestSchema = external_exports.object({
14626
+ manifestVersion: external_exports.literal(1),
14627
+ ...pluginPresentationShape,
14628
+ adapterApiVersion: external_exports.number().int().positive(),
14629
+ entry: relativeResourceSchema,
14630
+ icon: relativeResourceSchema.optional()
14631
+ }).strict();
14632
+ 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);
14633
+ var harnessPluginDescriptorSchema = external_exports.object({
14634
+ ...pluginPresentationShape,
14635
+ icon: harnessPluginIconSchema.optional()
14636
+ }).strict();
14637
+ var harnessPluginListParamsSchema = external_exports.object({}).strict();
14638
+ var harnessPluginListResultSchema = external_exports.object({
14639
+ plugins: external_exports.array(harnessPluginDescriptorSchema).max(HARNESS_PLUGIN_LIMIT)
14640
+ }).strict();
14641
+ var harnessPluginConfigurationSchema = external_exports.object({
14642
+ version: external_exports.literal(1),
14643
+ enabled: external_exports.array(harnessPluginIdSchema).max(HARNESS_PLUGIN_LIMIT)
14644
+ }).strict().refine((value) => new Set(value.enabled).size === value.enabled.length, {
14645
+ message: "Enabled plugin IDs must be unique",
14646
+ path: ["enabled"]
14647
+ });
14648
+
14649
+ // ../../shared-contracts/dist/harness-long-context.js
14650
+ var HARNESS_LONG_CONTEXT_GET_METHOD = "codexhost/harness/long-context/get";
14651
+ var HARNESS_LONG_CONTEXT_SET_METHOD = "codexhost/harness/long-context/set";
14652
+ var harnessLongContextGetSchema = external_exports.object({
14653
+ harnessId: harnessPluginIdSchema
14654
+ }).strict();
14655
+ var harnessLongContextSetSchema = harnessLongContextGetSchema.extend({
14656
+ enabled: external_exports.boolean()
14657
+ });
14658
+ var harnessLongContextSchema = external_exports.object({
14659
+ enabled: external_exports.boolean()
14660
+ }).strict();
14661
+
14597
14662
  // ../../shared-contracts/dist/console.js
14598
14663
  var consoleAnnouncementSchema = external_exports.strictObject({
14599
14664
  title: external_exports.string().trim().min(1).max(200),
@@ -14610,8 +14675,11 @@ var CONSOLE_HOST_METHODS = Object.freeze([
14610
14675
  "codexhost/harness/display-settings/get",
14611
14676
  "codexhost/harness/display-settings/set",
14612
14677
  "codexhost/harness/inspect",
14678
+ "codexhost/harness/installation",
14613
14679
  "codexhost/harness/launch-settings/get",
14614
14680
  "codexhost/harness/launch-settings/set",
14681
+ HARNESS_LONG_CONTEXT_GET_METHOD,
14682
+ HARNESS_LONG_CONTEXT_SET_METHOD,
14615
14683
  "codexhost/harness/web-ui/open",
14616
14684
  "codexhost/harness/accounts/sources",
14617
14685
  "codexhost/harness/accounts/list",
@@ -14671,16 +14739,6 @@ var loadedSessionsSchema = external_exports.array(external_exports.strictObject(
14671
14739
  inactiveMs: external_exports.number().nonnegative()
14672
14740
  }));
14673
14741
 
14674
- // ../../shared-contracts/dist/ids.js
14675
- var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
14676
- message: "Identifier must not be empty or whitespace"
14677
- });
14678
- var harnessIdSchema = opaqueIdSchema.brand();
14679
- var hostThreadIdSchema = opaqueIdSchema.brand();
14680
- var hostTurnIdSchema = opaqueIdSchema.brand();
14681
- var hostItemIdSchema = opaqueIdSchema.brand();
14682
- var hostInteractionIdSchema = opaqueIdSchema.brand();
14683
-
14684
14742
  // ../../shared-contracts/dist/manual-compaction.js
14685
14743
  var threadManualCompactionStartedSchema = external_exports.strictObject({
14686
14744
  threadId: hostThreadIdSchema,
@@ -15210,48 +15268,6 @@ var threadOwnershipListResultSchema = external_exports.object({
15210
15268
  }
15211
15269
  });
15212
15270
 
15213
- // ../../shared-contracts/dist/harness-plugins.js
15214
- var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
15215
- var HARNESS_PLUGIN_ICON_MAX_BYTES = 128 * 1024;
15216
- var HARNESS_PLUGIN_LIMIT = 128;
15217
- 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);
15218
- 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");
15219
- var documentationUrlSchema = external_exports.url().refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Plugin documentation links must be credential-free HTTPS URLs");
15220
- var pluginPresentationShape = {
15221
- id: harnessPluginIdSchema,
15222
- name: external_exports.string().trim().min(1).max(128),
15223
- version: external_exports.string().min(1).max(128),
15224
- /** The factory accepts a persisted local entrypoint through its construction context. */
15225
- launchCommand: external_exports.literal(true).optional(),
15226
- links: external_exports.object({
15227
- documentation: documentationUrlSchema.optional(),
15228
- installation: documentationUrlSchema.optional()
15229
- }).strict().optional()
15230
- };
15231
- var harnessPluginManifestSchema = external_exports.object({
15232
- manifestVersion: external_exports.literal(1),
15233
- ...pluginPresentationShape,
15234
- adapterApiVersion: external_exports.number().int().positive(),
15235
- entry: relativeResourceSchema,
15236
- icon: relativeResourceSchema.optional()
15237
- }).strict();
15238
- 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);
15239
- var harnessPluginDescriptorSchema = external_exports.object({
15240
- ...pluginPresentationShape,
15241
- icon: harnessPluginIconSchema.optional()
15242
- }).strict();
15243
- var harnessPluginListParamsSchema = external_exports.object({}).strict();
15244
- var harnessPluginListResultSchema = external_exports.object({
15245
- plugins: external_exports.array(harnessPluginDescriptorSchema).max(HARNESS_PLUGIN_LIMIT)
15246
- }).strict();
15247
- var harnessPluginConfigurationSchema = external_exports.object({
15248
- version: external_exports.literal(1),
15249
- enabled: external_exports.array(harnessPluginIdSchema).max(HARNESS_PLUGIN_LIMIT)
15250
- }).strict().refine((value) => new Set(value.enabled).size === value.enabled.length, {
15251
- message: "Enabled plugin IDs must be unique",
15252
- path: ["enabled"]
15253
- });
15254
-
15255
15271
  // ../../shared-contracts/dist/harness-route.js
15256
15272
  var harnessPluginRouteSchema = external_exports.object({
15257
15273
  harnessId: harnessPluginIdSchema,
@@ -15276,14 +15292,17 @@ var harnessLaunchSettingsSchema = external_exports.object({
15276
15292
  // ../../shared-contracts/dist/harness-installation.js
15277
15293
  var harnessInstallationParamsSchema = external_exports.object({
15278
15294
  harnessId: harnessIdSchema,
15279
- action: external_exports.enum(["check", "update"])
15295
+ action: external_exports.enum(["check", "update", "install"])
15280
15296
  }).strict();
15281
15297
  var harnessInstallationStateSchema = external_exports.object({
15282
15298
  currentVersion: external_exports.string().min(1).max(128),
15283
15299
  latestVersion: external_exports.string().min(1).max(128),
15284
15300
  updateAvailable: external_exports.boolean(),
15285
15301
  canUpdate: external_exports.boolean(),
15286
- message: external_exports.string().max(2048).optional()
15302
+ // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
15303
+ message: external_exports.string().max(2048).optional(),
15304
+ messageCode: external_exports.string().min(1).max(128).optional(),
15305
+ latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
15287
15306
  }).strict();
15288
15307
 
15289
15308
  // ../../shared-contracts/dist/codex-accounts.js
@@ -15578,7 +15597,7 @@ var updateStatusSchema = external_exports.strictObject({
15578
15597
  }
15579
15598
  });
15580
15599
  var updateEmptyParamsSchema = external_exports.strictObject({});
15581
- 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");
15600
+ 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");
15582
15601
  var updateCheckResultSchema = external_exports.strictObject({
15583
15602
  currentVersion: updateSemanticVersionSchema,
15584
15603
  installation: updateInstallationSchema.nullable(),