@liberseek/boft-cli-linux-x64 0.7.9 → 0.8.0

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.
Files changed (56) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.txt +8 -0
  3. package/app/codexhost-distribution.json +1 -1
  4. package/app/console-server.mjs +232 -21
  5. package/app/console-web.js +9669 -5390
  6. package/app/desktop-controller.mjs +252 -42
  7. package/app/host-runtime.mjs +5361 -1491
  8. package/app/plugins/antigravity/manifest.json +18 -1
  9. package/app/plugins/antigravity/plugin.mjs +276 -42
  10. package/app/plugins/claude-code/manifest.json +28 -0
  11. package/app/plugins/claude-code/plugin.mjs +1055 -391
  12. package/app/plugins/codebuddy/manifest.json +17 -0
  13. package/app/plugins/codebuddy/plugin.mjs +5931 -5358
  14. package/app/plugins/codex-usage/manifest.json +9 -0
  15. package/app/plugins/codex-usage/plugin.mjs +16750 -0
  16. package/app/plugins/cursor-cli/manifest.json +18 -1
  17. package/app/plugins/cursor-cli/plugin.mjs +351 -77
  18. package/app/plugins/deepseek-harness/assets/icon.svg +1 -0
  19. package/app/plugins/deepseek-harness/manifest.json +35 -2
  20. package/app/plugins/deepseek-harness/plugin.mjs +798 -242
  21. package/app/plugins/enabled.json +2 -1
  22. package/app/plugins/grok/manifest.json +21 -1
  23. package/app/plugins/grok/plugin.mjs +898 -268
  24. package/app/plugins/hermes/assets/icon.png +0 -0
  25. package/app/plugins/hermes/manifest.json +30 -2
  26. package/app/plugins/hermes/plugin.mjs +278 -33
  27. package/app/plugins/kimi-code/assets/icon.svg +5 -0
  28. package/app/plugins/kimi-code/manifest.json +25 -2
  29. package/app/plugins/kimi-code/plugin.mjs +555 -36
  30. package/app/plugins/kiro-cli/assets/kiro-agent.svg +11 -0
  31. package/app/plugins/kiro-cli/manifest.json +18 -1
  32. package/app/plugins/kiro-cli/plugin.mjs +284 -22
  33. package/app/plugins/muse/manifest.json +18 -1
  34. package/app/plugins/muse/plugin.mjs +251 -17
  35. package/app/plugins/omp/manifest.json +21 -1
  36. package/app/plugins/omp/plugin.mjs +2741 -1960
  37. package/app/plugins/opencode/manifest.json +18 -1
  38. package/app/plugins/opencode/plugin.mjs +694 -147
  39. package/app/plugins/pi/manifest.json +32 -0
  40. package/app/plugins/pi/plugin.mjs +3396 -2841
  41. package/app/plugins/qoder/manifest.json +18 -1
  42. package/app/plugins/qoder/plugin.mjs +585 -81
  43. package/app/plugins/qoder-cn/manifest.json +18 -1
  44. package/app/plugins/qoder-cn/plugin.mjs +585 -81
  45. package/app/plugins/workbuddy/manifest.json +18 -0
  46. package/app/plugins/workbuddy/plugin.mjs +6317 -5746
  47. package/app/plugins/zcode/manifest.json +19 -1
  48. package/app/plugins/zcode/plugin.mjs +1066 -260
  49. package/app/renderer-extension.js +2731 -2427
  50. package/bin/boft +0 -0
  51. package/libexec/boft-shim +0 -0
  52. package/libexec/boft-updater +0 -0
  53. package/licenses/Cordis-LICENSE.txt +21 -0
  54. package/licenses/Cosmokit-LICENSE.txt +21 -0
  55. package/package.json +1 -1
  56. package/app/plugins/kiro-cli/assets/icon.svg +0 -5
@@ -2220,20 +2220,20 @@ var require_resolve = __commonJS({
2220
2220
  return false;
2221
2221
  }
2222
2222
  function countKeys(schema) {
2223
- let count = 0;
2223
+ let count2 = 0;
2224
2224
  for (const key in schema) {
2225
2225
  if (key === "$ref")
2226
2226
  return Infinity;
2227
- count++;
2227
+ count2++;
2228
2228
  if (SIMPLE_INLINED.has(key))
2229
2229
  continue;
2230
2230
  if (typeof schema[key] == "object") {
2231
- (0, util_1.eachItem)(schema[key], (sch) => count += countKeys(sch));
2231
+ (0, util_1.eachItem)(schema[key], (sch) => count2 += countKeys(sch));
2232
2232
  }
2233
- if (count === Infinity)
2233
+ if (count2 === Infinity)
2234
2234
  return Infinity;
2235
2235
  }
2236
- return count;
2236
+ return count2;
2237
2237
  }
2238
2238
  function getFullPath(resolver, id = "", normalize) {
2239
2239
  if (normalize !== false)
@@ -5411,8 +5411,8 @@ var require_contains = __commonJS({
5411
5411
  cxt.result(valid, () => cxt.reset());
5412
5412
  function validateItemsWithCount() {
5413
5413
  const schValid = gen.name("_valid");
5414
- const count = gen.let("count", 0);
5415
- validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));
5414
+ const count2 = gen.let("count", 0);
5415
+ validateItems(schValid, () => gen.if(schValid, () => checkLimits(count2)));
5416
5416
  }
5417
5417
  function validateItems(_valid, block) {
5418
5418
  gen.forRange("i", 0, len, (i) => {
@@ -5425,16 +5425,16 @@ var require_contains = __commonJS({
5425
5425
  block();
5426
5426
  });
5427
5427
  }
5428
- function checkLimits(count) {
5429
- gen.code((0, codegen_1._)`${count}++`);
5428
+ function checkLimits(count2) {
5429
+ gen.code((0, codegen_1._)`${count2}++`);
5430
5430
  if (max === void 0) {
5431
- gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break());
5431
+ gen.if((0, codegen_1._)`${count2} >= ${min}`, () => gen.assign(valid, true).break());
5432
5432
  } else {
5433
- gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break());
5433
+ gen.if((0, codegen_1._)`${count2} > ${max}`, () => gen.assign(valid, false).break());
5434
5434
  if (min === 1)
5435
5435
  gen.assign(valid, true);
5436
5436
  else
5437
- gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true));
5437
+ gen.if((0, codegen_1._)`${count2} >= ${min}`, () => gen.assign(valid, true));
5438
5438
  }
5439
5439
  }
5440
5440
  }
