@liberseek/boft-cli-linux-x64 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.
@@ -27659,6 +27659,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
27659
27659
  initializeOnly: external_exports.boolean().optional()
27660
27660
  });
27661
27661
 
27662
+ // ../../shared-contracts/dist/harness-presentation.js
27663
+ var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
27664
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text2) => text2.trim().length > 0);
27665
+ var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
27666
+ label: displayText(256).optional(),
27667
+ description: displayText(1024).optional()
27668
+ }).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
27669
+ 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");
27670
+
27662
27671
  // ../../shared-contracts/dist/model-price-overrides.js
27663
27672
  var usdPerMillionTokens = external_exports.number().finite().nonnegative();
27664
27673
  var modelPriceOverrideSchema = external_exports.strictObject({
@@ -27737,6 +27746,8 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
27737
27746
  harness,
27738
27747
  sessionId: external_exports.string().min(1).max(512),
27739
27748
  project: project.nullable(),
27749
+ /** Persisted Desktop title for a mapped Session, otherwise its native name; may be absent. */
27750
+ title: external_exports.string().min(1).max(200).optional(),
27740
27751
  /** Models the session used, most requests first. */
27741
27752
  models: external_exports.array(model).max(16),
27742
27753
  firstAtMs: count,
@@ -27803,7 +27814,12 @@ var usageStatisticsResultSchema = external_exports.strictObject({
27803
27814
  * The sessions that spent the most, by cost and by tokens without cache, all filters applied;
27804
27815
  * requests without a native session are not listed here but count everywhere else.
27805
27816
  */
27806
- sessions: external_exports.array(usageStatisticsSessionSchema).max(100)
27817
+ sessions: external_exports.array(usageStatisticsSessionSchema).max(100),
27818
+ /**
27819
+ * The sessions last active in the range, newest first, all filters applied. Optional for older
27820
+ * Hosts; missing is treated as no list rather than no sessions.
27821
+ */
27822
+ recentSessions: external_exports.array(usageStatisticsSessionSchema).max(100).optional()
27807
27823
  });
27808
27824
 
27809
27825
  // ../../shared-contracts/dist/ids.js
@@ -28072,8 +28088,24 @@ var threadUsageSnapshotSchema = external_exports.object({
28072
28088
  }
28073
28089
  });
28074
28090
  var usagePercentSchema = external_exports.number().finite().min(0).max(100);
28091
+ var accountCreditsPeriodSchema = external_exports.enum([
28092
+ "weekly",
28093
+ "monthly",
28094
+ "five_hour",
28095
+ "seven_day",
28096
+ "unknown"
28097
+ ]);
28098
+ var accountCreditsScopeSchema = external_exports.object({
28099
+ id: external_exports.string().min(1).max(256),
28100
+ label: external_exports.string().min(1).max(256),
28101
+ localizations: harnessLocalizationsSchema.optional()
28102
+ }).strict();
28075
28103
  var accountCreditsProductUsageSchema = external_exports.object({
28076
28104
  product: external_exports.string().min(1),
28105
+ /** Native period and scope, never inferred from the display name. */
28106
+ periodType: accountCreditsPeriodSchema.optional(),
28107
+ scope: accountCreditsScopeSchema.optional(),
28108
+ localizations: harnessLocalizationsSchema.optional(),
28077
28109
  used: external_exports.number().finite().nonnegative().optional(),
28078
28110
  // Zero is a real empty cap, not an absent field.
28079
28111
  limit: external_exports.number().finite().nonnegative().optional(),
@@ -28095,8 +28127,10 @@ var accountCreditsSnapshotSchema = external_exports.object({
28095
28127
  label: external_exports.string().min(1).optional(),
28096
28128
  usedPercent: usagePercentSchema.optional(),
28097
28129
  remaining: external_exports.number().finite().optional(),
28130
+ scope: accountCreditsScopeSchema.optional(),
28131
+ localizations: harnessLocalizationsSchema.optional(),
28098
28132
  resetsAt: external_exports.string().min(1).optional(),
28099
- periodType: external_exports.enum(["weekly", "monthly", "five_hour", "seven_day", "unknown"]),
28133
+ periodType: accountCreditsPeriodSchema,
28100
28134
  productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
28101
28135
  resetCredits: accountResetCreditsSchema.optional()
28102
28136
  }).strict().superRefine((credits, context) => {
@@ -28121,7 +28155,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
28121
28155
  var threadUsageInspectionSchema = external_exports.object({
28122
28156
  threadId: hostThreadIdSchema,
28123
28157
  usage: threadUsageSnapshotSchema.nullable(),
28124
- accountCredits: accountCreditsSnapshotSchema.optional()
28158
+ accountCredits: accountCreditsSnapshotSchema.optional(),
28159
+ /** Whether this source can provide cached account quota independently of usage. */
28160
+ accountCreditsSupported: external_exports.boolean().optional()
28125
28161
  }).strict();
28126
28162
 
28127
28163
  // ../../shared-contracts/dist/harness-accounts.js
@@ -28248,7 +28284,8 @@ var harnessPermissionModeSchema = external_exports.object({
28248
28284
  id: harnessPermissionModeIdSchema,
28249
28285
  label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
28250
28286
  description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
28251
- dangerous: external_exports.boolean().optional()
28287
+ dangerous: external_exports.boolean().optional(),
28288
+ localizations: harnessLocalizationsSchema.optional()
28252
28289
  }).strict();
28253
28290
  var harnessPermissionModeCatalogSchema = external_exports.object({
28254
28291
  modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
@@ -28571,6 +28608,8 @@ var harnessInstallationStateSchema = external_exports.object({
28571
28608
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
28572
28609
  message: external_exports.string().max(2048).optional(),
28573
28610
  messageCode: external_exports.string().min(1).max(128).optional(),
28611
+ /** Safe plugin-owned explanation, distinct from raw diagnostic message. */
28612
+ notice: harnessLocalizedTextSchema.optional(),
28574
28613
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
28575
28614
  }).strict();
28576
28615
 
@@ -28709,6 +28748,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
28709
28748
  invocation: commandInvocationSchema,
28710
28749
  label: commandLabelSchema,
28711
28750
  description: commandDescriptionSchema.optional(),
28751
+ localizations: harnessLocalizationsSchema.optional(),
28712
28752
  argumentMode: external_exports.enum(["none", "text"]),
28713
28753
  /**
28714
28754
  * Native distinction reported by the Harness. Omitted when the Harness does
@@ -29463,12 +29503,15 @@ function projectCursorAccountUsage(usage, identity, plan) {
29463
29503
  credits: {
29464
29504
  usedPercent,
29465
29505
  label: "Auto · monthly",
29506
+ scope: { id: "auto", label: "Auto" },
29466
29507
  periodType: "monthly",
29467
29508
  ...resetsAt ? { resetsAt } : {},
29468
29509
  ...apiPercent === void 0 ? {} : {
29469
29510
  productUsage: [
29470
29511
  {
29471
29512
  product: "API · monthly",
29513
+ periodType: "monthly",
29514
+ scope: { id: "api", label: "API" },
29472
29515
  usagePercent: apiPercent,
29473
29516
  ...resetsAt ? { resetsAt } : {}
29474
29517
  }
@@ -29957,9 +30000,30 @@ var CURSOR_CAPABILITIES = {
29957
30000
  var CURSOR_MODES = harnessPermissionModeCatalogSchema.parse({
29958
30001
  defaultModeId: "agent",
29959
30002
  modes: [
29960
- { id: "agent", label: "Agent", description: "Native agent mode with Cursor tool approvals" },
29961
- { id: "plan", label: "Plan", description: "Native read-only planning mode" },
29962
- { id: "ask", label: "Ask", description: "Native read-only question mode" }
30003
+ {
30004
+ id: "agent",
30005
+ label: "Agent",
30006
+ description: "Native agent mode with Cursor tool approvals",
30007
+ localizations: {
30008
+ "zh-CN": { description: "执行任务,可修改文件和运行命令;需要审批的操作仍会请求确认。" }
30009
+ }
30010
+ },
30011
+ {
30012
+ id: "plan",
30013
+ label: "Plan",
30014
+ description: "Native read-only planning mode",
30015
+ localizations: {
30016
+ "zh-CN": { label: "规划模式", description: "只读分析代码并制定实施计划,不修改项目文件。" }
30017
+ }
30018
+ },
30019
+ {
30020
+ id: "ask",
30021
+ label: "Ask",
30022
+ description: "Native read-only question mode",
30023
+ localizations: {
30024
+ "zh-CN": { label: "询问", description: "只读查看代码并回答问题,不修改项目文件。" }
30025
+ }
30026
+ }
29963
30027
  ]
29964
30028
  });
29965
30029
  var cursorModelRef = (nativeId) => harnessModelRefSchema.parse({ id: `cursor.${Buffer.from(nativeId).toString("base64url")}` });
@@ -48842,6 +48906,8 @@ var BrokeredHarnessAdapter = class {
48842
48906
  commandCatalog;
48843
48907
  liveCommandCatalog;
48844
48908
  harnessId;
48909
+ credits;
48910
+ refreshCredits;
48845
48911
  #descriptorPath;
48846
48912
  #forwardEnvironment;
48847
48913
  #isInstalled;
@@ -48941,6 +49007,10 @@ var BrokeredHarnessAdapter = class {
48941
49007
  }
48942
49008
  constructor(input = {}) {
48943
49009
  this.harnessId = harnessPluginIdSchema.parse(input.harnessId ?? "claude-code");
49010
+ if (input.accountCredits !== false) {
49011
+ this.credits = () => this.#credits;
49012
+ this.refreshCredits = () => this.#refreshAccountCredits();
49013
+ }
48944
49014
  this.#forwardEnvironment = input.forwardDelegationEnvironment === true;
48945
49015
  if (input.commandCatalog)
48946
49016
  this.commandCatalog = input.commandCatalog;
@@ -48952,10 +49022,7 @@ var BrokeredHarnessAdapter = class {
48952
49022
  this.#startBroker = input.startBroker === false ? void 0 : input.startBroker ?? (process.platform === "darwin" && !input.descriptorPath ? () => startBrokerLaunchAgent(this.harnessId, environment) : void 0);
48953
49023
  this.#startTimeoutMs = input.startTimeoutMs ?? BROKER_START_TIMEOUT_MS;
48954
49024
  }
48955
- credits() {
48956
- return this.#credits;
48957
- }
48958
- refreshCredits() {
49025
+ #refreshAccountCredits() {
48959
49026
  if (this.#closed)
48960
49027
  return Promise.resolve(null);
48961
49028
  if (this.#creditsRefresh)
@@ -49127,6 +49194,7 @@ function createHarnessAdapter(context) {
49127
49194
  if (context.platform === "darwin" && context.managedRemoteHost) {
49128
49195
  const environment2 = { ...context.environment };
49129
49196
  return new BrokeredHarnessAdapter({
49197
+ accountCredits: false,
49130
49198
  harnessId: "cursor-cli",
49131
49199
  forwardDelegationEnvironment: true,
49132
49200
  commandCatalog: CURSOR_COMMAND_CATALOG,
@@ -31,8 +31,8 @@
31
31
  }
32
32
  },
33
33
  "notice": {
34
- "en": "Requires DSH 0.1.7-rc.1 or later and the V4 protocol. Verified with 0.1.7-rc.1, 0.1.7-rc.2, 0.2.0-rc.1 and 0.2.0-rc.2; other versions require native protocol validation.",
35
- "zh-CN": "需要 DSH 0.1.7-rc.1 或更高版本及 V4 协议。已验证 0.1.7-rc.1、0.1.7-rc.2、0.2.0-rc.1 和 0.2.0-rc.2;其他版本仍需通过原生协议校验。"
34
+ "en": "Requires DSH 0.1.7-rc.1 or later and the V4 protocol. Verified with 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; other versions require native protocol validation.",
35
+ "zh-CN": "需要 DSH 0.1.7-rc.1 或更高版本及 V4 协议。已验证 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 和 0.2.1-rc.2;其他版本仍需通过原生协议校验。"
36
36
  },
37
37
  "links": {
38
38
  "website": "https://github.com/deepseek-ai/deepseek-harness",