@liberseek/boft-cli-win32-arm64 0.8.0 → 0.8.2

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.
@@ -15085,6 +15085,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
15085
15085
  initializeOnly: external_exports.boolean().optional()
15086
15086
  });
15087
15087
 
15088
+ // ../../shared-contracts/dist/harness-presentation.js
15089
+ var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
15090
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
15091
+ var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
15092
+ label: displayText(256).optional(),
15093
+ description: displayText(1024).optional()
15094
+ }).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
15095
+ 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");
15096
+
15088
15097
  // ../../shared-contracts/dist/model-price-overrides.js
15089
15098
  var usdPerMillionTokens = external_exports.number().finite().nonnegative();
15090
15099
  var modelPriceOverrideSchema = external_exports.strictObject({
@@ -15163,6 +15172,8 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
15163
15172
  harness,
15164
15173
  sessionId: external_exports.string().min(1).max(512),
15165
15174
  project: project.nullable(),
15175
+ /** Persisted Desktop title for a mapped Session, otherwise its native name; may be absent. */
15176
+ title: external_exports.string().min(1).max(200).optional(),
15166
15177
  /** Models the session used, most requests first. */
15167
15178
  models: external_exports.array(model).max(16),
15168
15179
  firstAtMs: count,
@@ -15229,7 +15240,12 @@ var usageStatisticsResultSchema = external_exports.strictObject({
15229
15240
  * The sessions that spent the most, by cost and by tokens without cache, all filters applied;
15230
15241
  * requests without a native session are not listed here but count everywhere else.
15231
15242
  */
15232
- sessions: external_exports.array(usageStatisticsSessionSchema).max(100)
15243
+ sessions: external_exports.array(usageStatisticsSessionSchema).max(100),
15244
+ /**
15245
+ * The sessions last active in the range, newest first, all filters applied. Optional for older
15246
+ * Hosts; missing is treated as no list rather than no sessions.
15247
+ */
15248
+ recentSessions: external_exports.array(usageStatisticsSessionSchema).max(100).optional()
15233
15249
  });
15234
15250
 
15235
15251
  // ../../shared-contracts/dist/ids.js
@@ -15498,8 +15514,24 @@ var threadUsageSnapshotSchema = external_exports.object({
15498
15514
  }
15499
15515
  });
15500
15516
  var usagePercentSchema = external_exports.number().finite().min(0).max(100);
15517
+ var accountCreditsPeriodSchema = external_exports.enum([
15518
+ "weekly",
15519
+ "monthly",
15520
+ "five_hour",
15521
+ "seven_day",
15522
+ "unknown"
15523
+ ]);
15524
+ var accountCreditsScopeSchema = external_exports.object({
15525
+ id: external_exports.string().min(1).max(256),
15526
+ label: external_exports.string().min(1).max(256),
15527
+ localizations: harnessLocalizationsSchema.optional()
15528
+ }).strict();
15501
15529
  var accountCreditsProductUsageSchema = external_exports.object({
15502
15530
  product: external_exports.string().min(1),
15531
+ /** Native period and scope, never inferred from the display name. */
15532
+ periodType: accountCreditsPeriodSchema.optional(),
15533
+ scope: accountCreditsScopeSchema.optional(),
15534
+ localizations: harnessLocalizationsSchema.optional(),
15503
15535
  used: external_exports.number().finite().nonnegative().optional(),
15504
15536
  // Zero is a real empty cap, not an absent field.
15505
15537
  limit: external_exports.number().finite().nonnegative().optional(),
@@ -15521,8 +15553,10 @@ var accountCreditsSnapshotSchema = external_exports.object({
15521
15553
  label: external_exports.string().min(1).optional(),
15522
15554
  usedPercent: usagePercentSchema.optional(),
15523
15555
  remaining: external_exports.number().finite().optional(),
15556
+ scope: accountCreditsScopeSchema.optional(),
15557
+ localizations: harnessLocalizationsSchema.optional(),
15524
15558
  resetsAt: external_exports.string().min(1).optional(),
15525
- periodType: external_exports.enum(["weekly", "monthly", "five_hour", "seven_day", "unknown"]),
15559
+ periodType: accountCreditsPeriodSchema,
15526
15560
  productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
15527
15561
  resetCredits: accountResetCreditsSchema.optional()
15528
15562
  }).strict().superRefine((credits, context) => {
@@ -15547,7 +15581,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
15547
15581
  var threadUsageInspectionSchema = external_exports.object({
15548
15582
  threadId: hostThreadIdSchema,
15549
15583
  usage: threadUsageSnapshotSchema.nullable(),
15550
- accountCredits: accountCreditsSnapshotSchema.optional()
15584
+ accountCredits: accountCreditsSnapshotSchema.optional(),
15585
+ /** Whether this source can provide cached account quota independently of usage. */
15586
+ accountCreditsSupported: external_exports.boolean().optional()
15551
15587
  }).strict();
15552
15588
 
15553
15589
  // ../../shared-contracts/dist/harness-accounts.js
@@ -15674,7 +15710,8 @@ var harnessPermissionModeSchema = external_exports.object({
15674
15710
  id: harnessPermissionModeIdSchema,
15675
15711
  label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
15676
15712
  description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
15677
- dangerous: external_exports.boolean().optional()
15713
+ dangerous: external_exports.boolean().optional(),
15714
+ localizations: harnessLocalizationsSchema.optional()
15678
15715
  }).strict();
15679
15716
  var harnessPermissionModeCatalogSchema = external_exports.object({
15680
15717
  modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
@@ -15997,6 +16034,8 @@ var harnessInstallationStateSchema = external_exports.object({
15997
16034
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
15998
16035
  message: external_exports.string().max(2048).optional(),
15999
16036
  messageCode: external_exports.string().min(1).max(128).optional(),
16037
+ /** Safe plugin-owned explanation, distinct from raw diagnostic message. */
16038
+ notice: harnessLocalizedTextSchema.optional(),
16000
16039
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
16001
16040
  }).strict();
16002
16041
 
@@ -16135,6 +16174,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
16135
16174
  invocation: commandInvocationSchema,
16136
16175
  label: commandLabelSchema,
16137
16176
  description: commandDescriptionSchema.optional(),
16177
+ localizations: harnessLocalizationsSchema.optional(),
16138
16178
  argumentMode: external_exports.enum(["none", "text"]),
16139
16179
  /**
16140
16180
  * Native distinction reported by the Harness. Omitted when the Harness does
@@ -21375,6 +21415,8 @@ function projectKimiUsages(payload) {
21375
21415
  return [
21376
21416
  {
21377
21417
  product: "Kimi Code · 5-hour window",
21418
+ periodType: "five_hour",
21419
+ scope: { id: "kimi-code", label: "Kimi Code" },
21378
21420
  usagePercent: share.usedPercent,
21379
21421
  ...share.resetsAt ? { resetsAt: share.resetsAt } : {}
21380
21422
  }
@@ -22831,21 +22873,37 @@ var kimiPermissionModeCatalog = harnessPermissionModeCatalogSchema.parse({
22831
22873
  {
22832
22874
  id: harnessPermissionModeIdSchema.parse("default"),
22833
22875
  label: "询问确认",
22876
+ localizations: {
22877
+ en: { label: "Ask for approval" },
22878
+ "zh-CN": { description: "工具正常执行,需要时手动审批。" }
22879
+ },
22834
22880
  description: "Manual approvals; tools execute normally."
22835
22881
  },
22836
22882
  {
22837
22883
  id: harnessPermissionModeIdSchema.parse("plan"),
22838
22884
  label: "计划模式",
22885
+ localizations: {
22886
+ en: { label: "Plan mode" },
22887
+ "zh-CN": { description: "只读规划,不执行工具。" }
22888
+ },
22839
22889
  description: "Read-only planning; no tool execution."
22840
22890
  },
22841
22891
  {
22842
22892
  id: harnessPermissionModeIdSchema.parse("auto"),
22843
22893
  label: "按需询问",
22894
+ localizations: {
22895
+ en: { label: "Ask as needed" },
22896
+ "zh-CN": { description: "自动批准安全操作。" }
22897
+ },
22844
22898
  description: "Auto-approve safe operations."
22845
22899
  },
22846
22900
  {
22847
22901
  id: harnessPermissionModeIdSchema.parse("yolo"),
22848
22902
  label: "无需询问",
22903
+ localizations: {
22904
+ en: { label: "No approval prompts" },
22905
+ "zh-CN": { description: "自动批准所有操作。" }
22906
+ },
22849
22907
  description: "Auto-approve everything.",
22850
22908
  dangerous: true
22851
22909
  }
@@ -24110,6 +24168,11 @@ async function copyKimiCommandHistory(turns, sessionId, options) {
24110
24168
  }
24111
24169
 
24112
24170
  // dist/slash-commands.js
24171
+ var KIMI_COMPACT_COMMAND = {
24172
+ name: "compact",
24173
+ description: "Compact the conversation context",
24174
+ input: { hint: "prompt" }
24175
+ };
24113
24176
  function buildKimiCommandCatalog(availableCommands) {
24114
24177
  const seenIds = /* @__PURE__ */ new Set();
24115
24178
  const descriptors = [];
@@ -24129,17 +24192,16 @@ function buildKimiCommandCatalog(availableCommands) {
24129
24192
  invocation: `/${cleanId}`,
24130
24193
  label: cleanId,
24131
24194
  argumentMode,
24132
- ...description ? { description } : {}
24195
+ ...description ? { description } : {},
24196
+ // Only the known native built-in gets plugin copy. A live command with
24197
+ // the same name but different wording/input retains its own semantics.
24198
+ ...cleanId === KIMI_COMPACT_COMMAND.name && rawDesc === KIMI_COMPACT_COMMAND.description && command.input?.hint === KIMI_COMPACT_COMMAND.input?.hint ? { localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } } } : {}
24133
24199
  });
24134
24200
  }
24135
24201
  return harnessCommandCatalogSchema.parse({ commands: descriptors });
24136
24202
  }
24137
24203
  var KIMI_DEFAULT_COMMANDS = [
24138
- {
24139
- name: "compact",
24140
- description: "Compact the conversation context",
24141
- input: { hint: "prompt" }
24142
- },
24204
+ KIMI_COMPACT_COMMAND,
24143
24205
  {
24144
24206
  name: "status",
24145
24207
  description: "Show current session status"
@@ -14944,6 +14944,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
14944
14944
  initializeOnly: external_exports.boolean().optional()
14945
14945
  });
14946
14946
 
14947
+ // ../../shared-contracts/dist/harness-presentation.js
14948
+ var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
14949
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
14950
+ var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
14951
+ label: displayText(256).optional(),
14952
+ description: displayText(1024).optional()
14953
+ }).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
14954
+ 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");
14955
+
14947
14956
  // ../../shared-contracts/dist/model-price-overrides.js