@@ -8933,20 +8933,20 @@ var require_resolve2 = __commonJS({
8933
8933
  return false;
8934
8934
  }
8935
8935
  function countKeys(schema) {
8936
- let count = 0;
8936
+ let count2 = 0;
8937
8937
  for (const key in schema) {
8938
8938
  if (key === "$ref")
8939
8939
  return Infinity;
8940
- count++;
8940
+ count2++;
8941
8941
  if (SIMPLE_INLINED.has(key))
8942
8942
  continue;
8943
8943
  if (typeof schema[key] == "object") {
8944
- (0, util_1.eachItem)(schema[key], (sch) => count += countKeys(sch));
8944
+ (0, util_1.eachItem)(schema[key], (sch) => count2 += countKeys(sch));
8945
8945
  }
8946
- if (count === Infinity)
8946
+ if (count2 === Infinity)
8947
8947
  return Infinity;
8948
8948
  }
8949
- return count;
8949
+ return count2;
8950
8950
  }
8951
8951
  function getFullPath(resolver, id = "", normalize) {
8952
8952
  if (normalize !== false)
@@ -11309,8 +11309,8 @@ var require_contains2 = __commonJS({
11309
11309
  cxt.result(valid, () => cxt.reset());
11310
11310
  function validateItemsWithCount() {
11311
11311
  const schValid = gen.name("_valid");
11312
- const count = gen.let("count", 0);
11313
- validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));
11312
+ const count2 = gen.let("count", 0);
11313
+ validateItems(schValid, () => gen.if(schValid, () => checkLimits(count2)));
11314
11314
  }
11315
11315
  function validateItems(_valid, block) {
11316
11316
  gen.forRange("i", 0, len, (i) => {
@@ -11323,16 +11323,16 @@ var require_contains2 = __commonJS({
11323
11323
  block();
11324
11324
  });
11325
11325
  }
11326
- function checkLimits(count) {
11327
- gen.code((0, codegen_1._)`${count}++`);
11326
+ function checkLimits(count2) {
11327
+ gen.code((0, codegen_1._)`${count2}++`);
11328
11328
  if (max === void 0) {
11329
- gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break());
11329
+ gen.if((0, codegen_1._)`${count2} >= ${min}`, () => gen.assign(valid, true).break());
11330
11330
  } else {
11331
- gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break());
11331
+ gen.if((0, codegen_1._)`${count2} > ${max}`, () => gen.assign(valid, false).break());
11332
11332
  if (min === 1)
11333
11333
  gen.assign(valid, true);
11334
11334
  else
11335
- gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true));
11335
+ gen.if((0, codegen_1._)`${count2} >= ${min}`, () => gen.assign(valid, true));
11336
11336
  }
11337
11337
  }
11338
11338
  }
