@codexhost/cli-win32-arm64 0.13.2 → 0.13.3

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.
package/README.md CHANGED
@@ -7,7 +7,7 @@ Run Pi and Claude Code as first-class external harnesses inside Codex Desktop.
7
7
  ## Install
8
8
 
9
9
  ```bash
10
- npm install -g @codexhost/cli@0.13.2
10
+ npm install -g @codexhost/cli@0.13.3
11
11
  ```
12
12
 
13
13
  Do not install this package directly. npm selects it through the optional dependencies of `@codexhost/cli`.
@@ -1 +1 @@
1
- {"schemaVersion":1,"version":"0.13.2","distribution":"npm","target":"windows-arm64"}
1
+ {"schemaVersion":1,"version":"0.13.3","distribution":"npm","target":"windows-arm64"}
@@ -15489,6 +15489,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
15489
15489
  initializeOnly: external_exports.boolean().optional()
15490
15490
  });
15491
15491
 
15492
+ // packages/shared-contracts/dist/harness-presentation.js
15493
+ var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
15494
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
15495
+ var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
15496
+ label: displayText(256).optional(),
15497
+ description: displayText(1024).optional()
15498
+ }).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
15499
+ var harnessLocalizedTextSchema = external_exports.record(localeSchema, displayText(4096)).refine((entries) => typeof entries.en === "string", "English fallback is required").refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
15500
+
15492
15501
  // packages/shared-contracts/dist/model-price-overrides.js
15493
15502
  var usdPerMillionTokens = external_exports.number().finite().nonnegative();
