@liberseek/boft-cli-linux-x64 0.8.1 → 0.8.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.
@@ -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({
@@ -15364,8 +15373,24 @@ var threadUsageSnapshotSchema = external_exports.object({
15364
15373
  }
15365
15374
  });
15366
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();
15367
15388
  var accountCreditsProductUsageSchema = external_exports.object({
15368
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(),
15369
15394
  used: external_exports.number().finite().nonnegative().optional(),
15370
15395
  // Zero is a real empty cap, not an absent field.
15371
15396
  limit: external_exports.number().finite().nonnegative().optional(),
@@ -15387,8 +15412,10 @@ var accountCreditsSnapshotSchema = external_exports.object({
15387
15412
  label: external_exports.string().min(1).optional(),
15388
15413
  usedPercent: usagePercentSchema.optional(),
15389
15414
  remaining: external_exports.number().finite().optional(),
15415
+ scope: accountCreditsScopeSchema.optional(),
15416
+ localizations: harnessLocalizationsSchema.optional(),
15390
15417
  resetsAt: external_exports.string().min(1).optional(),
15391
- periodType: external_exports.enum(["weekly", "monthly", "five_hour", "seven_day", "unknown"]),
15418
+ periodType: accountCreditsPeriodSchema,
15392
15419
  productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
15393
15420
  resetCredits: accountResetCreditsSchema.optional()
15394
15421
  }).strict().superRefine((credits, context) => {
@@ -15413,7 +15440,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
15413
15440
  var threadUsageInspectionSchema = external_exports.object({
15414
15441
  threadId: hostThreadIdSchema,
15415
15442
  usage: threadUsageSnapshotSchema.nullable(),
15416
- 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()
15417
15446
  }).strict();
15418
15447
 
15419
15448
  // ../../shared-contracts/dist/harness-accounts.js
@@ -15540,7 +15569,8 @@ var harnessPermissionModeSchema = external_exports.object({
15540
15569
  id: harnessPermissionModeIdSchema,
15541
15570
  label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
15542
15571
  description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
15543
- dangerous: external_exports.boolean().optional()
15572
+ dangerous: external_exports.boolean().optional(),
15573
+ localizations: harnessLocalizationsSchema.optional()
15544
15574
  }).strict();
15545
15575
  var harnessPermissionModeCatalogSchema = external_exports.object({
15546
15576
  modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
@@ -15863,6 +15893,8 @@ var harnessInstallationStateSchema = external_exports.object({
15863
15893
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
15864
15894
  message: external_exports.string().max(2048).optional(),
15865
15895
  messageCode: external_exports.string().min(1).max(128).optional(),
15896
+ /** Safe plugin-owned explanation, distinct from raw diagnostic message. */
15897
+ notice: harnessLocalizedTextSchema.optional(),
15866
15898
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
15867
15899
  }).strict();
15868
15900
 
@@ -16001,6 +16033,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
16001
16033
  invocation: commandInvocationSchema,
16002
16034
  label: commandLabelSchema,
16003
16035
  description: commandDescriptionSchema.optional(),
16036
+ localizations: harnessLocalizationsSchema.optional(),
16004
16037
  argumentMode: external_exports.enum(["none", "text"]),
16005
16038
  /**
16006
16039
  * Native distinction reported by the Harness. Omitted when the Harness does
@@ -21553,6 +21586,7 @@ var KIRO_COMMANDS = [
21553
21586
  {
21554
21587
  id: "kiro.compact",
21555
21588
  invocation: "/compact",
21589
+ localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
21556
21590
  label: "Compact Conversation",
21557
21591
  description: "Summarize conversation history to free context window",
21558
21592
  argumentMode: "none"
@@ -22763,11 +22797,15 @@ var KIRO_PERMISSION_MODES = [
22763
22797
  {
22764
22798
  id: KIRO_DEFAULT_PERMISSION_MODE_ID,
22765
22799
  label: "Autopilot",
22800
+ localizations: {
22801
+ "zh-CN": { label: "自动执行", description: "在原生策略范围内自动执行工具。" }
22802
+ },
22766
22803
  description: "Automatic tool execution within native policy bounds"
22767
22804
  },
22768
22805
  {
22769
22806
  id: harnessPermissionModeIdSchema.parse("supervised"),
22770
22807
  label: "Supervised",
22808
+ localizations: { "zh-CN": { label: "人工监督", description: "人工审核工具审批与文件修改。" } },
22771
22809
  description: "Manual review of tool approvals and file modifications"
22772
22810
  }
22773
22811
  ];
@@ -24514,6 +24552,10 @@ function createKiroInstallation(environment, command) {
24514
24552
  updateAvailable: false,
24515
24553
  canUpdate: false,
24516
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
+ },
24517
24559
  message: "Use Kiro CLI's original installer or native updater to check for and install updates."
24518
24560
  };
24519
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({
@@ -15273,8 +15282,24 @@ var threadUsageSnapshotSchema = external_exports.object({
15273
15282
  }
15274
15283
  });
15275
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();
15276
15297
  var accountCreditsProductUsageSchema = external_exports.object({
15277
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(),
15278
15303
  used: external_exports.number().finite().nonnegative().optional(),
15279
15304
  // Zero is a real empty cap, not an absent field.
15280
15305
  limit: external_exports.number().finite().nonnegative().optional(),
@@ -15296,8 +15321,10 @@ var accountCreditsSnapshotSchema = external_exports.object({
15296
15321
  label: external_exports.string().min(1).optional(),
15297
15322
  usedPercent: usagePercentSchema.optional(),
15298
15323
  remaining: external_exports.number().finite().optional(),
15324
+ scope: accountCreditsScopeSchema.optional(),
15325
+ localizations: harnessLocalizationsSchema.optional(),
15299
15326
  resetsAt: external_exports.string().min(1).optional(),
15300
- periodType: external_exports.enum(["weekly", "monthly", "five_hour", "seven_day", "unknown"]),
15327
+ periodType: accountCreditsPeriodSchema,
15301
15328
  productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
15302
15329
  resetCredits: accountResetCreditsSchema.optional()
15303
15330
  }).strict().superRefine((credits, context) => {
@@ -15322,7 +15349,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
15322
15349
  var threadUsageInspectionSchema = external_exports.object({
15323
15350
  threadId: hostThreadIdSchema,
15324
15351
  usage: threadUsageSnapshotSchema.nullable(),
15325
- 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()
15326
15355
  }).strict();
15327
15356
 
15328
15357
  // ../../shared-contracts/dist/harness-accounts.js
@@ -15449,7 +15478,8 @@ var harnessPermissionModeSchema = external_exports.object({
15449
15478
  id: harnessPermissionModeIdSchema,
15450
15479
  label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
15451
15480
  description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
15452
- dangerous: external_exports.boolean().optional()
15481
+ dangerous: external_exports.boolean().optional(),
15482
+ localizations: harnessLocalizationsSchema.optional()
15453
15483
  }).strict();
15454
15484
  var harnessPermissionModeCatalogSchema = external_exports.object({
15455
15485
  modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
@@ -15772,6 +15802,8 @@ var harnessInstallationStateSchema = external_exports.object({
15772
15802
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
15773
15803
  message: external_exports.string().max(2048).optional(),
15774
15804
  messageCode: external_exports.string().min(1).max(128).optional(),
15805
+ /** Safe plugin-owned explanation, distinct from raw diagnostic message. */
15806
+ notice: harnessLocalizedTextSchema.optional(),
15775
15807
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
15776
15808
  }).strict();
15777
15809
 
@@ -15910,6 +15942,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
15910
15942
  invocation: commandInvocationSchema,
15911
15943
  label: commandLabelSchema,
15912
15944
  description: commandDescriptionSchema.optional(),
15945
+ localizations: harnessLocalizationsSchema.optional(),
15913
15946
  argumentMode: external_exports.enum(["none", "text"]),
15914
15947
  /**
15915
15948
  * Native distinction reported by the Harness. Omitted when the Harness does
@@ -15144,6 +15144,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
15144
15144
  initializeOnly: external_exports.boolean().optional()
15145
15145
  });
15146
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
+
15147
15156
  // ../../shared-contracts/dist/model-price-overrides.js
15148
15157
  var usdPerMillionTokens = external_exports.number().finite().nonnegative();
15149
15158
  var modelPriceOverrideSchema = external_exports.strictObject({
@@ -15564,8 +15573,24 @@ var threadUsageSnapshotSchema = external_exports.object({
15564
15573
  }
15565
15574
  });
15566
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();
15567
15588
  var accountCreditsProductUsageSchema = external_exports.object({
15568
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(),
15569
15594
  used: external_exports.number().finite().nonnegative().optional(),
15570
15595
  // Zero is a real empty cap, not an absent field.
15571
15596
  limit: external_exports.number().finite().nonnegative().optional(),
@@ -15587,8 +15612,10 @@ var accountCreditsSnapshotSchema = external_exports.object({
15587
15612
  label: external_exports.string().min(1).optional(),
15588
15613
  usedPercent: usagePercentSchema.optional(),
15589
15614
  remaining: external_exports.number().finite().optional(),
15615
+ scope: accountCreditsScopeSchema.optional(),
15616
+ localizations: harnessLocalizationsSchema.optional(),
15590
15617
  resetsAt: external_exports.string().min(1).optional(),
15591
- periodType: external_exports.enum(["weekly", "monthly", "five_hour", "seven_day", "unknown"]),
15618
+ periodType: accountCreditsPeriodSchema,
15592
15619
  productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
15593
15620
  resetCredits: accountResetCreditsSchema.optional()
15594
15621
  }).strict().superRefine((credits, context) => {
@@ -15613,7 +15640,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
15613
15640
  var threadUsageInspectionSchema = external_exports.object({
15614
15641
  threadId: hostThreadIdSchema,
15615
15642
  usage: threadUsageSnapshotSchema.nullable(),
15616
- 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()
15617
15646
  }).strict();
15618
15647
 
15619
15648
  // ../../shared-contracts/dist/harness-accounts.js
@@ -15740,7 +15769,8 @@ var harnessPermissionModeSchema = external_exports.object({
15740
15769
  id: harnessPermissionModeIdSchema,
15741
15770
  label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
15742
15771
  description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
15743
- dangerous: external_exports.boolean().optional()
15772
+ dangerous: external_exports.boolean().optional(),
15773
+ localizations: harnessLocalizationsSchema.optional()
15744
15774
  }).strict();
15745
15775
  var harnessPermissionModeCatalogSchema = external_exports.object({
15746
15776
  modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
@@ -16063,6 +16093,8 @@ var harnessInstallationStateSchema = external_exports.object({
16063
16093
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
16064
16094
  message: external_exports.string().max(2048).optional(),
16065
16095
  messageCode: external_exports.string().min(1).max(128).optional(),
16096
+ /** Safe plugin-owned explanation, distinct from raw diagnostic message. */
16097
+ notice: harnessLocalizedTextSchema.optional(),
16066
16098
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
16067
16099
  }).strict();
16068
16100
 
@@ -16201,6 +16233,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
16201
16233
  invocation: commandInvocationSchema,
16202
16234
  label: commandLabelSchema,
16203
16235
  description: commandDescriptionSchema.optional(),
16236
+ localizations: harnessLocalizationsSchema.optional(),
16204
16237
  argumentMode: external_exports.enum(["none", "text"]),
16205
16238
  /**
16206
16239
  * Native distinction reported by the Harness. Omitted when the Harness does
@@ -19990,16 +20023,25 @@ var OMP_PERMISSION_MODE_CATALOG = harnessPermissionModeCatalogSchema.parse({
19990
20023
  {
19991
20024
  id: "always-ask",
19992
20025
  label: "Always ask",
20026
+ localizations: {
20027
+ "zh-CN": { label: "始终询问", description: "自动允许读取;写入或执行操作前询问。" }
20028
+ },
19993
20029
  description: "Automatically allow reads and ask before write or execution actions."
19994
20030
  },
19995
20031
  {
19996
20032
  id: "write",
19997
20033
  label: "Write",
20034
+ localizations: {
20035
+ "zh-CN": { label: "写入", description: "自动允许读取和写入;执行操作前询问。" }
20036
+ },
19998
20037
  description: "Automatically allow reads and writes; ask before execution actions."
19999
20038
  },
20000
20039
  {
20001
20040
  id: "yolo",
20002
20041
  label: "Full access",
20042
+ localizations: {
20043
+ "zh-CN": { label: "完全访问", description: "无需批准提示即可运行所有工具操作。" }
20044
+ },
20003
20045
  description: "Run all tool actions without approval prompts.",
20004
20046
  dangerous: true
20005
20047
  }
@@ -20130,6 +20172,7 @@ var ompCommandCatalog = harnessCommandCatalogSchema.parse({
20130
20172
  {
20131
20173
  id: "omp.compact",
20132
20174
  invocation: "/compact",
20175
+ localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
20133
20176
  label: "Compact context",
20134
20177
  description: "Compact the current conversation context",
20135
20178
  argumentMode: "text"
@@ -15141,6 +15141,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
15141
15141
  initializeOnly: external_exports.boolean().optional()
15142
15142
  });
15143
15143
 
15144
+ // ../../shared-contracts/dist/harness-presentation.js
15145
+ var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
15146
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
15147
+ var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
15148
+ label: displayText(256).optional(),
15149
+ description: displayText(1024).optional()
15150
+ }).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
15151
+ 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");
15152
+
15144
15153
  // ../../shared-contracts/dist/model-price-overrides.js
15145
15154
  var usdPerMillionTokens = external_exports.number().finite().nonnegative();
15146
15155
  var modelPriceOverrideSchema = external_exports.strictObject({
@@ -15561,8 +15570,24 @@ var threadUsageSnapshotSchema = external_exports.object({
15561
15570
  }
15562
15571
  });
15563
15572
  var usagePercentSchema = external_exports.number().finite().min(0).max(100);
15573
+ var accountCreditsPeriodSchema = external_exports.enum([
15574
+ "weekly",
15575
+ "monthly",
15576
+ "five_hour",
15577
+ "seven_day",
15578
+ "unknown"
15579
+ ]);
15580
+ var accountCreditsScopeSchema = external_exports.object({
15581
+ id: external_exports.string().min(1).max(256),
15582
+ label: external_exports.string().min(1).max(256),
15583
+ localizations: harnessLocalizationsSchema.optional()
15584
+ }).strict();
15564
15585
  var accountCreditsProductUsageSchema = external_exports.object({
15565
15586
  product: external_exports.string().min(1),
15587
+ /** Native period and scope, never inferred from the display name. */
15588
+ periodType: accountCreditsPeriodSchema.optional(),
15589
+ scope: accountCreditsScopeSchema.optional(),
15590
+ localizations: harnessLocalizationsSchema.optional(),
15566
15591
  used: external_exports.number().finite().nonnegative().optional(),
15567
15592
  // Zero is a real empty cap, not an absent field.
15568
15593
  limit: external_exports.number().finite().nonnegative().optional(),
@@ -15584,8 +15609,10 @@ var accountCreditsSnapshotSchema = external_exports.object({
15584
15609
  label: external_exports.string().min(1).optional(),
15585
15610
  usedPercent: usagePercentSchema.optional(),
15586
15611
  remaining: external_exports.number().finite().optional(),
15612
+ scope: accountCreditsScopeSchema.optional(),
15613
+ localizations: harnessLocalizationsSchema.optional(),
15587
15614
  resetsAt: external_exports.string().min(1).optional(),
15588
- periodType: external_exports.enum(["weekly", "monthly", "five_hour", "seven_day", "unknown"]),
15615
+ periodType: accountCreditsPeriodSchema,
15589
15616
  productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
15590
15617
  resetCredits: accountResetCreditsSchema.optional()
15591
15618
  }).strict().superRefine((credits, context) => {
@@ -15610,7 +15637,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
15610
15637
  var threadUsageInspectionSchema = external_exports.object({
15611
15638
  threadId: hostThreadIdSchema,
15612
15639
  usage: threadUsageSnapshotSchema.nullable(),
15613
- accountCredits: accountCreditsSnapshotSchema.optional()
15640
+ accountCredits: accountCreditsSnapshotSchema.optional(),
15641
+ /** Whether this source can provide cached account quota independently of usage. */
15642
+ accountCreditsSupported: external_exports.boolean().optional()
15614
15643
  }).strict();
15615
15644
 
15616
15645
  // ../../shared-contracts/dist/harness-accounts.js
@@ -15737,7 +15766,8 @@ var harnessPermissionModeSchema = external_exports.object({
15737
15766
  id: harnessPermissionModeIdSchema,
15738
15767
  label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
15739
15768
  description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
15740
- dangerous: external_exports.boolean().optional()
15769
+ dangerous: external_exports.boolean().optional(),
15770
+ localizations: harnessLocalizationsSchema.optional()
15741
15771
  }).strict();
15742
15772
  var harnessPermissionModeCatalogSchema = external_exports.object({
15743
15773
  modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
@@ -16060,6 +16090,8 @@ var harnessInstallationStateSchema = external_exports.object({
16060
16090
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
16061
16091
  message: external_exports.string().max(2048).optional(),
16062
16092
  messageCode: external_exports.string().min(1).max(128).optional(),
16093
+ /** Safe plugin-owned explanation, distinct from raw diagnostic message. */
16094
+ notice: harnessLocalizedTextSchema.optional(),
16063
16095
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
16064
16096
  }).strict();
16065
16097
 
@@ -16198,6 +16230,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
16198
16230
  invocation: commandInvocationSchema,
16199
16231
  label: commandLabelSchema,
16200
16232
  description: commandDescriptionSchema.optional(),
16233
+ localizations: harnessLocalizationsSchema.optional(),
16201
16234
  argumentMode: external_exports.enum(["none", "text"]),
16202
16235
  /**
16203
16236
  * Native distinction reported by the Harness. Omitted when the Harness does
@@ -17250,16 +17283,25 @@ var OPENCODE_PERMISSION_MODE_CATALOG = harnessPermissionModeCatalogSchema.parse(
17250
17283
  {
17251
17284
  id: "default",
17252
17285
  label: "Default",
17286
+ localizations: {
17287
+ "zh-CN": { label: "默认", description: "使用 OpenCode 已配置的权限规则。" }
17288
+ },
17253
17289
  description: "Use OpenCode's configured permission rules."
17254
17290
  },
17255
17291
  {
17256
17292
  id: "ask",
17257
17293
  label: "Ask",
17294
+ localizations: {
17295
+ "zh-CN": { label: "询问", description: "执行受保护的 OpenCode 操作前询问。" }
17296
+ },
17258
17297
  description: "Ask before protected OpenCode actions."
17259
17298
  },
17260
17299
  {
17261
17300
  id: "allow",
17262
17301
  label: "Allow all",
17302
+ localizations: {
17303
+ "zh-CN": { label: "全部允许", description: "允许 OpenCode 操作,无需批准提示。" }
17304
+ },
17263
17305
  description: "Allow OpenCode actions without approval prompts.",
17264
17306
  dangerous: true
17265
17307
  }
@@ -23665,6 +23707,7 @@ var openCodeCommandCatalog = harnessCommandCatalogSchema.parse({
23665
23707
  {
23666
23708
  id: COMPACT_COMMAND_ID,
23667
23709
  invocation: "/compact",
23710
+ localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
23668
23711
  label: "Compact context",
23669
23712
  description: "Compact the current OpenCode Session context",
23670
23713
  argumentMode: "none"
@@ -24232,7 +24275,7 @@ var OpenCodeHarnessSession = class {
24232
24275
  }
24233
24276
  #projectPart(active, part) {
24234
24277
  if (part.type === "text" || part.type === "reasoning") {
24235
- if (part.type === "text" && part.ignored || !part.text)
24278
+ if (part.type === "text" && part.ignored)
24236
24279
  return;
24237
24280
  const existing = active.items.get(part.id);
24238
24281
  if (!existing) {
@@ -25106,11 +25149,15 @@ function v2State(session, catalog, policy) {
25106
25149
  ...entry ? {
25107
25150
  resolvedModelLabel: entry.resolvedModelLabel ?? entry.label,
25108
25151
  availableThinkingOptions: catalog.thinkingOptions.filter((v) => entry.supportedThinkingOptionIds?.includes(v.id)),
25109
- effectiveThinkingOptionId: encodeOpenCodeVariant(session.model?.variant)
25152
+ effectiveThinkingOptionId: effectiveVariant(session.model?.variant, entry)
25110
25153
  } : {},
25111
25154
  effectivePermissionModeId: decodeMode(mode?.effect)
25112
25155
  };
25113
25156
  }
25157
+ function effectiveVariant(variant, entry) {
25158
+ const id = encodeOpenCodeVariant(variant);
25159
+ return variant === "default" && !entry.supportedThinkingOptionIds?.includes(id) ? encodeOpenCodeVariant(void 0) : id;
25160
+ }
25114
25161
  function decodeMode(effect) {
25115
25162
  return effect === "allow" || effect === "ask" ? harnessPermissionModeIdSchema.parse(effect) : harnessPermissionModeIdSchema.parse("default");
25116
25163
  }
@@ -15141,6 +15141,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
15141
15141
  initializeOnly: external_exports.boolean().optional()
15142
15142
  });
15143
15143
 
15144
+ // ../../shared-contracts/dist/harness-presentation.js
15145
+ var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
15146
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text2) => text2.trim().length > 0);
15147
+ var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
15148
+ label: displayText(256).optional(),
15149
+ description: displayText(1024).optional()
15150
+ }).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
15151
+ 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");
15152
+
15144
15153
  // ../../shared-contracts/dist/model-price-overrides.js
15145
15154
  var usdPerMillionTokens = external_exports.number().finite().nonnegative();
15146
15155
  var modelPriceOverrideSchema = external_exports.strictObject({
@@ -15561,8 +15570,24 @@ var threadUsageSnapshotSchema = external_exports.object({
15561
15570
  }
15562
15571
  });
15563
15572
  var usagePercentSchema = external_exports.number().finite().min(0).max(100);
15573
+ var accountCreditsPeriodSchema = external_exports.enum([
15574
+ "weekly",
15575
+ "monthly",
15576
+ "five_hour",
15577
+ "seven_day",
15578
+ "unknown"
15579
+ ]);
15580
+ var accountCreditsScopeSchema = external_exports.object({
15581
+ id: external_exports.string().min(1).max(256),
15582
+ label: external_exports.string().min(1).max(256),
15583
+ localizations: harnessLocalizationsSchema.optional()
15584
+ }).strict();
15564
15585
  var accountCreditsProductUsageSchema = external_exports.object({
15565
15586
  product: external_exports.string().min(1),
15587
+ /** Native period and scope, never inferred from the display name. */
15588
+ periodType: accountCreditsPeriodSchema.optional(),
15589
+ scope: accountCreditsScopeSchema.optional(),
15590
+ localizations: harnessLocalizationsSchema.optional(),
15566
15591
  used: external_exports.number().finite().nonnegative().optional(),
15567
15592
  // Zero is a real empty cap, not an absent field.
15568
15593
  limit: external_exports.number().finite().nonnegative().optional(),
@@ -15584,8 +15609,10 @@ var accountCreditsSnapshotSchema = external_exports.object({
15584
15609
  label: external_exports.string().min(1).optional(),
15585
15610
  usedPercent: usagePercentSchema.optional(),
15586
15611
  remaining: external_exports.number().finite().optional(),
15612
+ scope: accountCreditsScopeSchema.optional(),
15613
+ localizations: harnessLocalizationsSchema.optional(),
15587
15614
  resetsAt: external_exports.string().min(1).optional(),
15588
- periodType: external_exports.enum(["weekly", "monthly", "five_hour", "seven_day", "unknown"]),
15615
+ periodType: accountCreditsPeriodSchema,
15589
15616
  productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
15590
15617
  resetCredits: accountResetCreditsSchema.optional()
15591
15618
  }).strict().superRefine((credits, context) => {
@@ -15610,7 +15637,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
15610
15637
  var threadUsageInspectionSchema = external_exports.object({
15611
15638
  threadId: hostThreadIdSchema,
15612
15639
  usage: threadUsageSnapshotSchema.nullable(),
15613
- accountCredits: accountCreditsSnapshotSchema.optional()
15640
+ accountCredits: accountCreditsSnapshotSchema.optional(),
15641
+ /** Whether this source can provide cached account quota independently of usage. */
15642
+ accountCreditsSupported: external_exports.boolean().optional()
15614
15643
  }).strict();
15615
15644
 
15616
15645
  // ../../shared-contracts/dist/harness-accounts.js
@@ -15737,7 +15766,8 @@ var harnessPermissionModeSchema = external_exports.object({
15737
15766
  id: harnessPermissionModeIdSchema,
15738
15767
  label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
15739
15768
  description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
15740
- dangerous: external_exports.boolean().optional()
15769
+ dangerous: external_exports.boolean().optional(),
15770
+ localizations: harnessLocalizationsSchema.optional()
15741
15771
  }).strict();
15742
15772
  var harnessPermissionModeCatalogSchema = external_exports.object({
15743
15773
  modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
@@ -16060,6 +16090,8 @@ var harnessInstallationStateSchema = external_exports.object({
16060
16090
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
16061
16091
  message: external_exports.string().max(2048).optional(),
16062
16092
  messageCode: external_exports.string().min(1).max(128).optional(),
16093
+ /** Safe plugin-owned explanation, distinct from raw diagnostic message. */
16094
+ notice: harnessLocalizedTextSchema.optional(),
16063
16095
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
16064
16096
  }).strict();
16065
16097
 
@@ -16198,6 +16230,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
16198
16230
  invocation: commandInvocationSchema,
16199
16231
  label: commandLabelSchema,
16200
16232
  description: commandDescriptionSchema.optional(),
16233
+ localizations: harnessLocalizationsSchema.optional(),
16201
16234
  argumentMode: external_exports.enum(["none", "text"]),
16202
16235
  /**
16203
16236
  * Native distinction reported by the Harness. Omitted when the Harness does
@@ -21026,6 +21059,7 @@ var piCommandCatalog = harnessCommandCatalogSchema.parse({
21026
21059
  {
21027
21060
  id: "pi.compact",
21028
21061
  invocation: "/compact",
21062
+ localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
21029
21063
  label: "Compact context",
21030
21064
  description: "Compact the current conversation context",
21031
21065
  argumentMode: "text"