@@ -12594,6 +12594,11 @@ var require_dist = __commonJS({
12594
12594
  var require_content_type = __commonJS({
12595
12595
  "../../../node_modules/content-type/index.js"(exports) {
12596
12596
  "use strict";
12597
+ /*!
12598
+ * content-type
12599
+ * Copyright(c) 2015 Douglas Christopher Wilson
12600
+ * MIT Licensed
12601
+ */
12597
12602
  var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g;
12598
12603
  var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/;
12599
12604
  var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
@@ -17697,8 +17702,8 @@ function az_default() {
17697
17702
  }
17698
17703
 
17699
17704
  // ../../../node_modules/zod/v4/locales/be.js
17700
- function getBelarusianPlural(count, one2, few, many) {
17701
- const absCount = Math.abs(count);
17705
+ function getBelarusianPlural(count2, one2, few, many) {
17706
+ const absCount = Math.abs(count2);
17702
17707
  const lastDigit = absCount % 10;
17703
17708
  const lastTwoDigits = absCount % 100;
17704
17709
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
@@ -19776,8 +19781,8 @@ function hu_default() {
19776
19781
  }
19777
19782
 
19778
19783
  // ../../../node_modules/zod/v4/locales/hy.js
19779
- function getArmenianPlural(count, one2, many) {
19780
- return Math.abs(count) === 1 ? one2 : many;
19784
+ function getArmenianPlural(count2, one2, many) {
19785
+ return Math.abs(count2) === 1 ? one2 : many;
19781
19786
  }
19782
19787
  function withDefiniteArticle(word) {
19783
19788
  if (!word)
@@ -21905,8 +21910,8 @@ function ro_default() {
21905
21910
  }
21906
21911
 
21907
21912
  // ../../../node_modules/zod/v4/locales/ru.js
21908
- function getRussianPlural(count, one2, few, many) {
21909
- const absCount = Math.abs(count);
21913
+ function getRussianPlural(count2, one2, few, many) {
21914
+ const absCount = Math.abs(count2);
21910
21915
  const lastDigit = absCount % 10;
21911
21916
  const lastTwoDigits = absCount % 100;
21912
21917
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
@@ -27575,6 +27580,15 @@ function date4(params) {
27575
27580
  // ../../../node_modules/zod/v4/classic/external.js
27576
27581
  config(en_default());
27577
27582
 
27583
+ // ../../shared-contracts/dist/delegation-read.js
27584
+ var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
27585
+ var delegationReadParamsSchema = external_exports.strictObject({
27586
+ threadId: external_exports.string().min(1).max(1024),
27587
+ view: external_exports.enum(["result", "messages"]),
27588
+ cursor: external_exports.string().min(1).max(8192).optional(),
27589
+ limit: external_exports.number().int().min(1).max(100).optional()
27590
+ });
27591
+
27578
27592
  // ../../shared-contracts/dist/credential-imports.js
27579
27593
  var credentialSourceSchema = external_exports.object({
27580
27594
  id: external_exports.string().min(1).max(256),
@@ -27645,6 +27659,153 @@ var harnessDisplaySetSchema = external_exports.strictObject({
27645
27659
  initializeOnly: external_exports.boolean().optional()
27646
27660
  });
27647
27661
 
27662
+ // ../../shared-contracts/dist/model-price-overrides.js
27663
+ var usdPerMillionTokens = external_exports.number().finite().nonnegative();
27664
+ var modelPriceOverrideSchema = external_exports.strictObject({
27665
+ input: usdPerMillionTokens,
27666
+ output: usdPerMillionTokens,
27667
+ cacheRead: usdPerMillionTokens.optional(),
27668
+ cacheWrite: usdPerMillionTokens.optional(),
27669
+ cacheWrite1h: usdPerMillionTokens.optional()
27670
+ });
27671
+ var modelPriceKeySchema = external_exports.string().max(512).refine((key) => key.trim() === key && key.length > 0, "Model ID is required");
27672
+ var modelPriceOverridesSchema = external_exports.strictObject({
27673
+ /** Absolute path of the Host's `pricing.json`. */
27674
+ path: external_exports.string(),
27675
+ entries: external_exports.array(external_exports.strictObject({ key: external_exports.string(), price: modelPriceOverrideSchema })),
27676
+ /** Why the existing file is unusable; the Host then ignores it and refuses to overwrite it. */
27677
+ error: external_exports.string().nullable()
27678
+ });
27679
+ var modelPriceOverridesGetSchema = external_exports.strictObject({});
27680
+ var modelPriceOverridesSetSchema = external_exports.strictObject({
27681
+ key: modelPriceKeySchema,
27682
+ price: modelPriceOverrideSchema.nullable(),
27683
+ previousKey: modelPriceKeySchema.optional()
27684
+ });
27685
+ var modelPriceDefaultParamsSchema = external_exports.strictObject({
27686
+ model: modelPriceKeySchema
27687
+ });
27688
+ var modelPriceSuggestionSchema = external_exports.strictObject({
27689
+ /** Verified from catalog canonical links, not inferred from names or equal prices. */
27690
+ official: external_exports.boolean().optional(),
27691
+ canonicalModelId: external_exports.string().min(1).optional(),
27692
+ provider: external_exports.string().min(1).max(512),
27693
+ model: external_exports.string().min(1).max(512),
27694
+ price: modelPriceOverrideSchema
27695
+ });
27696
+ var modelPriceDefaultResultSchema = external_exports.strictObject({
27697
+ price: modelPriceOverrideSchema.nullable(),
27698
+ /** Local catalog suggestions only; never used automatically for pricing. */
27699
+ suggestions: external_exports.array(modelPriceSuggestionSchema).max(6).optional()
27700
+ });
27701
+
27702
+ // ../../shared-contracts/dist/usage-statistics.js
27703
+ var USAGE_STATISTICS_RANGES = ["today", "7d", "30d", "90d", "all"];
27704
+ var count = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
27705
+ var localDate = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/u);
27706
+ var harness = external_exports.string().min(1).max(128);
27707
+ var model = external_exports.string().min(1).max(512);
27708
+ var project = external_exports.string().min(1).max(4096);
27709
+ var usageStatisticsParamsSchema = external_exports.strictObject({
27710
+ range: external_exports.enum(USAGE_STATISTICS_RANGES),
27711
+ harness: harness.optional(),
27712
+ model: model.nullable().optional(),
27713
+ project: project.nullable().optional(),
27714
+ /** One local date inside the range. */
27715
+ date: localDate.optional()
27716
+ });
27717
+ var usageStatisticsTotalsSchema = external_exports.strictObject({
27718
+ requests: count,
27719
+ inputTokens: count,
27720
+ cachedInputTokens: count,
27721
+ cacheWriteInputTokens: count,
27722
+ cacheKnownInputTokens: count,
27723
+ outputTokens: count,
27724
+ reasoningOutputTokens: count,
27725
+ /** USD at the public price, summed over the priced requests only. */
27726
+ costUsd: external_exports.number().finite().min(0),
27727
+ /** Requests without a price (or the cache data the price needs); not in `costUsd`. */
27728
+ unpricedRequests: count,
27729
+ /**
27730
+ * Requests whose storage gave no token counts: counted as requests, with neither tokens nor
27731
+ * cost, and not as unpriced.
27732
+ */
27733
+ unmeteredRequests: count
27734
+ });
27735
+ var totals = usageStatisticsTotalsSchema.shape;
27736
+ var usageStatisticsSessionSchema = external_exports.strictObject({
27737
+ harness,
27738
+ sessionId: external_exports.string().min(1).max(512),
27739
+ project: project.nullable(),
27740
+ /** Models the session used, most requests first. */
27741
+ models: external_exports.array(model).max(16),
27742
+ firstAtMs: count,
27743
+ lastAtMs: count,
27744
+ ...totals
27745
+ });
27746
+ var usageStatisticsResultSchema = external_exports.strictObject({
27747
+ range: external_exports.enum(USAGE_STATISTICS_RANGES),
27748
+ /** First local date of the range; null for all time. */
27749
+ from: localDate.nullable(),
27750
+ to: localDate,
27751
+ /** The filters these figures apply, echoed so a late answer to older filters is recognised. */
27752
+ filters: external_exports.strictObject({
27753
+ harness: harness.nullable(),
27754
+ model: model.nullable(),
27755
+ unknownModel: external_exports.boolean(),
27756
+ project: project.nullable(),
27757
+ unknownProject: external_exports.boolean(),
27758
+ date: localDate.nullable()
27759
+ }),
27760
+ /** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
27761
+ reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count, read: count }),
27762
+ /** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
27763
+ failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
27764
+ /** Every value seen in the range, ignoring the filters, to choose filters from. */
27765
+ options: external_exports.strictObject({
27766
+ harnesses: external_exports.array(harness).max(256),
27767
+ models: external_exports.array(model.nullable()).max(4096),
27768
+ projects: external_exports.array(project.nullable()).max(4096)
27769
+ }),
27770
+ /** Current display metadata, scoped by Harness. Never a pricing or filter identity.
27771
+ * Optional for older Hosts; missing/conflicting labels fall back to the native model ID.
27772
+ */
27773
+ modelLabels: external_exports.array(external_exports.strictObject({ harness, model, label: model })).max(4096).optional(),
27774
+ /** Native credits, all filters applied, never combined across Harnesses or treated as USD.
27775
+ * Only groups with at least one reported value appear; reportedRequests exposes partial data.
27776
+ */
27777
+ credits: external_exports.array(external_exports.strictObject({
27778
+ harness,
27779
+ model: model.nullable(),
27780
+ credits: external_exports.number().finite().min(0),
27781
+ reportedRequests: count,
27782
+ requests: count
27783
+ })).max(4096).optional(),
27784
+ /** All filters applied. */
27785
+ totals: usageStatisticsTotalsSchema,
27786
+ /** Each date and Harness of the range: every filter except the day. */
27787
+ daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
27788
+ /** Local weekday (0 = Sunday) and hour, all filters applied. */
27789
+ hourly: external_exports.array(external_exports.strictObject({
27790
+ weekday: external_exports.number().int().min(0).max(6),
27791
+ hour: external_exports.number().int().min(0).max(23),
27792
+ ...totals
27793
+ })).max(168),
27794
+ byHarness: external_exports.array(external_exports.strictObject({ harness, ...totals })).max(256),
27795
+ byModel: external_exports.array(external_exports.strictObject({
27796
+ model: model.nullable(),
27797
+ ...totals,
27798
+ /** Requests priced by what the Harness recorded they cost, not by a price list. */
27799
+ harnessPricedRequests: count
27800
+ })).max(4096),
27801
+ byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
27802
+ /**
27803
+ * The sessions that spent the most, by cost and by tokens without cache, all filters applied;
27804
+ * requests without a native session are not listed here but count everywhere else.
27805
+ */
27806
+ sessions: external_exports.array(usageStatisticsSessionSchema).max(100)
27807
+ });
27808
+
27648
27809
  // ../../shared-contracts/dist/ids.js
27649
27810
  var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
27650
27811
  message: "Identifier must not be empty or whitespace"
@@ -27666,13 +27827,40 @@ var HARNESS_PLUGIN_LIMIT = 128;
27666
27827
  var harnessPluginIdSchema = external_exports.string().min(1).max(128).regex(/^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/u).refine((id) => id !== "codex", "The official Codex identity is reserved").pipe(harnessIdSchema);
27667
27828
  var relativeResourceSchema = external_exports.string().min(1).max(512).refine((value) => !/[\\\u0000:#?]/u.test(value) && !value.startsWith("/") && !value.split("/").some((part) => part === ".." || part === ""), "Plugin resources must be relative paths inside the plugin");
27668
27829
  var documentationUrlSchema = external_exports.url().refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Plugin documentation links must be credential-free HTTPS URLs");
27830
+ var localizedTextSchema = external_exports.object({ en: external_exports.string().max(4096), "zh-CN": external_exports.string().max(4096).optional() }).strict();
27831
+ var harnessInstallationGuideSchema = external_exports.object({
27832
+ commands: external_exports.array(external_exports.object({ terminal: external_exports.string().max(256), command: external_exports.string().max(4096) }).strict()).max(8),
27833
+ before: localizedTextSchema.optional(),
27834
+ after: localizedTextSchema.optional(),
27835
+ downloads: external_exports.array(external_exports.object({ label: external_exports.string().max(128), url: documentationUrlSchema }).strict()).max(8).optional()
27836
+ }).strict();
27669
27837
  var pluginPresentationShape = {
27670
27838
  id: harnessPluginIdSchema,
27671
27839
  name: external_exports.string().trim().min(1).max(128),
27672
27840
  version: external_exports.string().min(1).max(128),
27841
+ /** Capability-only plugin; omitted for existing session-capable plugins. */
27842
+ kind: external_exports.literal("usage").optional(),
27843
+ /** Original image styling or bounded vector paths; never arbitrary CSS/SVG markup. */
27844
+ iconStyle: external_exports.object({
27845
+ vector: external_exports.object({
27846
+ viewBox: external_exports.string().max(128).regex(/^-?\d+(?:\.\d+)?(?: +-?\d+(?:\.\d+)?){3}$/u),
27847
+ color: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu),
27848
+ paths: external_exports.array(external_exports.object({
27849
+ d: external_exports.string().min(1).max(32768).regex(/^[MmLlHhVvCcSsQqTtAaZz\d.,+eE\s-]+$/u),
27850
+ fillRule: external_exports.enum(["evenodd", "nonzero"]).optional(),
27851
+ fill: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu).optional()
27852
+ }).strict()).min(1).max(32)
27853
+ }).strict().optional(),
27854
+ background: external_exports.string().regex(/^#[a-f0-9]{6}$/iu).optional(),
27855
+ borderRadius: external_exports.number().min(0).max(50).optional(),
27856
+ paddingRatio: external_exports.number().min(0).max(0.25).optional()
27857
+ }).strict().optional(),
27858
+ installation: harnessInstallationGuideSchema.optional(),
27859
+ notice: localizedTextSchema.optional(),
27673
27860
  /** The factory accepts a persisted local entrypoint through its construction context. */
27674
27861
  launchCommand: external_exports.literal(true).optional(),
27675
27862
  links: external_exports.object({
27863
+ website: documentationUrlSchema.optional(),
27676
27864
  documentation: documentationUrlSchema.optional(),
27677
27865
  installation: documentationUrlSchema.optional()
27678
27866
  }).strict().optional()
@@ -27749,6 +27937,10 @@ var CONSOLE_HOST_METHODS = Object.freeze([
27749
27937
  "codexhost/account/list",
27750
27938
  "codexhost/account/refresh",
27751
27939
  "codexhost/account/usage/inspect",
27940
+ "codexhost/usage/model-prices/get",
27941
+ "codexhost/usage/model-prices/set",
27942
+ "codexhost/usage/model-prices/default",
27943
+ "codexhost/usage/statistics/get",
27752
27944
  "codexhost/update/check",
27753
27945
  "codexhost/update/start",
27754
27946
  "codexhost/update/status"
@@ -27813,6 +28005,7 @@ var threadUsageSnapshotSchema = external_exports.object({
27813
28005
  cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
27814
28006
  outputTokens: nonNegativeSafeIntegerSchema.optional(),
27815
28007
  outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
28008
+ apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
27816
28009
  reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
27817
28010
  totalTokens: nonNegativeSafeIntegerSchema.optional(),
27818
28011
  totalCostUsd: finiteNonNegativeNumberSchema.optional(),
@@ -27824,7 +28017,11 @@ var threadUsageSnapshotSchema = external_exports.object({
27824
28017
  planFiveHourUsedPercent: cacheHitRatePercentSchema.optional(),
27825
28018
  planFiveHourResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
27826
28019
  planSevenDayUsedPercent: cacheHitRatePercentSchema.optional(),
27827
- planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional()
28020
+ planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
28021
+ sessionCacheHitRatePercent: cacheHitRatePercentSchema.optional(),
28022
+ timeToFirstOutputMs: nonNegativeSafeIntegerSchema.optional(),
28023
+ costSource: external_exports.enum(["publicPrice", "native"]).optional(),
28024
+ unpricedModels: external_exports.array(external_exports.string().min(1)).min(1).optional()
27828
28025
  }).strict().superRefine((usage, context) => {
27829
28026
  if (Object.keys(usage).length === 0) {
27830
28027
  context.addIssue({ code: "custom", message: "Thread Usage must contain a reliable field" });
@@ -27845,6 +28042,20 @@ var threadUsageSnapshotSchema = external_exports.object({
27845
28042
  path: ["contextWindowTokens"]
27846
28043
  });
27847
28044
  }
28045
+ if (usage.costSource !== void 0 && usage.totalCostUsd === void 0) {
28046
+ context.addIssue({
28047
+ code: "custom",
28048
+ message: "Thread Usage costSource must be provided with totalCostUsd",
28049
+ path: ["costSource"]
28050
+ });
28051
+ }
28052
+ if (usage.unpricedModels !== void 0 && usage.costSource !== "publicPrice") {
28053
+ context.addIssue({
28054
+ code: "custom",
28055
+ message: "Thread Usage unpricedModels must be provided with a publicPrice cost",
28056
+ path: ["unpricedModels"]
28057
+ });
28058
+ }
27848
28059
  if (usage.planFiveHourResetsAtUnix !== void 0 && usage.planFiveHourUsedPercent === void 0) {
27849
28060
  context.addIssue({
27850
28061
  code: "custom",
@@ -28114,27 +28325,27 @@ var harnessModelCatalogSchema = external_exports.object({
28114
28325
  }).strict().superRefine((catalog, context) => {
28115
28326
  const refs = /* @__PURE__ */ new Set();
28116
28327
  const thinkingIds = new Set(catalog.thinkingOptions.map(({ id }) => id));
28117
- for (const [index, model] of catalog.models.entries()) {
28118
- if (refs.has(model.ref.id)) {
28328
+ for (const [index, model2] of catalog.models.entries()) {
28329
+ if (refs.has(model2.ref.id)) {
28119
28330
  context.addIssue({
28120
28331
  code: "custom",
28121
28332
  message: "Model Catalog refs must be unique",
28122
28333
  path: ["models", index, "ref", "id"]
28123
28334
  });
28124
28335
  }
28125
- refs.add(model.ref.id);
28126
- if (model.fastModel) {
28127
- if (refs.has(model.fastModel.id) || catalog.models.some((entry) => entry.ref.id === model.fastModel?.id)) {
28336
+ refs.add(model2.ref.id);
28337
+ if (model2.fastModel) {
28338
+ if (refs.has(model2.fastModel.id) || catalog.models.some((entry) => entry.ref.id === model2.fastModel?.id)) {
28128
28339
  context.addIssue({
28129
28340
  code: "custom",
28130
28341
  message: "Fast Model refs must be distinct and unique",
28131
28342
  path: ["models", index, "fastModel"]
28132
28343
  });
28133
28344
  }
28134
- refs.add(model.fastModel.id);
28345
+ refs.add(model2.fastModel.id);
28135
28346
  }
28136
28347
  const supportedThinkingIds = /* @__PURE__ */ new Set();
28137
- for (const [optionIndex, optionId] of (model.supportedThinkingOptionIds ?? []).entries()) {
28348
+ for (const [optionIndex, optionId] of (model2.supportedThinkingOptionIds ?? []).entries()) {
28138
28349
  if (supportedThinkingIds.has(optionId)) {
28139
28350
  context.addIssue({
28140
28351
  code: "custom",
@@ -28728,6 +28939,11 @@ var codexSshDraftSchema = external_exports.strictObject({
28728
28939
  });
28729
28940
  var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
28730
28941
  external_exports.strictObject({ action: external_exports.literal("list") }),
28942
+ external_exports.strictObject({
28943
+ action: external_exports.literal("read-thread"),
28944
+ hostId: hostId.refine((id) => id !== "local"),
28945
+ input: delegationReadParamsSchema
28946
+ }),
28731
28947
  external_exports.strictObject({
28732
28948
  action: external_exports.literal("save"),
28733
28949
  draft: codexSshDraftSchema,
@@ -28876,7 +29092,6 @@ var tokenFields = [
28876
29092
  "cachedInputTokens",
28877
29093
  "cacheWriteInputTokens",
28878
29094
  "outputTokens",
28879
- "outputTokensPerSecond",
28880
29095
  "reasoningOutputTokens",
28881
29096
  "totalTokens",
28882
29097
  "contextWindowTokens",
@@ -28884,10 +29099,12 @@ var tokenFields = [
28884
29099
  ];
28885
29100
  var safeIntegerFields = [
28886
29101
  "planFiveHourResetsAtUnix",
28887
- "planSevenDayResetsAtUnix"
29102
+ "planSevenDayResetsAtUnix",
29103
+ "timeToFirstOutputMs"
28888
29104
  ];
28889
29105
  var percentFields = [
28890
29106
  "cacheHitRatePercent",
29107
+ "sessionCacheHitRatePercent",
28891
29108
  "planFiveHourUsedPercent",
28892
29109
  "planSevenDayUsedPercent"
28893
29110
  ];
@@ -28895,9 +29112,14 @@ var usageFields = /* @__PURE__ */ new Set([
28895
29112
  ...tokenFields,
28896
29113
  ...safeIntegerFields,
28897
29114
  ...percentFields,
29115
+ "sessionCacheUsage",
28898
29116
  "totalCostUsd",
28899
29117
  "totalCredits",
28900
- "contextUsagePercent"
29118
+ "contextUsagePercent",
29119
+ "outputTokensPerSecond",
29120
+ "apiOutputTokensPerSecond",
29121
+ "costSource",
29122
+ "unpricedModels"
28901
29123
  ]);
28902
29124
  function isRecord(value) {
28903
29125
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -28913,7 +29135,11 @@ function parseHostUsage(value) {
28913
29135
  throw new Error(`Harness Usage contains unknown field '${key}'`);
28914
29136
  }
28915
29137
  }
28916
- for (const field of ["totalCredits", "contextUsagePercent"]) {
29138
+ for (const field of [
29139
+ "totalCredits",
29140
+ "contextUsagePercent",
29141
+ "apiOutputTokensPerSecond"
29142
+ ]) {
28917
29143
  const candidate = value[field];
28918
29144
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
28919
29145
  throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
@@ -28949,6 +29175,12 @@ function parseHostUsage(value) {
28949
29175
  throw new Error(`Harness Usage '${field}' must be between 0 and 100`);
28950
29176
  }
28951
29177
  }
29178
+ if (value.sessionCacheUsage !== void 0) {
29179
+ const totals2 = value.sessionCacheUsage;
29180
+ if (!isRecord(totals2) || Object.keys(totals2).some((key) => key !== "inputTokens" && key !== "cachedInputTokens") || typeof totals2.inputTokens !== "number" || !Number.isSafeInteger(totals2.inputTokens) || totals2.inputTokens < 0 || typeof totals2.cachedInputTokens !== "number" || !Number.isSafeInteger(totals2.cachedInputTokens) || totals2.cachedInputTokens < 0 || totals2.cachedInputTokens > totals2.inputTokens) {
29181
+ throw new Error("Harness Usage 'sessionCacheUsage' must contain complete bounded token totals");
29182
+ }
29183
+ }
28952
29184
  const hasContextUsed = value.contextUsedTokens !== void 0;
28953
29185
  const hasContextWindow = value.contextWindowTokens !== void 0;
28954
29186
  if (hasContextUsed !== hasContextWindow) {
@@ -28963,8 +29195,43 @@ function parseHostUsage(value) {
28963
29195
  if (value.planSevenDayResetsAtUnix !== void 0 && value.planSevenDayUsedPercent === void 0) {
28964
29196
  throw new Error("Harness Usage 'planSevenDayResetsAtUnix' must be provided with 'planSevenDayUsedPercent'");
28965
29197
  }
29198
+ if (value.costSource !== void 0) {
29199
+ if (value.costSource !== "publicPrice" && value.costSource !== "native") {
29200
+ throw new Error("Harness Usage 'costSource' must be 'publicPrice' or 'native'");
29201
+ }
29202
+ if (value.totalCostUsd === void 0) {
29203
+ throw new Error("Harness Usage 'costSource' must be provided with 'totalCostUsd'");
29204
+ }
29205
+ }
29206
+ if (value.unpricedModels !== void 0) {
29207
+ const models = value.unpricedModels;
29208
+ if (!Array.isArray(models) || models.length === 0 || !models.every((model2) => typeof model2 === "string" && model2.length > 0)) {
29209
+ throw new Error("Harness Usage 'unpricedModels' must be a non-empty list of Model IDs");
29210
+ }
29211
+ if (value.costSource !== "publicPrice") {
29212
+ throw new Error("Harness Usage 'unpricedModels' must be provided with a 'publicPrice' cost");
29213
+ }
29214
+ return { ...value, unpricedModels: [...models] };
29215
+ }
28966
29216
  return { ...value };
28967
29217
  }
29218
+ var requestTokenFields = [
29219
+ "inputTokens",
29220
+ "cachedInputTokens",
29221
+ "cacheWriteInputTokens",
29222
+ "cacheWrite1hInputTokens",
29223
+ "outputTokens",
29224
+ "reasoningOutputTokens",
29225
+ "startedAtMs",
29226
+ "completedAtMs"
29227
+ ];
29228
+ var requestFields = /* @__PURE__ */ new Set([
29229
+ ...requestTokenFields,
29230
+ "requestId",
29231
+ "historical",
29232
+ "model",
29233
+ "provider"
29234
+ ]);
28968
29235
 
28969
29236
  // ../../harness-adapter/dist/live-command-catalog.js
28970
29237
  var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
@@ -29706,14 +29973,14 @@ function cursorModels(info) {
29706
29973
  function cursorCatalog(info) {
29707
29974
  const native = cursorModels(info);
29708
29975
  const thinking = /* @__PURE__ */ new Map();
29709
- const models = native.models.map((model) => {
29710
- const config2 = model.value === native.current ? info.configOptions : info.nativeModels?.find((entry) => entry.value === model.value)?.configOptions;
29976
+ const models = native.models.map((model2) => {
29977
+ const config2 = model2.value === native.current ? info.configOptions : info.nativeModels?.find((entry) => entry.value === model2.value)?.configOptions;
29711
29978
  const options = cursorThinking(config2);
29712
29979
  for (const { id, label } of options)
29713
29980
  thinking.set(id, { id, label });
29714
29981
  return {
29715
- ref: cursorConfiguredModelRef(model.value, config2),
29716
- label: model.name,
29982
+ ref: cursorConfiguredModelRef(model2.value, config2),
29983
+ label: model2.name,
29717
29984
  supportedThinkingOptionIds: options.map(({ id }) => id)
29718
29985
  };
29719
29986
  });
@@ -29730,13 +29997,13 @@ function cursorCatalog(info) {
29730
29997
  function parseCursorNativeModels(input) {
29731
29998
  if (!Array.isArray(input.models))
29732
29999
  throw new Error("Cursor returned no parameterized model catalog");
29733
- return input.models.map((model) => {
29734
- if (typeof model !== "object" || model === null || !("value" in model) || !("name" in model) || !("configOptions" in model) || typeof model.value !== "string" || typeof model.name !== "string" || !Array.isArray(model.configOptions))
30000
+ return input.models.map((model2) => {
30001
+ if (typeof model2 !== "object" || model2 === null || !("value" in model2) || !("name" in model2) || !("configOptions" in model2) || typeof model2.value !== "string" || typeof model2.name !== "string" || !Array.isArray(model2.configOptions))
29735
30002
  throw new Error("Invalid Cursor model metadata");
29736
30003
  return {
29737
- value: model.value,
29738
- name: model.name,
29739
- configOptions: model.configOptions.map((option) => {
30004
+ value: model2.value,
30005
+ name: model2.name,
30006
+ configOptions: model2.configOptions.map((option) => {
29740
30007
  if (typeof option !== "object" || option === null || !("id" in option) || !("name" in option) || !("type" in option) || !("currentValue" in option) || !("options" in option) || typeof option.id !== "string" || typeof option.name !== "string" || option.type !== "select" || typeof option.currentValue !== "string" || !Array.isArray(option.options))
29741
30008
  throw new Error("Invalid Cursor parameter metadata");
29742
30009
  const entries = option.options.map((entry) => {
@@ -29757,7 +30024,7 @@ function parseCursorNativeModels(input) {
29757
30024
  });
29758
30025
  }
29759
30026
  function cursorModelSelection(info, ref) {
29760
- const exact = cursorModels(info).models.find((model2) => cursorModelRef(model2.value).id === ref);
30027
+ const exact = cursorModels(info).models.find((model3) => cursorModelRef(model3.value).id === ref);
29761
30028
  if (exact)
29762
30029
  return [["model", exact.value]];
29763
30030
  if (!ref.startsWith("cursor."))
@@ -29766,8 +30033,8 @@ function cursorModelSelection(info, ref) {
29766
30033
  if (cursorModelRef(decoded).id !== ref)
29767
30034
  throw new Error("Invalid Cursor model reference");
29768
30035
  const match = /^([^\[\]]+)\[([^\[\]]*)\]$/u.exec(decoded);
29769
- const model = match && info.nativeModels?.find((entry) => entry.value === match[1]);
29770
- if (!match || !model)
30036
+ const model2 = match && info.nativeModels?.find((entry) => entry.value === match[1]);
30037
+ if (!match || !model2)
29771
30038
  throw new Error("Model is not in this Cursor session's native catalog");
29772
30039
  const parameters = [];
29773
30040
  for (const parameter of match[2] ? match[2].split(",") : []) {
@@ -29775,12 +30042,12 @@ function cursorModelSelection(info, ref) {
29775
30042
  const [id, value] = pair;
29776
30043
  if (pair.length !== 2 || !id || value === void 0 || parameters.some(([key]) => key === id))
29777
30044
  throw new Error("Invalid Cursor model parameters");
29778
- const option = model.configOptions.find((option2) => option2.id === id);
30045
+ const option = model2.configOptions.find((option2) => option2.id === id);
29779
30046
  if (!option || option.type !== "select" || !option.options.flatMap((entry) => "value" in entry ? [entry] : entry.options).some((entry) => entry.value === value))
29780
30047
  throw new Error("Legacy Cursor model parameter is not selectable in the native catalog");
29781
30048
  parameters.push([id, value]);
29782
30049
  }
29783
- return [["model", model.value], ...parameters];
30050
+ return [["model", model2.value], ...parameters];
29784
30051
  }
29785
30052
  function cursorCapabilities(info) {
29786
30053
  return {
@@ -29791,9 +30058,9 @@ function cursorCapabilities(info) {
29791
30058
  }
29792
30059
  };
29793
30060
  }
29794
- function cursorConfiguredModelRef(model, options) {
30061
+ function cursorConfiguredModelRef(model2, options) {
29795
30062
  const parameters = (options ?? []).flatMap((option) => option.category === "model_config" && option.type === "select" ? [`${option.id}=${option.currentValue}`] : []);
29796
- return cursorModelRef(parameters.length ? `${model}[${parameters.join(",")}]` : model);
30063
+ return cursorModelRef(parameters.length ? `${model2}[${parameters.join(",")}]` : model2);
29797
30064
  }
29798
30065
 
29799
30066
  // dist/transport.js
@@ -32083,9 +32350,9 @@ var Connection = class {
32083
32350
  return;
32084
32351
  }
32085
32352
  const responseBatch = isResponseBatch(batch);
32086
- const responseCount = responseBatch ? 0 : batch.reduce((count, message) => count + (isNotificationMessage(message) ? 0 : 1), 0);
32353
+ const responseCount = responseBatch ? 0 : batch.reduce((count2, message) => count2 + (isNotificationMessage(message) ? 0 : 1), 0);
32087
32354
  let remaining = responseCount;
32088
- let remainingNotifications = batch.reduce((count, message) => count + (isNotificationMessage(message) ? 1 : 0), 0);
32355
+ let remainingNotifications = batch.reduce((count2, message) => count2 + (isNotificationMessage(message) ? 1 : 0), 0);
32089
32356
  let responseSent = false;
32090
32357
  const responses = [];
32091
32358
  const sendResponsesIfReady = async () => {
@@ -45390,7 +45657,7 @@ async function createCursorDelegationBridge(cwd, environment, commandTimeoutMs =
45390
45657
  server.registerTool("harness_inspect", {
45391
45658
  description: "Read a Harness's native Models and Thinking choices. Use opaque IDs only when explicitly selecting; omission retains native defaults.",
45392
45659
  inputSchema: { harness: text, cwd: text.optional() }
45393
- }, ({ harness, cwd: cwd2 }) => run(["harness", "inspect", harness, ...optional2("--cwd", cwd2)]));
45660
+ }, ({ harness: harness2, cwd: cwd2 }) => run(["harness", "inspect", harness2, ...optional2("--cwd", cwd2)]));
45394
45661
  server.registerTool("delegate_start", {
45395
45662
  description: "Start an independent task in another Harness when the user requests delegation. Returns immediately with a task link; use thread_wait for completion. Parent attribution and credentials come from this Cursor session. Do not delegate to Cursor: unattended inbound Cursor tasks are unsupported.",
45396
45663
  inputSchema: {
@@ -45401,15 +45668,15 @@ async function createCursorDelegationBridge(cwd, environment, commandTimeoutMs =
45401
45668
  thinking: text.optional(),
45402
45669
  requestId: text.optional()
45403
45670
  }
45404
- }, ({ harness, task, cwd: cwd2, model, thinking, requestId }) => run([
45671
+ }, ({ harness: harness2, task, cwd: cwd2, model: model2, thinking, requestId }) => run([
45405
45672
  "delegate",
45406
45673
  "start",
45407
45674
  "--harness",
45408
- harness,
45675
+ harness2,
45409
45676
  "--task",
45410
45677
  task,
45411
45678
  ...optional2("--cwd", cwd2),
45412
- ...optional2("--model", model),
45679
+ ...optional2("--model", model2),
45413
45680
  ...optional2("--thinking", thinking),
45414
45681
  ...optional2("--request-id", requestId)
45415
45682
  ]));
@@ -45634,7 +45901,7 @@ var CursorTransport = class {
45634
45901
  return info;
45635
45902
  const modelOption = info.configOptions?.find((option) => option.id === "model");
45636
45903
  const available = modelOption?.type === "select" ? modelOption.options.flatMap((entry) => "value" in entry ? [entry] : entry.options) : void 0;
45637
- if (this.cachedModels?.length && available?.length === this.cachedModels.length && available.every((model) => this.cachedModels?.some((cached2) => cached2.value === model.value && cached2.name === model.name)))
45904
+ if (this.cachedModels?.length && available?.length === this.cachedModels.length && available.every((model2) => this.cachedModels?.some((cached2) => cached2.value === model2.value && cached2.name === model2.name)))
45638
45905
  return { ...info, nativeModels: structuredClone(this.cachedModels) };
45639
45906
  try {
45640
45907
  const models = await this.#bounded(this.#connection.extMethod("cursor/list_available_models", {}));
@@ -46431,7 +46698,13 @@ var CursorTurnOutput = class {
46431
46698
  constructor(turnId, emit, nativeTurnIndex = 0) {
46432
46699
  this.turnId = turnId;
46433
46700
  this.emit = emit;
46434
- this.subagents = new CursorSubagents(turnId, emit, nativeTurnIndex);
46701
+ this.subagents = new CursorSubagents(turnId, (event) => {
46702
+ if (event.type === "item.started") {
46703
+ this.#flushHold();
46704
+ this.#finishText();
46705
+ }
46706
+ emit(event);
46707
+ }, nativeTurnIndex);
46435
46708
  }
46436
46709
  sawWritableIterableClosed() {
46437
46710
  return this.#writableIterableClosed || takeCursorWritableIterableClosed(this.#hold).closed;
@@ -46481,11 +46754,8 @@ var CursorTurnOutput = class {
46481
46754
  this.#text = void 0;
46482
46755
  }
46483
46756
  update(notification) {
46484
- if (this.subagents.update(notification)) {
46485
- this.#flushHold();
46486
- this.#finishText();
46757
+ if (this.subagents.update(notification))
46487
46758
  return;
46488
- }
46489
46759
  const { update } = notification;
46490
46760
  if (update.sessionUpdate === "agent_message_chunk" || update.sessionUpdate === "agent_thought_chunk") {
46491
46761
  if (update.content.type !== "text")
@@ -46501,12 +46771,12 @@ var CursorTurnOutput = class {
46501
46771
  this.#hold = hold;
46502
46772
  this.#appendText(type, emit);
46503
46773
  } else if (update.sessionUpdate === "tool_call" || update.sessionUpdate === "tool_call_update") {
46504
- this.#flushHold();
46505
- this.#finishText();
46506
46774
  if (this.#finishedTools.has(update.toolCallId))
46507
46775
  return;
46508
46776
  let tool = this.#tools.get(update.toolCallId);
46509
46777
  if (!tool) {
46778
+ this.#flushHold();
46779
+ this.#finishText();
46510
46780
  const args = jsonValueSchema.safeParse(update.rawInput ?? {});
46511
46781
  const item2 = {
46512
46782
  type: "toolExecution",
@@ -47306,7 +47576,7 @@ var CursorAdapter = class {
47306
47576
  throw staged.reason;
47307
47577
  if (!derived)
47308
47578
  throw new Error("Cursor native fork did not return a target");
47309
- const model = input.kind === "rollbackLastTurn" ? input.model ?? source?.initialState.effectiveModel : source?.initialState.effectiveModel;
47579
+ const model2 = input.kind === "rollbackLastTurn" ? input.model ?? source?.initialState.effectiveModel : source?.initialState.effectiveModel;
47310
47580
  const thinking = input.kind === "rollbackLastTurn" ? input.thinkingOptionId ?? source?.initialState.effectiveThinkingOptionId : source?.initialState.effectiveThinkingOptionId;
47311
47581
  const mode = input.kind === "rollbackLastTurn" ? input.permissionModeId ?? source?.initialState.effectivePermissionModeId : source?.initialState.effectivePermissionModeId;
47312
47582
  const opened = await this.#openSession({
@@ -47314,7 +47584,7 @@ var CursorAdapter = class {
47314
47584
  cwd: input.cwd,
47315
47585
  environment: options.environment,
47316
47586
  nativeRef: cursorNativeSessionRef(derived.sessionId, executionPolicy),
47317
- ...model ? { model } : {},
47587
+ ...model2 ? { model: model2 } : {},
47318
47588
  ...thinking ? { thinkingOptionId: thinking } : {},
47319
47589
  ...mode ? { permissionModeId: mode } : {}
47320
47590
  }, transport);
@@ -47531,9 +47801,9 @@ var CursorSession = class {
47531
47801
  if (!result.configOptions.some((option) => option.id === configId && option.currentValue === value))
47532
47802
  throw new Error("Cursor did not confirm configuration selection");
47533
47803
  this.info.configOptions = result.configOptions;
47534
- const model = result.configOptions.find((option) => option.id === "model");
47535
- if (model?.type === "select")
47536
- this.initialState.effectiveModel = cursorConfiguredModelRef(model.currentValue, result.configOptions);
47804
+ const model2 = result.configOptions.find((option) => option.id === "model");
47805
+ if (model2?.type === "select")
47806
+ this.initialState.effectiveModel = cursorConfiguredModelRef(model2.currentValue, result.configOptions);
47537
47807
  const mode = result.configOptions.find((option) => option.id === "mode");
47538
47808
  if (mode)
47539
47809
  this.initialState.effectivePermissionModeId = harnessPermissionModeIdSchema.parse(mode.currentValue);
@@ -47981,6 +48251,8 @@ var harnessSessionStateSchema = external_exports.custom((value) => {
47981
48251
  var eventKeys = /* @__PURE__ */ new Map([
47982
48252
  ["session.state.changed", /* @__PURE__ */ new Set(["type", "state"])],
47983
48253
  ["session.usage.changed", /* @__PURE__ */ new Set(["type", "usage", "observedForTurnId"])],
48254
+ ["usage.request", /* @__PURE__ */ new Set(["type", "request"])],
48255
+ ["usage.history", /* @__PURE__ */ new Set(["type", "complete"])],
47984
48256
  ["subagent.state.changed", /* @__PURE__ */ new Set(["type", "nativeSubagentId", "status", "resultSummary"])],
47985
48257
  ["subagent.transcript.changed", /* @__PURE__ */ new Set(["type", "nativeSubagentId"])],
47986
48258
  ["turn.started", /* @__PURE__ */ new Set(["type", "turnId"])],
@@ -48029,6 +48301,8 @@ var harnessOutputSchema = external_exports.custom((value) => {
48029
48301
  return harnessSessionStateSchema.safeParse(event.state).success;
48030
48302
  if (event.type === "session.faulted")
48031
48303
  return harnessErrorSchema.safeParse(event.error).success;
48304
+ if (event.type === "usage.history")
48305
+ return typeof event.complete === "boolean";
48032
48306
  return true;
48033
48307
  }
48034
48308
  if (output.kind === "interaction") {