14948
14957
  var usdPerMillionTokens = external_exports.number().finite().nonnegative();
14949
14958
  var modelPriceOverrideSchema = external_exports.strictObject({
@@ -15022,6 +15031,8 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
15022
15031
  harness,
15023
15032
  sessionId: external_exports.string().min(1).max(512),
15024
15033
  project: project.nullable(),
15034
+ /** Persisted Desktop title for a mapped Session, otherwise its native name; may be absent. */
15035
+ title: external_exports.string().min(1).max(200).optional(),
15025
15036
  /** Models the session used, most requests first. */
15026
15037
  models: external_exports.array(model).max(16),
15027
15038
  firstAtMs: count,
@@ -15088,7 +15099,12 @@ var usageStatisticsResultSchema = external_exports.strictObject({
15088
15099
  * The sessions that spent the most, by cost and by tokens without cache, all filters applied;
15089
15100
  * requests without a native session are not listed here but count everywhere else.
15090
15101
  */
15091
- sessions: external_exports.array(usageStatisticsSessionSchema).max(100)
15102
+ sessions: external_exports.array(usageStatisticsSessionSchema).max(100),
15103
+ /**
15104
+ * The sessions last active in the range, newest first, all filters applied. Optional for older
15105
+ * Hosts; missing is treated as no list rather than no sessions.
15106
+ */
15107
+ recentSessions: external_exports.array(usageStatisticsSessionSchema).max(100).optional()
15092
15108
  });
15093
15109
 
15094
15110
  // ../../shared-contracts/dist/ids.js
@@ -15357,8 +15373,24 @@ var threadUsageSnapshotSchema = external_exports.object({
15357
15373
  }
15358
15374
  });
15359
15375
  var usagePercentSchema = external_exports.number().finite().min(0).max(100);
15376
+ var accountCreditsPeriodSchema = external_exports.enum([
15377
+ "weekly",
15378
+ "monthly",
15379
+ "five_hour",
15380
+ "seven_day",
15381
+ "unknown"
15382
+ ]);
15383
+ var accountCreditsScopeSchema = external_exports.object({
15384
+ id: external_exports.string().min(1).max(256),
15385
+ label: external_exports.string().min(1).max(256),
15386
+ localizations: harnessLocalizationsSchema.optional()
15387
+ }).strict();
15360
15388
  var accountCreditsProductUsageSchema = external_exports.object({
15361
15389
  product: external_exports.string().min(1),
15390
+ /** Native period and scope, never inferred from the display name. */
15391
+ periodType: accountCreditsPeriodSchema.optional(),
15392
+ scope: accountCreditsScopeSchema.optional(),
15393
+ localizations: harnessLocalizationsSchema.optional(),
15362
15394
  used: external_exports.number().finite().nonnegative().optional(),
15363
15395
  // Zero is a real empty cap, not an absent field.
15364
15396
  limit: external_exports.number().finite().nonnegative().optional(),
@@ -15380,8 +15412,10 @@ var accountCreditsSnapshotSchema = external_exports.object({
15380
15412
  label: external_exports.string().min(1).optional(),
15381
15413
  usedPercent: usagePercentSchema.optional(),
15382
15414
  remaining: external_exports.number().finite().optional(),
15415
+ scope: accountCreditsScopeSchema.optional(),
15416
+ localizations: harnessLocalizationsSchema.optional(),
15383
15417
  resetsAt: external_exports.string().min(1).optional(),
15384
- periodType: external_exports.enum(["weekly", "monthly", "five_hour", "seven_day", "unknown"]),
15418
+ periodType: accountCreditsPeriodSchema,
15385
15419
  productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
15386
15420
  resetCredits: accountResetCreditsSchema.optional()
15387
15421
  }).strict().superRefine((credits, context) => {
@@ -15406,7 +15440,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
15406
15440
  var threadUsageInspectionSchema = external_exports.object({
15407
15441
  threadId: hostThreadIdSchema,
15408
15442
  usage: threadUsageSnapshotSchema.nullable(),
15409
- accountCredits: accountCreditsSnapshotSchema.optional()
15443
+ accountCredits: accountCreditsSnapshotSchema.optional(),
15444
+ /** Whether this source can provide cached account quota independently of usage. */
15445
+ accountCreditsSupported: external_exports.boolean().optional()
15410
15446
  }).strict();
15411
15447
 
15412
15448
  // ../../shared-contracts/dist/harness-accounts.js
@@ -15533,7 +15569,8 @@ var harnessPermissionModeSchema = external_exports.object({
15533
15569
  id: harnessPermissionModeIdSchema,
15534
15570
  label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
15535
15571
  description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
15536
- dangerous: external_exports.boolean().optional()
15572
+ dangerous: external_exports.boolean().optional(),
15573
+ localizations: harnessLocalizationsSchema.optional()
15537
15574
  }).strict();
15538
15575
  var harnessPermissionModeCatalogSchema = external_exports.object({
15539
15576
  modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
@@ -15856,6 +15893,8 @@ var harnessInstallationStateSchema = external_exports.object({
15856
15893
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
15857
15894
  message: external_exports.string().max(2048).optional(),
15858
15895
  messageCode: external_exports.string().min(1).max(128).optional(),
15896
+ /** Safe plugin-owned explanation, distinct from raw diagnostic message. */
15897
+ notice: harnessLocalizedTextSchema.optional(),
15859
15898
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
15860
15899
  }).strict();
15861
15900
 
@@ -15994,6 +16033,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
15994
16033
  invocation: commandInvocationSchema,
15995
16034
  label: commandLabelSchema,
15996
16035
  description: commandDescriptionSchema.optional(),
16036
+ localizations: harnessLocalizationsSchema.optional(),
15997
16037
  argumentMode: external_exports.enum(["none", "text"]),
15998
16038
  /**
15999
16039
  * Native distinction reported by the Harness. Omitted when the Harness does
@@ -21546,6 +21586,7 @@ var KIRO_COMMANDS = [
21546
21586
  {
21547
21587
  id: "kiro.compact",
21548
21588
  invocation: "/compact",
21589
+ localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
21549
21590
  label: "Compact Conversation",
21550
21591
  description: "Summarize conversation history to free context window",
21551
21592
  argumentMode: "none"
@@ -22756,11 +22797,15 @@ var KIRO_PERMISSION_MODES = [
22756
22797
  {
22757
22798
  id: KIRO_DEFAULT_PERMISSION_MODE_ID,
22758
22799
  label: "Autopilot",
22800
+ localizations: {
22801
+ "zh-CN": { label: "自动执行", description: "在原生策略范围内自动执行工具。" }
22802
+ },
22759
22803
  description: "Automatic tool execution within native policy bounds"
22760
22804
  },
22761
22805
  {
22762
22806
  id: harnessPermissionModeIdSchema.parse("supervised"),
22763
22807
  label: "Supervised",
22808
+ localizations: { "zh-CN": { label: "人工监督", description: "人工审核工具审批与文件修改。" } },
22764
22809
  description: "Manual review of tool approvals and file modifications"
22765
22810
  }
22766
22811
  ];
@@ -24507,6 +24552,10 @@ function createKiroInstallation(environment, command) {
24507
24552
  updateAvailable: false,
24508
24553
  canUpdate: false,
24509
24554
  messageCode: "kiro-native-updater",
24555
+ notice: {
24556
+ en: "Use Kiro CLI's original installer or native updater to check for and install updates.",
24557
+ "zh-CN": "请使用 Kiro CLI 原安装程序或原生更新器检查并安装更新。"
24558
+ },
24510
24559
  message: "Use Kiro CLI's original installer or native updater to check for and install updates."
24511
24560
  };
24512
24561
  };
@@ -14853,6 +14853,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
14853
14853
  initializeOnly: external_exports.boolean().optional()
14854
14854
  });
14855
14855
 
14856
+ // ../../shared-contracts/dist/harness-presentation.js
14857
+ var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
14858
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
14859
+ var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
14860
+ label: displayText(256).optional(),
14861
+ description: displayText(1024).optional()
14862
+ }).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
14863
+ 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");
14864
+
14856
14865
  // ../../shared-contracts/dist/model-price-overrides.js
14857
14866
  var usdPerMillionTokens = external_exports.number().finite().nonnegative();
14858
14867
  var modelPriceOverrideSchema = external_exports.strictObject({
@@ -14931,6 +14940,8 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
14931
14940
  harness,
14932
14941
  sessionId: external_exports.string().min(1).max(512),
14933
14942
  project: project.nullable(),
14943
+ /** Persisted Desktop title for a mapped Session, otherwise its native name; may be absent. */
14944
+ title: external_exports.string().min(1).max(200).optional(),
14934
14945
  /** Models the session used, most requests first. */
14935
14946
  models: external_exports.array(model).max(16),
14936
14947
  firstAtMs: count,
@@ -14997,7 +15008,12 @@ var usageStatisticsResultSchema = external_exports.strictObject({
14997
15008
  * The sessions that spent the most, by cost and by tokens without cache, all filters applied;
14998
15009
  * requests without a native session are not listed here but count everywhere else.
14999
15010
  */
15000
- sessions: external_exports.array(usageStatisticsSessionSchema).max(100)
15011
+ sessions: external_exports.array(usageStatisticsSessionSchema).max(100),
15012
+ /**
15013
+ * The sessions last active in the range, newest first, all filters applied. Optional for older
15014
+ * Hosts; missing is treated as no list rather than no sessions.
15015
+ */
15016
+ recentSessions: external_exports.array(usageStatisticsSessionSchema).max(100).optional()
15001
15017
  });
15002
15018
 
15003
15019
  // ../../shared-contracts/dist/ids.js
@@ -15266,8 +15282,24 @@ var threadUsageSnapshotSchema = external_exports.object({
15266
15282
  }
15267
15283
  });
15268
15284
  var usagePercentSchema = external_exports.number().finite().min(0).max(100);
15285
+ var accountCreditsPeriodSchema = external_exports.enum([
15286
+ "weekly",
15287
+ "monthly",
15288
+ "five_hour",
15289
+ "seven_day",
15290
+ "unknown"
15291
+ ]);
15292
+ var accountCreditsScopeSchema = external_exports.object({
15293
+ id: external_exports.string().min(1).max(256),
15294
+ label: external_exports.string().min(1).max(256),
15295
+ localizations: harnessLocalizationsSchema.optional()
15296
+ }).strict();
15269
15297
  var accountCreditsProductUsageSchema = external_exports.object({
15270
15298
  product: external_exports.string().min(1),
15299
+ /** Native period and scope, never inferred from the display name. */
15300
+ periodType: accountCreditsPeriodSchema.optional(),
15301
+ scope: accountCreditsScopeSchema.optional(),
15302
+ localizations: harnessLocalizationsSchema.optional(),
15271
15303
  used: external_exports.number().finite().nonnegative().optional(),
15272
15304
  // Zero is a real empty cap, not an absent field.
15273
15305
  limit: external_exports.number().finite().nonnegative().optional(),
@@ -15289,8 +15321,10 @@ var accountCreditsSnapshotSchema = external_exports.object({
15289
15321
  label: external_exports.string().min(1).optional(),
15290
15322
  usedPercent: usagePercentSchema.optional(),
15291
15323
  remaining: external_exports.number().finite().optional(),
15324
+ scope: accountCreditsScopeSchema.optional(),
15325
+ localizations: harnessLocalizationsSchema.optional(),
15292
15326
  resetsAt: external_exports.string().min(1).optional(),
15293
- periodType: external_exports.enum(["weekly", "monthly", "five_hour", "seven_day", "unknown"]),
15327
+ periodType: accountCreditsPeriodSchema,
15294
15328
  productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
15295
15329
  resetCredits: accountResetCreditsSchema.optional()
15296
15330
  }).strict().superRefine((credits, context) => {
@@ -15315,7 +15349,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
15315
15349
  var threadUsageInspectionSchema = external_exports.object({
15316
15350
  threadId: hostThreadIdSchema,
15317
15351
  usage: threadUsageSnapshotSchema.nullable(),
15318
- accountCredits: accountCreditsSnapshotSchema.optional()
15352
+ accountCredits: accountCreditsSnapshotSchema.optional(),
15353
+ /** Whether this source can provide cached account quota independently of usage. */
15354
+ accountCreditsSupported: external_exports.boolean().optional()
15319
15355
  }).strict();
15320
15356
 
15321
15357
  // ../../shared-contracts/dist/harness-accounts.js
@@ -15442,7 +15478,8 @@ var harnessPermissionModeSchema = external_exports.object({
15442
15478
  id: harnessPermissionModeIdSchema,
15443
15479
  label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
15444
15480
  description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
15445
- dangerous: external_exports.boolean().optional()
15481
+ dangerous: external_exports.boolean().optional(),
15482
+ localizations: harnessLocalizationsSchema.optional()
15446
15483
  }).strict();
15447
15484
  var harnessPermissionModeCatalogSchema = external_exports.object({
15448
15485
  modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
@@ -15765,6 +15802,8 @@ var harnessInstallationStateSchema = external_exports.object({
15765
15802
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
15766
15803
  message: external_exports.string().max(2048).optional(),
15767
15804
  messageCode: external_exports.string().min(1).max(128).optional(),
15805
+ /** Safe plugin-owned explanation, distinct from raw diagnostic message. */
15806
+ notice: harnessLocalizedTextSchema.optional(),
15768
15807
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
15769
15808
  }).strict();
15770
15809
 
@@ -15903,6 +15942,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
15903
15942
  invocation: commandInvocationSchema,
15904
15943
  label: commandLabelSchema,
15905
15944
  description: commandDescriptionSchema.optional(),
15945
+ localizations: harnessLocalizationsSchema.optional(),
15906
15946
  argumentMode: external_exports.enum(["none", "text"]),
15907
15947
  /**
15908
15948
  * Native distinction reported by the Harness. Omitted when the Harness does
@@ -415,6 +415,20 @@ import path4 from "node:path";
415
415
  import { createInterface } from "node:readline";
416
416
  var MAX_SESSION_ID_LENGTH = 512;
417
417
  var MAX_CWD_LENGTH = 4096;
418
+ var MAX_SESSION_TITLE_LENGTH = 200;
419
+ function usageSessionTitle(value) {
420
+ if (typeof value !== "string")
421
+ return void 0;
422
+ const normalized = value.replaceAll("\0", "").replaceAll(/\s+/gu, " ").trim();
423
+ if (!normalized)
424
+ return void 0;
425
+ if (normalized.length <= MAX_SESSION_TITLE_LENGTH)
426
+ return normalized;
427
+ const characters = [...normalized];
428
+ if (characters.length <= MAX_SESSION_TITLE_LENGTH)
429
+ return normalized;
430
+ return `${characters.slice(0, MAX_SESSION_TITLE_LENGTH - 1).join("").trimEnd()}…`;
431
+ }
418
432
  function sessionIdOk(value) {
419
433
  return typeof value === "string" && value.length > 0 && value.length <= MAX_SESSION_ID_LENGTH;
420
434
  }
@@ -424,12 +438,14 @@ function cwdOk(value) {
424
438
  function withUsageSession(entry, session) {
425
439
  const sessionId = sessionIdOk(session.sessionId) ? session.sessionId : void 0;
426
440
  const cwd = cwdOk(session.cwd) ? session.cwd : void 0;
441
+ const sessionTitle = sessionId !== void 0 ? usageSessionTitle(session.title) : void 0;
427
442
  if (sessionId === void 0 && cwd === void 0)
428
443
  return entry;
429
444
  return {
430
445
  ...entry,
431
446
  ...sessionId !== void 0 ? { sessionId } : {},
432
- ...cwd !== void 0 ? { cwd } : {}
447
+ ...cwd !== void 0 ? { cwd } : {},
448
+ ...sessionTitle !== void 0 ? { sessionTitle } : {}
433
449
  };
434
450
  }
435
451
  function usageEntryFromRequest(request, occurredAtMs) {
@@ -15128,6 +15144,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
15128
15144
  initializeOnly: external_exports.boolean().optional()
15129
15145
  });
15130
15146
 
15147
+ // ../../shared-contracts/dist/harness-presentation.js
15148
+ var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
15149
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
15150
+ var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
15151
+ label: displayText(256).optional(),
15152
+ description: displayText(1024).optional()
15153
+ }).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
15154
+ 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");
15155
+
15131
15156
  // ../../shared-contracts/dist/model-price-overrides.js
15132
15157
  var usdPerMillionTokens = external_exports.number().finite().nonnegative();
15133
15158
  var modelPriceOverrideSchema = external_exports.strictObject({
@@ -15206,6 +15231,8 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
15206
15231
  harness,
15207
15232
  sessionId: external_exports.string().min(1).max(512),
15208
15233
  project: project.nullable(),
15234
+ /** Persisted Desktop title for a mapped Session, otherwise its native name; may be absent. */
15235
+ title: external_exports.string().min(1).max(200).optional(),
15209
15236
  /** Models the session used, most requests first. */
15210
15237
  models: external_exports.array(model).max(16),
15211
15238
  firstAtMs: count,
@@ -15272,7 +15299,12 @@ var usageStatisticsResultSchema = external_exports.strictObject({
15272
15299
  * The sessions that spent the most, by cost and by tokens without cache, all filters applied;
15273
15300
  * requests without a native session are not listed here but count everywhere else.
15274
15301
  */
15275
- sessions: external_exports.array(usageStatisticsSessionSchema).max(100)
15302
+ sessions: external_exports.array(usageStatisticsSessionSchema).max(100),
15303
+ /**
15304
+ * The sessions last active in the range, newest first, all filters applied. Optional for older
15305
+ * Hosts; missing is treated as no list rather than no sessions.
15306
+ */
15307
+ recentSessions: external_exports.array(usageStatisticsSessionSchema).max(100).optional()
15276
15308
  });
15277
15309
 
15278
15310
  // ../../shared-contracts/dist/ids.js
@@ -15541,8 +15573,24 @@ var threadUsageSnapshotSchema = external_exports.object({
15541
15573
  }
15542
15574
  });
15543
15575
  var usagePercentSchema = external_exports.number().finite().min(0).max(100);
15576
+ var accountCreditsPeriodSchema = external_exports.enum([
15577
+ "weekly",
15578
+ "monthly",
15579
+ "five_hour",
15580
+ "seven_day",
15581
+ "unknown"
15582
+ ]);
15583
+ var accountCreditsScopeSchema = external_exports.object({
15584
+ id: external_exports.string().min(1).max(256),
15585
+ label: external_exports.string().min(1).max(256),
15586
+ localizations: harnessLocalizationsSchema.optional()
15587
+ }).strict();
15544
15588
  var accountCreditsProductUsageSchema = external_exports.object({
15545
15589
  product: external_exports.string().min(1),
15590
+ /** Native period and scope, never inferred from the display name. */
15591
+ periodType: accountCreditsPeriodSchema.optional(),
15592
+ scope: accountCreditsScopeSchema.optional(),
15593
+ localizations: harnessLocalizationsSchema.optional(),
15546
15594
  used: external_exports.number().finite().nonnegative().optional(),
15547
15595
  // Zero is a real empty cap, not an absent field.
15548
15596
  limit: external_exports.number().finite().nonnegative().optional(),
@@ -15564,8 +15612,10 @@ var accountCreditsSnapshotSchema = external_exports.object({
15564
15612
  label: external_exports.string().min(1).optional(),
15565
15613
  usedPercent: usagePercentSchema.optional(),
15566
15614
  remaining: external_exports.number().finite().optional(),
15615
+ scope: accountCreditsScopeSchema.optional(),
15616
+ localizations: harnessLocalizationsSchema.optional(),
15567
15617
  resetsAt: external_exports.string().min(1).optional(),
15568
- periodType: external_exports.enum(["weekly", "monthly", "five_hour", "seven_day", "unknown"]),
15618
+ periodType: accountCreditsPeriodSchema,
15569
15619
  productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
15570
15620
  resetCredits: accountResetCreditsSchema.optional()
15571
15621
  }).strict().superRefine((credits, context) => {
@@ -15590,7 +15640,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
15590
15640
  var threadUsageInspectionSchema = external_exports.object({
15591
15641
  threadId: hostThreadIdSchema,
15592
15642
  usage: threadUsageSnapshotSchema.nullable(),
15593
- accountCredits: accountCreditsSnapshotSchema.optional()
15643
+ accountCredits: accountCreditsSnapshotSchema.optional(),
15644
+ /** Whether this source can provide cached account quota independently of usage. */
15645
+ accountCreditsSupported: external_exports.boolean().optional()
15594
15646
  }).strict();
15595
15647
 
15596
15648
  // ../../shared-contracts/dist/harness-accounts.js
@@ -15717,7 +15769,8 @@ var harnessPermissionModeSchema = external_exports.object({
15717
15769
  id: harnessPermissionModeIdSchema,
15718
15770
  label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
15719
15771
  description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
15720
- dangerous: external_exports.boolean().optional()
15772
+ dangerous: external_exports.boolean().optional(),
15773
+ localizations: harnessLocalizationsSchema.optional()
15721
15774
  }).strict();
15722
15775
  var harnessPermissionModeCatalogSchema = external_exports.object({
15723
15776
  modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
@@ -16040,6 +16093,8 @@ var harnessInstallationStateSchema = external_exports.object({
16040
16093
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
16041
16094
  message: external_exports.string().max(2048).optional(),
16042
16095
  messageCode: external_exports.string().min(1).max(128).optional(),
16096
+ /** Safe plugin-owned explanation, distinct from raw diagnostic message. */
16097
+ notice: harnessLocalizedTextSchema.optional(),
16043
16098
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
16044
16099
  }).strict();
16045
16100
 
@@ -16178,6 +16233,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
16178
16233
  invocation: commandInvocationSchema,
16179
16234
  label: commandLabelSchema,
16180
16235
  description: commandDescriptionSchema.optional(),
16236
+ localizations: harnessLocalizationsSchema.optional(),
16181
16237
  argumentMode: external_exports.enum(["none", "text"]),
16182
16238
  /**
16183
16239
  * Native distinction reported by the Harness. Omitted when the Harness does
@@ -17674,9 +17730,11 @@ function ompUsageHistory(history) {
17674
17730
  async function readOmpUsage(file2, signal) {
17675
17731
  const entries = [];
17676
17732
  const header = await jsonlHeader(file2, (record2) => record2.type === "session", signal);
17733
+ const titled = await jsonlHeader(file2, (record2) => record2.type === "title", signal);
17677
17734
  const session = {
17678
17735
  sessionId: typeof header?.id === "string" ? header.id : void 0,
17679
- cwd: typeof header?.cwd === "string" ? header.cwd : void 0
17736
+ cwd: typeof header?.cwd === "string" ? header.cwd : void 0,
17737
+ title: usageSessionTitle(titled?.title)
17680
17738
  };
17681
17739
  for await (const line of jsonlRecords(file2, '"assistant"', signal)) {
17682
17740
  if (line.type !== "message")
@@ -19965,16 +20023,25 @@ var OMP_PERMISSION_MODE_CATALOG = harnessPermissionModeCatalogSchema.parse({
19965
20023
  {
19966
20024
  id: "always-ask",
19967
20025
  label: "Always ask",
20026
+ localizations: {
20027
+ "zh-CN": { label: "始终询问", description: "自动允许读取;写入或执行操作前询问。" }
20028
+ },
19968
20029
  description: "Automatically allow reads and ask before write or execution actions."
19969
20030
  },
19970
20031
  {
19971
20032
  id: "write",
19972
20033
  label: "Write",
20034
+ localizations: {
20035
+ "zh-CN": { label: "写入", description: "自动允许读取和写入;执行操作前询问。" }
20036
+ },
19973
20037
  description: "Automatically allow reads and writes; ask before execution actions."
19974
20038
  },
19975
20039
  {
19976
20040
  id: "yolo",
19977
20041
  label: "Full access",
20042
+ localizations: {
20043
+ "zh-CN": { label: "完全访问", description: "无需批准提示即可运行所有工具操作。" }
20044
+ },
19978
20045
  description: "Run all tool actions without approval prompts.",
19979
20046
  dangerous: true
19980
20047
  }
@@ -20105,6 +20172,7 @@ var ompCommandCatalog = harnessCommandCatalogSchema.parse({
20105
20172
  {
20106
20173
  id: "omp.compact",
20107
20174
  invocation: "/compact",
20175
+ localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
20108
20176
  label: "Compact context",
20109
20177
  description: "Compact the current conversation context",
20110
20178
  argumentMode: "text"
@@ -21362,11 +21430,10 @@ var OmpHarnessSession = class {
21362
21430
  state = await transport.selectThinkingOption(this.#requestedThinkingOptionId);
21363
21431
  thinkingLevels = await transport.getAvailableThinkingLevels();
21364
21432
  }
21365
- } else {
21366
- const reconciled = await reconcileThinkingLevel(transport, state, thinkingLevels);
21367
- state = reconciled.state;
21368
- thinkingLevels = reconciled.thinkingLevels;
21369
21433
  }
21434
+ const reconciled = await reconcileThinkingLevel(transport, state, thinkingLevels);
21435
+ state = reconciled.state;
21436
+ thinkingLevels = reconciled.thinkingLevels;
21370
21437
  this.#transport = transport;
21371
21438
  this.#publishTransportState(state, thinkingLevels);
21372
21439
  return transport;