15494
15503
  var modelPriceOverrideSchema = external_exports.strictObject({
@@ -15828,8 +15837,24 @@ var threadUsageSnapshotSchema = external_exports.object({
15828
15837
  }
15829
15838
  });
15830
15839
  var usagePercentSchema = external_exports.number().finite().min(0).max(100);
15840
+ var accountCreditsPeriodSchema = external_exports.enum([
15841
+ "weekly",
15842
+ "monthly",
15843
+ "five_hour",
15844
+ "seven_day",
15845
+ "unknown"
15846
+ ]);
15847
+ var accountCreditsScopeSchema = external_exports.object({
15848
+ id: external_exports.string().min(1).max(256),
15849
+ label: external_exports.string().min(1).max(256),
15850
+ localizations: harnessLocalizationsSchema.optional()
15851
+ }).strict();
15831
15852
  var accountCreditsProductUsageSchema = external_exports.object({
15832
15853
  product: external_exports.string().min(1),
15854
+ /** Native period and scope, never inferred from the display name. */
15855
+ periodType: accountCreditsPeriodSchema.optional(),
15856
+ scope: accountCreditsScopeSchema.optional(),
15857
+ localizations: harnessLocalizationsSchema.optional(),
15833
15858
  used: external_exports.number().finite().nonnegative().optional(),
15834
15859
  // Zero is a real empty cap, not an absent field.
15835
15860
  limit: external_exports.number().finite().nonnegative().optional(),
@@ -15849,9 +15874,11 @@ var accountCreditsSnapshotSchema = external_exports.object({
15849
15874
  unit: external_exports.string().min(1).max(32).optional(),
15850
15875
  /** Native label when the primary limit is scoped to a model or product group. */
15851
15876
  label: external_exports.string().min(1).optional(),
15877
+ scope: accountCreditsScopeSchema.optional(),
15878
+ localizations: harnessLocalizationsSchema.optional(),
15852
15879
  usedPercent: usagePercentSchema,
15853
15880
  resetsAt: external_exports.string().min(1).optional(),
15854
- periodType: external_exports.enum(["weekly", "monthly", "five_hour", "seven_day", "unknown"]),
15881
+ periodType: accountCreditsPeriodSchema,
15855
15882
  productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
15856
15883
  resetCredits: accountResetCreditsSchema.optional()
15857
15884
  }).strict();
@@ -15862,7 +15889,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
15862
15889
  var threadUsageInspectionSchema = external_exports.object({
15863
15890
  threadId: hostThreadIdSchema,
15864
15891
  usage: threadUsageSnapshotSchema.nullable(),
15865
- accountCredits: accountCreditsSnapshotSchema.optional()
15892
+ accountCredits: accountCreditsSnapshotSchema.optional(),
15893
+ /** Whether this source can provide cached account quota independently of usage. */
15894
+ accountCreditsSupported: external_exports.boolean().optional()
15866
15895
  }).strict();
15867
15896
 
15868
15897
  // packages/shared-contracts/dist/harness-accounts.js
@@ -15989,7 +16018,8 @@ var harnessPermissionModeSchema = external_exports.object({
15989
16018
  id: harnessPermissionModeIdSchema,
15990
16019
  label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
15991
16020
  description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
15992
- dangerous: external_exports.boolean().optional()
16021
+ dangerous: external_exports.boolean().optional(),
16022
+ localizations: harnessLocalizationsSchema.optional()
15993
16023
  }).strict();
15994
16024
  var harnessPermissionModeCatalogSchema = external_exports.object({
15995
16025
  modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
@@ -16376,6 +16406,8 @@ var harnessInstallationStateSchema = external_exports.object({
16376
16406
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
16377
16407
  message: external_exports.string().max(2048).optional(),
16378
16408
  messageCode: external_exports.string().min(1).max(128).optional(),
16409
+ /** Safe plugin-owned explanation, distinct from raw diagnostic message. */
16410
+ notice: harnessLocalizedTextSchema.optional(),
16379
16411
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
16380
16412
  }).strict();
16381
16413
 
@@ -16502,6 +16534,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
16502
16534
  invocation: commandInvocationSchema,
16503
16535
  label: commandLabelSchema,
16504
16536
  description: commandDescriptionSchema.optional(),
16537
+ localizations: harnessLocalizationsSchema.optional(),
16505
16538
  argumentMode: external_exports.enum(["none", "text"]),
16506
16539
  /**
16507
16540
  * Native distinction reported by the Harness. Omitted when the Harness does
@@ -14673,6 +14673,48 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14673
14673
  initializeOnly: external_exports.boolean().optional()
14674
14674
  });
14675
14675
 
14676
+ // ../shared-contracts/dist/harness-presentation.js
14677
+ var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
14678
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
14679
+ var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
14680
+ label: displayText(256).optional(),
14681
+ description: displayText(1024).optional()
14682
+ }).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
14683
+ var harnessLocalizedTextSchema = external_exports.record(localeSchema, displayText(4096)).refine((entries) => typeof entries.en === "string", "English fallback is required").refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
14684
+ function translation(entries, locale) {
14685
+ if (!entries)
14686
+ return void 0;
14687
+ const language = locale.split("-")[0] ?? locale;
14688
+ for (const candidate of [locale, language]) {
14689
+ if (Object.hasOwn(entries, candidate))
14690
+ return entries[candidate];
14691
+ }
14692
+ return void 0;
14693
+ }
14694
+ function localizeHarnessPresentation(value, locale) {
14695
+ const localized = translation(value.localizations, locale);
14696
+ const language = translation(value.localizations, locale.split("-")[0] ?? locale);
14697
+ return {
14698
+ label: localized?.label ?? language?.label ?? value.label,
14699
+ description: localized?.description ?? language?.description ?? value.description
14700
+ };
14701
+ }
14702
+ function localizeHarnessText(value, locale) {
14703
+ return translation(value, locale) ?? value.en ?? "";
14704
+ }
14705
+
14706
+ // ../shared-contracts/dist/account-credits-presentation.js
14707
+ function accountCreditsWindowLabel(window2, locale, periodLabel) {
14708
+ if (window2.periodType && window2.periodType !== "unknown" && (window2.scope || !window2.label)) {
14709
+ const period = periodLabel(window2.periodType);
14710
+ return window2.scope ? `${localizeHarnessPresentation(window2.scope, locale).label} \xB7 ${period}` : period;
14711
+ }
14712
+ return localizeHarnessPresentation({
14713
+ label: window2.label ?? window2.product ?? periodLabel("unknown"),
14714
+ ...window2.localizations ? { localizations: window2.localizations } : {}
14715
+ }, locale).label;
14716
+ }
14717
+
14676
14718
  // ../shared-contracts/dist/model-price-overrides.js
14677
14719
  var MODEL_PRICE_OVERRIDES_GET_METHOD = "codexhost/usage/model-prices/get";
14678
14720
  var MODEL_PRICE_OVERRIDES_SET_METHOD = "codexhost/usage/model-prices/set";
@@ -15016,8 +15058,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15016
15058
  }
15017
15059
  });
15018
15060
  var usagePercentSchema = external_exports.number().finite().min(0).max(100);
15061
+ var accountCreditsPeriodSchema = external_exports.enum([
15062
+ "weekly",
15063
+ "monthly",
15064
+ "five_hour",
15065
+ "seven_day",
15066
+ "unknown"
15067
+ ]);
15068
+ var accountCreditsScopeSchema = external_exports.object({
15069
+ id: external_exports.string().min(1).max(256),
15070
+ label: external_exports.string().min(1).max(256),
15071
+ localizations: harnessLocalizationsSchema.optional()
15072
+ }).strict();
15019
15073
  var accountCreditsProductUsageSchema = external_exports.object({
15020
15074
  product: external_exports.string().min(1),
15075
+ /** Native period and scope, never inferred from the display name. */
15076
+ periodType: accountCreditsPeriodSchema.optional(),
15077
+ scope: accountCreditsScopeSchema.optional(),
15078
+ localizations: harnessLocalizationsSchema.optional(),
15021
15079
  used: external_exports.number().finite().nonnegative().optional(),
15022
15080
  // Zero is a real empty cap, not an absent field.
15023
15081
  limit: external_exports.number().finite().nonnegative().optional(),
@@ -15037,9 +15095,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15037
15095
  unit: external_exports.string().min(1).max(32).optional(),
15038
15096
  /** Native label when the primary limit is scoped to a model or product group. */
15039
15097
  label: external_exports.string().min(1).optional(),
15098
+ scope: accountCreditsScopeSchema.optional(),
15099
+ localizations: harnessLocalizationsSchema.optional(),
15040
15100
  usedPercent: usagePercentSchema,
15041
15101
  resetsAt: external_exports.string().min(1).optional(),
15042
- periodType: external_exports.enum(["weekly", "monthly", "five_hour", "seven_day", "unknown"]),
15102
+ periodType: accountCreditsPeriodSchema,
15043
15103
  productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
15044
15104
  resetCredits: accountResetCreditsSchema.optional()
15045
15105
  }).strict();
@@ -15050,7 +15110,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15050
15110
  var threadUsageInspectionSchema = external_exports.object({
15051
15111
  threadId: hostThreadIdSchema,
15052
15112
  usage: threadUsageSnapshotSchema.nullable(),
15053
- accountCredits: accountCreditsSnapshotSchema.optional()
15113
+ accountCredits: accountCreditsSnapshotSchema.optional(),
15114
+ /** Whether this source can provide cached account quota independently of usage. */
15115
+ accountCreditsSupported: external_exports.boolean().optional()
15054
15116
  }).strict();
15055
15117
 
15056
15118
  // ../shared-contracts/dist/harness-accounts.js
@@ -15177,7 +15239,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15177
15239
  id: harnessPermissionModeIdSchema,
15178
15240
  label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
15179
15241
  description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
15180
- dangerous: external_exports.boolean().optional()
15242
+ dangerous: external_exports.boolean().optional(),
15243
+ localizations: harnessLocalizationsSchema.optional()
15181
15244
  }).strict();
15182
15245
  var harnessPermissionModeCatalogSchema = external_exports.object({
15183
15246
  modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
@@ -15568,6 +15631,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15568
15631
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
15569
15632
  message: external_exports.string().max(2048).optional(),
15570
15633
  messageCode: external_exports.string().min(1).max(128).optional(),
15634
+ /** Safe plugin-owned explanation, distinct from raw diagnostic message. */
15635
+ notice: harnessLocalizedTextSchema.optional(),
15571
15636
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
15572
15637
  }).strict();
15573
15638
 
@@ -15696,6 +15761,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15696
15761
  invocation: commandInvocationSchema,
15697
15762
  label: commandLabelSchema,
15698
15763
  description: commandDescriptionSchema.optional(),
15764
+ localizations: harnessLocalizationsSchema.optional(),
15699
15765
  argumentMode: external_exports.enum(["none", "text"]),
15700
15766
  /**
15701
15767
  * Native distinction reported by the Harness. Omitted when the Harness does
@@ -16527,10 +16593,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16527
16593
  let previousWasTranslation = false;
16528
16594
  paragraphLines.forEach((line, lineIndex) => {
16529
16595
  if (lineIndex > 0 && !primaryIsCjk && CJK_PATTERN.test(line)) {
16530
- const translation = document2.createElement("span");
16531
- translation.className = "release-note-translation";
16532
- appendInline(document2, translation, line);
16533
- paragraph.append(translation);
16596
+ const translation2 = document2.createElement("span");
16597
+ translation2.className = "release-note-translation";
16598
+ appendInline(document2, translation2, line);
16599
+ paragraph.append(translation2);
16534
16600
  previousWasTranslation = true;
16535
16601
  return;
16536
16602
  }
@@ -20555,37 +20621,19 @@ th[aria-sort] .console-usage-sort__mark {
20555
20621
 
20556
20622
  // src/settings/harness-version-messages.ts
20557
20623
  var harnessVersionEnglish = Object.freeze({
20624
+ locale: "en",
20558
20625
  unknown: "Unknown",
20559
20626
  trackingBranch: "Tracking branch (new commits)",
20560
20627
  notes: Object.freeze({
20561
- "original-installer": "Use the original installer, package manager, or launcher to update this installation.",
20562
- "claude-policy-restricted": "Claude updates are restricted by the installation's settings or policy.",
20563
- "codebuddy-npm-required": "Use CodeBuddy's native updater or original package manager. Latest-version checks here require an identified npm installation.",
20564
- "deepseek-original-installer": "Update with the original installer. Python, desktop, and project-local installations are not upgraded through global npm.",
20565
- "kiro-native-updater": "Use Kiro CLI's original installer or native updater to check for and install updates.",
20566
- "zcode-desktop-updater": "The CLI ships inside ZCode Desktop. Update ZCode Desktop itself to update it.",
20567
- "qoder-check-unavailable": "This Qoder China release does not expose a non-installing update check. Use its original installer.",
20568
- "hermes-update-plan-unavailable": "This Hermes release does not expose a safe update plan. Use the original installer.",
20569
- "hermes-externally-managed": "This Hermes installation is managed externally. Update it through its desktop app, container, or original package manager.",
20570
- "hermes-update-channel": "Uses Hermes's configured update channel. Gateway restarts are deferred; existing processes keep their running code.",
20571
- "hermes-manual-update": "Use the native updater manually. Safe non-interactive updates require a clean source checkout, commit identity, and Gateway restart deferral."
20628
+ "original-installer": "Use the original installer, package manager, or launcher to update this installation."
20572
20629
  })
20573
20630
  });
20574
20631
  var harnessVersionChinese = Object.freeze({
20632
+ locale: "zh-CN",
20575
20633
  unknown: "\u672A\u77E5",
20576
20634
  trackingBranch: "\u8DDF\u8E2A\u5206\u652F\uFF08\u6709\u65B0\u63D0\u4EA4\uFF09",
20577
20635
  notes: Object.freeze({
20578
- "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",
20579
- "claude-policy-restricted": "\u6B64 Claude \u5B89\u88C5\u7684\u8BBE\u7F6E\u6216\u7B56\u7565\u9650\u5236\u4E86\u66F4\u65B0\u3002",
20580
- "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",
20581
- "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",
20582
- "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",
20583
- "zcode-desktop-updater": "CLI \u968F ZCode Desktop \u4E00\u8D77\u53D1\u5E03\uFF0C\u8BF7\u76F4\u63A5\u66F4\u65B0 ZCode Desktop\u3002",
20584
- "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",
20585
- "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",
20586
- "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",
20587
- "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",
20588
- "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"
20636
+ "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"
20589
20637
  })
20590
20638
  });
20591
20639
  function harnessVersionLabel(state, messages) {
@@ -20597,6 +20645,7 @@ th[aria-sort] .console-usage-sort__mark {
20597
20645
  return state.latestVersion;
20598
20646
  }
20599
20647
  function harnessVersionNote(state, messages) {
20648
+ if (state?.notice) return localizeHarnessText(state.notice, messages.locale);
20600
20649
  const code = state?.messageCode;
20601
20650
  return code && Object.hasOwn(messages.notes, code) ? messages.notes[code] : void 0;
20602
20651
  }
@@ -20775,7 +20824,7 @@ th[aria-sort] .console-usage-sort__mark {
20775
20824
  launchPathSaveError: "Could not save. Enter an existing absolute installation folder on this Host and check configuration permissions.",
20776
20825
  connectionOfficialWebsite: "Visit official website",
20777
20826
  connectionOpenHarnessWeb: "Open DeepSeek Harness Web",
20778
- 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.",
20827
+ connectionDeepSeekTestedVersions: "Supported DSH versions: 0.1.7-rc.1, 0.1.7-rc.2, 0.2.0-rc.1, 0.2.0-rc.2, 0.2.1-rc.1 and 0.2.1-rc.2. Versions newer than 0.2.1-rc.2 can be tried, but compatibility may be limited; versions older than 0.1.7-rc.1 must be upgraded first.",
20779
20828
  connectionInstall: "Install",
20780
20829
  connectionInstallDescription: "This Harness was not detected.",
20781
20830
  connectionInstallRunning: "Installing on the selected Host. You can leave this page; login or setup may still be required afterward.",
@@ -21048,7 +21097,7 @@ th[aria-sort] .console-usage-sort__mark {
21048
21097
  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",
21049
21098
  connectionOfficialWebsite: "\u8BBF\u95EE\u5B98\u7F51",
21050
21099
  connectionOpenHarnessWeb: "\u6253\u5F00 DeepSeek Harness Web",
21051
- 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",
21100
+ connectionDeepSeekTestedVersions: "\u652F\u6301 DSH \u7248\u672C\uFF1A0.1.7-rc.1\u30010.1.7-rc.2\u30010.2.0-rc.1\u30010.2.0-rc.2\u30010.2.1-rc.1 \u548C 0.2.1-rc.2\u3002\u9AD8\u4E8E 0.2.1-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",
21052
21101
  connectionInstall: "\u5B89\u88C5",
21053
21102
  connectionInstallDescription: "\u5C1A\u672A\u68C0\u6D4B\u5230\u8BE5 Harness\u3002",
21054
21103
  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",
@@ -21179,7 +21228,6 @@ th[aria-sort] .console-usage-sort__mark {
21179
21228
  // src/renderer-usage-control.ts
21180
21229
  var ENGLISH_USAGE_MESSAGES = Object.freeze({
21181
21230
  usage: "Usage",
21182
- account: "Account",
21183
21231
  context: "Context",
21184
21232
  recordedCredits: "Recorded usage",
21185
21233
  latestCacheHit: "Latest cache hit (CH)",
@@ -21205,7 +21253,6 @@ th[aria-sort] .console-usage-sort__mark {
21205
21253
  });
21206
21254
  var CHINESE_USAGE_MESSAGES = Object.freeze({
21207
21255
  usage: "\u7528\u91CF",
21208
- account: "\u8D26\u53F7",
21209
21256
  context: "\u4E0A\u4E0B\u6587",
21210
21257
  recordedCredits: "\u5DF2\u8BB0\u5F55\u6D88\u8017",
21211
21258
  latestCacheHit: "\u6700\u8FD1\u7F13\u5B58\u547D\u4E2D\uFF08CH\uFF09",
@@ -27660,17 +27707,6 @@ ${error51.stderrTail}`] : []
27660
27707
  if (periodType === "seven_day") return messages.accountCreditsPeriodSevenDay;
27661
27708
  return messages.accountCreditsPeriodUnknown;
27662
27709
  }
27663
- function creditsProductLabel(product, messages) {
27664
- if (product === "GrokBuild" || product === "Build") return messages.accountCreditsBuild;
27665
- if (product === "5-hour window") return messages.accountCreditsPeriodFiveHour;
27666
- if (product === "7-day window") return messages.accountCreditsPeriodSevenDay;
27667
- if (product.endsWith(" \xB7 monthly"))
27668
- return `${product.slice(0, -" \xB7 monthly".length)} \xB7 ${messages.accountCreditsPeriodMonthly}`;
27669
- if (product === "GrokChat") return "Chat";
27670
- if (product === "GrokImagine") return "Imagine";
27671
- if (product === "GrokVoice") return "Voice";
27672
- return product;
27673
- }
27674
27710
  function formatAccountCreditsReset(value, locale, now = /* @__PURE__ */ new Date()) {
27675
27711
  if (locale !== "zh-CN") return formatRendererCreditsReset(value, now);
27676
27712
  const date5 = new Date(value);
@@ -27697,36 +27733,22 @@ ${error51.stderrTail}`] : []
27697
27733
  if (periodType === "weekly" || periodType === "seven_day") return "seven_day";
27698
27734
  return null;
27699
27735
  }
27700
- function scopedUsageProduct(product) {
27701
- const suffixes = [
27702
- [" \xB7 5-hour window", "five_hour"],
27703
- [" \xB7 Weekly window", "seven_day"],
27704
- [" \xB7 7-day window", "seven_day"],
27705
- [" \xB7 5-hour", "five_hour"],
27706
- [" \xB7 7-day", "seven_day"]
27707
- ];
27708
- for (const [suffix, period] of suffixes) {
27709
- if (!product.endsWith(suffix)) continue;
27710
- const scope = product.slice(0, -suffix.length).trim();
27711
- if (scope) return { scope, period };
27712
- }
27713
- return null;
27714
- }
27715
27736
  function splitUsageWindows(credits, messages, filter) {
27716
27737
  const generic = { columns: {} };
27717
27738
  const scopedRows = /* @__PURE__ */ new Map();
27718
27739
  const additional = [];
27719
27740
  const addScoped = (scope, period, window2) => {
27720
- const rows2 = scopedRows.get(scope) ?? [];
27741
+ const scopeLabel = localizeHarnessPresentation(scope, messages.locale).label;
27742
+ const rows2 = scopedRows.get(scope.id) ?? [];
27721
27743
  let row = rows2.find((candidate) => !candidate.columns[period]);
27722
27744
  if (!row) {
27723
- row = { scope, columns: {} };
27745
+ row = { scope: scopeLabel, columns: {} };
27724
27746
  rows2.push(row);
27725
- scopedRows.set(scope, rows2);
27747
+ scopedRows.set(scope.id, rows2);
27726
27748
  }
27727
27749
  row.columns[period] = {
27728
27750
  ...window2,
27729
- label: `${scope} \xB7 ${creditsPeriodLabel(period, messages)}`,
27751
+ label: window2.label,
27730
27752
  scoped: true
27731
27753
  };
27732
27754
  };
@@ -27736,29 +27758,30 @@ ${error51.stderrTail}`] : []
27736
27758
  else additional.push(window2);
