@karlorz/codexhost-cli-win32-x64 0.15.0-1 → 0.16.1-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.
@@ -1320,8 +1320,8 @@ var require_messageWriter = __commonJS({
1320
1320
  get onError() {
1321
1321
  return this.errorEmitter.event;
1322
1322
  }
1323
- fireError(error51, message, count3) {
1324
- this.errorEmitter.fire([this.asError(error51), message, count3]);
1323
+ fireError(error51, message, count4) {
1324
+ this.errorEmitter.fire([this.asError(error51), message, count4]);
1325
1325
  }
1326
1326
  get onClose() {
1327
1327
  return this.closeEmitter.event;
@@ -8698,8 +8698,8 @@ function az_default() {
8698
8698
  }
8699
8699
 
8700
8700
  // ../../../node_modules/zod/v4/locales/be.js
8701
- function getBelarusianPlural(count3, one, few, many) {
8702
- const absCount = Math.abs(count3);
8701
+ function getBelarusianPlural(count4, one, few, many) {
8702
+ const absCount = Math.abs(count4);
8703
8703
  const lastDigit = absCount % 10;
8704
8704
  const lastTwoDigits = absCount % 100;
8705
8705
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
@@ -10777,8 +10777,8 @@ function hu_default() {
10777
10777
  }
10778
10778
 
10779
10779
  // ../../../node_modules/zod/v4/locales/hy.js
10780
- function getArmenianPlural(count3, one, many) {
10781
- return Math.abs(count3) === 1 ? one : many;
10780
+ function getArmenianPlural(count4, one, many) {
10781
+ return Math.abs(count4) === 1 ? one : many;
10782
10782
  }
10783
10783
  function withDefiniteArticle(word) {
10784
10784
  if (!word)
@@ -12906,8 +12906,8 @@ function ro_default() {
12906
12906
  }
12907
12907
 
12908
12908
  // ../../../node_modules/zod/v4/locales/ru.js
12909
- function getRussianPlural(count3, one, few, many) {
12910
- const absCount = Math.abs(count3);
12909
+ function getRussianPlural(count4, one, few, many) {
12910
+ const absCount = Math.abs(count4);
12911
12911
  const lastDigit = absCount % 10;
12912
12912
  const lastTwoDigits = absCount % 100;
12913
12913
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
@@ -18576,6 +18576,33 @@ function date4(params) {
18576
18576
  // ../../../node_modules/zod/v4/classic/external.js
18577
18577
  config(en_default());
18578
18578
 
18579
+ // ../../shared-contracts/dist/goals.js
18580
+ var harnessGoalStatusSchema = external_exports.enum([
18581
+ "active",
18582
+ "paused",
18583
+ "blocked",
18584
+ "usageLimited",
18585
+ "budgetLimited",
18586
+ "complete"
18587
+ ]);
18588
+ var count = external_exports.number().int().nonnegative().safe();
18589
+ var harnessGoalSchema = external_exports.object({
18590
+ objective: external_exports.string().min(1),
18591
+ status: harnessGoalStatusSchema,
18592
+ tokenBudget: count.positive().nullable(),
18593
+ tokensUsed: count,
18594
+ timeUsedSeconds: count,
18595
+ createdAt: count,
18596
+ updatedAt: count
18597
+ });
18598
+ var goalOriginSchema = external_exports.enum(["user", "automatic"]).nullable();
18599
+ var harnessGoalSetSchema = external_exports.object({
18600
+ objective: external_exports.string().min(1).optional(),
18601
+ status: external_exports.enum(["active", "paused"]).optional(),
18602
+ tokenBudget: count.positive().nullable().optional(),
18603
+ origin: goalOriginSchema
18604
+ });
18605
+
18579
18606
  // ../../shared-contracts/dist/delegation-read.js
18580
18607
  var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
18581
18608
  var delegationReadParamsSchema = external_exports.strictObject({
@@ -18706,7 +18733,7 @@ var modelPriceDefaultResultSchema = external_exports.strictObject({
18706
18733
 
18707
18734
  // ../../shared-contracts/dist/usage-statistics.js
18708
18735
  var USAGE_STATISTICS_RANGES = ["today", "7d", "30d", "90d", "all"];
18709
- var count = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
18736
+ var count2 = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
18710
18737
  var localDate = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/u);
18711
18738
  var harness = external_exports.string().min(1).max(128);
18712
18739
  var model = external_exports.string().min(1).max(512);
@@ -18729,22 +18756,24 @@ var usageStatisticsParamsSchema = external_exports.strictObject({
18729
18756
  date: localDate.optional()
18730
18757
  });
18731
18758
  var usageStatisticsTotalsSchema = external_exports.strictObject({
18732
- requests: count,
18733
- inputTokens: count,
18734
- cachedInputTokens: count,
18735
- cacheWriteInputTokens: count,
18736
- cacheKnownInputTokens: count,
18737
- outputTokens: count,
18738
- reasoningOutputTokens: count,
18759
+ requests: count2,
18760
+ inputTokens: count2,
18761
+ cachedInputTokens: count2,
18762
+ cacheWriteInputTokens: count2,
18763
+ cacheKnownInputTokens: count2,
18764
+ cacheHitCachedInputTokens: count2,
18765
+ cacheHitInputTokens: count2,
18766
+ outputTokens: count2,
18767
+ reasoningOutputTokens: count2,
18739
18768
  /** USD at the public price, summed over the priced requests only. */
18740
18769
  costUsd: external_exports.number().finite().min(0),
18741
18770
  /** Requests without a price (or the cache data the price needs); not in `costUsd`. */
18742
- unpricedRequests: count,
18771
+ unpricedRequests: count2,
18743
18772
  /**
18744
18773
  * Requests whose storage gave no token counts: counted as requests, with neither tokens nor
18745
18774
  * cost, and not as unpriced.
18746
18775
  */
18747
- unmeteredRequests: count
18776
+ unmeteredRequests: count2
18748
18777
  });
18749
18778
  var totals = usageStatisticsTotalsSchema.shape;
18750
18779
  var usageStatisticsSessionSchema = external_exports.strictObject({
@@ -18755,8 +18784,8 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
18755
18784
  title: external_exports.string().min(1).max(200).optional(),
18756
18785
  /** Models the session used, most requests first. */
18757
18786
  models: external_exports.array(model).max(16),
18758
- firstAtMs: count,
18759
- lastAtMs: count,
18787
+ firstAtMs: count2,
18788
+ lastAtMs: count2,
18760
18789
  ...totals
18761
18790
  });
18762
18791
  var usageStatisticsResultSchema = external_exports.strictObject({
@@ -18774,7 +18803,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
18774
18803
  date: localDate.nullable()
18775
18804
  }),
18776
18805
  /** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
18777
- reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count, read: count }),
18806
+ reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count2, read: count2 }),
18778
18807
  /** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
18779
18808
  failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
18780
18809
  /** Every value seen in the range, ignoring the filters, to choose filters from. */
@@ -18794,8 +18823,8 @@ var usageStatisticsResultSchema = external_exports.strictObject({
18794
18823
  harness,
18795
18824
  model: model.nullable(),
18796
18825
  credits: external_exports.number().finite().min(0),
18797
- reportedRequests: count,
18798
- requests: count
18826
+ reportedRequests: count2,
18827
+ requests: count2
18799
18828
  })).max(4096).optional(),
18800
18829
  /** All filters applied. */
18801
18830
  totals: usageStatisticsTotalsSchema,
@@ -18812,7 +18841,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
18812
18841
  model: model.nullable(),
18813
18842
  ...totals,
18814
18843
  /** Requests priced by what the Harness recorded they cost, not by a price list. */
18815
- harnessPricedRequests: count
18844
+ harnessPricedRequests: count2
18816
18845
  })).max(4096),
18817
18846
  byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
18818
18847
  /**
@@ -19426,7 +19455,9 @@ var harnessModelCatalogSchema = external_exports.object({
19426
19455
  var harnessHistoryCapabilitiesSchema = external_exports.object({
19427
19456
  fork: external_exports.boolean(),
19428
19457
  forkAcrossCwd: external_exports.boolean(),
19429
- rollbackLastTurn: external_exports.boolean()
19458
+ rollbackLastTurn: external_exports.boolean(),
19459
+ /** Remove the selected checkpoint's Turn and every later Turn, without restoring files. */
19460
+ rollbackToCheckpoint: external_exports.boolean().optional()
19430
19461
  }).strict().refine((history) => history.fork || !history.forkAcrossCwd, {
19431
19462
  path: ["forkAcrossCwd"],
19432
19463
  message: "Cross-cwd Fork requires exact history Fork support"
@@ -19664,7 +19695,10 @@ var harnessPluginRouteSchema = external_exports.object({
19664
19695
  harnessId: harnessPluginIdSchema,
19665
19696
  model: harnessModelRefSchema.optional(),
19666
19697
  thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
19667
- permissionModeId: harnessPermissionModeIdSchema.optional()
19698
+ permissionModeId: harnessPermissionModeIdSchema.optional(),
19699
+ /** A draft prewarm create: stays unsubmitted until the user's first Turn.
19700
+ * Desktop forwards only the Model of a main-process prewarm to thread/start. */
19701
+ prewarm: external_exports.literal(true).optional()
19668
19702
  }).strict();
19669
19703
 
19670
19704
  // ../../shared-contracts/dist/harness-launch-settings.js
@@ -33311,7 +33345,7 @@ function usageFromMetrics(metrics, context, live = {}) {
33311
33345
  }
33312
33346
 
33313
33347
  // dist/usage-telemetry.js
33314
- var count2 = (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
33348
+ var count3 = (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
33315
33349
  var duration3 = (value) => typeof value === "number" && Number.isFinite(value) && value >= 0;
33316
33350
  var CopilotUsageTelemetry = class {
33317
33351
  turn;
@@ -33375,9 +33409,9 @@ var CopilotUsageTelemetry = class {
33375
33409
  return false;
33376
33410
  call.consumed = true;
33377
33411
  const data = call.receipt;
33378
- if (count2(data.inputTokens) && data.inputTokens > 0 && count2(data.cacheReadTokens) && data.cacheReadTokens <= data.inputTokens)
33412
+ if (count3(data.inputTokens) && data.inputTokens > 0 && count3(data.cacheReadTokens) && data.cacheReadTokens <= data.inputTokens)
33379
33413
  this.latest.cacheHitRatePercent = data.cacheReadTokens / data.inputTokens * 100;
33380
- if (!count2(data.outputTokens) || !duration3(data.duration) || data.duration <= 0) {
33414
+ if (!count3(data.outputTokens) || !duration3(data.duration) || data.duration <= 0) {
33381
33415
  this.generationKnown = this.apiKnown = false;
33382
33416
  return true;
33383
33417
  }
@@ -34459,6 +34493,16 @@ var CopilotAdapter = class {
34459
34493
  return result;
34460
34494
  }
34461
34495
  async open(input) {
34496
+ if (input.kind === "rollbackToCheckpoint") {
34497
+ return {
34498
+ ok: false,
34499
+ error: {
34500
+ code: "unsupported",
34501
+ message: "Checkpoint rollback is not supported by this Adapter",
34502
+ retryable: false
34503
+ }
34504
+ };
34505
+ }
34462
34506
  if (this.closed)
34463
34507
  return failure("invalidState", "Copilot Adapter is closed.");
34464
34508
  if (input.kind === "create" && input.executionPolicy === "unattended-full-access" && input.permissionModeId && input.permissionModeId !== "allow-all")
@@ -5008,8 +5008,8 @@ function az_default() {
5008
5008
  }
5009
5009
 
5010
5010
  // ../../../node_modules/zod/v4/locales/be.js
5011
- function getBelarusianPlural(count2, one2, few, many) {
5012
- const absCount = Math.abs(count2);
5011
+ function getBelarusianPlural(count3, one2, few, many) {
5012
+ const absCount = Math.abs(count3);
5013
5013
  const lastDigit = absCount % 10;
5014
5014
  const lastTwoDigits = absCount % 100;
5015
5015
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
@@ -7087,8 +7087,8 @@ function hu_default() {
7087
7087
  }
7088
7088
 
7089
7089
  // ../../../node_modules/zod/v4/locales/hy.js
7090
- function getArmenianPlural(count2, one2, many) {
7091
- return Math.abs(count2) === 1 ? one2 : many;
7090
+ function getArmenianPlural(count3, one2, many) {
7091
+ return Math.abs(count3) === 1 ? one2 : many;
7092
7092
  }
7093
7093
  function withDefiniteArticle(word) {
7094
7094
  if (!word)
@@ -9216,8 +9216,8 @@ function ro_default() {
9216
9216
  }
9217
9217
 
9218
9218
  // ../../../node_modules/zod/v4/locales/ru.js
9219
- function getRussianPlural(count2, one2, few, many) {
9220
- const absCount = Math.abs(count2);
9219
+ function getRussianPlural(count3, one2, few, many) {
9220
+ const absCount = Math.abs(count3);
9221
9221
  const lastDigit = absCount % 10;
9222
9222
  const lastTwoDigits = absCount % 100;
9223
9223
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
@@ -14886,6 +14886,33 @@ function date4(params) {
14886
14886
  // ../../../node_modules/zod/v4/classic/external.js
14887
14887
  config(en_default());
14888
14888
 
14889
+ // ../../shared-contracts/dist/goals.js
14890
+ var harnessGoalStatusSchema = external_exports.enum([
14891
+ "active",
14892
+ "paused",
14893
+ "blocked",
14894
+ "usageLimited",
14895
+ "budgetLimited",
14896
+ "complete"
14897
+ ]);
14898
+ var count = external_exports.number().int().nonnegative().safe();
14899
+ var harnessGoalSchema = external_exports.object({
14900
+ objective: external_exports.string().min(1),
14901
+ status: harnessGoalStatusSchema,
14902
+ tokenBudget: count.positive().nullable(),
14903
+ tokensUsed: count,
14904
+ timeUsedSeconds: count,
14905
+ createdAt: count,
14906
+ updatedAt: count
14907
+ });
14908
+ var goalOriginSchema = external_exports.enum(["user", "automatic"]).nullable();
14909
+ var harnessGoalSetSchema = external_exports.object({
14910
+ objective: external_exports.string().min(1).optional(),
14911
+ status: external_exports.enum(["active", "paused"]).optional(),
14912
+ tokenBudget: count.positive().nullable().optional(),
14913
+ origin: goalOriginSchema
14914
+ });
14915
+
14889
14916
  // ../../shared-contracts/dist/delegation-read.js
14890
14917
  var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
14891
14918
  var delegationReadParamsSchema = external_exports.strictObject({
@@ -15016,7 +15043,7 @@ var modelPriceDefaultResultSchema = external_exports.strictObject({
15016
15043
 
15017
15044
  // ../../shared-contracts/dist/usage-statistics.js
15018
15045
  var USAGE_STATISTICS_RANGES = ["today", "7d", "30d", "90d", "all"];
15019
- var count = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
15046
+ var count2 = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
15020
15047
  var localDate = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/u);
15021
15048
  var harness = external_exports.string().min(1).max(128);
15022
15049
  var model = external_exports.string().min(1).max(512);
@@ -15039,22 +15066,24 @@ var usageStatisticsParamsSchema = external_exports.strictObject({
15039
15066
  date: localDate.optional()
15040
15067
  });
15041
15068
  var usageStatisticsTotalsSchema = external_exports.strictObject({
15042
- requests: count,
15043
- inputTokens: count,
15044
- cachedInputTokens: count,
15045
- cacheWriteInputTokens: count,
15046
- cacheKnownInputTokens: count,
15047
- outputTokens: count,
15048
- reasoningOutputTokens: count,
15069
+ requests: count2,
15070
+ inputTokens: count2,
15071
+ cachedInputTokens: count2,
15072
+ cacheWriteInputTokens: count2,
15073
+ cacheKnownInputTokens: count2,
15074
+ cacheHitCachedInputTokens: count2,
15075
+ cacheHitInputTokens: count2,
15076
+ outputTokens: count2,
15077
+ reasoningOutputTokens: count2,
15049
15078
  /** USD at the public price, summed over the priced requests only. */
15050
15079
  costUsd: external_exports.number().finite().min(0),
15051
15080
  /** Requests without a price (or the cache data the price needs); not in `costUsd`. */
15052
- unpricedRequests: count,
15081
+ unpricedRequests: count2,
15053
15082
  /**
15054
15083
  * Requests whose storage gave no token counts: counted as requests, with neither tokens nor
15055
15084
  * cost, and not as unpriced.
15056
15085
  */
15057
- unmeteredRequests: count
15086
+ unmeteredRequests: count2
15058
15087
  });
15059
15088
  var totals = usageStatisticsTotalsSchema.shape;
15060
15089
  var usageStatisticsSessionSchema = external_exports.strictObject({
@@ -15065,8 +15094,8 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
15065
15094
  title: external_exports.string().min(1).max(200).optional(),
15066
15095
  /** Models the session used, most requests first. */
15067
15096
  models: external_exports.array(model).max(16),
15068
- firstAtMs: count,
15069
- lastAtMs: count,
15097
+ firstAtMs: count2,
15098
+ lastAtMs: count2,
15070
15099
  ...totals
15071
15100
  });
15072
15101
  var usageStatisticsResultSchema = external_exports.strictObject({
@@ -15084,7 +15113,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
15084
15113
  date: localDate.nullable()
15085
15114
  }),
15086
15115
  /** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
15087
- reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count, read: count }),
15116
+ reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count2, read: count2 }),
15088
15117
  /** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
15089
15118
  failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
15090
15119
  /** Every value seen in the range, ignoring the filters, to choose filters from. */
@@ -15104,8 +15133,8 @@ var usageStatisticsResultSchema = external_exports.strictObject({
15104
15133
  harness,
15105
15134
  model: model.nullable(),
15106
15135
  credits: external_exports.number().finite().min(0),
15107
- reportedRequests: count,
15108
- requests: count
15136
+ reportedRequests: count2,
15137
+ requests: count2
15109
15138
  })).max(4096).optional(),
15110
15139
  /** All filters applied. */
15111
15140
  totals: usageStatisticsTotalsSchema,
@@ -15122,7 +15151,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
15122
15151
  model: model.nullable(),
15123
15152
  ...totals,
15124
15153
  /** Requests priced by what the Harness recorded they cost, not by a price list. */
15125
- harnessPricedRequests: count
15154
+ harnessPricedRequests: count2
15126
15155
  })).max(4096),
15127
15156
  byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
15128
15157
  /**
@@ -15736,7 +15765,9 @@ var harnessModelCatalogSchema = external_exports.object({
15736
15765
  var harnessHistoryCapabilitiesSchema = external_exports.object({
15737
15766
  fork: external_exports.boolean(),
15738
15767
  forkAcrossCwd: external_exports.boolean(),
15739
- rollbackLastTurn: external_exports.boolean()
15768
+ rollbackLastTurn: external_exports.boolean(),
15769
+ /** Remove the selected checkpoint's Turn and every later Turn, without restoring files. */
15770
+ rollbackToCheckpoint: external_exports.boolean().optional()
15740
15771
  }).strict().refine((history) => history.fork || !history.forkAcrossCwd, {
15741
15772
  path: ["forkAcrossCwd"],
15742
15773
  message: "Cross-cwd Fork requires exact history Fork support"
@@ -15974,7 +16005,10 @@ var harnessPluginRouteSchema = external_exports.object({
15974
16005
  harnessId: harnessPluginIdSchema,
15975
16006
  model: harnessModelRefSchema.optional(),
15976
16007
  thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
15977
- permissionModeId: harnessPermissionModeIdSchema.optional()
16008
+ permissionModeId: harnessPermissionModeIdSchema.optional(),
16009
+ /** A draft prewarm create: stays unsubmitted until the user's first Turn.
16010
+ * Desktop forwards only the Model of a main-process prewarm to thread/start. */
16011
+ prewarm: external_exports.literal(true).optional()
15978
16012
  }).strict();
15979
16013
 
15980
16014
  // ../../shared-contracts/dist/harness-launch-settings.js
@@ -19896,9 +19930,9 @@ var Connection = class {
19896
19930
  return;
19897
19931
  }
19898
19932
  const responseBatch = isResponseBatch(batch);
19899
- const responseCount = responseBatch ? 0 : batch.reduce((count2, message) => count2 + (isNotificationMessage(message) ? 0 : 1), 0);
19933
+ const responseCount = responseBatch ? 0 : batch.reduce((count3, message) => count3 + (isNotificationMessage(message) ? 0 : 1), 0);
19900
19934
  let remaining = responseCount;
19901
- let remainingNotifications = batch.reduce((count2, message) => count2 + (isNotificationMessage(message) ? 1 : 0), 0);
19935
+ let remainingNotifications = batch.reduce((count3, message) => count3 + (isNotificationMessage(message) ? 1 : 0), 0);
19902
19936
  let responseSent = false;
19903
19937
  const responses = [];
19904
19938
  const sendResponsesIfReady = async () => {
@@ -23469,6 +23503,16 @@ var CursorAdapter = class {
23469
23503
  return result;
23470
23504
  }
23471
23505
  async open(input) {
23506
+ if (input.kind === "rollbackToCheckpoint") {
23507
+ return {
23508
+ ok: false,
23509
+ error: {
23510
+ code: "unsupported",
23511
+ message: "Checkpoint rollback is not supported by this Adapter",
23512
+ retryable: false
23513
+ }
23514
+ };
23515
+ }
23472
23516
  if (this.#closed)
23473
23517
  return rejected("invalidState", "Cursor adapter is closed");
23474
23518
  if (input.kind === "fork" || input.kind === "rollbackLastTurn") {