27737
27759
  };
27738
27760
  const primary = {
27739
- label: credits.label ? creditsProductLabel(credits.label, messages) : creditsPeriodLabel(credits.periodType, messages),
27761
+ label: accountCreditsWindowLabel(
27762
+ credits,
27763
+ messages.locale,
27764
+ (period) => creditsPeriodLabel(period, messages)
27765
+ ),
27740
27766
  usedPercent: credits.usedPercent,
27741
27767
  amount: credits,
27742
27768
  resetsAt: credits.resetsAt,
27743
- scoped: Boolean(credits.label && scopedUsageProduct(credits.label))
27769
+ scoped: Boolean(credits.scope)
27744
27770
  };
27745
- const primaryScope = credits.label ? scopedUsageProduct(credits.label) : null;
27746
- addWindow(
27747
- primary,
27748
- primaryScope?.period ?? (credits.label ? null : comparisonPeriod(credits.periodType)),
27749
- primaryScope?.scope
27750
- );
27771
+ addWindow(primary, comparisonPeriod(credits.periodType), credits.scope);
27751
27772
  for (const product of credits.productUsage ?? []) {
27752
- const scoped = scopedUsageProduct(product.product);
27753
27773
  const window2 = {
27754
- label: creditsProductLabel(product.product, messages),
27774
+ label: accountCreditsWindowLabel(
27775
+ product,
27776
+ messages.locale,
27777
+ (period) => creditsPeriodLabel(period, messages)
27778
+ ),
27755
27779
  usedPercent: product.usagePercent,
27756
27780
  amount: product,
27757
27781
  resetsAt: product.resetsAt,
27758
- scoped: Boolean(scoped)
27782
+ scoped: Boolean(product.scope)
27759
27783
  };
27760
- const genericPeriod = product.product === "5-hour window" ? "five_hour" : product.product === "7-day window" ? "seven_day" : null;
27761
- addWindow(window2, scoped?.period ?? genericPeriod, scoped?.scope);
27784
+ addWindow(window2, comparisonPeriod(product.periodType ?? "unknown"), product.scope);
27762
27785
  }
27763
27786
  const structured = [...scopedRows.values()].flat();
27764
27787
  let rows = Object.keys(generic.columns).length > 0 ? [generic, ...structured] : structured;
@@ -28150,8 +28173,7 @@ ${error51.stderrTail}`] : []
28150
28173
  { status: "ready", credits: account.credits, freshness: "live", observedAt: null },
28151
28174
  messages,
28152
28175
  display,
28153
- () => void 0,
28154
- account.harnessId === "grok" ? "weekly-only" : "all"
28176
+ () => void 0
28155
28177
  ) : renderAccountBalance(document2, messages, account.balance);
28156
28178
  personCell.title = messages.accountNativeManagementHint.replace("{harness}", account.harnessName);
28157
28179
  appendAccountExtras(personCell, [importAction]);
@@ -14873,6 +14873,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
14873
14873
  initializeOnly: external_exports.boolean().optional()
14874
14874
  });
14875
14875
 
14876
+ // packages/shared-contracts/dist/harness-presentation.js
14877
+ var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
14878
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
14879
+ var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
14880
+ label: displayText(256).optional(),
14881
+ description: displayText(1024).optional()
14882
+ }).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
14883
+ var harnessLocalizedTextSchema = external_exports.record(localeSchema, displayText(4096)).refine((entries) => typeof entries.en === "string", "English fallback is required").refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
14884
+
14876
14885
  // packages/shared-contracts/dist/model-price-overrides.js
14877
14886
  var usdPerMillionTokens = external_exports.number().finite().nonnegative();
14878
14887
  var modelPriceOverrideSchema = external_exports.strictObject({
@@ -15209,8 +15218,24 @@ var threadUsageSnapshotSchema = external_exports.object({
15209
15218
  }
15210
15219
  });
15211
15220
  var usagePercentSchema = external_exports.number().finite().min(0).max(100);
15221
+ var accountCreditsPeriodSchema = external_exports.enum([
15222
+ "weekly",
15223
+ "monthly",
15224
+ "five_hour",
15225
+ "seven_day",
15226
+ "unknown"
15227
+ ]);
15228
+ var accountCreditsScopeSchema = external_exports.object({
15229
+ id: external_exports.string().min(1).max(256),
15230
+ label: external_exports.string().min(1).max(256),
15231
+ localizations: harnessLocalizationsSchema.optional()
15232
+ }).strict();
15212
15233
  var accountCreditsProductUsageSchema = external_exports.object({
15213
15234
  product: external_exports.string().min(1),
15235
+ /** Native period and scope, never inferred from the display name. */
15236
+ periodType: accountCreditsPeriodSchema.optional(),
15237
+ scope: accountCreditsScopeSchema.optional(),
15238
+ localizations: harnessLocalizationsSchema.optional(),
15214
15239
  used: external_exports.number().finite().nonnegative().optional(),
15215
15240
  // Zero is a real empty cap, not an absent field.
15216
15241
  limit: external_exports.number().finite().nonnegative().optional(),
@@ -15230,9 +15255,11 @@ var accountCreditsSnapshotSchema = external_exports.object({
15230
15255
  unit: external_exports.string().min(1).max(32).optional(),
15231
15256
  /** Native label when the primary limit is scoped to a model or product group. */
15232
15257
  label: external_exports.string().min(1).optional(),
15258
+ scope: accountCreditsScopeSchema.optional(),
15259
+ localizations: harnessLocalizationsSchema.optional(),
15233
15260
  usedPercent: usagePercentSchema,
15234
15261
  resetsAt: external_exports.string().min(1).optional(),
15235
- periodType: external_exports.enum(["weekly", "monthly", "five_hour", "seven_day", "unknown"]),
15262
+ periodType: accountCreditsPeriodSchema,
15236
15263
  productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
15237
15264
  resetCredits: accountResetCreditsSchema.optional()
15238
15265
  }).strict();
@@ -15243,7 +15270,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
15243
15270
  var threadUsageInspectionSchema = external_exports.object({
15244
15271
  threadId: hostThreadIdSchema,
15245
15272
  usage: threadUsageSnapshotSchema.nullable(),
15246
- accountCredits: accountCreditsSnapshotSchema.optional()
15273
+ accountCredits: accountCreditsSnapshotSchema.optional(),
15274
+ /** Whether this source can provide cached account quota independently of usage. */
15275
+ accountCreditsSupported: external_exports.boolean().optional()
15247
15276
  }).strict();
15248
15277
 
15249
15278
  // packages/shared-contracts/dist/harness-accounts.js
@@ -15370,7 +15399,8 @@ var harnessPermissionModeSchema = external_exports.object({
15370
15399
  id: harnessPermissionModeIdSchema,
15371
15400
  label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
15372
15401
  description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
15373
- dangerous: external_exports.boolean().optional()
15402
+ dangerous: external_exports.boolean().optional(),
15403
+ localizations: harnessLocalizationsSchema.optional()
15374
15404
  }).strict();
15375
15405
  var harnessPermissionModeCatalogSchema = external_exports.object({
15376
15406
  modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
@@ -15757,6 +15787,8 @@ var harnessInstallationStateSchema = external_exports.object({
15757
15787
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
15758
15788
  message: external_exports.string().max(2048).optional(),
15759
15789
  messageCode: external_exports.string().min(1).max(128).optional(),
15790
+ /** Safe plugin-owned explanation, distinct from raw diagnostic message. */
15791
+ notice: harnessLocalizedTextSchema.optional(),
15760
15792
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
15761
15793
  }).strict();
15762
15794
 
@@ -15883,6 +15915,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
15883
15915
  invocation: commandInvocationSchema,
15884
15916
  label: commandLabelSchema,
15885
15917
  description: commandDescriptionSchema.optional(),
15918
+ localizations: harnessLocalizationsSchema.optional(),
15886
15919
  argumentMode: external_exports.enum(["none", "text"]),
15887
15920
  /**
15888
15921
  * Native distinction reported by the Harness. Omitted when the Harness does