t3code-cli 0.14.2 → 0.15.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 (165) hide show
  1. package/README.md +36 -1
  2. package/dist/application.d.ts +2 -2
  3. package/dist/application.js +1 -1
  4. package/dist/auth.d.ts +1 -1
  5. package/dist/auth.js +1 -1
  6. package/dist/bin.js +935 -336
  7. package/dist/cli.d.ts +1 -1
  8. package/dist/cli.js +1 -1
  9. package/dist/client-runtime/authorization.d.ts +1 -1
  10. package/dist/client-runtime/authorization.js +1 -1
  11. package/dist/client-runtime/connection.d.ts +1 -1
  12. package/dist/client-runtime/connection.js +1 -1
  13. package/dist/client-runtime/environment.d.ts +3 -1
  14. package/dist/client-runtime/environment.js +1 -1
  15. package/dist/client-runtime/errors.js +1 -1
  16. package/dist/client-runtime/operations/projects.d.ts +1 -1
  17. package/dist/client-runtime/operations.d.ts +1 -1
  18. package/dist/client-runtime/platform.d.ts +1 -1
  19. package/dist/client-runtime/platform.js +1 -1
  20. package/dist/client-runtime/relay.d.ts +9 -2
  21. package/dist/client-runtime/relay.js +12 -2
  22. package/dist/client-runtime/rpc.d.ts +2 -2
  23. package/dist/client-runtime/rpc.js +2 -2
  24. package/dist/client-runtime/state/assets.d.ts +1 -1
  25. package/dist/client-runtime/state/assets.js +1 -1
  26. package/dist/client-runtime/state/auth.d.ts +1 -1
  27. package/dist/client-runtime/state/auth.js +1 -1
  28. package/dist/client-runtime/state/connections.js +1 -1
  29. package/dist/client-runtime/state/entities.d.ts +1 -1
  30. package/dist/client-runtime/state/filesystem.d.ts +1 -1
  31. package/dist/client-runtime/state/filesystem.js +1 -1
  32. package/dist/client-runtime/state/git.d.ts +2 -1
  33. package/dist/client-runtime/state/git.js +1 -1
  34. package/dist/client-runtime/state/models.d.ts +1 -1
  35. package/dist/client-runtime/state/models.js +1 -1
  36. package/dist/client-runtime/state/orchestration.d.ts +1 -1
  37. package/dist/client-runtime/state/orchestration.js +1 -1
  38. package/dist/client-runtime/state/presentation.d.ts +7 -1
  39. package/dist/client-runtime/state/presentation.js +1 -1
  40. package/dist/client-runtime/state/preview.d.ts +5 -2
  41. package/dist/client-runtime/state/preview.js +3 -2
  42. package/dist/client-runtime/state/project-grouping.d.ts +1 -1
  43. package/dist/client-runtime/state/project-grouping.js +1 -1
  44. package/dist/client-runtime/state/projects.d.ts +1 -1
  45. package/dist/client-runtime/state/pull-requests.d.ts +478 -0
  46. package/dist/client-runtime/state/pull-requests.js +172 -0
  47. package/dist/client-runtime/state/relay.d.ts +1 -1
  48. package/dist/client-runtime/state/relay.js +1 -1
  49. package/dist/client-runtime/state/review.d.ts +1 -1
  50. package/dist/client-runtime/state/review.js +1 -1
  51. package/dist/client-runtime/state/runtime.d.ts +2 -2
  52. package/dist/client-runtime/state/runtime.js +2 -2
  53. package/dist/client-runtime/state/server.d.ts +13 -1
  54. package/dist/client-runtime/state/server.js +1 -1
  55. package/dist/client-runtime/state/session.d.ts +13 -1
  56. package/dist/client-runtime/state/session.js +1 -1
  57. package/dist/client-runtime/state/shell.d.ts +7 -1
  58. package/dist/client-runtime/state/shell.js +1 -1
  59. package/dist/client-runtime/state/source-control.d.ts +1 -1
  60. package/dist/client-runtime/state/source-control.js +1 -1
  61. package/dist/client-runtime/state/subagentRuntime.d.ts +1 -1
  62. package/dist/client-runtime/state/terminal.d.ts +1 -1
  63. package/dist/client-runtime/state/terminal.js +1 -1
  64. package/dist/client-runtime/state/thread-search.d.ts +1 -1
  65. package/dist/client-runtime/state/thread-search.js +1 -1
  66. package/dist/client-runtime/state/thread-settled.d.ts +11 -8
  67. package/dist/client-runtime/state/thread-settled.js +2 -229
  68. package/dist/client-runtime/state/thread-sort.d.ts +1 -1
  69. package/dist/client-runtime/state/thread-sort.js +1 -1
  70. package/dist/client-runtime/state/threads.d.ts +1 -1
  71. package/dist/client-runtime/state/threads.js +1 -1
  72. package/dist/client-runtime/state/vcs.d.ts +1 -1
  73. package/dist/client-runtime/state/vcs.js +1 -1
  74. package/dist/config.d.ts +1 -1
  75. package/dist/config.js +1 -1
  76. package/dist/connection.d.ts +1 -1
  77. package/dist/connection.js +1 -1
  78. package/dist/contracts.d.ts +1 -1
  79. package/dist/contracts.js +1 -1
  80. package/dist/index.d.ts +1 -1
  81. package/dist/index.js +1 -1
  82. package/dist/node.d.ts +1 -1
  83. package/dist/node.js +1 -1
  84. package/dist/orchestration.d.ts +12 -6
  85. package/dist/orchestration.js +2 -2
  86. package/dist/preview.d.ts +1 -1
  87. package/dist/rpc.d.ts +4 -9
  88. package/dist/rpc.js +1 -1
  89. package/dist/runtime.d.ts +1 -1
  90. package/dist/shared/DrainableWorker.js +1 -1
  91. package/dist/shared/KeyedCoalescingWorker.js +1 -1
  92. package/dist/shared/Net.d.ts +6 -0
  93. package/dist/shared/Net.js +2 -1
  94. package/dist/shared/advertisedEndpoint.d.ts +1 -1
  95. package/dist/shared/advertisedEndpoint.js +1 -1
  96. package/dist/shared/agentAwareness.d.ts +1 -1
  97. package/dist/shared/backgroundActivitySettings.d.ts +1 -1
  98. package/dist/shared/connectAuth.d.ts +23 -4
  99. package/dist/shared/connectAuth.js +40 -7
  100. package/dist/shared/devHome.js +1 -1
  101. package/dist/shared/dpop.js +1 -1
  102. package/dist/shared/git.d.ts +1 -1
  103. package/dist/shared/httpObservability.js +1 -1
  104. package/dist/shared/httpReadiness.js +1 -1
  105. package/dist/shared/keybindings.d.ts +1 -1
  106. package/dist/shared/model.d.ts +1 -1
  107. package/dist/shared/oauthScope.js +1 -1
  108. package/dist/shared/observability.js +1 -1
  109. package/dist/shared/preview.js +1 -1
  110. package/dist/shared/previewViewport.d.ts +1 -1
  111. package/dist/shared/previewViewport.js +1 -1
  112. package/dist/shared/projectScripts.d.ts +1 -1
  113. package/dist/shared/relayAuth.js +1 -1
  114. package/dist/shared/relayClient.d.ts +1 -1
  115. package/dist/shared/relayClient.js +1 -1
  116. package/dist/shared/relayJwt.js +1 -1
  117. package/dist/shared/relayTracing.js +1 -1
  118. package/dist/shared/relayUrl.js +1 -1
  119. package/dist/shared/remote.js +1 -1
  120. package/dist/shared/schemaYaml.js +1 -1
  121. package/dist/shared/serverSettings.d.ts +1 -1
  122. package/dist/shared/serverSettings.js +1 -1
  123. package/dist/shared/shell.js +1 -1
  124. package/dist/shared/sourceControl.d.ts +1 -1
  125. package/dist/shared/t3ProjectFile.d.ts +1 -1
  126. package/dist/shared/t3ProjectFile.js +1 -1
  127. package/dist/shared/terminalLabels.d.ts +1 -1
  128. package/dist/shared/threadEnvMode.d.ts +1 -1
  129. package/dist/shared/toolActivity.d.ts +1 -1
  130. package/dist/shared/usageFormat.d.ts +16 -3
  131. package/dist/shared/usageFormat.js +92 -6
  132. package/dist/shared/usageMerge.d.ts +13 -2
  133. package/dist/shared/usageMerge.js +23 -0
  134. package/dist/shared.d.ts +3470 -378
  135. package/dist/shared.js +2434 -617
  136. package/dist/t3tools.d.ts +2 -2
  137. package/dist/t3tools.js +2 -2
  138. package/package.json +2 -2
  139. package/src/application/error.ts +2 -2
  140. package/src/application/index.ts +1 -0
  141. package/src/application/service.ts +38 -4
  142. package/src/application/thread-commands.ts +78 -0
  143. package/src/application/threads.ts +113 -16
  144. package/src/cli/app.ts +2 -0
  145. package/src/cli/ask-lifecycle.ts +331 -0
  146. package/src/cli/ask.ts +390 -0
  147. package/src/cli/error.ts +70 -0
  148. package/src/cli/format/thread.ts +26 -6
  149. package/src/cli/thread.ts +12 -0
  150. package/src/cli/threads/messages.ts +33 -3
  151. package/src/cli/threads/pin.ts +46 -0
  152. package/src/cli/threads/send.ts +5 -1
  153. package/src/cli/threads/settle.ts +46 -0
  154. package/src/cli/threads/snooze.ts +117 -0
  155. package/src/cli/threads/start.ts +6 -1
  156. package/src/cli/threads/unpin.ts +48 -0
  157. package/src/cli/threads/unsettle.ts +48 -0
  158. package/src/cli/threads/unsnooze.ts +48 -0
  159. package/src/connection/prepared.ts +12 -2
  160. package/src/orchestration/error.ts +10 -0
  161. package/src/orchestration/index.ts +1 -0
  162. package/src/orchestration/layer.ts +72 -0
  163. package/src/orchestration/service.ts +11 -3
  164. package/src/rpc/ws-group.ts +1 -0
  165. package/src/runtime/layer.ts +9 -4
package/dist/shared.js CHANGED
@@ -1876,7 +1876,7 @@ const emptyContext$1 = {
1876
1876
  * @category formatting
1877
1877
  * @since 2.0.0
1878
1878
  */
1879
- function format$1(input, options) {
1879
+ function format$2(input, options) {
1880
1880
  const space = options?.space ?? 0;
1881
1881
  const ancestors = /* @__PURE__ */ new WeakSet();
1882
1882
  const gap = !space ? "" : typeof space === "number" ? " ".repeat(space) : space;
@@ -1913,7 +1913,7 @@ function format$1(input, options) {
1913
1913
  if (ancestors.has(v)) return CIRCULAR;
1914
1914
  ancestors.add(v);
1915
1915
  let output;
1916
- if (symbolRedactable in v) output = format$1(getRedacted(v));
1916
+ if (symbolRedactable in v) output = format$2(getRedacted(v));
1917
1917
  else if (Symbol.iterator in v) output = `${v.constructor.name}(${recur(Array.from(v), d)})`;
1918
1918
  else {
1919
1919
  const keys = ownKeys(v);
@@ -2179,7 +2179,7 @@ const BaseProto = {
2179
2179
  return this.toJSON();
2180
2180
  },
2181
2181
  toString() {
2182
- return format$1(this.toJSON());
2182
+ return format$2(this.toJSON());
2183
2183
  }
2184
2184
  };
2185
2185
  /**
@@ -2250,7 +2250,7 @@ var Class$2 = class {
2250
2250
  * @since 2.0.0
2251
2251
  */
2252
2252
  toString() {
2253
- return format$1(this.toJSON());
2253
+ return format$2(this.toJSON());
2254
2254
  }
2255
2255
  };
2256
2256
  //#endregion
@@ -2390,7 +2390,7 @@ const PipeInspectableProto = {
2390
2390
  return { ...this };
2391
2391
  },
2392
2392
  toString() {
2393
- return format$1(this.toJSON(), {
2393
+ return format$2(this.toJSON(), {
2394
2394
  ignoreToString: true,
2395
2395
  space: 2
2396
2396
  });
@@ -2444,7 +2444,7 @@ var CauseImpl = class {
2444
2444
  };
2445
2445
  }
2446
2446
  toString() {
2447
- return `Cause(${format$1(this.reasons)})`;
2447
+ return `Cause(${format$2(this.reasons)})`;
2448
2448
  }
2449
2449
  [NodeInspectSymbol]() {
2450
2450
  return this.toJSON();
@@ -2487,7 +2487,7 @@ var ReasonBase = class {
2487
2487
  return pipeArguments(this, arguments);
2488
2488
  }
2489
2489
  toString() {
2490
- return format$1(this);
2490
+ return format$2(this);
2491
2491
  }
2492
2492
  [NodeInspectSymbol]() {
2493
2493
  return this.toString();
@@ -2503,7 +2503,7 @@ var Fail = class extends ReasonBase {
2503
2503
  this.error = error;
2504
2504
  }
2505
2505
  toString() {
2506
- return `Fail(${format$1(this.error)})`;
2506
+ return `Fail(${format$2(this.error)})`;
2507
2507
  }
2508
2508
  toJSON() {
2509
2509
  return {
@@ -2532,7 +2532,7 @@ var Die = class extends ReasonBase {
2532
2532
  this.defect = defect;
2533
2533
  }
2534
2534
  toString() {
2535
- return `Die(${format$1(this.defect)})`;
2535
+ return `Die(${format$2(this.defect)})`;
2536
2536
  }
2537
2537
  toJSON() {
2538
2538
  return {
@@ -2591,7 +2591,7 @@ const makeExit = (options) => {
2591
2591
  },
2592
2592
  ...makePrimitiveProto(options),
2593
2593
  toString() {
2594
- return `${options.op}(${format$1(this[args])})`;
2594
+ return `${options.op}(${format$2(this[args])})`;
2595
2595
  },
2596
2596
  toJSON() {
2597
2597
  return {
@@ -2982,7 +2982,7 @@ const SomeProto = /*#__PURE__*/ Object.defineProperty(/*#__PURE__*/ Object.assig
2982
2982
  return combine$3(hash(this._tag))(hash(this.value));
2983
2983
  },
2984
2984
  toString() {
2985
- return `some(${format$1(this.value)})`;
2985
+ return `some(${format$2(this.value)})`;
2986
2986
  },
2987
2987
  toJSON() {
2988
2988
  return {
@@ -3053,7 +3053,7 @@ const SuccessProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Com
3053
3053
  return combine$3(hash(this._tag))(hash(this.success));
3054
3054
  },
3055
3055
  toString() {
3056
- return `success(${format$1(this.success)})`;
3056
+ return `success(${format$2(this.success)})`;
3057
3057
  },
3058
3058
  toJSON() {
3059
3059
  return {
@@ -3073,7 +3073,7 @@ const FailureProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Com
3073
3073
  return combine$3(hash(this._tag))(hash(this.failure));
3074
3074
  },
3075
3075
  toString() {
3076
- return `failure(${format$1(this.failure)})`;
3076
+ return `failure(${format$2(this.failure)})`;
3077
3077
  },
3078
3078
  toJSON() {
3079
3079
  return {
@@ -4978,7 +4978,10 @@ const Reference = Service$1;
4978
4978
  const TypeId$66 = "~effect/time/Duration";
4979
4979
  const bigint0$2 = /*#__PURE__*/ BigInt(0);
4980
4980
  const bigint1 = /*#__PURE__*/ BigInt(1);
4981
+ const bigint24 = /*#__PURE__*/ BigInt(24);
4982
+ const bigint60 = /*#__PURE__*/ BigInt(60);
4981
4983
  const bigint1e3 = /*#__PURE__*/ BigInt(1e3);
4984
+ const bigint1e6 = /*#__PURE__*/ BigInt(1e6);
4982
4985
  const roundTiesAwayFromZero = (input) => BigInt(input < 0 ? Math.ceil(input - .5) : Math.floor(input + .5));
4983
4986
  const roundMillisToNanos = (millis) => roundTiesAwayFromZero(millis * 1e6);
4984
4987
  const parseNanos = (input, scale) => input.includes(".") ? roundTiesAwayFromZero(Number(input) * Number(scale)) : BigInt(input) * scale;
@@ -5065,6 +5068,23 @@ const fromInputUnsafe = (input) => {
5065
5068
  const invalid = (input) => {
5066
5069
  throw new Error(`Invalid Input: ${input}`);
5067
5070
  };
5071
+ /**
5072
+ * Decodes a `Input` value into a `Duration` safely, returning
5073
+ * `Option.none()` if decoding fails.
5074
+ *
5075
+ * **Example** (Safely decoding duration inputs)
5076
+ *
5077
+ * ```ts import.meta.vitest
5078
+ * import { Duration, Option } from "effect"
5079
+ *
5080
+ * Duration.fromInput(1000) // => Option.some(Duration.seconds(1))
5081
+ * Duration.fromInput("invalid" as any) // => Option.none()
5082
+ * ```
5083
+ *
5084
+ * @category constructors
5085
+ * @since 4.0.0
5086
+ */
5087
+ const fromInput$2 = /*#__PURE__*/ liftThrowable(fromInputUnsafe);
5068
5088
  const zeroDurationValue = {
5069
5089
  _tag: "Millis",
5070
5090
  millis: 0
@@ -5166,7 +5186,77 @@ const isDuration = (u) => hasProperty(u, TypeId$66);
5166
5186
  * @category predicates
5167
5187
  * @since 2.0.0
5168
5188
  */
5169
- const isFinite$2 = (self) => self.value._tag !== "Infinity" && self.value._tag !== "NegativeInfinity";
5189
+ const isFinite$3 = (self) => self.value._tag !== "Infinity" && self.value._tag !== "NegativeInfinity";
5190
+ /**
5191
+ * Checks whether a Duration is zero.
5192
+ *
5193
+ * **Example** (Checking for zero durations)
5194
+ *
5195
+ * ```ts import.meta.vitest
5196
+ * import { Duration } from "effect"
5197
+ *
5198
+ * Duration.isZero(Duration.zero) // => true
5199
+ * Duration.isZero(Duration.seconds(1)) // => false
5200
+ * ```
5201
+ *
5202
+ * @category predicates
5203
+ * @since 3.5.0
5204
+ */
5205
+ const isZero$1 = (self) => {
5206
+ switch (self.value._tag) {
5207
+ case "Millis": return self.value.millis === 0;
5208
+ case "Nanos": return self.value.nanos === bigint0$2;
5209
+ case "Infinity":
5210
+ case "NegativeInfinity": return false;
5211
+ }
5212
+ };
5213
+ /**
5214
+ * Returns `true` if the duration is negative (strictly less than zero).
5215
+ *
5216
+ * **Example** (Checking for negative durations)
5217
+ *
5218
+ * ```ts import.meta.vitest
5219
+ * import { Duration } from "effect"
5220
+ *
5221
+ * Duration.isNegative(Duration.seconds(-5)) // => true
5222
+ * Duration.isNegative(Duration.zero) // => false
5223
+ * Duration.isNegative(Duration.negativeInfinity) // => true
5224
+ * ```
5225
+ *
5226
+ * @category predicates
5227
+ * @since 4.0.0
5228
+ */
5229
+ const isNegative$1 = (self) => {
5230
+ switch (self.value._tag) {
5231
+ case "Millis": return self.value.millis < 0;
5232
+ case "Nanos": return self.value.nanos < bigint0$2;
5233
+ case "NegativeInfinity": return true;
5234
+ case "Infinity": return false;
5235
+ }
5236
+ };
5237
+ /**
5238
+ * Returns the absolute value of the duration.
5239
+ *
5240
+ * **Example** (Taking absolute duration values)
5241
+ *
5242
+ * ```ts import.meta.vitest
5243
+ * import { Duration } from "effect"
5244
+ *
5245
+ * Duration.abs(Duration.seconds(-5)) // => Duration.seconds(5)
5246
+ * Duration.abs(Duration.negativeInfinity) // => Duration.infinity
5247
+ * ```
5248
+ *
5249
+ * @category math
5250
+ * @since 4.0.0
5251
+ */
5252
+ const abs$1 = (self) => {
5253
+ switch (self.value._tag) {
5254
+ case "Infinity":
5255
+ case "NegativeInfinity": return infinity;
5256
+ case "Millis": return self.value.millis < 0 ? make$73(-self.value.millis) : self;
5257
+ case "Nanos": return self.value.nanos < bigint0$2 ? make$73(-self.value.nanos) : self;
5258
+ }
5259
+ };
5170
5260
  /**
5171
5261
  * A Duration representing zero time.
5172
5262
  *
@@ -5586,6 +5676,102 @@ const isLessThanOrEqualTo$1 = /*#__PURE__*/ isLessThanOrEqualTo$2(Order$3);
5586
5676
  * @since 2.0.0
5587
5677
  */
5588
5678
  const equals$1 = /*#__PURE__*/ dual(2, (self, that) => Equivalence$5(self, that));
5679
+ /**
5680
+ * Decomposes a `Duration` into normalized signed components.
5681
+ *
5682
+ * **Details**
5683
+ *
5684
+ * Finite durations are returned as `{ days, hours, minutes, seconds, millis,
5685
+ * nanos }`. Infinite durations return every component as `Infinity` or
5686
+ * `-Infinity`.
5687
+ *
5688
+ * **Example** (Decomposing durations into parts)
5689
+ *
5690
+ * ```ts import.meta.vitest
5691
+ * import { Duration } from "effect"
5692
+ *
5693
+ * // Create a complex duration by adding multiple parts
5694
+ * const duration = Duration.sum(
5695
+ * Duration.sum(
5696
+ * Duration.sum(Duration.days(1), Duration.hours(2)),
5697
+ * Duration.sum(Duration.minutes(30), Duration.seconds(45))
5698
+ * ),
5699
+ * Duration.millis(123)
5700
+ * )
5701
+ * Duration.parts(duration) // => ({ days: 1, hours: 2, minutes: 30, seconds: 45, millis: 123, nanos: 0 })
5702
+ *
5703
+ * const complex = Duration.sum(Duration.hours(25), Duration.minutes(90))
5704
+ * Duration.parts(complex) // => ({ days: 1, hours: 2, minutes: 30, seconds: 0, millis: 0, nanos: 0 })
5705
+ * ```
5706
+ *
5707
+ * @category converting
5708
+ * @since 3.8.0
5709
+ */
5710
+ const parts = (self) => {
5711
+ if (self.value._tag === "Infinity") return {
5712
+ days: Infinity,
5713
+ hours: Infinity,
5714
+ minutes: Infinity,
5715
+ seconds: Infinity,
5716
+ millis: Infinity,
5717
+ nanos: Infinity
5718
+ };
5719
+ if (self.value._tag === "NegativeInfinity") return {
5720
+ days: -Infinity,
5721
+ hours: -Infinity,
5722
+ minutes: -Infinity,
5723
+ seconds: -Infinity,
5724
+ millis: -Infinity,
5725
+ nanos: -Infinity
5726
+ };
5727
+ const n = toNanosUnsafe(self);
5728
+ const neg = n < bigint0$2;
5729
+ const a = neg ? -n : n;
5730
+ const ms = a / bigint1e6;
5731
+ const sec = ms / bigint1e3;
5732
+ const min = sec / bigint60;
5733
+ const hr = min / bigint60;
5734
+ const d = hr / bigint24;
5735
+ const sign = neg ? -1 : 1;
5736
+ return {
5737
+ days: sign * Number(d),
5738
+ hours: sign * Number(hr % bigint24),
5739
+ minutes: sign * Number(min % bigint60),
5740
+ seconds: sign * Number(sec % bigint60),
5741
+ millis: sign * Number(ms % bigint1e3),
5742
+ nanos: sign * Number(a % bigint1e6)
5743
+ };
5744
+ };
5745
+ /**
5746
+ * Converts a `Duration` to a human readable string.
5747
+ *
5748
+ * **Example** (Formatting durations)
5749
+ *
5750
+ * ```ts import.meta.vitest
5751
+ * import { Duration } from "effect"
5752
+ *
5753
+ * Duration.format(Duration.millis(1000)) // => "1s"
5754
+ * Duration.format(Duration.millis(1001)) // => "1s 1ms"
5755
+ * ```
5756
+ *
5757
+ * @category converting
5758
+ * @since 2.0.0
5759
+ */
5760
+ const format$1 = (self) => {
5761
+ if (self.value._tag === "Infinity") return "Infinity";
5762
+ if (self.value._tag === "NegativeInfinity") return "-Infinity";
5763
+ if (isZero$1(self)) return "0";
5764
+ if (isNegative$1(self)) return "-" + format$1(abs$1(self));
5765
+ const fragments = parts(self);
5766
+ const pieces = [];
5767
+ if (fragments.days !== 0) pieces.push(`${fragments.days}d`);
5768
+ if (fragments.hours !== 0) pieces.push(`${fragments.hours}h`);
5769
+ if (fragments.minutes !== 0) pieces.push(`${fragments.minutes}m`);
5770
+ if (fragments.seconds !== 0) pieces.push(`${fragments.seconds}s`);
5771
+ if (fragments.millis !== 0) pieces.push(`${fragments.millis}ms`);
5772
+ if (fragments.nanos !== 0) pieces.push(`${fragments.nanos}ns`);
5773
+ return pieces.join(" ");
5774
+ };
5589
5775
  //#endregion
5590
5776
  //#region node_modules/.pnpm/effect@4.0.0-beta.103_patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6/node_modules/effect/dist/internal/array.js
5591
5777
  /**
@@ -12743,6 +12929,8 @@ const make$69 = /*#__PURE__*/ liftThrowable(makeUnsafe$10);
12743
12929
  /** @internal */
12744
12930
  const now$1 = /*#__PURE__*/ map$9(currentTimeMillis, makeUtc);
12745
12931
  /** @internal */
12932
+ const nowAsDate$1 = /*#__PURE__*/ map$9(currentTimeMillis, (millis) => new Date(millis));
12933
+ /** @internal */
12746
12934
  const nowUnsafe$1 = () => makeUtc(Date.now());
12747
12935
  /** @internal */
12748
12936
  const toUtc$1 = (self) => makeUtc(self.epochMilliseconds);
@@ -19049,7 +19237,7 @@ const _equivalence = /*#__PURE__*/ makeEquivalence$1(equals$2);
19049
19237
  const ChunkProto = {
19050
19238
  [TypeId$60]: { _A: (_) => _ },
19051
19239
  toString() {
19052
- return `Chunk(${format$1(toReadonlyArray(this))})`;
19240
+ return `Chunk(${format$2(toReadonlyArray(this))})`;
19053
19241
  },
19054
19242
  toJSON() {
19055
19243
  return {
@@ -24338,7 +24526,7 @@ const MutableHashMapProto = {
24338
24526
  return this.backing[Symbol.iterator]();
24339
24527
  },
24340
24528
  toString() {
24341
- return `MutableHashMap(${format$1(Array.from(this))})`;
24529
+ return `MutableHashMap(${format$2(Array.from(this))})`;
24342
24530
  },
24343
24531
  toJSON() {
24344
24532
  return {
@@ -24639,7 +24827,7 @@ const get$7 = /*#__PURE__*/ fnUntraced(function* (self_) {
24639
24827
  const self = self_;
24640
24828
  const state = yield* getState(self);
24641
24829
  const scope$6 = yield* scope;
24642
- const isFinite = self.idleTimeToLive !== void 0 && isFinite$2(self.idleTimeToLive);
24830
+ const isFinite = self.idleTimeToLive !== void 0 && isFinite$3(self.idleTimeToLive);
24643
24831
  yield* addFinalizerExit(scope$6, () => {
24644
24832
  state.refCount--;
24645
24833
  if (state.refCount > 0) return void_$1;
@@ -27900,6 +28088,23 @@ const make$59 = make$69;
27900
28088
  */
27901
28089
  const now = now$1;
27902
28090
  /**
28091
+ * Gets the current time from the `Clock` service and returns it as a
28092
+ * JavaScript `Date`.
28093
+ *
28094
+ * **Example** (Getting the current Date)
28095
+ *
28096
+ * ```ts import.meta.vitest
28097
+ * import { DateTime, Effect } from "effect"
28098
+ * import { TestClock } from "effect/testing"
28099
+ *
28100
+ * await Effect.runPromise(Effect.map(DateTime.nowAsDate, (now) => now instanceof Date)) // => true
28101
+ * ```
28102
+ *
28103
+ * @category constructors
28104
+ * @since 3.14.0
28105
+ */
28106
+ const nowAsDate = nowAsDate$1;
28107
+ /**
27903
28108
  * Gets the current time using `Date.now`.
27904
28109
  *
27905
28110
  * **When to use**
@@ -30283,6 +30488,46 @@ const numberFromString = /*#__PURE__*/ new Transformation(/*#__PURE__*/ Number$3
30283
30488
  */
30284
30489
  const bigintFromString = /*#__PURE__*/ new Transformation(/*#__PURE__*/ BigInt$3(), /*#__PURE__*/ String$3());
30285
30490
  /**
30491
+ * Decodes a `string` into a `Duration` and encodes a `Duration` back to a
30492
+ * parseable `string`.
30493
+ *
30494
+ * **When to use**
30495
+ *
30496
+ * Use when you need a schema transformation to parse human-readable duration
30497
+ * strings from APIs, config, or user input.
30498
+ *
30499
+ * **Details**
30500
+ *
30501
+ * Decoding accepts any string that `Duration.fromInput` can parse, including
30502
+ * `"Infinity"` and `"-Infinity"`. Encoding returns `String(duration)`,
30503
+ * producing strings such as `"2000 millis"` or `"10 nanos"` that round-trip
30504
+ * through the parser.
30505
+ *
30506
+ * **Example** (Converting a string to a Duration)
30507
+ *
30508
+ * ```ts import.meta.vitest
30509
+ * import { Schema, SchemaTransformation } from "effect"
30510
+ *
30511
+ * const schema = Schema.String.pipe(
30512
+ * Schema.decodeTo(Schema.Duration, SchemaTransformation.durationFromString)
30513
+ * )
30514
+ * String(Schema.decodeSync(schema)("5 seconds")) // => "5000 millis"
30515
+ * ```
30516
+ *
30517
+ * @see {@link durationFromNanos}
30518
+ * @see {@link durationFromMillis}
30519
+ *
30520
+ * @category transforming
30521
+ * @since 4.0.0
30522
+ */
30523
+ const durationFromString = /*#__PURE__*/ transformOrFail({
30524
+ decode: (s) => match$5(fromInput$2(s), {
30525
+ onNone: () => fail$3(new InvalidValue$1({ message: "Expected a valid Duration string" })),
30526
+ onSome: succeed$4
30527
+ }),
30528
+ encode: (duration) => succeed$4(globalThis.String(duration))
30529
+ });
30530
+ /**
30286
30531
  * Decodes a `number` of milliseconds into a `Duration` and encodes a `Duration`
30287
30532
  * back to milliseconds.
30288
30533
  *
@@ -30326,9 +30571,9 @@ const decodeJsonError = (input) => {
30326
30571
  const encodeUnknownAsJson = (input) => {
30327
30572
  try {
30328
30573
  const json = formatJson(input);
30329
- return json === void 0 ? format$1(input) : JSON.parse(json);
30574
+ return json === void 0 ? format$2(input) : JSON.parse(json);
30330
30575
  } catch {
30331
- return format$1(input);
30576
+ return format$2(input);
30332
30577
  }
30333
30578
  };
30334
30579
  const encodeJsonError = (input, options, encodeDefect) => {
@@ -31100,7 +31345,7 @@ var Literal$1 = class extends Base {
31100
31345
  literal;
31101
31346
  constructor(literal, annotations, checks, encoding, context) {
31102
31347
  super(annotations, checks, encoding, context);
31103
- if (typeof literal === "number" && !globalThis.Number.isFinite(literal)) throw new Error(`A numeric literal must be finite, got ${format$1(literal)}`);
31348
+ if (typeof literal === "number" && !globalThis.Number.isFinite(literal)) throw new Error(`A numeric literal must be finite, got ${format$2(literal)}`);
31104
31349
  this.literal = literal;
31105
31350
  }
31106
31351
  /** @internal */
@@ -32297,7 +32542,7 @@ function makeFilter$1(filter, annotations, aborted = false) {
32297
32542
  return new Filter((input, ast, options) => normalizeFilterOutput(ast, filter(input, ast, options)), annotations, aborted);
32298
32543
  }
32299
32544
  /** @internal */
32300
- function isFinite$1(annotations) {
32545
+ function isFinite$2(annotations) {
32301
32546
  return makeFilter$1((n) => globalThis.Number.isFinite(n), {
32302
32547
  expected: "a finite number",
32303
32548
  representation: {
@@ -32314,7 +32559,7 @@ function isFinite$1(annotations) {
32314
32559
  });
32315
32560
  }
32316
32561
  /** @internal */
32317
- const finite = /*#__PURE__*/ appendChecks(number, [/*#__PURE__*/ isFinite$1()]);
32562
+ const finite = /*#__PURE__*/ appendChecks(number, [/*#__PURE__*/ isFinite$2()]);
32318
32563
  /**
32319
32564
  * Creates a {@link Filter} that validates strings by running `RegExp.test`.
32320
32565
  *
@@ -36555,7 +36800,7 @@ function isTrimmed(annotations) {
36555
36800
  function isPattern(regExp, annotations) {
36556
36801
  const source = regExp.source;
36557
36802
  const flags = regExp.flags;
36558
- const runtimeRegExp = flags === "" ? `new RegExp(${format$1(source)})` : `new RegExp(${format$1(source)}, ${format$1(flags)})`;
36803
+ const runtimeRegExp = flags === "" ? `new RegExp(${format$2(source)})` : `new RegExp(${format$2(source)}, ${format$2(flags)})`;
36559
36804
  return isPattern$1(regExp, {
36560
36805
  toCode: () => ({ runtime: `Schema.isPattern(${runtimeRegExp})` }),
36561
36806
  ...annotations
@@ -36569,6 +36814,25 @@ function isPattern(regExp, annotations) {
36569
36814
  */
36570
36815
  const Finite = /*#__PURE__*/ make$50(finite);
36571
36816
  /**
36817
+ * Validates that a number is finite (not `Infinity`, `-Infinity`, or `NaN`).
36818
+ *
36819
+ * **Details**
36820
+ *
36821
+ * JSON Schema:
36822
+ *
36823
+ * This check does not have a direct JSON Schema equivalent, but ensures the
36824
+ * number is valid and finite.
36825
+ *
36826
+ * Arbitrary:
36827
+ *
36828
+ * When generating test data with fast-check, this applies `noNaN: true` and
36829
+ * `noInfinity: true` constraints to ensure generated numbers are finite.
36830
+ *
36831
+ * @category validation
36832
+ * @since 4.0.0
36833
+ */
36834
+ const isFinite$1 = isFinite$2;
36835
+ /**
36572
36836
  * Creates a greater-than (`>`) check for any ordered type from an
36573
36837
  * `Order.Order` instance.
36574
36838
  *
@@ -36577,7 +36841,7 @@ const Finite = /*#__PURE__*/ make$50(finite);
36577
36841
  */
36578
36842
  function makeIsGreaterThan(options) {
36579
36843
  const gt = isGreaterThan$1(options.order);
36580
- const formatter = options.formatter ?? format$1;
36844
+ const formatter = options.formatter ?? format$2;
36581
36845
  return (exclusiveMinimum, annotations) => {
36582
36846
  return makeFilter((input) => gt(input, exclusiveMinimum), {
36583
36847
  expected: `a value greater than ${formatter(exclusiveMinimum)}`,
@@ -36600,7 +36864,7 @@ function makeIsGreaterThan(options) {
36600
36864
  */
36601
36865
  function makeIsGreaterThanOrEqualTo(options) {
36602
36866
  const gte = isGreaterThanOrEqualTo$1(options.order);
36603
- const formatter = options.formatter ?? format$1;
36867
+ const formatter = options.formatter ?? format$2;
36604
36868
  return (minimum, annotations) => {
36605
36869
  return makeFilter((input) => gte(input, minimum), {
36606
36870
  expected: `a value greater than or equal to ${formatter(minimum)}`,
@@ -36622,7 +36886,7 @@ function makeIsGreaterThanOrEqualTo(options) {
36622
36886
  */
36623
36887
  function makeIsLessThan(options) {
36624
36888
  const lt = isLessThan$1(options.order);
36625
- const formatter = options.formatter ?? format$1;
36889
+ const formatter = options.formatter ?? format$2;
36626
36890
  return (exclusiveMaximum, annotations) => {
36627
36891
  return makeFilter((input) => lt(input, exclusiveMaximum), {
36628
36892
  expected: `a value less than ${formatter(exclusiveMaximum)}`,
@@ -36645,7 +36909,7 @@ function makeIsLessThan(options) {
36645
36909
  */
36646
36910
  function makeIsLessThanOrEqualTo(options) {
36647
36911
  const lte = isLessThanOrEqualTo$2(options.order);
36648
- const formatter = options.formatter ?? format$1;
36912
+ const formatter = options.formatter ?? format$2;
36649
36913
  return (maximum, annotations) => {
36650
36914
  return makeFilter((input) => lte(input, maximum), {
36651
36915
  expected: `a value less than or equal to ${formatter(maximum)}`,
@@ -36670,7 +36934,7 @@ function makeIsBetween(deriveOptions) {
36670
36934
  const greaterThan = isGreaterThan$1(deriveOptions.order);
36671
36935
  const lessThanOrEqualTo = isLessThanOrEqualTo$2(deriveOptions.order);
36672
36936
  const lessThan = isLessThan$1(deriveOptions.order);
36673
- const formatter = deriveOptions.formatter ?? format$1;
36937
+ const formatter = deriveOptions.formatter ?? format$2;
36674
36938
  return (options, annotations) => {
36675
36939
  const gte = options.exclusiveMinimum ? greaterThan : greaterThanOrEqualTo;
36676
36940
  const lte = options.exclusiveMaximum ? lessThan : lessThanOrEqualTo;
@@ -36689,7 +36953,7 @@ function makeIsBetween(deriveOptions) {
36689
36953
  };
36690
36954
  }
36691
36955
  function encodeNumberPayload(number) {
36692
- if (!globalThis.Number.isFinite(number)) throw new globalThis.RangeError(`Expected a finite number, got ${format$1(number)}`);
36956
+ if (!globalThis.Number.isFinite(number)) throw new globalThis.RangeError(`Expected a finite number, got ${format$2(number)}`);
36693
36957
  return number;
36694
36958
  }
36695
36959
  /**
@@ -36718,7 +36982,7 @@ const isGreaterThan = /*#__PURE__*/ makeIsGreaterThan({
36718
36982
  payload: { exclusiveMinimum: encodeNumberPayload(exclusiveMinimum) }
36719
36983
  },
36720
36984
  toJsonSchema: () => ({ exclusiveMinimum }),
36721
- toCode: () => ({ runtime: `Schema.isGreaterThan(${format$1(exclusiveMinimum)})` })
36985
+ toCode: () => ({ runtime: `Schema.isGreaterThan(${format$2(exclusiveMinimum)})` })
36722
36986
  })
36723
36987
  });
36724
36988
  /**
@@ -36747,7 +37011,7 @@ const isGreaterThanOrEqualTo = /*#__PURE__*/ makeIsGreaterThanOrEqualTo({
36747
37011
  payload: { minimum: encodeNumberPayload(minimum) }
36748
37012
  },
36749
37013
  toJsonSchema: () => ({ minimum }),
36750
- toCode: () => ({ runtime: `Schema.isGreaterThanOrEqualTo(${format$1(minimum)})` })
37014
+ toCode: () => ({ runtime: `Schema.isGreaterThanOrEqualTo(${format$2(minimum)})` })
36751
37015
  })
36752
37016
  });
36753
37017
  /**
@@ -36776,7 +37040,7 @@ const isLessThan = /*#__PURE__*/ makeIsLessThan({
36776
37040
  payload: { exclusiveMaximum: encodeNumberPayload(exclusiveMaximum) }
36777
37041
  },
36778
37042
  toJsonSchema: () => ({ exclusiveMaximum }),
36779
- toCode: () => ({ runtime: `Schema.isLessThan(${format$1(exclusiveMaximum)})` })
37043
+ toCode: () => ({ runtime: `Schema.isLessThan(${format$2(exclusiveMaximum)})` })
36780
37044
  })
36781
37045
  });
36782
37046
  /**
@@ -36805,7 +37069,7 @@ const isLessThanOrEqualTo = /*#__PURE__*/ makeIsLessThanOrEqualTo({
36805
37069
  payload: { maximum: encodeNumberPayload(maximum) }
36806
37070
  },
36807
37071
  toJsonSchema: () => ({ maximum }),
36808
- toCode: () => ({ runtime: `Schema.isLessThanOrEqualTo(${format$1(maximum)})` })
37072
+ toCode: () => ({ runtime: `Schema.isLessThanOrEqualTo(${format$2(maximum)})` })
36809
37073
  })
36810
37074
  });
36811
37075
  /**
@@ -36848,7 +37112,7 @@ const isBetween = /*#__PURE__*/ makeIsBetween({
36848
37112
  [exclusiveMinimum ? "exclusiveMinimum" : "minimum"]: options.minimum,
36849
37113
  [exclusiveMaximum ? "exclusiveMaximum" : "maximum"]: options.maximum
36850
37114
  }),
36851
- toCode: () => ({ runtime: `Schema.isBetween({ minimum: ${format$1(options.minimum)}, maximum: ${format$1(options.maximum)}, exclusiveMinimum: ${format$1(exclusiveMinimum)}, exclusiveMaximum: ${format$1(exclusiveMaximum)} })` })
37115
+ toCode: () => ({ runtime: `Schema.isBetween({ minimum: ${format$2(options.minimum)}, maximum: ${format$2(options.maximum)}, exclusiveMinimum: ${format$2(exclusiveMinimum)}, exclusiveMaximum: ${format$2(exclusiveMaximum)} })` })
36852
37116
  };
36853
37117
  }
36854
37118
  });
@@ -37154,7 +37418,7 @@ function Redacted(value, options) {
37154
37418
  payload: normalizedOptions ?? null
37155
37419
  },
37156
37420
  toCode: ({ typeParameters }) => ({
37157
- runtime: normalizedOptions !== void 0 ? `Schema.Redacted(${typeParameters[0].runtime}, ${format$1(normalizedOptions)})` : `Schema.Redacted(${typeParameters[0].runtime})`,
37421
+ runtime: normalizedOptions !== void 0 ? `Schema.Redacted(${typeParameters[0].runtime}, ${format$2(normalizedOptions)})` : `Schema.Redacted(${typeParameters[0].runtime})`,
37158
37422
  Type: `Redacted.Redacted<${typeParameters[0].Type}>`,
37159
37423
  importDeclarations: [`import * as Redacted from "effect/Redacted"`]
37160
37424
  }),
@@ -37590,6 +37854,22 @@ const Duration = /*#__PURE__*/ declare(isDuration, {
37590
37854
  toEquivalence: () => Equivalence$5
37591
37855
  });
37592
37856
  /**
37857
+ * Schema that parses a string into a `Duration`.
37858
+ *
37859
+ * **Details**
37860
+ *
37861
+ * Decoding:
37862
+ * - A `string` is decoded as a `Duration`, accepting any format that
37863
+ * `Duration.fromInput` can parse.
37864
+ *
37865
+ * Encoding:
37866
+ * - A `Duration` is encoded as a parseable `string`.
37867
+ *
37868
+ * @category schemas
37869
+ * @since 4.0.0
37870
+ */
37871
+ const DurationFromString = /*#__PURE__*/ (/* @__PURE__ */ String$1.annotate({ expected: "a string that will be decoded as a Duration" })).pipe(/*#__PURE__*/ decodeTo(Duration, durationFromString));
37872
+ /**
37593
37873
  * Schema that decodes a number into a `Duration`, treating the number as
37594
37874
  * milliseconds.
37595
37875
  *
@@ -37963,7 +38243,7 @@ function isStruct(schema) {
37963
38243
  const Class = (identifier) => (schema, annotations) => {
37964
38244
  const struct = isStruct(schema) ? schema : Struct(schema);
37965
38245
  return makeClass(Class$1, identifier, struct, annotations, (identifier) => ({ toString() {
37966
- return `${identifier}(${format$1({ ...this })})`;
38246
+ return `${identifier}(${format$2({ ...this })})`;
37967
38247
  } }));
37968
38248
  };
37969
38249
  /**
@@ -51006,7 +51286,7 @@ const string$2 = /*#__PURE__*/ makePrimitive("String", (value) => succeed$4(valu
51006
51286
  */
51007
51287
  const choice$2 = (choices) => {
51008
51288
  const choiceMap = new Map(choices);
51009
- const validChoices = choices.map(([key]) => format$1(key)).join(" | ");
51289
+ const validChoices = choices.map(([key]) => format$2(key)).join(" | ");
51010
51290
  const primitive = makePrimitive("Choice", (value) => {
51011
51291
  if (choiceMap.has(value)) return succeed$4(choiceMap.get(value));
51012
51292
  return fail$3(validChoices);
@@ -56516,7 +56796,7 @@ var Proto$11 = class {
56516
56796
  return this.toJSON();
56517
56797
  }
56518
56798
  toString() {
56519
- return format$1(this, { ignoreToString: true });
56799
+ return format$2(this, { ignoreToString: true });
56520
56800
  }
56521
56801
  };
56522
56802
  /**
@@ -61170,12 +61450,6 @@ function resolveThreadId(input) {
61170
61450
  if (fromEnv !== void 0 && fromEnv.length > 0) return fromEnv;
61171
61451
  }
61172
61452
  //#endregion
61173
- //#region src/auth/service.ts
61174
- var T3Auth = class extends Service$1()("t3cli/T3Auth") {};
61175
- //#endregion
61176
- //#region src/cli/env/flag.ts
61177
- const cliEnvironmentSetting = setting("environment")({ flag: string("environment").pipe(withDescription("Auth environment name for this command"), optional) });
61178
- //#endregion
61179
61453
  //#region upstream-t3code/packages/contracts/src/baseSchemas.ts
61180
61454
  const TrimmedString = String$1.pipe(decodeTo(String$1, transformOrFail({
61181
61455
  decode: (value) => succeed$4(value.trim()),
@@ -61946,6 +62220,9 @@ const ServerSelfUpdateCapability = Literals([
61946
62220
  const ExecutionEnvironmentCapabilities = Struct({
61947
62221
  repositoryIdentity: Boolean$2.pipe(withDecodingDefault(succeed$4(false))),
61948
62222
  connectionProbe: optionalKey(Boolean$2),
62223
+ /** Server exposes the pull-request list, detail, activity, diff, and mutation APIs. Absent on
62224
+ servers from before the pull-request workspace shipped, so clients must not probe them. */
62225
+ pullRequests: optionalKey(Boolean$2),
61949
62226
  /** Server understands thread.settle / thread.unsettle commands. Absent on
61950
62227
  pre-settlement servers, so clients treat missing as unsupported and
61951
62228
  never send the commands under version skew. */
@@ -61968,7 +62245,13 @@ const ExecutionEnvironmentCapabilities = Struct({
61968
62245
  serverSelfUpdate: optionalKey(ServerSelfUpdateCapability),
61969
62246
  /** Server can stream self-update progress before acknowledging the
61970
62247
  restart. Clients fall back to server.updateServer when absent. */
61971
- serverSelfUpdateProgress: optionalKey(Boolean$2)
62248
+ serverSelfUpdateProgress: optionalKey(Boolean$2),
62249
+ /** Agent-activity publishes (push notifications and Live Activities)
62250
+ currently leave this environment: the publish opt-in is enabled and the
62251
+ relay link credentials exist. Clients skip seeding a Live Activity when
62252
+ this is false — no update would ever repaint it. Absent on older
62253
+ servers, which may still publish, so only an explicit false skips. */
62254
+ agentActivityPublishing: optionalKey(Boolean$2)
61972
62255
  });
61973
62256
  const ExecutionEnvironmentDescriptor = Struct({
61974
62257
  environmentId: EnvironmentId,
@@ -64022,6 +64305,1263 @@ var OrchestrationSearchThreadsError = class extends TaggedErrorClass()("Orchestr
64022
64305
  cause: optional$2(Defect())
64023
64306
  }) {};
64024
64307
  //#endregion
64308
+ //#region upstream-t3code/packages/contracts/src/vcs.ts
64309
+ const VcsDriverKind = Literals([
64310
+ "git",
64311
+ "jj",
64312
+ "unknown"
64313
+ ]);
64314
+ const VcsFreshnessSource = Literals([
64315
+ "live-local",
64316
+ "cached-local",
64317
+ "cached-remote",
64318
+ "explicit-remote"
64319
+ ]);
64320
+ const VcsFreshness = Struct({
64321
+ source: VcsFreshnessSource,
64322
+ observedAt: DateTimeUtc,
64323
+ expiresAt: Option(DateTimeUtc)
64324
+ });
64325
+ const VcsDriverCapabilities = Struct({
64326
+ kind: VcsDriverKind,
64327
+ supportsWorktrees: Boolean$2,
64328
+ supportsBookmarks: Boolean$2,
64329
+ supportsAtomicSnapshot: Boolean$2,
64330
+ supportsPushDefaultRemote: Boolean$2,
64331
+ ignoreClassifier: Literals(["native", "git-compatible-fallback"])
64332
+ });
64333
+ const VcsRepositoryIdentity = Struct({
64334
+ kind: VcsDriverKind,
64335
+ rootPath: TrimmedNonEmptyString,
64336
+ metadataPath: NullOr(TrimmedNonEmptyString),
64337
+ freshness: VcsFreshness
64338
+ });
64339
+ const VcsListWorkspaceFilesResult = Struct({
64340
+ paths: ArraySchema(TrimmedNonEmptyString),
64341
+ truncated: Boolean$2,
64342
+ freshness: VcsFreshness
64343
+ });
64344
+ const VcsRemote = Struct({
64345
+ name: TrimmedNonEmptyString,
64346
+ url: TrimmedNonEmptyString,
64347
+ pushUrl: Option(TrimmedNonEmptyString),
64348
+ isPrimary: Boolean$2
64349
+ });
64350
+ const VcsListRemotesResult = Struct({
64351
+ remotes: ArraySchema(VcsRemote),
64352
+ freshness: VcsFreshness
64353
+ });
64354
+ const VcsProcessExitFailureKind = Literals([
64355
+ "authentication",
64356
+ "not-found",
64357
+ "rate-limited",
64358
+ "command-failed"
64359
+ ]);
64360
+ var VcsProcessSpawnError = class VcsProcessSpawnError extends TaggedErrorClass()("VcsProcessSpawnError", {
64361
+ operation: String$1,
64362
+ command: String$1,
64363
+ cwd: String$1,
64364
+ argumentCount: optional$2(NonNegativeInt),
64365
+ cause: Defect()
64366
+ }) {
64367
+ get message() {
64368
+ return `VCS process failed to spawn in ${this.operation}: ${this.command} (${this.cwd})`;
64369
+ }
64370
+ static fromProcessSpawnError(context, error) {
64371
+ return new VcsProcessSpawnError({
64372
+ ...context,
64373
+ cause: error.cause
64374
+ });
64375
+ }
64376
+ };
64377
+ var VcsProcessExitError = class VcsProcessExitError extends TaggedErrorClass()("VcsProcessExitError", {
64378
+ operation: String$1,
64379
+ command: String$1,
64380
+ cwd: String$1,
64381
+ argumentCount: optional$2(NonNegativeInt),
64382
+ exitCode: Number$1,
64383
+ detail: String$1,
64384
+ failureKind: optional$2(VcsProcessExitFailureKind),
64385
+ stderrLength: optional$2(NonNegativeInt),
64386
+ stderrTruncated: optional$2(Boolean$2)
64387
+ }) {
64388
+ get message() {
64389
+ return `VCS process failed in ${this.operation}: ${this.command} (${this.cwd}) exited with ${this.exitCode} - ${this.detail}`;
64390
+ }
64391
+ static fromProcessExit(context, error, failureKind) {
64392
+ const detail = failureKind === "authentication" ? "Authentication failed." : failureKind === "rate-limited" ? "API rate limit exceeded." : failureKind === "not-found" ? context.command === "glab" ? "Merge request not found." : context.command === "gh" || context.command === "az" ? "Pull request not found." : "VCS resource not found." : "Process exited with a non-zero status.";
64393
+ return new VcsProcessExitError({
64394
+ ...context,
64395
+ exitCode: error.exitCode,
64396
+ detail,
64397
+ failureKind,
64398
+ stderrLength: error.stderr.length,
64399
+ stderrTruncated: error.stderrTruncated
64400
+ });
64401
+ }
64402
+ };
64403
+ var VcsProcessTimeoutError = class VcsProcessTimeoutError extends TaggedErrorClass()("VcsProcessTimeoutError", {
64404
+ operation: String$1,
64405
+ command: String$1,
64406
+ cwd: String$1,
64407
+ argumentCount: optional$2(NonNegativeInt),
64408
+ timeoutMs: Number$1
64409
+ }) {
64410
+ get message() {
64411
+ return `VCS process timed out in ${this.operation}: ${this.command} (${this.cwd}) after ${this.timeoutMs}ms`;
64412
+ }
64413
+ static fromProcessTimeoutError(context, error) {
64414
+ return new VcsProcessTimeoutError({
64415
+ ...context,
64416
+ timeoutMs: error.timeoutMs
64417
+ });
64418
+ }
64419
+ };
64420
+ const VcsProcessBoundaryErrorFields = {
64421
+ operation: String$1,
64422
+ command: String$1,
64423
+ cwd: String$1,
64424
+ argumentCount: optional$2(NonNegativeInt)
64425
+ };
64426
+ var VcsProcessStdinWriteError = class extends TaggedErrorClass()("VcsProcessStdinWriteError", {
64427
+ ...VcsProcessBoundaryErrorFields,
64428
+ stdinBytes: NonNegativeInt,
64429
+ cause: Defect()
64430
+ }) {
64431
+ get message() {
64432
+ return `VCS process failed to write ${this.stdinBytes} bytes to stdin in ${this.operation}: ${this.command} (${this.cwd})`;
64433
+ }
64434
+ };
64435
+ var VcsProcessOutputReadError = class extends TaggedErrorClass()("VcsProcessOutputReadError", {
64436
+ ...VcsProcessBoundaryErrorFields,
64437
+ stream: Literals([
64438
+ "stdout",
64439
+ "stderr",
64440
+ "exitCode"
64441
+ ]),
64442
+ cause: Defect()
64443
+ }) {
64444
+ get message() {
64445
+ return `VCS process failed to read ${this.stream} in ${this.operation}: ${this.command} (${this.cwd})`;
64446
+ }
64447
+ };
64448
+ var VcsProcessOutputLimitError = class extends TaggedErrorClass()("VcsProcessOutputLimitError", {
64449
+ ...VcsProcessBoundaryErrorFields,
64450
+ stream: Literals(["stdout", "stderr"]),
64451
+ maxBytes: NonNegativeInt,
64452
+ observedBytes: NonNegativeInt
64453
+ }) {
64454
+ get message() {
64455
+ return `VCS process ${this.stream} produced ${this.observedBytes} bytes in ${this.operation}: ${this.command} (${this.cwd}), exceeding the ${this.maxBytes} byte limit`;
64456
+ }
64457
+ };
64458
+ var VcsProcessMissingExitCodeError = class extends TaggedErrorClass()("VcsProcessMissingExitCodeError", VcsProcessBoundaryErrorFields) {
64459
+ get message() {
64460
+ return `VCS process completed without an exit code in ${this.operation}: ${this.command} (${this.cwd})`;
64461
+ }
64462
+ };
64463
+ const VcsOutputDecodeError = Union([
64464
+ VcsProcessStdinWriteError,
64465
+ VcsProcessOutputReadError,
64466
+ VcsProcessOutputLimitError,
64467
+ VcsProcessMissingExitCodeError
64468
+ ]);
64469
+ var VcsRepositoryDetectionError = class extends TaggedErrorClass()("VcsRepositoryDetectionError", {
64470
+ operation: String$1,
64471
+ cwd: String$1,
64472
+ detail: String$1,
64473
+ cause: optional$2(Defect())
64474
+ }) {
64475
+ get message() {
64476
+ return `VCS repository detection failed in ${this.operation}: ${this.cwd} - ${this.detail}`;
64477
+ }
64478
+ };
64479
+ var VcsUnsupportedOperationError = class extends TaggedErrorClass()("VcsUnsupportedOperationError", {
64480
+ operation: String$1,
64481
+ kind: VcsDriverKind,
64482
+ detail: String$1
64483
+ }) {
64484
+ get message() {
64485
+ return `VCS operation is unsupported for ${this.kind} in ${this.operation}: ${this.detail}`;
64486
+ }
64487
+ };
64488
+ const VcsError = Union([
64489
+ VcsProcessSpawnError,
64490
+ VcsProcessExitError,
64491
+ VcsProcessTimeoutError,
64492
+ VcsProcessStdinWriteError,
64493
+ VcsProcessOutputReadError,
64494
+ VcsProcessOutputLimitError,
64495
+ VcsProcessMissingExitCodeError,
64496
+ VcsRepositoryDetectionError,
64497
+ VcsUnsupportedOperationError
64498
+ ]);
64499
+ //#endregion
64500
+ //#region upstream-t3code/packages/contracts/src/sourceControl.ts
64501
+ const SourceControlProviderKind = Literals([
64502
+ "github",
64503
+ "gitlab",
64504
+ "azure-devops",
64505
+ "bitbucket",
64506
+ "unknown"
64507
+ ]);
64508
+ const SourceControlProviderInfo = Struct({
64509
+ kind: SourceControlProviderKind,
64510
+ name: TrimmedNonEmptyString,
64511
+ baseUrl: String$1
64512
+ });
64513
+ const ChangeRequestState = Literals([
64514
+ "open",
64515
+ "closed",
64516
+ "merged"
64517
+ ]);
64518
+ const ChangeRequest = Struct({
64519
+ provider: SourceControlProviderKind,
64520
+ number: PositiveInt,
64521
+ title: TrimmedNonEmptyString,
64522
+ url: String$1,
64523
+ baseRefName: TrimmedNonEmptyString,
64524
+ headRefName: TrimmedNonEmptyString,
64525
+ state: ChangeRequestState,
64526
+ updatedAt: Option(DateTimeUtc),
64527
+ isCrossRepository: optional$2(Boolean$2),
64528
+ headRepositoryNameWithOwner: optional$2(NullOr(TrimmedNonEmptyString)),
64529
+ headRepositoryOwnerLogin: optional$2(NullOr(TrimmedNonEmptyString))
64530
+ });
64531
+ const SourceControlRepositoryCloneUrls = Struct({
64532
+ nameWithOwner: TrimmedNonEmptyString,
64533
+ url: TrimmedNonEmptyString,
64534
+ sshUrl: TrimmedNonEmptyString
64535
+ });
64536
+ const SourceControlRepositoryVisibility = Literals(["private", "public"]);
64537
+ const SourceControlCloneProtocol = Literals([
64538
+ "auto",
64539
+ "ssh",
64540
+ "https"
64541
+ ]);
64542
+ const SourceControlRepositoryInfo = Struct({
64543
+ provider: SourceControlProviderKind,
64544
+ nameWithOwner: TrimmedNonEmptyString,
64545
+ url: TrimmedNonEmptyString,
64546
+ sshUrl: TrimmedNonEmptyString
64547
+ });
64548
+ const SourceControlRepositoryLookupInput = Struct({
64549
+ provider: SourceControlProviderKind,
64550
+ repository: TrimmedNonEmptyString,
64551
+ cwd: optional$2(TrimmedNonEmptyString)
64552
+ });
64553
+ const SourceControlCloneRepositoryInput = Struct({
64554
+ provider: optional$2(SourceControlProviderKind),
64555
+ repository: optional$2(TrimmedNonEmptyString),
64556
+ remoteUrl: optional$2(TrimmedNonEmptyString),
64557
+ destinationPath: TrimmedNonEmptyString,
64558
+ protocol: optional$2(SourceControlCloneProtocol)
64559
+ });
64560
+ const SourceControlCloneRepositoryResult = Struct({
64561
+ cwd: TrimmedNonEmptyString,
64562
+ remoteUrl: TrimmedNonEmptyString,
64563
+ repository: NullOr(SourceControlRepositoryInfo)
64564
+ });
64565
+ const SourceControlPublishRepositoryInput = Struct({
64566
+ cwd: TrimmedNonEmptyString,
64567
+ provider: SourceControlProviderKind,
64568
+ repository: TrimmedNonEmptyString,
64569
+ visibility: SourceControlRepositoryVisibility,
64570
+ remoteName: optional$2(TrimmedNonEmptyString),
64571
+ protocol: optional$2(SourceControlCloneProtocol)
64572
+ });
64573
+ const SourceControlPublishStatus = Literals(["pushed", "remote_added"]);
64574
+ const SourceControlPublishRepositoryResult = Struct({
64575
+ repository: SourceControlRepositoryInfo,
64576
+ remoteName: TrimmedNonEmptyString,
64577
+ remoteUrl: TrimmedNonEmptyString,
64578
+ branch: TrimmedNonEmptyString,
64579
+ upstreamBranch: optional$2(TrimmedNonEmptyString),
64580
+ status: SourceControlPublishStatus
64581
+ });
64582
+ const SourceControlDiscoveryStatus = Literals(["available", "missing"]);
64583
+ const SourceControlProviderAuthStatus = Literals([
64584
+ "authenticated",
64585
+ "unauthenticated",
64586
+ "unknown"
64587
+ ]);
64588
+ const SourceControlProviderAuth = Struct({
64589
+ status: SourceControlProviderAuthStatus,
64590
+ account: Option(TrimmedNonEmptyString),
64591
+ host: Option(TrimmedNonEmptyString),
64592
+ detail: Option(TrimmedNonEmptyString)
64593
+ });
64594
+ const SourceControlDiscoverySharedFields = {
64595
+ label: TrimmedNonEmptyString,
64596
+ executable: optional$2(TrimmedNonEmptyString),
64597
+ status: SourceControlDiscoveryStatus,
64598
+ version: Option(TrimmedNonEmptyString),
64599
+ installHint: TrimmedNonEmptyString,
64600
+ detail: Option(TrimmedNonEmptyString)
64601
+ };
64602
+ const VcsDiscoveryItem = Struct({
64603
+ kind: VcsDriverKind,
64604
+ implemented: Boolean$2,
64605
+ ...SourceControlDiscoverySharedFields
64606
+ });
64607
+ const SourceControlProviderDiscoveryItem = Struct({
64608
+ kind: SourceControlProviderKind,
64609
+ ...SourceControlDiscoverySharedFields,
64610
+ auth: SourceControlProviderAuth
64611
+ });
64612
+ const SourceControlDiscoveryResult = Struct({
64613
+ versionControlSystems: ArraySchema(VcsDiscoveryItem),
64614
+ sourceControlProviders: ArraySchema(SourceControlProviderDiscoveryItem)
64615
+ });
64616
+ var SourceControlProviderError = class extends TaggedErrorClass()("SourceControlProviderError", {
64617
+ provider: SourceControlProviderKind,
64618
+ operation: String$1,
64619
+ cwd: String$1,
64620
+ command: optional$2(String$1),
64621
+ repository: optional$2(String$1),
64622
+ reference: optional$2(String$1),
64623
+ detail: String$1,
64624
+ cause: optional$2(Defect())
64625
+ }) {
64626
+ get message() {
64627
+ return `Source control provider ${this.provider} failed in ${this.operation}: ${this.detail}`;
64628
+ }
64629
+ };
64630
+ var SourceControlRepositoryError = class extends TaggedErrorClass()("SourceControlRepositoryError", {
64631
+ provider: SourceControlProviderKind,
64632
+ operation: String$1,
64633
+ detail: String$1,
64634
+ cause: optional$2(Defect())
64635
+ }) {
64636
+ get message() {
64637
+ return `Source control repository operation ${this.operation} failed for ${this.provider}: ${this.detail}`;
64638
+ }
64639
+ };
64640
+ //#endregion
64641
+ //#region upstream-t3code/packages/contracts/src/pullRequest.ts
64642
+ const PullRequestInvolvement = Literals([
64643
+ "all",
64644
+ "reviewing",
64645
+ "authored"
64646
+ ]);
64647
+ const PullRequestState = Literals([
64648
+ "open",
64649
+ "closed",
64650
+ "merged"
64651
+ ]);
64652
+ /**
64653
+ * What a listing asks for, which is the three states a change request can be in plus the option
64654
+ * to span them. Separate from `PullRequestState` because a change request is never "all" — only
64655
+ * a request for one can be.
64656
+ */
64657
+ const PullRequestListState = Literals([
64658
+ "all",
64659
+ "open",
64660
+ "closed",
64661
+ "merged"
64662
+ ]);
64663
+ /** Where a review stands overall, as a host that summarises its reviews reports it. */
64664
+ const PullRequestReviewDecision = Literals([
64665
+ "approved",
64666
+ "changes-requested",
64667
+ "review-required"
64668
+ ]);
64669
+ /** One qualifier's value, bounded because it is written into a host's own search query. */
64670
+ const PullRequestQualifierValue = TrimmedNonEmptyString.check(isMaxLength(200));
64671
+ const PullRequestQualifierValues = ArraySchema(PullRequestQualifierValue).check(isMaxLength(10));
64672
+ /**
64673
+ * Narrowings beyond state and involvement, each absent by default — an absent field filters
64674
+ * nothing, which is what every listing did before there were any. Optional as a whole so a page
64675
+ * and a server of different ages still speak to each other.
64676
+ *
64677
+ * `checks` is host-side only: no row carries its own check state, so a host that cannot match it
64678
+ * answers unnarrowed rather than the page pretending to know.
64679
+ */
64680
+ const PullRequestListFilters = Struct({
64681
+ draft: optional$2(Literals(["only", "hide"])),
64682
+ review: optional$2(Literals([
64683
+ "approved",
64684
+ "changes-requested",
64685
+ "review-required",
64686
+ "none"
64687
+ ])),
64688
+ checks: optional$2(Literals(["passing", "failing"])),
64689
+ /**
64690
+ * Labels as GitHub's own search reads them: each group is one `label:` qualifier, a row must
64691
+ * satisfy every group, and a group holding several names is satisfied by any one of them —
64692
+ * `label:size:S,size:XS` finds either size. Typed rather than picked, since a project's labels
64693
+ * are its own and no menu can list them. Bounded because each becomes a host search qualifier.
64694
+ */
64695
+ labels: optional$2(ArraySchema(PullRequestQualifierValues).check(isMaxLength(10))),
64696
+ excludedLabels: optional$2(PullRequestQualifierValues),
64697
+ /** One login, as `author:` names it. */
64698
+ author: optional$2(PullRequestQualifierValue)
64699
+ });
64700
+ /** The one-glyph summary of a change request's checks, as its list row wears it. */
64701
+ const PullRequestChecksState = Literals([
64702
+ "passing",
64703
+ "failing",
64704
+ "pending"
64705
+ ]);
64706
+ const PullRequestMergeability = Literals([
64707
+ "mergeable",
64708
+ "conflicting",
64709
+ "unknown"
64710
+ ]);
64711
+ const PullRequestMergeMethod = Literals([
64712
+ "merge",
64713
+ "squash",
64714
+ "rebase"
64715
+ ]);
64716
+ const PullRequestAction = Literals([
64717
+ "merge",
64718
+ "ready",
64719
+ "draft",
64720
+ "close",
64721
+ "reopen",
64722
+ "update-branch",
64723
+ "enable-auto-merge",
64724
+ "disable-auto-merge"
64725
+ ]);
64726
+ /**
64727
+ * How a stale branch catches up with its base: a merge commit, or a rebase onto it. The two are
64728
+ * the host's own choices, not this page's — GitHub offers both and refuses a rebase it cannot
64729
+ * replay, so what is offered comes from the host and what is allowed comes from the viewer.
64730
+ */
64731
+ const PullRequestUpdateMethod = Literals(["merge", "rebase"]);
64732
+ /**
64733
+ * Where the branch stands against the base it would merge into. Separate from `mergeability`,
64734
+ * which answers a different question: a branch can be behind and still merge cleanly, and that
64735
+ * pairing — out of date, no conflicts — is the one an update button exists for.
64736
+ *
64737
+ * "unknown" where the host was not asked or could not say, which is every host but GitHub and
64738
+ * every pull request whose head repository could not be compared.
64739
+ */
64740
+ const PullRequestBaseComparison = Literals([
64741
+ "up-to-date",
64742
+ "behind",
64743
+ "unknown"
64744
+ ]);
64745
+ const PullRequestActor = Struct({
64746
+ login: TrimmedNonEmptyString,
64747
+ name: NullOr(String$1),
64748
+ /** Null where a host does not report one, which is what the initials fall back to. */
64749
+ avatarUrl: NullOr(String$1)
64750
+ });
64751
+ const PullRequestLabel = Struct({
64752
+ name: TrimmedNonEmptyString,
64753
+ color: NullOr(String$1)
64754
+ });
64755
+ const PullRequestCheckStatus = Literals([
64756
+ "pending",
64757
+ "success",
64758
+ "failure",
64759
+ "skipped",
64760
+ "neutral",
64761
+ "cancelled"
64762
+ ]);
64763
+ const PullRequestCheck = Struct({
64764
+ name: TrimmedNonEmptyString,
64765
+ status: PullRequestCheckStatus,
64766
+ description: NullOr(String$1),
64767
+ url: NullOr(String$1)
64768
+ });
64769
+ /**
64770
+ * The reactions a remark can carry. GitHub's eight, which is also what the picker offers: GitLab
64771
+ * accepts any emoji as an award, and the ones outside this set are read as nothing rather than
64772
+ * shown under a name no other host would recognise.
64773
+ */
64774
+ const PullRequestReactionContent = Literals([
64775
+ "thumbs-up",
64776
+ "thumbs-down",
64777
+ "laugh",
64778
+ "hooray",
64779
+ "confused",
64780
+ "heart",
64781
+ "rocket",
64782
+ "eyes"
64783
+ ]);
64784
+ /** One reaction and everyone behind it, which is what the hover on a reaction pill says. */
64785
+ const PullRequestReaction = Struct({
64786
+ content: PullRequestReactionContent,
64787
+ count: PositiveInt,
64788
+ /**
64789
+ * Who reacted, as far as the host named them. A host that reports fewer names than it counts
64790
+ * leaves the rest out, so this is never longer than `count` and may be shorter. When
64791
+ * `viewerHasReacted` is true, the viewer's own login is left out of this list — the page names
64792
+ * them "You" instead — but `count` still counts them along with everyone else.
64793
+ */
64794
+ actors: ArraySchema(TrimmedNonEmptyString),
64795
+ /** The signed-in account is one of them, so pressing the pill takes the reaction back. */
64796
+ viewerHasReacted: Boolean$2
64797
+ });
64798
+ const PullRequestCommentKind = Literals([
64799
+ "issue-comment",
64800
+ "review-comment",
64801
+ "review"
64802
+ ]);
64803
+ const PullRequestComment = Struct({
64804
+ id: TrimmedNonEmptyString,
64805
+ kind: PullRequestCommentKind,
64806
+ author: NullOr(PullRequestActor),
64807
+ body: String$1,
64808
+ createdAt: IsoDateTime,
64809
+ url: NullOr(String$1),
64810
+ path: NullOr(String$1),
64811
+ reviewState: NullOr(String$1),
64812
+ /** Absent from a host with no reactions at all, which is a different thing from none on this. */
64813
+ reactions: optional$2(ArraySchema(PullRequestReaction))
64814
+ });
64815
+ /**
64816
+ * Which file a diff line belongs to: `left` is the version before the change, `right` the
64817
+ * version after. A comment has to name one, because a unified diff shows both at once and the
64818
+ * same line number means two different lines.
64819
+ */
64820
+ const PullRequestDiffSide = Literals(["left", "right"]);
64821
+ /** What submitting a review says about the change, beyond the words in it. */
64822
+ const PullRequestReviewVerdict = Literals([
64823
+ "comment",
64824
+ "approve",
64825
+ "request-changes"
64826
+ ]);
64827
+ const PullRequestThreadComment = Struct({
64828
+ id: TrimmedNonEmptyString,
64829
+ author: NullOr(PullRequestActor),
64830
+ body: String$1,
64831
+ createdAt: IsoDateTime,
64832
+ url: NullOr(String$1),
64833
+ reactions: optional$2(ArraySchema(PullRequestReaction))
64834
+ });
64835
+ /**
64836
+ * A conversation anchored to a line of the diff. The detail carries these alongside `comments`
64837
+ * rather than instead of them: the timeline wants one flat, chronological list, and the diff
64838
+ * wants whole threads pinned to their line — the same remarks, read two different ways.
64839
+ */
64840
+ const PullRequestReviewThread = Struct({
64841
+ id: TrimmedNonEmptyString,
64842
+ path: TrimmedNonEmptyString,
64843
+ /** Null when the host anchors the thread to a file rather than to a line. */
64844
+ line: NullOr(PositiveInt),
64845
+ side: PullRequestDiffSide,
64846
+ isResolved: Boolean$2,
64847
+ /**
64848
+ * The line the thread was written against is no longer in the diff, so it cannot be shown
64849
+ * against the code. Such a thread is listed separately rather than pinned to the wrong line.
64850
+ */
64851
+ isOutdated: Boolean$2,
64852
+ comments: ArraySchema(PullRequestThreadComment)
64853
+ });
64854
+ /**
64855
+ * Whether a reviewer is a person or a group of them the host addresses as one. GitHub is the only
64856
+ * host here that takes a review request for a team; the others name individuals only, so nothing
64857
+ * they report is ever anything but a user.
64858
+ */
64859
+ const PullRequestReviewerKind = Literals(["user", "team"]);
64860
+ /**
64861
+ * Somebody a review may be asked of. Carries the actor fields so the menu shows the same face and
64862
+ * handle the rest of the page does, and a team wears them too — its slug stands in for a login.
64863
+ */
64864
+ const PullRequestReviewerCandidate = Struct({
64865
+ ...PullRequestActor.fields,
64866
+ /**
64867
+ * How the host addresses this reviewer when a review is requested, which is not always the
64868
+ * handle it shows: GitHub takes a login or a team slug, GitLab a numeric user id, Bitbucket an
64869
+ * account uuid. Opaque to the page, which sends back whatever the candidate arrived with.
64870
+ */
64871
+ id: TrimmedNonEmptyString,
64872
+ kind: PullRequestReviewerKind,
64873
+ /** A review has already been asked of them, so pressing them takes the request back. */
64874
+ isRequested: Boolean$2
64875
+ });
64876
+ const PullRequestReviewerCandidateList = Struct({
64877
+ /** Never includes the author: nobody is asked to review their own change request. */
64878
+ candidates: ArraySchema(PullRequestReviewerCandidate),
64879
+ /**
64880
+ * The host has more people with access than the read asked for, so somebody missing from the
64881
+ * menu may still be somebody this change request can be sent to. Nothing is wrong with the
64882
+ * list; it is simply not all of it.
64883
+ */
64884
+ truncated: Boolean$2
64885
+ });
64886
+ const PullRequestCommit = Struct({
64887
+ oid: TrimmedNonEmptyString,
64888
+ messageHeadline: String$1,
64889
+ committedDate: IsoDateTime,
64890
+ /** Per-commit line counts where the host can return them without a request per commit. */
64891
+ additions: optional$2(NonNegativeInt),
64892
+ deletions: optional$2(NonNegativeInt),
64893
+ /**
64894
+ * Everyone the host attributes the commit to. Optional because older servers and hosts that
64895
+ * do not expose commit authors still produce a useful timeline entry.
64896
+ */
64897
+ authors: optional$2(ArraySchema(PullRequestActor))
64898
+ });
64899
+ /**
64900
+ * What a host can do with a review, which is where the four differ most. GitLab has no way to
64901
+ * say "changes requested", and Azure DevOps exposes no diff through its CLI, so it has no lines
64902
+ * to write against at all.
64903
+ */
64904
+ const PullRequestReviewCapabilities = Struct({
64905
+ /** A new comment can be anchored to a line of the diff. */
64906
+ inlineComment: Boolean$2,
64907
+ /** An existing thread can be replied to. */
64908
+ reply: Boolean$2,
64909
+ /** A thread can be marked resolved, and unresolved again. */
64910
+ resolve: Boolean$2,
64911
+ /** The verdicts a submitted review can carry. Empty means reviews cannot be submitted. */
64912
+ verdicts: ArraySchema(PullRequestReviewVerdict)
64913
+ });
64914
+ /**
64915
+ * What a host lets be rewritten after it has been posted. The two are separate because a host can
64916
+ * take one without the other: Azure DevOps takes a new title and description through the same
64917
+ * command that closes a pull request, and has no way to post a remark here at all — so nothing it
64918
+ * shows in a conversation can be rewritten either.
64919
+ */
64920
+ const PullRequestEditCapabilities = Struct({
64921
+ /** The change request's own title and description can be rewritten. */
64922
+ changeRequest: Boolean$2,
64923
+ /** A remark can be rewritten by whoever wrote it. */
64924
+ comment: Boolean$2
64925
+ });
64926
+ /**
64927
+ * What a host can do about who reviews. The two are independent: a host can take a request without
64928
+ * publishing who may receive one, which is Azure DevOps.
64929
+ */
64930
+ const PullRequestReviewerCapabilities = Struct({
64931
+ /** A review can be asked of somebody, and the request taken back. */
64932
+ request: Boolean$2,
64933
+ /**
64934
+ * The people who may be asked can be listed. False where the host has no such list to give,
64935
+ * which leaves the page to take a name rather than offer a menu — a guessed list would be worse,
64936
+ * because a name missing from it reads as a name that cannot be asked.
64937
+ */
64938
+ listCandidates: Boolean$2
64939
+ });
64940
+ /**
64941
+ * What a provider can actually do, so a surface can hide what is missing rather than offer an
64942
+ * action that would fail. Every provider fills this in for itself; nothing is assumed.
64943
+ *
64944
+ * Hosts differ more than they look: Azure DevOps exposes no patch through its CLI, and
64945
+ * Bitbucket has no endpoint that reopens a declined pull request. Both would otherwise be dead
64946
+ * buttons.
64947
+ */
64948
+ const PullRequestCapabilities = Struct({
64949
+ /** A unified patch can be fetched for the change request. */
64950
+ diff: Boolean$2,
64951
+ /** A comment can be posted, and the conversation read back. */
64952
+ comment: Boolean$2,
64953
+ /** The actions this host can carry out; anything absent is never offered. */
64954
+ actions: ArraySchema(PullRequestAction),
64955
+ /** Merge strategies the provider itself offers, before repository settings narrow them. */
64956
+ mergeMethods: ArraySchema(PullRequestMergeMethod),
64957
+ /**
64958
+ * How this host can bring a stale branch up to date. Absent where it cannot at all, which is
64959
+ * every host that has not said otherwise — so a provider that says nothing offers nothing.
64960
+ */
64961
+ updateMethods: optional$2(ArraySchema(PullRequestUpdateMethod)),
64962
+ /**
64963
+ * The host can narrow a listing by free text. False means it answers unnarrowed and whoever
64964
+ * asked has to do the narrowing — which is a different promise, so the page is told rather
64965
+ * than left to show every change request on that host as a search result.
64966
+ */
64967
+ search: Boolean$2,
64968
+ /**
64969
+ * Reactions can be read from a remark, and added to one or taken back. One flag for both:
64970
+ * neither host here reports reactions it will not also take, and a surface that could show a
64971
+ * pill it may never press is a surface offering nothing. Optional for the same reason as
64972
+ * `updateMethods` and `edit`: a server that says nothing about reactions has none, which is
64973
+ * what every server before this field was.
64974
+ */
64975
+ reactions: optional$2(Boolean$2),
64976
+ review: PullRequestReviewCapabilities,
64977
+ reviewers: PullRequestReviewerCapabilities,
64978
+ /**
64979
+ * What can be rewritten after the fact. Optional so a page and a server of different ages still
64980
+ * speak to each other: a server that says nothing about rewriting is one that cannot, which is
64981
+ * what every server before this one was.
64982
+ */
64983
+ edit: optional$2(PullRequestEditCapabilities)
64984
+ });
64985
+ /**
64986
+ * What the signed-in account may do with this change request, which is a different question from
64987
+ * `capabilities`: that says what the host is able to do at all, and this says whether this viewer
64988
+ * is allowed to ask for it. A host that merges pull requests still will not let a stranger merge
64989
+ * one, so a control belongs on the page only where the two agree.
64990
+ *
64991
+ * A permission the host reports nothing about is granted rather than withheld. Hiding a control
64992
+ * from someone who may in fact use it leaves them no way through and no reason given, while
64993
+ * offering one they may not use ends in the host's own refusal — which at least says why.
64994
+ */
64995
+ const PullRequestViewerPermissions = Struct({
64996
+ /** Which of the actions this viewer may take; anything absent is theirs to look at only. */
64997
+ actions: ArraySchema(PullRequestAction),
64998
+ /** This viewer may write a remark: a comment, a reply, or a note against a line. */
64999
+ comment: Boolean$2,
65000
+ /** This viewer may mark a review conversation resolved, and unresolved again. */
65001
+ resolve: Boolean$2,
65002
+ /** The verdicts this viewer may submit a review with. Empty means they may not review. */
65003
+ verdicts: ArraySchema(PullRequestReviewVerdict),
65004
+ /** This viewer may ask somebody for a review, and take the request back again. */
65005
+ requestReviewers: Boolean$2,
65006
+ /**
65007
+ * The ways this viewer may bring the branch up to date, narrowed from what the host offers.
65008
+ * Absent or empty means they may not, which is also what a host with no such action says.
65009
+ */
65010
+ updateMethods: optional$2(ArraySchema(PullRequestUpdateMethod))
65011
+ });
65012
+ const PullRequestMergeCapabilities = Struct({
65013
+ merge: Boolean$2,
65014
+ squash: Boolean$2,
65015
+ rebase: Boolean$2
65016
+ });
65017
+ const PullRequestListEntry = Struct({
65018
+ provider: SourceControlProviderKind,
65019
+ /**
65020
+ * The host below which `repository` is addressed, so the same provider kind can serve more
65021
+ * than one account — github.com and a GitHub Enterprise install are different identities.
65022
+ */
65023
+ host: TrimmedNonEmptyString,
65024
+ projectId: ProjectId,
65025
+ projectTitle: TrimmedNonEmptyString,
65026
+ repository: TrimmedNonEmptyString,
65027
+ number: PositiveInt,
65028
+ title: TrimmedNonEmptyString,
65029
+ url: TrimmedNonEmptyString,
65030
+ author: NullOr(PullRequestActor),
65031
+ headBranch: TrimmedNonEmptyString,
65032
+ baseBranch: TrimmedNonEmptyString,
65033
+ state: PullRequestState,
65034
+ isDraft: Boolean$2,
65035
+ mergeability: PullRequestMergeability,
65036
+ /**
65037
+ * Zero where the host has not been asked for the counts yet, which on GitHub is every row a
65038
+ * listing hands over: they are read afterwards, through `PullRequestListStatsInput`. Zero is
65039
+ * what a host that reports no counts at all has always sent, and what the page already draws
65040
+ * as no stat rather than as an empty change.
65041
+ */
65042
+ additions: NonNegativeInt,
65043
+ deletions: NonNegativeInt,
65044
+ createdAt: IsoDateTime,
65045
+ updatedAt: IsoDateTime,
65046
+ viewerReviewRequested: Boolean$2,
65047
+ labels: ArraySchema(PullRequestLabel),
65048
+ /** Absent where the host does not summarise its reviews, which is every host but GitHub. */
65049
+ reviewDecision: optional$2(PullRequestReviewDecision),
65050
+ /** Absent where the host reports no check rollup, or the change request has no checks. */
65051
+ checksState: optional$2(PullRequestChecksState)
65052
+ });
65053
+ /**
65054
+ * Where each repository a listing already reached carries on from, keyed `"<host> <repository>"`
65055
+ * — which is how a listing tells two repositories apart, since the same `owner/repo` exists on
65056
+ * github.com and on an Enterprise install at once.
65057
+ *
65058
+ * Each value is opaque: only the provider that issued one knows what it means, and the page hands
65059
+ * back exactly what it was given rather than composing one.
65060
+ */
65061
+ const PullRequestListCursors = Record$1(TrimmedNonEmptyString, TrimmedNonEmptyString.check(isMaxLength(4096)));
65062
+ const PullRequestListInput = Struct({
65063
+ state: PullRequestListState,
65064
+ involvement: optional$2(PullRequestInvolvement),
65065
+ filters: optional$2(PullRequestListFilters),
65066
+ projectId: optional$2(ProjectId),
65067
+ /**
65068
+ * Only these projects, for a client that assigns each shared repository to one of its
65069
+ * connections and asks the others to stay quiet about it. Absent means every project, which
65070
+ * is what every listing asked for before there were several connections to spread across.
65071
+ */
65072
+ projectIds: optional$2(ArraySchema(ProjectId).check(isMaxLength(100))),
65073
+ /**
65074
+ * Narrows the listing to one host, named as the host itself rather than as its provider kind:
65075
+ * github.com and a GitHub Enterprise install are two accounts, and a kind cannot tell them
65076
+ * apart. Absent means every host the workspace has.
65077
+ */
65078
+ host: optional$2(TrimmedNonEmptyString),
65079
+ /** Rows to return per repository, which with a continuation is rows per slice. */
65080
+ limit: optional$2(Int.check(isBetween({
65081
+ minimum: 1,
65082
+ maximum: 500
65083
+ }))),
65084
+ /**
65085
+ * Carry on from an answer already on the page rather than read the listing again. Only the
65086
+ * repositories named here are read, one slice each — which is what makes a further page cost
65087
+ * one slice rather than every repository over again at a larger size. A repository the page has
65088
+ * enough of is simply left out.
65089
+ *
65090
+ * Absent asks for the listing from the top, which is what raising `limit` alone has always
65091
+ * done and still does.
65092
+ */
65093
+ cursors: optional$2(PullRequestListCursors),
65094
+ /**
65095
+ * Free text the hosts themselves are asked to match, rather than a filter over the rows that
65096
+ * have already arrived: a listing only ever holds a page per repository, so a search that
65097
+ * never leaves the client can only find what happened to be loaded. What a match means is the
65098
+ * host's own business — GitHub reads a body, GitLab a description — and a host with no text
65099
+ * filter answers unnarrowed rather than pretending.
65100
+ *
65101
+ * Bounded because it travels into a CLI argument and a query string, and no host makes
65102
+ * anything of a search term this long.
65103
+ */
65104
+ query: optional$2(TrimmedNonEmptyString.check(isMaxLength(200)))
65105
+ });
65106
+ /**
65107
+ * A host the workspace has projects on, and whether it can be read right now. Drives the host
65108
+ * switcher and explains projects the list leaves out.
65109
+ *
65110
+ * One per host rather than per provider kind, because signing in is a question about the host:
65111
+ * a workspace can hold repositories on github.com and on a GitHub Enterprise install at once,
65112
+ * and the two are separate accounts that succeed and fail independently.
65113
+ */
65114
+ const PullRequestProviderSummary = Struct({
65115
+ host: TrimmedNonEmptyString,
65116
+ kind: SourceControlProviderKind,
65117
+ /** False where a search has to be applied to the rows after they arrive. */
65118
+ searchesOnHost: Boolean$2,
65119
+ projectCount: PositiveInt,
65120
+ /** False when the provider's CLI or credentials are missing, with `detail` saying which. */
65121
+ configured: Boolean$2,
65122
+ detail: NullOr(TrimmedNonEmptyString)
65123
+ });
65124
+ /** One project whose repository could not be read; healthy projects still return entries. */
65125
+ const PullRequestListProjectError = Struct({
65126
+ projectId: ProjectId,
65127
+ projectTitle: TrimmedNonEmptyString,
65128
+ message: TrimmedNonEmptyString
65129
+ });
65130
+ const PullRequestListResult = Struct({
65131
+ /**
65132
+ * The signed-in account per host, which is what involvement filtering compares. Keyed by
65133
+ * host rather than by provider kind: two GitHub hosts are two accounts. A host that could
65134
+ * not be read is absent rather than present-and-undefined, because an open-keyed record
65135
+ * cannot carry an optional value through the JSON codec.
65136
+ */
65137
+ viewers: Record$1(TrimmedNonEmptyString, TrimmedNonEmptyString),
65138
+ providers: ArraySchema(PullRequestProviderSummary),
65139
+ /**
65140
+ * By update, newest first, across every repository this answer covers. A page that appends a
65141
+ * continuation sorts what it then holds the same way: a repository's next slice is older than
65142
+ * that repository's last row, but can still be newer than another repository's.
65143
+ */
65144
+ entries: ArraySchema(PullRequestListEntry),
65145
+ errors: ArraySchema(PullRequestListProjectError),
65146
+ /** At least one repository hit the per-repository listing cap. */
65147
+ truncated: Boolean$2,
65148
+ /**
65149
+ * Where each repository carries on, to be sent straight back as `cursors`. A repository is
65150
+ * absent from this once it has nothing more to give, and also where its host could not be asked
65151
+ * in an order a continuation means anything in — so an empty record beside `truncated` means
65152
+ * more rows are only reachable by raising `limit`, the way they always were.
65153
+ */
65154
+ nextCursors: PullRequestListCursors
65155
+ });
65156
+ const PullRequestRef = Struct({
65157
+ projectId: ProjectId,
65158
+ repository: TrimmedNonEmptyString,
65159
+ number: PositiveInt
65160
+ });
65161
+ /**
65162
+ * One row's line counts, read after the listing rather than inside it. On GitHub the pair is
65163
+ * 40-60% of the wall clock of the search that answers the whole page — measured over twelve
65164
+ * repositories, 7.1s with it and 4.0s without — for two small numbers at the end of a row.
65165
+ *
65166
+ * So the listing answers without them and the page asks for them next, which is what puts the
65167
+ * rows on screen at the speed of everything else on them.
65168
+ */
65169
+ const PullRequestDiffStat = Struct({
65170
+ projectId: ProjectId,
65171
+ repository: TrimmedNonEmptyString,
65172
+ number: PositiveInt,
65173
+ additions: NonNegativeInt,
65174
+ deletions: NonNegativeInt
65175
+ });
65176
+ /**
65177
+ * The rows whose line counts are wanted, which is the rows the page is showing.
65178
+ *
65179
+ * Bounded at the largest listing a page can hold, since each ref becomes a lookup of its own on
65180
+ * the host.
65181
+ */
65182
+ const PullRequestListStatsInput = Struct({ refs: ArraySchema(PullRequestRef).check(isMaxLength(500)) });
65183
+ /**
65184
+ * Only the rows that could be answered for. A host with no batched stat read of its own — every
65185
+ * one but GitHub, which all report the counts in the listing itself — is simply absent here, and
65186
+ * the numbers its listing already carried stand.
65187
+ */
65188
+ const PullRequestListStatsResult = Struct({ stats: ArraySchema(PullRequestDiffStat) });
65189
+ /**
65190
+ * Forget what the server has cached, so the next read asks the host. With a reference it
65191
+ * forgets that one change request's detail and diff; without one it forgets the listings.
65192
+ * A separate request rather than a flag on the reads, so an explicit "refresh" one person
65193
+ * presses is the only thing that spends host requests — every ordinary read shares.
65194
+ */
65195
+ const PullRequestInvalidateInput = Struct({ reference: optional$2(PullRequestRef) });
65196
+ const PullRequestDetail = Struct({
65197
+ provider: SourceControlProviderKind,
65198
+ capabilities: PullRequestCapabilities,
65199
+ /** What this viewer may do, which `capabilities` says nothing about. Both narrow the page. */
65200
+ viewerPermissions: PullRequestViewerPermissions,
65201
+ projectId: ProjectId,
65202
+ projectTitle: TrimmedNonEmptyString,
65203
+ workspaceRoot: TrimmedNonEmptyString,
65204
+ repository: TrimmedNonEmptyString,
65205
+ number: PositiveInt,
65206
+ title: TrimmedNonEmptyString,
65207
+ body: String$1,
65208
+ url: TrimmedNonEmptyString,
65209
+ author: NullOr(PullRequestActor),
65210
+ state: PullRequestState,
65211
+ isDraft: Boolean$2,
65212
+ mergeability: PullRequestMergeability,
65213
+ additions: NonNegativeInt,
65214
+ deletions: NonNegativeInt,
65215
+ changedFiles: NonNegativeInt,
65216
+ headBranch: TrimmedNonEmptyString,
65217
+ baseBranch: TrimmedNonEmptyString,
65218
+ createdAt: IsoDateTime,
65219
+ updatedAt: IsoDateTime,
65220
+ mergedAt: NullOr(IsoDateTime),
65221
+ closedAt: NullOr(IsoDateTime),
65222
+ reviewers: ArraySchema(PullRequestActor),
65223
+ labels: ArraySchema(PullRequestLabel),
65224
+ checks: ArraySchema(PullRequestCheck),
65225
+ mergeCapabilities: PullRequestMergeCapabilities,
65226
+ /**
65227
+ * Who the host says the reader is, which is the one thing a conversation cannot be read without
65228
+ * to tell the reader's own remarks from everybody else's — and rewriting a remark is offered
65229
+ * only where the two names agree. Absent where the host could not say, which offers nothing
65230
+ * rather than everything.
65231
+ */
65232
+ viewer: optional$2(TrimmedNonEmptyString),
65233
+ /**
65234
+ * Where the branch stands against its base. Optional so a host that cannot compare says
65235
+ * nothing rather than claiming the branch is current — the page shows a banner only where the
65236
+ * answer is "behind", and silence is not that answer.
65237
+ */
65238
+ baseComparison: optional$2(PullRequestBaseComparison),
65239
+ /** How many commits the base is ahead by, where the host counted them. */
65240
+ behindBy: optional$2(NonNegativeInt),
65241
+ /**
65242
+ * Whether the host is already armed to merge this on its own. Absent where the host does not
65243
+ * report it, which is not the same as off: a page that reads silence as "not armed" offers to
65244
+ * arm something that is already armed, and a second arming is a write nobody asked for.
65245
+ */
65246
+ autoMergeEnabled: optional$2(Boolean$2)
65247
+ });
65248
+ /**
65249
+ * The slower, conversation-shaped half of a change request. It is read independently from the
65250
+ * core detail so a host with a deeply paginated review history cannot hold the title, body,
65251
+ * checks, and actions off screen. `author` and `reviewers` are optional enrichments: GitHub's
65252
+ * conversation query carries avatars and completed reviewers that its basic detail does not.
65253
+ */
65254
+ const PullRequestActivity = Struct({
65255
+ author: optional$2(NullOr(PullRequestActor)),
65256
+ reviewers: optional$2(ArraySchema(PullRequestActor)),
65257
+ comments: ArraySchema(PullRequestComment),
65258
+ /**
65259
+ * How many remarks the host itself counts in the conversation, which is the number a surface
65260
+ * showing a count has to show: `comments` carries what was read, and a reader who can see 225
65261
+ * on the host is not reassured by a page that says 10. Never less than `comments` holds, and
65262
+ * equal to it wherever the host was read to the end.
65263
+ */
65264
+ commentCount: NonNegativeInt,
65265
+ /**
65266
+ * The read stopped at a bound of its own before the host ran out, so `comments` holds less
65267
+ * than `commentCount` counts. Nothing else: a conversation read whole is never truncated,
65268
+ * however long it is.
65269
+ */
65270
+ commentsTruncated: Boolean$2,
65271
+ reviewThreads: ArraySchema(PullRequestReviewThread),
65272
+ commits: ArraySchema(PullRequestCommit),
65273
+ /**
65274
+ * The change request's own reactions — the ones on its description, which every host counts
65275
+ * against the change request itself rather than against a remark in the conversation.
65276
+ */
65277
+ reactions: optional$2(ArraySchema(PullRequestReaction))
65278
+ });
65279
+ /** The complete detail shape after the independently loaded activity has been applied. */
65280
+ const PullRequestDetailView = Struct({
65281
+ ...PullRequestDetail.fields,
65282
+ ...PullRequestActivity.fields,
65283
+ author: NullOr(PullRequestActor),
65284
+ reviewers: ArraySchema(PullRequestActor)
65285
+ });
65286
+ /**
65287
+ * A diff arrives a slice at a time, because a large change is more than any host will hand over
65288
+ * at once — GitHub refuses outright past 300 files — and more than a viewer can lay out in one
65289
+ * go. A slice is a whole number of files, never a file cut in half, so each one parses on its
65290
+ * own and the reader can start on the first while the rest is still coming.
65291
+ */
65292
+ const PullRequestDiffInput = Struct({
65293
+ ...PullRequestRef.fields,
65294
+ /**
65295
+ * Where to carry on from. Absent asks for the first slice. Opaque to the reader: each host
65296
+ * counts its files its own way, and only the provider that issued one knows what it means.
65297
+ */
65298
+ cursor: optional$2(TrimmedNonEmptyString),
65299
+ /**
65300
+ * One commit of the change rather than the whole of it. A large pull request is easier to
65301
+ * read a commit at a time, and the author's own commits are the boundaries they chose.
65302
+ */
65303
+ commit: optional$2(TrimmedNonEmptyString)
65304
+ });
65305
+ /** Real line counts for a file whose hunks the host withheld from the patch. */
65306
+ const PullRequestOmittedFileStat = Struct({
65307
+ path: TrimmedNonEmptyString,
65308
+ additions: Number$1,
65309
+ deletions: Number$1
65310
+ });
65311
+ const PullRequestDiffResult = Struct({
65312
+ patch: String$1,
65313
+ /**
65314
+ * Something inside this slice could not be shown — a binary file, or a hunk the host declined
65315
+ * to inline. Not the same as there being more slices, which `nextCursor` answers.
65316
+ */
65317
+ truncated: Boolean$2,
65318
+ /** Where the next slice starts, or null once the diff is whole. */
65319
+ nextCursor: NullOr(TrimmedNonEmptyString),
65320
+ /**
65321
+ * The host's own counts for the files whose hunks it withheld, so a file the patch cannot
65322
+ * show still reports what changed instead of a zero the diff never had.
65323
+ */
65324
+ omittedFileStats: optional$2(ArraySchema(PullRequestOmittedFileStat))
65325
+ });
65326
+ /** The complete old and new files Pierre needs to open omitted context in a host-backed patch. */
65327
+ const PullRequestDiffFileContentsInput = Struct({
65328
+ ...PullRequestRef.fields,
65329
+ /** One commit's own comparison; absent means the whole change request. */
65330
+ commit: optional$2(TrimmedNonEmptyString),
65331
+ changeType: Literals([
65332
+ "change",
65333
+ "rename-pure",
65334
+ "rename-changed",
65335
+ "new",
65336
+ "deleted"
65337
+ ]),
65338
+ oldPath: TrimmedNonEmptyString,
65339
+ newPath: TrimmedNonEmptyString
65340
+ });
65341
+ const PullRequestDiffFileContentsResult = Struct({
65342
+ oldContents: String$1,
65343
+ newContents: String$1
65344
+ });
65345
+ const PullRequestActionInput = Struct({
65346
+ ...PullRequestRef.fields,
65347
+ action: PullRequestAction,
65348
+ /**
65349
+ * Which strategy the merge uses, read for `merge` and for `enable-auto-merge` alike — a merge
65350
+ * the host performs later is still a merge, and the strategy is chosen when it is armed rather
65351
+ * than at the moment it happens. Absent means the host's own default.
65352
+ */
65353
+ mergeMethod: optional$2(PullRequestMergeMethod),
65354
+ /** Only read for `update-branch`, where absent means the host's own default. */
65355
+ updateMethod: optional$2(PullRequestUpdateMethod)
65356
+ });
65357
+ const CommentBody = String$1.check(isNonEmpty()).check(isMaxLength(65536));
65358
+ const PullRequestCommentInput = Struct({
65359
+ ...PullRequestRef.fields,
65360
+ body: CommentBody
65361
+ });
65362
+ /**
65363
+ * A change request's own words rewritten: its title, its description, or both. Each is optional
65364
+ * because the page rewrites them apart — a title corrected on its own must not carry a description
65365
+ * nobody opened — and the service refuses a request that carries neither.
65366
+ *
65367
+ * The title is bounded far past what any host takes, GitHub refusing one past 256 characters, so
65368
+ * an oversized one is turned away before it reaches a subprocess. The body is not trimmed for the
65369
+ * same reason a comment is not: it is markdown, where leading spaces open a code block. An empty
65370
+ * one is allowed, which is how a description is cleared.
65371
+ */
65372
+ const PullRequestUpdateInput = Struct({
65373
+ ...PullRequestRef.fields,
65374
+ title: optional$2(TrimmedNonEmptyString.check(isMaxLength(1024))),
65375
+ body: optional$2(String$1.check(isMaxLength(65536)))
65376
+ });
65377
+ /**
65378
+ * A remark already posted, rewritten by whoever wrote it. The kind travels beside the id because
65379
+ * an id alone does not say which endpoint addresses it: GitHub rewrites a comment on the
65380
+ * conversation and a comment on a line through two different mutations.
65381
+ *
65382
+ * A review's own summary is not among them. The hosts disagree about what one even is — the entry
65383
+ * Bitbucket shows is a vote this page renders as a remark, with no words behind it to rewrite —
65384
+ * and a control that worked on one host and failed on another is worse than one that is not there.
65385
+ */
65386
+ const PullRequestCommentUpdateInput = Struct({
65387
+ ...PullRequestRef.fields,
65388
+ commentId: TrimmedNonEmptyString,
65389
+ kind: Literals(["issue-comment", "review-comment"]),
65390
+ body: CommentBody
65391
+ });
65392
+ /** One remark in a review that has not been sent yet, anchored to a line of the diff. */
65393
+ const PullRequestReviewCommentDraft = Struct({
65394
+ path: TrimmedNonEmptyString,
65395
+ /**
65396
+ * What the file was called before the change, sent only when it differs. GitLab resolves a
65397
+ * position against both sides of the diff, so a comment on a renamed file needs both names;
65398
+ * the hosts that address a comment by one path ignore this.
65399
+ */
65400
+ oldPath: optional$2(TrimmedNonEmptyString),
65401
+ line: PositiveInt,
65402
+ side: PullRequestDiffSide,
65403
+ body: CommentBody
65404
+ });
65405
+ /**
65406
+ * A whole review, sent in one go. The line comments travel with the verdict rather than being
65407
+ * posted as they are written, so a half-finished review is never visible to anyone else — and
65408
+ * so hosts with no notion of a pending review behave the same as the ones that have it.
65409
+ */
65410
+ const PullRequestSubmitReviewInput = Struct({
65411
+ ...PullRequestRef.fields,
65412
+ verdict: PullRequestReviewVerdict,
65413
+ /** The review's own words. May be empty, which is how an approval with no remarks is sent. */
65414
+ body: String$1.check(isMaxLength(65536)),
65415
+ comments: ArraySchema(PullRequestReviewCommentDraft)
65416
+ });
65417
+ const PullRequestThreadReplyInput = Struct({
65418
+ ...PullRequestRef.fields,
65419
+ threadId: TrimmedNonEmptyString,
65420
+ body: CommentBody
65421
+ });
65422
+ const PullRequestThreadResolutionInput = Struct({
65423
+ ...PullRequestRef.fields,
65424
+ threadId: TrimmedNonEmptyString,
65425
+ resolved: Boolean$2
65426
+ });
65427
+ /**
65428
+ * Reacting and taking the reaction back are one operation with `reacted` turned around, which is
65429
+ * what pressing the same pill twice is.
65430
+ */
65431
+ const PullRequestReactionInput = Struct({
65432
+ ...PullRequestRef.fields,
65433
+ /**
65434
+ * Which remark to react to, as it arrived in the conversation. Absent reacts to the change
65435
+ * request itself, which is where its description's reactions live — the id a host uses for
65436
+ * that is its own to work out.
65437
+ */
65438
+ subjectId: optional$2(TrimmedNonEmptyString),
65439
+ content: PullRequestReactionContent,
65440
+ reacted: Boolean$2
65441
+ });
65442
+ /**
65443
+ * Asking for a review and taking the request back are one operation with `requested` turned
65444
+ * around, and asking again somebody who has already reviewed is what a re-request is — so that is
65445
+ * the same operation once more rather than a third one.
65446
+ */
65447
+ const PullRequestReviewerRequestInput = Struct({
65448
+ ...PullRequestRef.fields,
65449
+ /**
65450
+ * Who, as the candidate list named them. Bounded because every host bounds it as well — GitHub
65451
+ * refuses past fifteen — and because these travel into a request body a page composed.
65452
+ */
65453
+ reviewers: ArraySchema(Struct({
65454
+ id: TrimmedNonEmptyString,
65455
+ kind: PullRequestReviewerKind
65456
+ })).check(isMinLength(1), isMaxLength(25)),
65457
+ requested: Boolean$2
65458
+ });
65459
+ const PullRequestUnavailableReason = Literals([
65460
+ "cli-missing",
65461
+ "cli-unauthenticated",
65462
+ "provider-unsupported"
65463
+ ]);
65464
+ /**
65465
+ * What each host needs before it can be read, so a failure names the fix rather than the
65466
+ * symptom. Bitbucket is credentials on the server rather than a signed-in CLI, which is why
65467
+ * these are whole sentences instead of a tool name to interpolate.
65468
+ */
65469
+ const PROVIDER_REQUIREMENT = {
65470
+ github: {
65471
+ missing: "GitHub CLI (`gh`) is required to browse change requests on this host. Install it from https://cli.github.com/ and reload.",
65472
+ unauthenticated: "GitHub CLI is not authenticated. Run `gh auth login` and retry."
65473
+ },
65474
+ gitlab: {
65475
+ missing: "GitLab CLI (`glab`) is required to browse change requests on this host. Install it from https://gitlab.com/gitlab-org/cli and reload.",
65476
+ unauthenticated: "GitLab CLI is not authenticated. Run `glab auth login` and retry."
65477
+ },
65478
+ "azure-devops": {
65479
+ missing: "Azure CLI (`az`) with the Azure DevOps extension is required. Install `az`, then run `az extension add --name azure-devops`.",
65480
+ unauthenticated: "Azure CLI is not signed in. Run `az login` and retry."
65481
+ },
65482
+ bitbucket: {
65483
+ missing: "Bitbucket needs API credentials on the server. Set T3CODE_BITBUCKET_EMAIL and T3CODE_BITBUCKET_API_TOKEN, or T3CODE_BITBUCKET_ACCESS_TOKEN.",
65484
+ unauthenticated: "Bitbucket rejected the configured credentials. Check T3CODE_BITBUCKET_EMAIL and T3CODE_BITBUCKET_API_TOKEN."
65485
+ }
65486
+ };
65487
+ /**
65488
+ * The host a project's repository is addressed below. `canonicalKey` is the normalized remote,
65489
+ * `host/owner/repo`, so its first segment is the host; the provider kind stands in when there is
65490
+ * no key to read, which keeps one bucket per kind for identities recorded before it existed.
65491
+ *
65492
+ * Shared between the server and the page so both bucket a workspace the same way — the page
65493
+ * knows its hosts before the listing answers, and the two must agree on what they are called.
65494
+ */
65495
+ function pullRequestHostOf(identity, kind) {
65496
+ const host = identity?.canonicalKey?.split("/")[0]?.trim();
65497
+ return host === void 0 || host.length === 0 ? kind : host.toLowerCase();
65498
+ }
65499
+ /**
65500
+ * `author:me` names whoever is signed in to the host being read, GitHub's `@me` spelled either
65501
+ * way. A host's own search would answer it, but the page and the server both re-check an author
65502
+ * against the row's login, so the name is resolved before either comparison rather than being
65503
+ * matched as the literal login "me".
65504
+ *
65505
+ * Null viewer where the host has not said who the reader is; the filter then stands as typed,
65506
+ * which is the same answer a search for a user named "me" would give.
65507
+ *
65508
+ * Shared between the server and the page so both narrow by the same login.
65509
+ */
65510
+ function resolvePullRequestAuthorFilter(author, viewer) {
65511
+ const trimmed = author.trim();
65512
+ if (!/^@?me$/i.test(trimmed)) return trimmed;
65513
+ return viewer === null || viewer === void 0 || viewer.trim().length === 0 ? trimmed : viewer;
65514
+ }
65515
+ /**
65516
+ * What a host needs before it can be read, as a sentence to show wherever that host is reported
65517
+ * as unusable — the whole page when nothing can be read, and one entry in the host switcher when
65518
+ * only that host cannot. Null when the reason is not about setting a host up.
65519
+ */
65520
+ function pullRequestProviderRequirement(provider, reason) {
65521
+ const requirement = PROVIDER_REQUIREMENT[provider];
65522
+ if (requirement === void 0) return null;
65523
+ switch (reason) {
65524
+ case "cli-missing": return requirement.missing;
65525
+ case "cli-unauthenticated": return requirement.unauthenticated;
65526
+ case "provider-unsupported": return null;
65527
+ }
65528
+ }
65529
+ /**
65530
+ * The feature is switched off entirely. The message is derived from `reason` and the host
65531
+ * rather than from whatever the CLI printed, so it stays a stable sentence the UI can show
65532
+ * as-is; the underlying failure travels in `cause` (absent for `provider-unsupported`, which
65533
+ * has none).
65534
+ */
65535
+ var PullRequestUnavailableError = class PullRequestUnavailableError extends TaggedErrorClass()("PullRequestUnavailableError", {
65536
+ reason: PullRequestUnavailableReason,
65537
+ provider: optional$2(SourceControlProviderKind),
65538
+ cause: optional$2(Defect())
65539
+ }, { httpApiStatus: 503 }) {
65540
+ [symbol$1]() {
65541
+ return schemaJson(PullRequestUnavailableError)(this, { status: 503 });
65542
+ }
65543
+ get message() {
65544
+ const requirement = this.provider === void 0 ? void 0 : PROVIDER_REQUIREMENT[this.provider];
65545
+ switch (this.reason) {
65546
+ case "cli-missing": return requirement?.missing ?? "The tool this host is read through is not installed or set up.";
65547
+ case "cli-unauthenticated": return requirement?.unauthenticated ?? "This host has no working credentials.";
65548
+ case "provider-unsupported": return "Change requests cannot be browsed for this project's host yet.";
65549
+ }
65550
+ }
65551
+ };
65552
+ var PullRequestOperationError = class PullRequestOperationError extends TaggedErrorClass()("PullRequestOperationError", {
65553
+ operation: String$1,
65554
+ detail: TrimmedNonEmptyString,
65555
+ cause: optional$2(Defect())
65556
+ }, { httpApiStatus: 502 }) {
65557
+ [symbol$1]() {
65558
+ return schemaJson(PullRequestOperationError)(this, { status: 502 });
65559
+ }
65560
+ get message() {
65561
+ return `Pull request operation ${this.operation} failed: ${this.detail}`;
65562
+ }
65563
+ };
65564
+ //#endregion
64025
65565
  //#region node_modules/.pnpm/effect@4.0.0-beta.103_patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6/node_modules/effect/dist/unstable/httpapi/HttpApiSecurity.js
64026
65566
  /**
64027
65567
  * Defines security scheme declarations for declarative HTTP APIs.
@@ -64752,6 +66292,9 @@ var EnvironmentRequestInvalidError = class EnvironmentRequestInvalidError extend
64752
66292
  [symbol$1]() {
64753
66293
  return schemaJson(EnvironmentRequestInvalidError)(this, { status: 400 });
64754
66294
  }
66295
+ get message() {
66296
+ return `The environment rejected the request (${this.reason}).`;
66297
+ }
64755
66298
  };
64756
66299
  var EnvironmentAuthInvalidError = class EnvironmentAuthInvalidError extends TaggedErrorClass()("EnvironmentAuthInvalidError", {
64757
66300
  code: Literal("auth_invalid"),
@@ -64761,6 +66304,9 @@ var EnvironmentAuthInvalidError = class EnvironmentAuthInvalidError extends Tagg
64761
66304
  [symbol$1]() {
64762
66305
  return schemaJson(EnvironmentAuthInvalidError)(this, { status: 401 });
64763
66306
  }
66307
+ get message() {
66308
+ return `The environment rejected this client's credentials (${this.reason}).`;
66309
+ }
64764
66310
  };
64765
66311
  var EnvironmentScopeRequiredError = class EnvironmentScopeRequiredError extends TaggedErrorClass()("EnvironmentScopeRequiredError", {
64766
66312
  code: Literal("insufficient_scope"),
@@ -64770,6 +66316,9 @@ var EnvironmentScopeRequiredError = class EnvironmentScopeRequiredError extends
64770
66316
  [symbol$1]() {
64771
66317
  return schemaJson(EnvironmentScopeRequiredError)(this, { status: 403 });
64772
66318
  }
66319
+ get message() {
66320
+ return `This request needs the ${this.requiredScope} scope, which this client does not have.`;
66321
+ }
64773
66322
  };
64774
66323
  var EnvironmentOperationForbiddenError = class EnvironmentOperationForbiddenError extends TaggedErrorClass()("EnvironmentOperationForbiddenError", {
64775
66324
  code: Literal("operation_forbidden"),
@@ -64779,6 +66328,9 @@ var EnvironmentOperationForbiddenError = class EnvironmentOperationForbiddenErro
64779
66328
  [symbol$1]() {
64780
66329
  return schemaJson(EnvironmentOperationForbiddenError)(this, { status: 403 });
64781
66330
  }
66331
+ get message() {
66332
+ return `The environment refused this operation (${this.reason}).`;
66333
+ }
64782
66334
  };
64783
66335
  var EnvironmentInternalError = class EnvironmentInternalError extends TaggedErrorClass()("EnvironmentInternalError", {
64784
66336
  code: Literal("internal_error"),
@@ -64788,6 +66340,9 @@ var EnvironmentInternalError = class EnvironmentInternalError extends TaggedErro
64788
66340
  [symbol$1]() {
64789
66341
  return schemaJson(EnvironmentInternalError)(this, { status: 500 });
64790
66342
  }
66343
+ get message() {
66344
+ return `The environment failed to answer this request (${this.reason}).`;
66345
+ }
64791
66346
  };
64792
66347
  const EnvironmentResourceNotFoundReason = Literals(["thread_not_found"]);
64793
66348
  var EnvironmentResourceNotFoundError = class EnvironmentResourceNotFoundError extends TaggedErrorClass()("EnvironmentResourceNotFoundError", {
@@ -64798,6 +66353,9 @@ var EnvironmentResourceNotFoundError = class EnvironmentResourceNotFoundError ex
64798
66353
  [symbol$1]() {
64799
66354
  return schemaJson(EnvironmentResourceNotFoundError)(this, { status: 404 });
64800
66355
  }
66356
+ get message() {
66357
+ return `The environment could not find what this request named (${this.reason}).`;
66358
+ }
64801
66359
  };
64802
66360
  const EnvironmentHttpCommonError = Union([
64803
66361
  EnvironmentRequestInvalidError,
@@ -64962,6 +66520,19 @@ var EnvironmentOrchestrationHttpApi = class extends make$30("orchestration").add
64962
66520
  success: DispatchResult,
64963
66521
  error: EnvironmentOrchestrationDispatchErrors
64964
66522
  }).middleware(EnvironmentAuthenticatedAuth)) {};
66523
+ /** Large, compressible pull-request payloads travel over HTTP rather than the RPC socket. */
66524
+ var EnvironmentPullRequestsHttpApi = class extends make$30("pullRequests").add(post("diff", "/api/pull-requests/diff", {
66525
+ headers: OptionalBearerHeaders,
66526
+ payload: PullRequestDiffInput,
66527
+ success: PullRequestDiffResult,
66528
+ error: [
66529
+ PullRequestUnavailableError,
66530
+ PullRequestOperationError,
66531
+ EnvironmentAuthInvalidError,
66532
+ EnvironmentScopeRequiredError,
66533
+ EnvironmentInternalError
66534
+ ]
66535
+ }).middleware(EnvironmentAuthenticatedAuth)) {};
64965
66536
  var EnvironmentConnectHttpApi = class extends make$30("connect").add(post("linkProof", "/api/connect/link-proof", {
64966
66537
  headers: OptionalBearerHeaders,
64967
66538
  payload: RelayLinkProofRequest,
@@ -64998,7 +66569,7 @@ var EnvironmentConnectHttpApi = class extends make$30("connect").add(post("linkP
64998
66569
  success: RelayEnvironmentMintResponse,
64999
66570
  error: EnvironmentHttpCloudErrors
65000
66571
  })) {};
65001
- var EnvironmentHttpApi = class extends make$31("environment").add(EnvironmentMetadataHttpApi).add(EnvironmentAuthHttpApi).add(EnvironmentOrchestrationHttpApi).add(EnvironmentConnectHttpApi) {};
66572
+ var EnvironmentHttpApi = class extends make$31("environment").add(EnvironmentMetadataHttpApi).add(EnvironmentAuthHttpApi).add(EnvironmentOrchestrationHttpApi).add(EnvironmentPullRequestsHttpApi).add(EnvironmentConnectHttpApi) {};
65002
66573
  //#endregion
65003
66574
  //#region upstream-t3code/packages/contracts/src/relayClient.ts
65004
66575
  const RelayClientStatusSchema = Union([
@@ -66789,7 +68360,7 @@ const TxChunkProto = {
66789
68360
  return this.toJSON();
66790
68361
  },
66791
68362
  toString() {
66792
- return `TxChunk(${format$1(toJson(this.ref))})`;
68363
+ return `TxChunk(${format$2(toJson(this.ref))})`;
66793
68364
  },
66794
68365
  toJSON() {
66795
68366
  return {
@@ -67463,7 +69034,10 @@ const shutdown = (self) => gen(function* () {
67463
69034
  *
67464
69035
  * @module Preview
67465
69036
  */
67466
- const Url = TrimmedNonEmptyString.check(isMaxLength(2048));
69037
+ const PREVIEW_URL_MAX_LENGTH = 2048;
69038
+ const CONFIGURED_LOCAL_SERVER_URLS_MAX_ITEMS = 32;
69039
+ const Url = TrimmedNonEmptyString.check(isMaxLength(PREVIEW_URL_MAX_LENGTH));
69040
+ const ConfiguredLocalServerUrls = ArraySchema(Url).check(isMaxLength(32));
67467
69041
  const Title = String$1.check(isMaxLength(512));
67468
69042
  const PreviewTabId = TrimmedNonEmptyString.check(isMaxLength(128));
67469
69043
  const PREVIEW_VIEWPORT_MIN_DIMENSION = 240;
@@ -67653,7 +69227,8 @@ const DiscoveredLocalServer = Struct({
67653
69227
  });
67654
69228
  const DiscoveredLocalServerList = Struct({
67655
69229
  servers: ArraySchema(DiscoveredLocalServer),
67656
- scannedAt: String$1
69230
+ scannedAt: String$1,
69231
+ configuredUrlProbing: optional$2(Literal(true))
67657
69232
  });
67658
69233
  var PreviewSessionLookupError = class extends TaggedErrorClass()("PreviewSessionLookupError", {
67659
69234
  threadId: String$1,
@@ -68341,6 +69916,13 @@ const DesktopPreviewColorSchemeSchema = Literals([
68341
69916
  "light",
68342
69917
  "dark"
68343
69918
  ]);
69919
+ const FAVICON_DATA_URL_MAX_LENGTH = 8192;
69920
+ const FAVICON_CAPTURED_AT_MAX = 864e13;
69921
+ const DesktopPreviewFaviconSchema = Struct({
69922
+ dataUrl: String$1.check(isMaxLength(FAVICON_DATA_URL_MAX_LENGTH), isPattern(/^data:image\/png;base64,[a-z0-9+/]+={0,2}$/i)),
69923
+ pageUrl: String$1.check(isMaxLength(2048)),
69924
+ capturedAt: Number$1.check(isFinite$1(), isGreaterThanOrEqualTo(0), isLessThanOrEqualTo(FAVICON_CAPTURED_AT_MAX))
69925
+ });
68344
69926
  const DesktopPreviewTabIdSchema = String$1.check(isTrimmed()).check(isNonEmpty());
68345
69927
  const DesktopPreviewNavStatusSchema = Union([
68346
69928
  Struct({ kind: Literal("Idle") }),
@@ -68376,6 +69958,7 @@ const DesktopPreviewTabStateSchema = Struct({
68376
69958
  "agent",
68377
69959
  "none"
68378
69960
  ]),
69961
+ favicon: optionalKey(DesktopPreviewFaviconSchema),
68379
69962
  updatedAt: String$1
68380
69963
  });
68381
69964
  const DesktopPreviewPointerEventSchema = Struct({
@@ -69870,7 +71453,8 @@ const EDITORS = [
69870
71453
  id: "cursor",
69871
71454
  label: "Cursor",
69872
71455
  commands: ["cursor"],
69873
- launchStyle: "goto"
71456
+ launchStyle: "goto",
71457
+ remoteScheme: "cursor"
69874
71458
  },
69875
71459
  {
69876
71460
  id: "trae",
@@ -69889,19 +71473,22 @@ const EDITORS = [
69889
71473
  id: "vscode",
69890
71474
  label: "VS Code",
69891
71475
  commands: ["code"],
69892
- launchStyle: "goto"
71476
+ launchStyle: "goto",
71477
+ remoteScheme: "vscode"
69893
71478
  },
69894
71479
  {
69895
71480
  id: "vscode-insiders",
69896
71481
  label: "VS Code Insiders",
69897
71482
  commands: ["code-insiders"],
69898
- launchStyle: "goto"
71483
+ launchStyle: "goto",
71484
+ remoteScheme: "vscode-insiders"
69899
71485
  },
69900
71486
  {
69901
71487
  id: "vscodium",
69902
71488
  label: "VSCodium",
69903
71489
  commands: ["codium"],
69904
- launchStyle: "goto"
71490
+ launchStyle: "goto",
71491
+ remoteScheme: "vscodium"
69905
71492
  },
69906
71493
  {
69907
71494
  id: "zed",
@@ -69999,6 +71586,36 @@ const LaunchEditorInput = Struct({
69999
71586
  cwd: TrimmedNonEmptyString,
70000
71587
  editor: EditorId
70001
71588
  });
71589
+ const remoteSchemeOf = (editor) => editor.remoteScheme;
71590
+ /** Editors that can open a remote workspace via `vscode-remote` deep links. */
71591
+ const REMOTE_CAPABLE_EDITOR_IDS = EDITORS.flatMap((editor) => remoteSchemeOf(editor) !== void 0 ? [editor.id] : []);
71592
+ const remoteSchemeForEditor = (id) => {
71593
+ const editor = EDITORS.find((candidate) => candidate.id === id);
71594
+ return editor === void 0 ? void 0 : remoteSchemeOf(editor);
71595
+ };
71596
+ /**
71597
+ * Builds a `<scheme>://vscode-remote/ssh-remote+<host><path>` deep link that
71598
+ * opens `absolutePath` on `host` in the local editor over SSH. Returns
71599
+ * undefined for editors without remote deep-link support.
71600
+ */
71601
+ const buildRemoteOpenUrl = (input) => {
71602
+ const scheme = remoteSchemeForEditor(input.editor);
71603
+ if (scheme === void 0) return;
71604
+ const posixPath = input.absolutePath.replaceAll("\\", "/");
71605
+ const encodedPath = (posixPath.startsWith("/") ? posixPath : `/${posixPath}`).split("/").map(encodeURIComponent).join("/");
71606
+ return `${scheme}://vscode-remote/ssh-remote+${encodeURIComponent(input.host)}${encodedPath}`;
71607
+ };
71608
+ /**
71609
+ * SSH hostnames an environment advertises for remote open links. Reachability
71610
+ * is client-side; the server only advertises names that resolve to itself and
71611
+ * gates them on a local sshd listen check. Ordered most-reachable first
71612
+ * (tailnet MagicDNS name, then mDNS `<hostname>.local`).
71613
+ */
71614
+ const RemoteOpenTargetKind = Literals(["tailscale", "mdns"]);
71615
+ const RemoteOpenTarget = Struct({
71616
+ kind: RemoteOpenTargetKind,
71617
+ host: TrimmedNonEmptyString
71618
+ });
70002
71619
  var ExternalLauncherUnknownEditorError = class extends TaggedErrorClass()("ExternalLauncherUnknownEditorError", { editor: String$1 }) {
70003
71620
  get message() {
70004
71621
  return `Unknown editor: ${this.editor}`;
@@ -70161,6 +71778,7 @@ const ClientSettingsSchema = Struct({
70161
71778
  planModeEnabled: Boolean$2.pipe(withDecodingDefault(succeed$4(false))),
70162
71779
  legacySidebarEnabled: Boolean$2.pipe(withDecodingDefault(succeed$4(false))),
70163
71780
  sidebarAutoSettleAfterDays: NullOr(SidebarAutoSettleAfterDays).pipe(withDecodingDefault(succeed$4(3))),
71781
+ sidebarAutoSettleOnMerge: Boolean$2.pipe(withDecodingDefault(succeed$4(true))),
70164
71782
  sidebarProjectGroupingMode: SidebarProjectGroupingMode.pipe(withDecodingDefault(succeed$4(DEFAULT_SIDEBAR_PROJECT_GROUPING_MODE))),
70165
71783
  sidebarProjectGroupingOverrides: Record$1(TrimmedNonEmptyString, SidebarProjectGroupingMode).pipe(withDecodingDefault(succeed$4({}))),
70166
71784
  sidebarProjectSortOrder: SidebarProjectSortOrder.pipe(withDecodingDefault(succeed$4(DEFAULT_SIDEBAR_PROJECT_SORT_ORDER))),
@@ -70514,6 +72132,7 @@ const ClientSettingsPatch = Struct({
70514
72132
  planModeEnabled: optionalKey(Boolean$2),
70515
72133
  legacySidebarEnabled: optionalKey(Boolean$2),
70516
72134
  sidebarAutoSettleAfterDays: optionalKey(NullOr(SidebarAutoSettleAfterDays)),
72135
+ sidebarAutoSettleOnMerge: optionalKey(Boolean$2),
70517
72136
  sidebarProjectGroupingMode: optionalKey(SidebarProjectGroupingMode),
70518
72137
  sidebarProjectGroupingOverrides: optionalKey(Record$1(TrimmedNonEmptyString, SidebarProjectGroupingMode)),
70519
72138
  sidebarProjectSortOrder: optionalKey(SidebarProjectSortOrder),
@@ -70818,6 +72437,12 @@ const ServerConfig = Struct({
70818
72437
  issues: ServerConfigIssues,
70819
72438
  providers: ServerProviders,
70820
72439
  availableEditors: ForwardCompatibleArray(EditorId),
72440
+ /**
72441
+ * SSH hosts this environment advertises for remote open-in-editor links.
72442
+ * Absent on servers that predate the feature; empty when the machine has no
72443
+ * sshd or no advertisable name.
72444
+ */
72445
+ remoteOpenTargets: optionalKey(ForwardCompatibleArray(RemoteOpenTarget)),
70821
72446
  observability: ServerObservability,
70822
72447
  settings: ServerSettings,
70823
72448
  /** Whether shell subscriptions can emit an opt-in catch-up completion marker. */
@@ -70966,338 +72591,6 @@ var ServerSelfUpdateError = class extends TaggedErrorClass()("ServerSelfUpdateEr
70966
72591
  }
70967
72592
  };
70968
72593
  //#endregion
70969
- //#region upstream-t3code/packages/contracts/src/vcs.ts
70970
- const VcsDriverKind = Literals([
70971
- "git",
70972
- "jj",
70973
- "unknown"
70974
- ]);
70975
- const VcsFreshnessSource = Literals([
70976
- "live-local",
70977
- "cached-local",
70978
- "cached-remote",
70979
- "explicit-remote"
70980
- ]);
70981
- const VcsFreshness = Struct({
70982
- source: VcsFreshnessSource,
70983
- observedAt: DateTimeUtc,
70984
- expiresAt: Option(DateTimeUtc)
70985
- });
70986
- const VcsDriverCapabilities = Struct({
70987
- kind: VcsDriverKind,
70988
- supportsWorktrees: Boolean$2,
70989
- supportsBookmarks: Boolean$2,
70990
- supportsAtomicSnapshot: Boolean$2,
70991
- supportsPushDefaultRemote: Boolean$2,
70992
- ignoreClassifier: Literals(["native", "git-compatible-fallback"])
70993
- });
70994
- const VcsRepositoryIdentity = Struct({
70995
- kind: VcsDriverKind,
70996
- rootPath: TrimmedNonEmptyString,
70997
- metadataPath: NullOr(TrimmedNonEmptyString),
70998
- freshness: VcsFreshness
70999
- });
71000
- const VcsListWorkspaceFilesResult = Struct({
71001
- paths: ArraySchema(TrimmedNonEmptyString),
71002
- truncated: Boolean$2,
71003
- freshness: VcsFreshness
71004
- });
71005
- const VcsRemote = Struct({
71006
- name: TrimmedNonEmptyString,
71007
- url: TrimmedNonEmptyString,
71008
- pushUrl: Option(TrimmedNonEmptyString),
71009
- isPrimary: Boolean$2
71010
- });
71011
- const VcsListRemotesResult = Struct({
71012
- remotes: ArraySchema(VcsRemote),
71013
- freshness: VcsFreshness
71014
- });
71015
- const VcsProcessExitFailureKind = Literals([
71016
- "authentication",
71017
- "not-found",
71018
- "command-failed"
71019
- ]);
71020
- var VcsProcessSpawnError = class VcsProcessSpawnError extends TaggedErrorClass()("VcsProcessSpawnError", {
71021
- operation: String$1,
71022
- command: String$1,
71023
- cwd: String$1,
71024
- argumentCount: optional$2(NonNegativeInt),
71025
- cause: Defect()
71026
- }) {
71027
- get message() {
71028
- return `VCS process failed to spawn in ${this.operation}: ${this.command} (${this.cwd})`;
71029
- }
71030
- static fromProcessSpawnError(context, error) {
71031
- return new VcsProcessSpawnError({
71032
- ...context,
71033
- cause: error.cause
71034
- });
71035
- }
71036
- };
71037
- var VcsProcessExitError = class VcsProcessExitError extends TaggedErrorClass()("VcsProcessExitError", {
71038
- operation: String$1,
71039
- command: String$1,
71040
- cwd: String$1,
71041
- argumentCount: optional$2(NonNegativeInt),
71042
- exitCode: Number$1,
71043
- detail: String$1,
71044
- failureKind: optional$2(VcsProcessExitFailureKind),
71045
- stderrLength: optional$2(NonNegativeInt),
71046
- stderrTruncated: optional$2(Boolean$2)
71047
- }) {
71048
- get message() {
71049
- return `VCS process failed in ${this.operation}: ${this.command} (${this.cwd}) exited with ${this.exitCode} - ${this.detail}`;
71050
- }
71051
- static fromProcessExit(context, error, failureKind) {
71052
- const detail = failureKind === "authentication" ? "Authentication failed." : failureKind === "not-found" ? context.command === "glab" ? "Merge request not found." : context.command === "gh" || context.command === "az" ? "Pull request not found." : "VCS resource not found." : "Process exited with a non-zero status.";
71053
- return new VcsProcessExitError({
71054
- ...context,
71055
- exitCode: error.exitCode,
71056
- detail,
71057
- failureKind,
71058
- stderrLength: error.stderr.length,
71059
- stderrTruncated: error.stderrTruncated
71060
- });
71061
- }
71062
- };
71063
- var VcsProcessTimeoutError = class VcsProcessTimeoutError extends TaggedErrorClass()("VcsProcessTimeoutError", {
71064
- operation: String$1,
71065
- command: String$1,
71066
- cwd: String$1,
71067
- argumentCount: optional$2(NonNegativeInt),
71068
- timeoutMs: Number$1
71069
- }) {
71070
- get message() {
71071
- return `VCS process timed out in ${this.operation}: ${this.command} (${this.cwd}) after ${this.timeoutMs}ms`;
71072
- }
71073
- static fromProcessTimeoutError(context, error) {
71074
- return new VcsProcessTimeoutError({
71075
- ...context,
71076
- timeoutMs: error.timeoutMs
71077
- });
71078
- }
71079
- };
71080
- const VcsProcessBoundaryErrorFields = {
71081
- operation: String$1,
71082
- command: String$1,
71083
- cwd: String$1,
71084
- argumentCount: optional$2(NonNegativeInt)
71085
- };
71086
- var VcsProcessStdinWriteError = class extends TaggedErrorClass()("VcsProcessStdinWriteError", {
71087
- ...VcsProcessBoundaryErrorFields,
71088
- stdinBytes: NonNegativeInt,
71089
- cause: Defect()
71090
- }) {
71091
- get message() {
71092
- return `VCS process failed to write ${this.stdinBytes} bytes to stdin in ${this.operation}: ${this.command} (${this.cwd})`;
71093
- }
71094
- };
71095
- var VcsProcessOutputReadError = class extends TaggedErrorClass()("VcsProcessOutputReadError", {
71096
- ...VcsProcessBoundaryErrorFields,
71097
- stream: Literals([
71098
- "stdout",
71099
- "stderr",
71100
- "exitCode"
71101
- ]),
71102
- cause: Defect()
71103
- }) {
71104
- get message() {
71105
- return `VCS process failed to read ${this.stream} in ${this.operation}: ${this.command} (${this.cwd})`;
71106
- }
71107
- };
71108
- var VcsProcessOutputLimitError = class extends TaggedErrorClass()("VcsProcessOutputLimitError", {
71109
- ...VcsProcessBoundaryErrorFields,
71110
- stream: Literals(["stdout", "stderr"]),
71111
- maxBytes: NonNegativeInt,
71112
- observedBytes: NonNegativeInt
71113
- }) {
71114
- get message() {
71115
- return `VCS process ${this.stream} produced ${this.observedBytes} bytes in ${this.operation}: ${this.command} (${this.cwd}), exceeding the ${this.maxBytes} byte limit`;
71116
- }
71117
- };
71118
- var VcsProcessMissingExitCodeError = class extends TaggedErrorClass()("VcsProcessMissingExitCodeError", VcsProcessBoundaryErrorFields) {
71119
- get message() {
71120
- return `VCS process completed without an exit code in ${this.operation}: ${this.command} (${this.cwd})`;
71121
- }
71122
- };
71123
- const VcsOutputDecodeError = Union([
71124
- VcsProcessStdinWriteError,
71125
- VcsProcessOutputReadError,
71126
- VcsProcessOutputLimitError,
71127
- VcsProcessMissingExitCodeError
71128
- ]);
71129
- var VcsRepositoryDetectionError = class extends TaggedErrorClass()("VcsRepositoryDetectionError", {
71130
- operation: String$1,
71131
- cwd: String$1,
71132
- detail: String$1,
71133
- cause: optional$2(Defect())
71134
- }) {
71135
- get message() {
71136
- return `VCS repository detection failed in ${this.operation}: ${this.cwd} - ${this.detail}`;
71137
- }
71138
- };
71139
- var VcsUnsupportedOperationError = class extends TaggedErrorClass()("VcsUnsupportedOperationError", {
71140
- operation: String$1,
71141
- kind: VcsDriverKind,
71142
- detail: String$1
71143
- }) {
71144
- get message() {
71145
- return `VCS operation is unsupported for ${this.kind} in ${this.operation}: ${this.detail}`;
71146
- }
71147
- };
71148
- const VcsError = Union([
71149
- VcsProcessSpawnError,
71150
- VcsProcessExitError,
71151
- VcsProcessTimeoutError,
71152
- VcsProcessStdinWriteError,
71153
- VcsProcessOutputReadError,
71154
- VcsProcessOutputLimitError,
71155
- VcsProcessMissingExitCodeError,
71156
- VcsRepositoryDetectionError,
71157
- VcsUnsupportedOperationError
71158
- ]);
71159
- //#endregion
71160
- //#region upstream-t3code/packages/contracts/src/sourceControl.ts
71161
- const SourceControlProviderKind = Literals([
71162
- "github",
71163
- "gitlab",
71164
- "azure-devops",
71165
- "bitbucket",
71166
- "unknown"
71167
- ]);
71168
- const SourceControlProviderInfo = Struct({
71169
- kind: SourceControlProviderKind,
71170
- name: TrimmedNonEmptyString,
71171
- baseUrl: String$1
71172
- });
71173
- const ChangeRequestState = Literals([
71174
- "open",
71175
- "closed",
71176
- "merged"
71177
- ]);
71178
- const ChangeRequest = Struct({
71179
- provider: SourceControlProviderKind,
71180
- number: PositiveInt,
71181
- title: TrimmedNonEmptyString,
71182
- url: String$1,
71183
- baseRefName: TrimmedNonEmptyString,
71184
- headRefName: TrimmedNonEmptyString,
71185
- state: ChangeRequestState,
71186
- updatedAt: Option(DateTimeUtc),
71187
- isCrossRepository: optional$2(Boolean$2),
71188
- headRepositoryNameWithOwner: optional$2(NullOr(TrimmedNonEmptyString)),
71189
- headRepositoryOwnerLogin: optional$2(NullOr(TrimmedNonEmptyString))
71190
- });
71191
- const SourceControlRepositoryCloneUrls = Struct({
71192
- nameWithOwner: TrimmedNonEmptyString,
71193
- url: TrimmedNonEmptyString,
71194
- sshUrl: TrimmedNonEmptyString
71195
- });
71196
- const SourceControlRepositoryVisibility = Literals(["private", "public"]);
71197
- const SourceControlCloneProtocol = Literals([
71198
- "auto",
71199
- "ssh",
71200
- "https"
71201
- ]);
71202
- const SourceControlRepositoryInfo = Struct({
71203
- provider: SourceControlProviderKind,
71204
- nameWithOwner: TrimmedNonEmptyString,
71205
- url: TrimmedNonEmptyString,
71206
- sshUrl: TrimmedNonEmptyString
71207
- });
71208
- const SourceControlRepositoryLookupInput = Struct({
71209
- provider: SourceControlProviderKind,
71210
- repository: TrimmedNonEmptyString,
71211
- cwd: optional$2(TrimmedNonEmptyString)
71212
- });
71213
- const SourceControlCloneRepositoryInput = Struct({
71214
- provider: optional$2(SourceControlProviderKind),
71215
- repository: optional$2(TrimmedNonEmptyString),
71216
- remoteUrl: optional$2(TrimmedNonEmptyString),
71217
- destinationPath: TrimmedNonEmptyString,
71218
- protocol: optional$2(SourceControlCloneProtocol)
71219
- });
71220
- const SourceControlCloneRepositoryResult = Struct({
71221
- cwd: TrimmedNonEmptyString,
71222
- remoteUrl: TrimmedNonEmptyString,
71223
- repository: NullOr(SourceControlRepositoryInfo)
71224
- });
71225
- const SourceControlPublishRepositoryInput = Struct({
71226
- cwd: TrimmedNonEmptyString,
71227
- provider: SourceControlProviderKind,
71228
- repository: TrimmedNonEmptyString,
71229
- visibility: SourceControlRepositoryVisibility,
71230
- remoteName: optional$2(TrimmedNonEmptyString),
71231
- protocol: optional$2(SourceControlCloneProtocol)
71232
- });
71233
- const SourceControlPublishStatus = Literals(["pushed", "remote_added"]);
71234
- const SourceControlPublishRepositoryResult = Struct({
71235
- repository: SourceControlRepositoryInfo,
71236
- remoteName: TrimmedNonEmptyString,
71237
- remoteUrl: TrimmedNonEmptyString,
71238
- branch: TrimmedNonEmptyString,
71239
- upstreamBranch: optional$2(TrimmedNonEmptyString),
71240
- status: SourceControlPublishStatus
71241
- });
71242
- const SourceControlDiscoveryStatus = Literals(["available", "missing"]);
71243
- const SourceControlProviderAuthStatus = Literals([
71244
- "authenticated",
71245
- "unauthenticated",
71246
- "unknown"
71247
- ]);
71248
- const SourceControlProviderAuth = Struct({
71249
- status: SourceControlProviderAuthStatus,
71250
- account: Option(TrimmedNonEmptyString),
71251
- host: Option(TrimmedNonEmptyString),
71252
- detail: Option(TrimmedNonEmptyString)
71253
- });
71254
- const SourceControlDiscoverySharedFields = {
71255
- label: TrimmedNonEmptyString,
71256
- executable: optional$2(TrimmedNonEmptyString),
71257
- status: SourceControlDiscoveryStatus,
71258
- version: Option(TrimmedNonEmptyString),
71259
- installHint: TrimmedNonEmptyString,
71260
- detail: Option(TrimmedNonEmptyString)
71261
- };
71262
- const VcsDiscoveryItem = Struct({
71263
- kind: VcsDriverKind,
71264
- implemented: Boolean$2,
71265
- ...SourceControlDiscoverySharedFields
71266
- });
71267
- const SourceControlProviderDiscoveryItem = Struct({
71268
- kind: SourceControlProviderKind,
71269
- ...SourceControlDiscoverySharedFields,
71270
- auth: SourceControlProviderAuth
71271
- });
71272
- const SourceControlDiscoveryResult = Struct({
71273
- versionControlSystems: ArraySchema(VcsDiscoveryItem),
71274
- sourceControlProviders: ArraySchema(SourceControlProviderDiscoveryItem)
71275
- });
71276
- var SourceControlProviderError = class extends TaggedErrorClass()("SourceControlProviderError", {
71277
- provider: SourceControlProviderKind,
71278
- operation: String$1,
71279
- cwd: String$1,
71280
- command: optional$2(String$1),
71281
- repository: optional$2(String$1),
71282
- reference: optional$2(String$1),
71283
- detail: String$1,
71284
- cause: optional$2(Defect())
71285
- }) {
71286
- get message() {
71287
- return `Source control provider ${this.provider} failed in ${this.operation}: ${this.detail}`;
71288
- }
71289
- };
71290
- var SourceControlRepositoryError = class extends TaggedErrorClass()("SourceControlRepositoryError", {
71291
- provider: SourceControlProviderKind,
71292
- operation: String$1,
71293
- detail: String$1,
71294
- cause: optional$2(Defect())
71295
- }) {
71296
- get message() {
71297
- return `Source control repository operation ${this.operation} failed for ${this.provider}: ${this.detail}`;
71298
- }
71299
- };
71300
- //#endregion
71301
72594
  //#region upstream-t3code/packages/contracts/src/git.ts
71302
72595
  const TrimmedNonEmptyStringSchema = TrimmedNonEmptyString;
71303
72596
  const GIT_LIST_BRANCHES_MAX_LIMIT = 200;
@@ -71508,7 +72801,13 @@ const GitResolvePullRequestResult = Struct({ pullRequest: GitResolvedPullRequest
71508
72801
  const GitPreparePullRequestThreadResult = Struct({
71509
72802
  pullRequest: GitResolvedPullRequest,
71510
72803
  branch: TrimmedNonEmptyStringSchema,
71511
- worktreePath: TrimmedNonEmptyStringSchema.pipe(NullOr)
72804
+ worktreePath: TrimmedNonEmptyStringSchema.pipe(NullOr),
72805
+ /**
72806
+ * False when the checkout could not be brought to the pull request head — a reused worktree
72807
+ * holding local commits or uncommitted changes keeps its own state, so the code being handed
72808
+ * over is older than the pull request.
72809
+ */
72810
+ isOnPullRequestHead: Boolean$2
71512
72811
  });
71513
72812
  const VcsSwitchRefResult = Struct({ refName: NullOr(TrimmedNonEmptyStringSchema) });
71514
72813
  const GitRunStackedActionResult = Struct({
@@ -72413,8 +73712,8 @@ const ResourceTelemetryRetryResult = Struct({
72413
73712
  * even for turns that were never driven through T3 Code. This mirrors the
72414
73713
  * approach `ccusage` takes.
72415
73714
  *
72416
- * Environments return pre-aggregated `(day, provider, model)` buckets. Raw
72417
- * transcript records never cross the wire.
73715
+ * Environments return pre-aggregated `(day, hourStart?, provider, model)`
73716
+ * buckets. Raw transcript records never cross the wire.
72418
73717
  *
72419
73718
  * @module usage
72420
73719
  */
@@ -72423,9 +73722,10 @@ const ResourceTelemetryRetryResult = Struct({
72423
73722
  * client renders partial coverage when an environment reports an older version
72424
73723
  * rather than failing the whole page.
72425
73724
  */
72426
- const USAGE_CONTRACT_VERSION = 3;
73725
+ const USAGE_CONTRACT_VERSION = 4;
72427
73726
  const UsageProviderKind = Literals(["claude", "codex"]);
72428
73727
  const UsageDay = TrimmedNonEmptyString.check(isPattern(/^\d{4}-\d{2}-\d{2}$/)).pipe(brand("UsageDay"));
73728
+ const UsageResolution = Literals(["day", "hour"]);
72429
73729
  /**
72430
73730
  * Why a bucket's cost is what it is.
72431
73731
  *
@@ -72455,7 +73755,8 @@ const UsageTokenTotals = Struct({
72455
73755
  reasoningTokens: NonNegativeInt
72456
73756
  });
72457
73757
  /**
72458
- * One `(day, provider, model)` cell.
73758
+ * One `(day, hourStart?, provider, model)` cell. `hourStart` is the UTC start
73759
+ * instant of a rolling bucket and is present only for hourly requests.
72459
73760
  *
72460
73761
  * `costUsd` is the raw API-equivalent cost of these tokens. It is not money
72461
73762
  * spent: subscription plans bill separately. `unpricedRecords` counts records
@@ -72464,6 +73765,7 @@ const UsageTokenTotals = Struct({
72464
73765
  */
72465
73766
  const UsageBucket = Struct({
72466
73767
  day: UsageDay,
73768
+ hourStart: optional$2(TrimmedNonEmptyString),
72467
73769
  provider: UsageProviderKind,
72468
73770
  model: TrimmedNonEmptyString,
72469
73771
  totals: UsageTokenTotals,
@@ -72548,7 +73850,13 @@ const UsageSummaryInput = Struct({
72548
73850
  * IANA zone the client wants days bucketed in. An offset would be wrong for
72549
73851
  * any window that crosses a DST boundary.
72550
73852
  */
72551
- timeZone: TrimmedNonEmptyString
73853
+ timeZone: TrimmedNonEmptyString,
73854
+ /** Defaults to daily for older clients. */
73855
+ resolution: optional$2(UsageResolution),
73856
+ /** Inclusive UTC instant for an hourly rolling window. */
73857
+ sinceTime: optional$2(TrimmedNonEmptyString),
73858
+ /** Exclusive UTC instant for an hourly rolling window. */
73859
+ untilTime: optional$2(TrimmedNonEmptyString)
72552
73860
  });
72553
73861
  const UsageSummary = Struct({
72554
73862
  contractVersion: Number$1,
@@ -72978,6 +74286,22 @@ const WS_METHODS = {
72978
74286
  serverGetUsageSummary: "server.getUsageSummary",
72979
74287
  cloudGetRelayClientStatus: "cloud.getRelayClientStatus",
72980
74288
  cloudInstallRelayClient: "cloud.installRelayClient",
74289
+ pullRequestsList: "pullRequests.list",
74290
+ pullRequestsListStats: "pullRequests.listStats",
74291
+ pullRequestsDetail: "pullRequests.detail",
74292
+ pullRequestsActivity: "pullRequests.activity",
74293
+ pullRequestsDiffFileContents: "pullRequests.diffFileContents",
74294
+ pullRequestsRunAction: "pullRequests.runAction",
74295
+ pullRequestsUpdate: "pullRequests.update",
74296
+ pullRequestsComment: "pullRequests.comment",
74297
+ pullRequestsUpdateComment: "pullRequests.updateComment",
74298
+ pullRequestsSubmitReview: "pullRequests.submitReview",
74299
+ pullRequestsReplyToThread: "pullRequests.replyToThread",
74300
+ pullRequestsSetThreadResolution: "pullRequests.setThreadResolution",
74301
+ pullRequestsSetReaction: "pullRequests.setReaction",
74302
+ pullRequestsInvalidate: "pullRequests.invalidate",
74303
+ pullRequestsReviewerCandidates: "pullRequests.reviewerCandidates",
74304
+ pullRequestsRequestReviewers: "pullRequests.requestReviewers",
72981
74305
  sourceControlLookupRepository: "sourceControl.lookupRepository",
72982
74306
  sourceControlCloneRepository: "sourceControl.cloneRepository",
72983
74307
  sourceControlPublishRepository: "sourceControl.publishRepository",
@@ -73118,6 +74442,101 @@ const WsServerGetBackgroundPolicyRpc = make$23(WS_METHODS.serverGetBackgroundPol
73118
74442
  success: BackgroundPolicySnapshot,
73119
74443
  error: EnvironmentAuthorizationError
73120
74444
  });
74445
+ const PullRequestRpcError = Union([
74446
+ PullRequestUnavailableError,
74447
+ PullRequestOperationError,
74448
+ EnvironmentAuthorizationError
74449
+ ]);
74450
+ const WsPullRequestsListRpc = make$23(WS_METHODS.pullRequestsList, {
74451
+ payload: PullRequestListInput,
74452
+ success: PullRequestListResult,
74453
+ error: PullRequestRpcError
74454
+ });
74455
+ /**
74456
+ * The line counts for rows already on the page. Its own call because on GitHub the pair costs
74457
+ * 40-60% of the listing read that answers everything else on the row, so the rows arrive first
74458
+ * and their stats a moment later.
74459
+ */
74460
+ const WsPullRequestsListStatsRpc = make$23(WS_METHODS.pullRequestsListStats, {
74461
+ payload: PullRequestListStatsInput,
74462
+ success: PullRequestListStatsResult,
74463
+ error: PullRequestRpcError
74464
+ });
74465
+ const WsPullRequestsDetailRpc = make$23(WS_METHODS.pullRequestsDetail, {
74466
+ payload: PullRequestRef,
74467
+ success: PullRequestDetail,
74468
+ error: PullRequestRpcError
74469
+ });
74470
+ const WsPullRequestsActivityRpc = make$23(WS_METHODS.pullRequestsActivity, {
74471
+ payload: PullRequestRef,
74472
+ success: PullRequestActivity,
74473
+ error: PullRequestRpcError
74474
+ });
74475
+ const WsPullRequestsDiffFileContentsRpc = make$23(WS_METHODS.pullRequestsDiffFileContents, {
74476
+ payload: PullRequestDiffFileContentsInput,
74477
+ success: PullRequestDiffFileContentsResult,
74478
+ error: PullRequestRpcError
74479
+ });
74480
+ const WsPullRequestsRunActionRpc = make$23(WS_METHODS.pullRequestsRunAction, {
74481
+ payload: PullRequestActionInput,
74482
+ success: Void,
74483
+ error: PullRequestRpcError
74484
+ });
74485
+ const WsPullRequestsUpdateRpc = make$23(WS_METHODS.pullRequestsUpdate, {
74486
+ payload: PullRequestUpdateInput,
74487
+ success: Void,
74488
+ error: PullRequestRpcError
74489
+ });
74490
+ const WsPullRequestsCommentRpc = make$23(WS_METHODS.pullRequestsComment, {
74491
+ payload: PullRequestCommentInput,
74492
+ success: Void,
74493
+ error: PullRequestRpcError
74494
+ });
74495
+ const WsPullRequestsUpdateCommentRpc = make$23(WS_METHODS.pullRequestsUpdateComment, {
74496
+ payload: PullRequestCommentUpdateInput,
74497
+ success: Void,
74498
+ error: PullRequestRpcError
74499
+ });
74500
+ const WsPullRequestsSubmitReviewRpc = make$23(WS_METHODS.pullRequestsSubmitReview, {
74501
+ payload: PullRequestSubmitReviewInput,
74502
+ success: Void,
74503
+ error: PullRequestRpcError
74504
+ });
74505
+ const WsPullRequestsReplyToThreadRpc = make$23(WS_METHODS.pullRequestsReplyToThread, {
74506
+ payload: PullRequestThreadReplyInput,
74507
+ success: Void,
74508
+ error: PullRequestRpcError
74509
+ });
74510
+ const WsPullRequestsSetThreadResolutionRpc = make$23(WS_METHODS.pullRequestsSetThreadResolution, {
74511
+ payload: PullRequestThreadResolutionInput,
74512
+ success: Void,
74513
+ error: PullRequestRpcError
74514
+ });
74515
+ const WsPullRequestsSetReactionRpc = make$23(WS_METHODS.pullRequestsSetReaction, {
74516
+ payload: PullRequestReactionInput,
74517
+ success: Void,
74518
+ error: PullRequestRpcError
74519
+ });
74520
+ const WsPullRequestsInvalidateRpc = make$23(WS_METHODS.pullRequestsInvalidate, {
74521
+ payload: PullRequestInvalidateInput,
74522
+ success: Void,
74523
+ error: PullRequestRpcError
74524
+ });
74525
+ /**
74526
+ * Read on its own rather than as part of the detail: the people who may be asked are only wanted
74527
+ * once somebody opens the menu, and reading them with every change request would spend a request
74528
+ * per host on a list nobody looked at.
74529
+ */
74530
+ const WsPullRequestsReviewerCandidatesRpc = make$23(WS_METHODS.pullRequestsReviewerCandidates, {
74531
+ payload: PullRequestRef,
74532
+ success: PullRequestReviewerCandidateList,
74533
+ error: PullRequestRpcError
74534
+ });
74535
+ const WsPullRequestsRequestReviewersRpc = make$23(WS_METHODS.pullRequestsRequestReviewers, {
74536
+ payload: PullRequestReviewerRequestInput,
74537
+ success: Void,
74538
+ error: PullRequestRpcError
74539
+ });
73121
74540
  const WsSourceControlLookupRepositoryRpc = make$23(WS_METHODS.sourceControlLookupRepository, {
73122
74541
  payload: SourceControlRepositoryLookupInput,
73123
74542
  success: SourceControlRepositoryInfo,
@@ -73332,7 +74751,7 @@ const WsSubscribePreviewEventsRpc = make$23(WS_METHODS.subscribePreviewEvents, {
73332
74751
  stream: true
73333
74752
  });
73334
74753
  const WsSubscribeDiscoveredLocalServersRpc = make$23(WS_METHODS.subscribeDiscoveredLocalServers, {
73335
- payload: Struct({}),
74754
+ payload: Struct({ configuredUrls: optional$2(ConfiguredLocalServerUrls) }),
73336
74755
  success: DiscoveredLocalServerList,
73337
74756
  error: EnvironmentAuthorizationError,
73338
74757
  stream: true
@@ -73425,7 +74844,7 @@ const WsSubscribeResourceTelemetryRpc = make$23(WS_METHODS.subscribeResourceTele
73425
74844
  error: EnvironmentAuthorizationError,
73426
74845
  stream: true
73427
74846
  });
73428
- const WsRpcGroup = make$22(WsServerProbeRpc, WsServerGetConfigRpc$1, WsServerRefreshProvidersRpc, WsServerUpdateProviderRpc, WsServerUpdateServerRpc, WsServerUpdateServerWithProgressRpc, WsServerUpsertKeybindingRpc, WsServerRemoveKeybindingRpc, WsServerGetSettingsRpc, WsServerUpdateSettingsRpc, WsServerDiscoverSourceControlRpc, WsServerGetTraceDiagnosticsRpc, WsServerGetProcessDiagnosticsRpc, WsServerGetProcessResourceHistoryRpc, WsServerGetResourceTelemetryHistoryRpc, WsServerRetryResourceTelemetryRpc, WsServerGetUsageSummaryRpc, WsServerSignalProcessRpc, WsServerReportClientActivityRpc, WsServerReportHostPowerStateRpc, WsServerGetBackgroundPolicyRpc, WsCloudGetRelayClientStatusRpc, WsCloudInstallRelayClientRpc, WsSourceControlLookupRepositoryRpc, WsSourceControlCloneRepositoryRpc, WsSourceControlPublishRepositoryRpc, WsProjectsListEntriesRpc, WsProjectsReadFileRpc, WsProjectsSearchContentsRpc, WsProjectsSearchEntriesRpc, WsProjectsWriteFileRpc, WsShellOpenInEditorRpc, WsFilesystemBrowseRpc, WsAssetsCreateUrlRpc, WsSubscribeVcsStatusRpc, WsVcsPullRpc, WsVcsRefreshStatusRpc, WsGitRunStackedActionRpc, WsGitResolvePullRequestRpc, WsGitPreparePullRequestThreadRpc, WsVcsListRefsRpc, WsVcsCreateWorktreeRpc, WsVcsRemoveWorktreeRpc, WsVcsCreateRefRpc, WsVcsSwitchRefRpc, WsVcsInitRpc, WsReviewGetDiffPreviewRpc, WsReviewGetDiffFileContentsRpc, WsTerminalOpenRpc, WsTerminalAttachRpc, WsTerminalWriteRpc, WsTerminalResizeRpc, WsTerminalClearRpc, WsTerminalRestartRpc, WsTerminalCloseRpc, WsSubscribeTerminalEventsRpc, WsSubscribeTerminalMetadataRpc, WsPreviewOpenRpc, WsPreviewNavigateRpc, WsPreviewResizeRpc, WsPreviewRefreshRpc, WsPreviewCloseRpc, WsPreviewListRpc, WsPreviewReportStatusRpc, WsPreviewAutomationConnectRpc, WsPreviewAutomationRespondRpc, WsPreviewAutomationFocusHostRpc, WsSubscribePreviewEventsRpc, WsSubscribeDiscoveredLocalServersRpc, WsSubscribeServerConfigRpc, WsSubscribeServerLifecycleRpc, WsSubscribeAuthAccessRpc, WsSubscribeBackgroundPolicyRpc, WsSubscribeResourceTelemetryRpc, WsOrchestrationDispatchCommandRpc, WsOrchestrationGetWorkflowScriptRpc, WsOrchestrationGetTurnDiffRpc, WsOrchestrationGetFullThreadDiffRpc, WsOrchestrationSearchThreadsRpc, WsOrchestrationGetArchivedShellSnapshotRpc, WsOrchestrationSubscribeShellRpc, WsOrchestrationSubscribeThreadRpc);
74847
+ const WsRpcGroup = make$22(WsServerProbeRpc, WsServerGetConfigRpc$1, WsServerRefreshProvidersRpc, WsServerUpdateProviderRpc, WsServerUpdateServerRpc, WsServerUpdateServerWithProgressRpc, WsServerUpsertKeybindingRpc, WsServerRemoveKeybindingRpc, WsServerGetSettingsRpc, WsServerUpdateSettingsRpc, WsServerDiscoverSourceControlRpc, WsServerGetTraceDiagnosticsRpc, WsServerGetProcessDiagnosticsRpc, WsServerGetProcessResourceHistoryRpc, WsServerGetResourceTelemetryHistoryRpc, WsServerRetryResourceTelemetryRpc, WsServerGetUsageSummaryRpc, WsServerSignalProcessRpc, WsServerReportClientActivityRpc, WsServerReportHostPowerStateRpc, WsServerGetBackgroundPolicyRpc, WsCloudGetRelayClientStatusRpc, WsCloudInstallRelayClientRpc, WsPullRequestsListRpc, WsPullRequestsListStatsRpc, WsPullRequestsDetailRpc, WsPullRequestsActivityRpc, WsPullRequestsDiffFileContentsRpc, WsPullRequestsRunActionRpc, WsPullRequestsUpdateRpc, WsPullRequestsCommentRpc, WsPullRequestsUpdateCommentRpc, WsPullRequestsSubmitReviewRpc, WsPullRequestsReplyToThreadRpc, WsPullRequestsSetThreadResolutionRpc, WsPullRequestsSetReactionRpc, WsPullRequestsInvalidateRpc, WsPullRequestsReviewerCandidatesRpc, WsPullRequestsRequestReviewersRpc, WsSourceControlLookupRepositoryRpc, WsSourceControlCloneRepositoryRpc, WsSourceControlPublishRepositoryRpc, WsProjectsListEntriesRpc, WsProjectsReadFileRpc, WsProjectsSearchContentsRpc, WsProjectsSearchEntriesRpc, WsProjectsWriteFileRpc, WsShellOpenInEditorRpc, WsFilesystemBrowseRpc, WsAssetsCreateUrlRpc, WsSubscribeVcsStatusRpc, WsVcsPullRpc, WsVcsRefreshStatusRpc, WsGitRunStackedActionRpc, WsGitResolvePullRequestRpc, WsGitPreparePullRequestThreadRpc, WsVcsListRefsRpc, WsVcsCreateWorktreeRpc, WsVcsRemoveWorktreeRpc, WsVcsCreateRefRpc, WsVcsSwitchRefRpc, WsVcsInitRpc, WsReviewGetDiffPreviewRpc, WsReviewGetDiffFileContentsRpc, WsTerminalOpenRpc, WsTerminalAttachRpc, WsTerminalWriteRpc, WsTerminalResizeRpc, WsTerminalClearRpc, WsTerminalRestartRpc, WsTerminalCloseRpc, WsSubscribeTerminalEventsRpc, WsSubscribeTerminalMetadataRpc, WsPreviewOpenRpc, WsPreviewNavigateRpc, WsPreviewResizeRpc, WsPreviewRefreshRpc, WsPreviewCloseRpc, WsPreviewListRpc, WsPreviewReportStatusRpc, WsPreviewAutomationConnectRpc, WsPreviewAutomationRespondRpc, WsPreviewAutomationFocusHostRpc, WsSubscribePreviewEventsRpc, WsSubscribeDiscoveredLocalServersRpc, WsSubscribeServerConfigRpc, WsSubscribeServerLifecycleRpc, WsSubscribeAuthAccessRpc, WsSubscribeBackgroundPolicyRpc, WsSubscribeResourceTelemetryRpc, WsOrchestrationDispatchCommandRpc, WsOrchestrationGetWorkflowScriptRpc, WsOrchestrationGetTurnDiffRpc, WsOrchestrationGetFullThreadDiffRpc, WsOrchestrationSearchThreadsRpc, WsOrchestrationGetArchivedShellSnapshotRpc, WsOrchestrationSubscribeShellRpc, WsOrchestrationSubscribeThreadRpc);
73429
74848
  //#endregion
73430
74849
  //#region src/domain/thread-lifecycle.ts
73431
74850
  function isClosedSessionStatus(status) {
@@ -73495,9 +74914,377 @@ function hasTerminalSession(thread) {
73495
74914
  return thread.session !== null && thread.session?.status !== "starting" && thread.session?.status !== "running";
73496
74915
  }
73497
74916
  //#endregion
74917
+ //#region src/domain/thread-activities.ts
74918
+ function isRecord$1(value) {
74919
+ return value !== null && typeof value === "object";
74920
+ }
74921
+ function activityPayload(activity) {
74922
+ const payload = activity.payload;
74923
+ if (!isRecord$1(payload)) return null;
74924
+ return payload;
74925
+ }
74926
+ function compareActivityLifecycleRank(kind) {
74927
+ if (kind.endsWith(".started") || kind === "tool.started") return 0;
74928
+ if (kind.endsWith(".progress") || kind.endsWith(".updated")) return 1;
74929
+ if (kind.endsWith(".completed") || kind.endsWith(".resolved") || kind.endsWith(".failed")) return 2;
74930
+ return 1;
74931
+ }
74932
+ function compareActivitiesByOrder(left, right) {
74933
+ if (left.sequence !== void 0 && right.sequence !== void 0) {
74934
+ if (left.sequence !== right.sequence) return left.sequence - right.sequence;
74935
+ } else if (left.sequence !== void 0) return 1;
74936
+ else if (right.sequence !== void 0) return -1;
74937
+ const createdAtComparison = left.createdAt.localeCompare(right.createdAt);
74938
+ if (createdAtComparison !== 0) return createdAtComparison;
74939
+ const lifecycleRankComparison = compareActivityLifecycleRank(left.kind) - compareActivityLifecycleRank(right.kind);
74940
+ if (lifecycleRankComparison !== 0) return lifecycleRankComparison;
74941
+ return left.id.localeCompare(right.id);
74942
+ }
74943
+ function requestKindFromRequestType(requestType) {
74944
+ switch (requestType) {
74945
+ case "command_execution_approval":
74946
+ case "exec_command_approval":
74947
+ case "dynamic_tool_call": return "command";
74948
+ case "file_read_approval": return "file-read";
74949
+ case "file_change_approval":
74950
+ case "apply_patch_approval": return "file-change";
74951
+ default: return null;
74952
+ }
74953
+ }
74954
+ function isStalePendingRequestFailureDetail(detail) {
74955
+ const normalized = detail?.toLowerCase();
74956
+ if (normalized === void 0 || normalized.length === 0) return false;
74957
+ return normalized.includes("stale pending approval request") || normalized.includes("stale pending user-input request") || normalized.includes("unknown pending approval request") || normalized.includes("unknown pending permission request") || normalized.includes("unknown pending user-input request");
74958
+ }
74959
+ function requestKindFromPayload(payload) {
74960
+ if (payload.requestKind === "command" || payload.requestKind === "file-read" || payload.requestKind === "file-change") return payload.requestKind;
74961
+ return requestKindFromRequestType(payload.requestType);
74962
+ }
74963
+ function derivePendingApprovals(activities) {
74964
+ const openByRequestId = /* @__PURE__ */ new Map();
74965
+ const ordered = [...activities].toSorted(compareActivitiesByOrder);
74966
+ for (const activity of ordered) {
74967
+ const payload = activityPayload(activity);
74968
+ const requestId = payload !== null && typeof payload.requestId === "string" ? ApprovalRequestId.make(payload.requestId) : null;
74969
+ const requestKind = payload !== null ? requestKindFromPayload(payload) : null;
74970
+ const detail = payload !== null && typeof payload.detail === "string" ? payload.detail : void 0;
74971
+ if (activity.kind === "approval.requested" && requestId !== null && requestKind !== null) {
74972
+ openByRequestId.set(requestId, {
74973
+ requestId,
74974
+ requestKind,
74975
+ createdAt: activity.createdAt,
74976
+ ...detail !== void 0 ? { detail } : {}
74977
+ });
74978
+ continue;
74979
+ }
74980
+ if (activity.kind === "approval.resolved" && requestId !== null) {
74981
+ openByRequestId.delete(requestId);
74982
+ continue;
74983
+ }
74984
+ if (activity.kind === "provider.approval.respond.failed" && requestId !== null && isStalePendingRequestFailureDetail(detail)) openByRequestId.delete(requestId);
74985
+ }
74986
+ return [...openByRequestId.values()].toSorted((a, b) => a.createdAt.localeCompare(b.createdAt));
74987
+ }
74988
+ function parseUserInputQuestions(payload) {
74989
+ const questions = payload?.questions;
74990
+ if (!Array.isArray(questions)) return null;
74991
+ const parsed = questions.map((entry) => {
74992
+ if (!isRecord$1(entry)) return null;
74993
+ const question = entry;
74994
+ if (typeof question.id !== "string" || typeof question.header !== "string" || typeof question.question !== "string" || !Array.isArray(question.options)) return null;
74995
+ const options = question.options.map((option) => {
74996
+ if (!isRecord$1(option)) return null;
74997
+ const record = option;
74998
+ if (typeof record.label !== "string" || typeof record.description !== "string") return null;
74999
+ return {
75000
+ label: record.label,
75001
+ description: record.description
75002
+ };
75003
+ }).filter((option) => option !== null);
75004
+ if (options.length === 0) return null;
75005
+ return {
75006
+ id: question.id,
75007
+ header: question.header,
75008
+ question: question.question,
75009
+ options,
75010
+ multiSelect: question.multiSelect === true
75011
+ };
75012
+ }).filter((question) => question !== null);
75013
+ return parsed.length > 0 ? parsed : null;
75014
+ }
75015
+ function derivePendingUserInputs(activities) {
75016
+ const openByRequestId = /* @__PURE__ */ new Map();
75017
+ const ordered = [...activities].toSorted(compareActivitiesByOrder);
75018
+ for (const activity of ordered) {
75019
+ const payload = activityPayload(activity);
75020
+ const requestId = payload !== null && typeof payload.requestId === "string" ? ApprovalRequestId.make(payload.requestId) : null;
75021
+ const detail = payload !== null && typeof payload.detail === "string" ? payload.detail : void 0;
75022
+ if (activity.kind === "user-input.requested" && requestId !== null) {
75023
+ const questions = parseUserInputQuestions(payload);
75024
+ if (questions === null) continue;
75025
+ openByRequestId.set(requestId, {
75026
+ requestId,
75027
+ createdAt: activity.createdAt,
75028
+ questions
75029
+ });
75030
+ continue;
75031
+ }
75032
+ if (activity.kind === "user-input.resolved" && requestId !== null) {
75033
+ openByRequestId.delete(requestId);
75034
+ continue;
75035
+ }
75036
+ if (activity.kind === "provider.user-input.respond.failed" && requestId !== null && isStalePendingRequestFailureDetail(detail)) openByRequestId.delete(requestId);
75037
+ }
75038
+ return [...openByRequestId.values()].toSorted((a, b) => a.createdAt.localeCompare(b.createdAt));
75039
+ }
75040
+ //#endregion
75041
+ //#region src/auth/service.ts
75042
+ var T3Auth = class extends Service$1()("t3cli/T3Auth") {};
75043
+ //#endregion
75044
+ //#region src/cli/env/flag.ts
75045
+ const cliEnvironmentSetting = setting("environment")({ flag: string("environment").pipe(withDescription("Auth environment name for this command"), optional) });
75046
+ //#endregion
73498
75047
  //#region src/cli-path/service.ts
73499
75048
  var CliPath = class extends Service$1()("t3cli/CliPath") {};
73500
75049
  //#endregion
75050
+ //#region upstream-t3code/packages/client-runtime/src/state/threadSettled.ts
75051
+ /** Returns whether the change request state settles the thread immediately. */
75052
+ function changeRequestAutoSettles(state, autoSettleOnMerge = true) {
75053
+ return state === "closed" || state === "merged" && autoSettleOnMerge;
75054
+ }
75055
+ const DAY_MS = 1440 * 60 * 1e3;
75056
+ function threadLastActivityAt(shell) {
75057
+ const candidates = [
75058
+ shell.latestUserMessageAt,
75059
+ shell.latestTurn?.requestedAt,
75060
+ shell.latestTurn?.startedAt,
75061
+ shell.latestTurn?.completedAt
75062
+ ];
75063
+ let latest = null;
75064
+ let latestTimestamp = Number.NEGATIVE_INFINITY;
75065
+ for (const candidate of candidates) {
75066
+ if (candidate === null || candidate === void 0) continue;
75067
+ const timestamp = Date.parse(candidate);
75068
+ if (timestamp > latestTimestamp) {
75069
+ latest = candidate;
75070
+ latestTimestamp = timestamp;
75071
+ }
75072
+ }
75073
+ return latest;
75074
+ }
75075
+ /**
75076
+ * A queued turn start lives for at most this long: session adoption takes
75077
+ * seconds, so a user message still unadopted after the grace window is a
75078
+ * failed start (or stale data — shells from older servers can carry user
75079
+ * messages with no latestTurn at all), not pending work. Without this bound
75080
+ * such threads would be permanently unsettleable.
75081
+ */
75082
+ const QUEUED_TURN_START_GRACE_MS = 120 * 1e3;
75083
+ /**
75084
+ * A user message no turn has picked up yet: the turn.start command was
75085
+ * dispatched (message-sent + turn-start-requested) but no session has
75086
+ * adopted it, so `session` is still null and the pending work is invisible
75087
+ * to the session-status checks. Detectable as a user message strictly newer
75088
+ * than every timestamp on the latest turn — on adoption the new turn's
75089
+ * requestedAt equals the message time, clearing the condition — and only
75090
+ * within the adoption grace window.
75091
+ */
75092
+ function hasQueuedTurnStart(shell, options) {
75093
+ if (shell.latestUserMessageAt == null) return false;
75094
+ if (shell.session?.status === "error") return false;
75095
+ const messageAt = Date.parse(shell.latestUserMessageAt);
75096
+ if (Number.isNaN(messageAt)) return false;
75097
+ const nowMs = Date.parse(options.now);
75098
+ if (Number.isNaN(nowMs)) return false;
75099
+ if (Math.abs(nowMs - messageAt) > 12e4) return false;
75100
+ const turn = shell.latestTurn;
75101
+ if (turn === null) return true;
75102
+ return [
75103
+ turn.requestedAt,
75104
+ turn.startedAt,
75105
+ turn.completedAt
75106
+ ].every((candidate) => candidate == null || Date.parse(candidate) < messageAt);
75107
+ }
75108
+ /**
75109
+ * A thread may be settled only when none of effectiveSettled's activity
75110
+ * blockers hold. This is deliberately the same list: anything the partition
75111
+ * refuses to CLASSIFY as settled must also be refused as a settle TARGET.
75112
+ * The server enforces its own invariants; this client-side twin exists so
75113
+ * the UI can disable/reject before a round trip.
75114
+ */
75115
+ function canSettle(shell, options) {
75116
+ if (shell.hasPendingApprovals || shell.hasPendingUserInput) return false;
75117
+ if (shell.session?.status === "starting" || shell.session?.status === "running") return false;
75118
+ if (hasQueuedTurnStart(shell, options)) return false;
75119
+ return true;
75120
+ }
75121
+ /**
75122
+ * A snoozed thread "raises its hand" when something happens that outranks
75123
+ * the user's snooze: the agent is blocked on them (approval / user input),
75124
+ * the session failed, or a run completed after the snooze was set — the
75125
+ * v1 taste of event-based snooze ("something happened" wakes early).
75126
+ * Raising a hand never clears the server-side snooze fields; it only stops
75127
+ * the thread from CLASSIFYING as snoozed, exactly like blocked work and
75128
+ * effectiveSettled.
75129
+ */
75130
+ function threadRaisedHandWhileSnoozed(shell) {
75131
+ if (shell.hasPendingApprovals || shell.hasPendingUserInput) return true;
75132
+ if (shell.session?.status === "error" && (shell.snoozedAt == null || Date.parse(shell.session.updatedAt) > Date.parse(shell.snoozedAt))) return true;
75133
+ if (shell.snoozedAt != null && shell.latestTurn?.state === "completed" && shell.latestTurn.completedAt != null && Date.parse(shell.latestTurn.completedAt) > Date.parse(shell.snoozedAt)) return true;
75134
+ return false;
75135
+ }
75136
+ /**
75137
+ * A thread may be snoozed unless the agent is blocked on the user: hiding a
75138
+ * pending approval or user-input request defeats the request, and a queued
75139
+ * turn start (a message no turn has adopted yet) is invisible pending work
75140
+ * the same way it is for settle. A running session IS snoozable — snooze
75141
+ * only affects visibility, never the agent. Client-side twin of the server
75142
+ * invariants so the UI can reject before a round trip.
75143
+ */
75144
+ function canSnooze(shell, options) {
75145
+ if (shell.hasPendingApprovals || shell.hasPendingUserInput) return false;
75146
+ if (hasQueuedTurnStart(shell, options)) return false;
75147
+ return true;
75148
+ }
75149
+ /**
75150
+ * Snoozed resolution: hidden from the inbox while the wake time is in the
75151
+ * future and the thread has not raised its hand. Timer wakes are derived —
75152
+ * no server event fires when snoozedUntil passes; the stale fields simply
75153
+ * stop classifying as snoozed (and feed the woke indicator until the user
75154
+ * visits or re-engages).
75155
+ */
75156
+ function effectiveSnoozed(shell, options) {
75157
+ if (shell.snoozedUntil == null) return false;
75158
+ const wakeAtMs = Date.parse(shell.snoozedUntil);
75159
+ if (Number.isNaN(wakeAtMs)) return false;
75160
+ if (wakeAtMs <= Date.parse(options.now)) return false;
75161
+ return !threadRaisedHandWhileSnoozed(shell);
75162
+ }
75163
+ /**
75164
+ * When a previously-snoozed thread woke, or null if it never snoozed / is
75165
+ * still snoozed. Used for the "Woke" indicator: the thread reappears in its
75166
+ * original sort position (the inbox sort is deliberately static), so the
75167
+ * wake signal has to carry the weight. Compare against the client's
75168
+ * lastVisitedAt — visiting clears the indicator like it clears unread.
75169
+ *
75170
+ * Timer wakes report the wake time itself; raised-hand wakes report the
75171
+ * triggering timestamp so a visit BEFORE the early wake doesn't suppress
75172
+ * the indicator.
75173
+ */
75174
+ function threadWokeAt(shell, options) {
75175
+ if (shell.snoozedUntil == null) return null;
75176
+ const wakeAtMs = Date.parse(shell.snoozedUntil);
75177
+ if (Number.isNaN(wakeAtMs)) return null;
75178
+ if (threadRaisedHandWhileSnoozed(shell)) {
75179
+ if (shell.snoozedAt != null && shell.latestTurn?.state === "completed" && shell.latestTurn.completedAt != null && Date.parse(shell.latestTurn.completedAt) > Date.parse(shell.snoozedAt)) return shell.latestTurn.completedAt;
75180
+ return shell.session?.updatedAt ?? shell.snoozedAt ?? null;
75181
+ }
75182
+ return wakeAtMs <= Date.parse(options.now) ? shell.snoozedUntil : null;
75183
+ }
75184
+ /**
75185
+ * Settled resolution over the server-backed settled lifecycle. Activity
75186
+ * blockers (pending approval/user-input, a live session, an unadjudicated
75187
+ * queued turn) are checked first and hold a thread active regardless of any
75188
+ * override. Past the blockers, the explicit user override (thread.settle /
75189
+ * thread.unsettle commands, projected into settledOverride + settledAt)
75190
+ * wins in both directions; without one, a thread can auto-settle on a
75191
+ * merged PR, always settles on a closed PR, or settles on inactivity past
75192
+ * the window. An open PR blocks the inactivity path entirely. The server
75193
+ * un-settles on real activity (user message, session start, approval/
75194
+ * user-input request), so an override never goes stale silently.
75195
+ */
75196
+ function effectiveSettled(shell, options) {
75197
+ if (shell.hasPendingApprovals || shell.hasPendingUserInput) return false;
75198
+ if (shell.session?.status === "starting" || shell.session?.status === "running") return false;
75199
+ if (hasQueuedTurnStart(shell, { now: options.now })) {
75200
+ if (!(shell.settledOverride === "settled" && shell.settledAt !== null && shell.latestUserMessageAt !== null && Date.parse(shell.settledAt) >= Date.parse(shell.latestUserMessageAt))) return false;
75201
+ }
75202
+ if (shell.settledOverride === "settled") return true;
75203
+ if (shell.settledOverride === "active") return false;
75204
+ if (changeRequestAutoSettles(options.changeRequestState, options.autoSettleOnMerge !== false)) return true;
75205
+ if (options.changeRequestState === "open") return false;
75206
+ if (options.autoSettleAfterDays === null) return false;
75207
+ const lastActivityAt = threadLastActivityAt(shell);
75208
+ if (lastActivityAt === null) return false;
75209
+ return Date.parse(lastActivityAt) < Date.parse(options.now) - options.autoSettleAfterDays * DAY_MS;
75210
+ }
75211
+ const HOUR_MS = 3600 * 1e3;
75212
+ const EVENING_HOUR = 18;
75213
+ const MORNING_HOUR = 9;
75214
+ function snoozeTimeOfDayLabel(date) {
75215
+ return date.toLocaleTimeString(void 0, {
75216
+ hour: "numeric",
75217
+ minute: "2-digit"
75218
+ });
75219
+ }
75220
+ function snoozeAtHour(base, hour) {
75221
+ const next = new Date(base);
75222
+ next.setHours(hour, 0, 0, 0);
75223
+ return next;
75224
+ }
75225
+ function addSnoozeDays(base, days) {
75226
+ const next = new Date(base);
75227
+ next.setDate(next.getDate() + days);
75228
+ return next;
75229
+ }
75230
+ /**
75231
+ * Shared "snooze until" choices for every client. "This evening" only
75232
+ * appears while it is meaningfully before evening; after that the calendar
75233
+ * choices start at "Tomorrow".
75234
+ */
75235
+ function resolveSnoozePresets(now) {
75236
+ const inAnHour = new Date(now.getTime() + HOUR_MS);
75237
+ const inThreeHours = new Date(now.getTime() + 3 * HOUR_MS);
75238
+ const presets = [{
75239
+ id: "hour",
75240
+ label: "In 1 hour",
75241
+ whenLabel: snoozeTimeOfDayLabel(inAnHour),
75242
+ snoozedUntil: inAnHour.toISOString()
75243
+ }, {
75244
+ id: "three-hours",
75245
+ label: "In 3 hours",
75246
+ whenLabel: snoozeTimeOfDayLabel(inThreeHours),
75247
+ snoozedUntil: inThreeHours.toISOString()
75248
+ }];
75249
+ const evening = snoozeAtHour(now, EVENING_HOUR);
75250
+ if (evening.getTime() - now.getTime() > HOUR_MS) presets.push({
75251
+ id: "evening",
75252
+ label: "This evening",
75253
+ whenLabel: snoozeTimeOfDayLabel(evening),
75254
+ snoozedUntil: evening.toISOString()
75255
+ });
75256
+ const tomorrow = snoozeAtHour(addSnoozeDays(now, 1), MORNING_HOUR);
75257
+ presets.push({
75258
+ id: "tomorrow",
75259
+ label: "Tomorrow",
75260
+ whenLabel: snoozeTimeOfDayLabel(tomorrow),
75261
+ snoozedUntil: tomorrow.toISOString()
75262
+ });
75263
+ const nextWeek = snoozeAtHour(addSnoozeDays(now, (1 - now.getDay() + 7) % 7 || 7), MORNING_HOUR);
75264
+ presets.push({
75265
+ id: "next-week",
75266
+ label: "Next week",
75267
+ whenLabel: `${nextWeek.toLocaleDateString(void 0, { weekday: "short" })} ${snoozeTimeOfDayLabel(nextWeek)}`,
75268
+ snoozedUntil: nextWeek.toISOString()
75269
+ });
75270
+ return presets;
75271
+ }
75272
+ /**
75273
+ * Compact "wakes in" label for snoozed rows: "2h", "18h", "3d". Minutes
75274
+ * round up so a snooze never reads "0m" while still hidden. Shared by web
75275
+ * and mobile so the same wake time never reads differently per client.
75276
+ */
75277
+ function snoozeWakeLabel(snoozedUntil, options) {
75278
+ const wakeMs = Date.parse(snoozedUntil);
75279
+ const nowMs = Date.parse(options.now);
75280
+ if (Number.isNaN(wakeMs) || Number.isNaN(nowMs)) return "now";
75281
+ const remainingMs = wakeMs - nowMs;
75282
+ if (remainingMs <= 0) return "now";
75283
+ if (remainingMs < HOUR_MS) return `${Math.max(1, Math.ceil(remainingMs / 6e4))}m`;
75284
+ if (remainingMs < DAY_MS) return `${Math.ceil(remainingMs / HOUR_MS)}h`;
75285
+ return `${Math.ceil(remainingMs / DAY_MS)}d`;
75286
+ }
75287
+ //#endregion
73501
75288
  //#region src/cli/env/selection-layer.ts
73502
75289
  var selection_layer_exports = /* @__PURE__ */ __exportAll({ layer: () => layer$15 });
73503
75290
  const layer$15 = effect$1(T3ConfigSelection, gen(function* () {
@@ -101245,7 +103032,7 @@ const unknownToAttributeValue = (value) => {
101245
103032
  case "bigint": return { intValue: String(value) };
101246
103033
  case "number": return Number.isInteger(value) ? { intValue: value } : { doubleValue: value };
101247
103034
  case "boolean": return { boolValue: value };
101248
- default: return { stringValue: format$1(value) };
103035
+ default: return { stringValue: format$2(value) };
101249
103036
  }
101250
103037
  };
101251
103038
  //#endregion
@@ -102282,6 +104069,8 @@ const remoteApiBaseUrl = (httpBaseUrl) => {
102282
104069
  return url.toString();
102283
104070
  };
102284
104071
  const makeEnvironmentHttpApiClient = (httpBaseUrl) => make$14(EnvironmentHttpApi, { baseUrl: remoteApiBaseUrl(httpBaseUrl) });
104072
+ /** Contract-derived request URLs for authentication proofs, tracing, and structured errors. */
104073
+ const makeEnvironmentHttpApiUrlBuilder = (httpBaseUrl) => urlBuilder(EnvironmentHttpApi, { baseUrl: remoteApiBaseUrl(httpBaseUrl) });
102285
104074
  const failRemoteRequest = (requestUrl, cause) => {
102286
104075
  if (cause instanceof RemoteEnvironmentAuthTimeoutError) return fail$3(cause);
102287
104076
  if (isEnvironmentHttpCommonError(cause)) return fail$3(cause);
@@ -110087,130 +111876,6 @@ function failMissingCurrentModel(input) {
110087
111876
  return fail$3(new ModelSelectionError({ message: `provider ${input.provider} does not have current model ${input.model}; pass --model` }));
110088
111877
  }
110089
111878
  //#endregion
110090
- //#region src/domain/thread-activities.ts
110091
- function isRecord$1(value) {
110092
- return value !== null && typeof value === "object";
110093
- }
110094
- function activityPayload(activity) {
110095
- const payload = activity.payload;
110096
- if (!isRecord$1(payload)) return null;
110097
- return payload;
110098
- }
110099
- function compareActivityLifecycleRank(kind) {
110100
- if (kind.endsWith(".started") || kind === "tool.started") return 0;
110101
- if (kind.endsWith(".progress") || kind.endsWith(".updated")) return 1;
110102
- if (kind.endsWith(".completed") || kind.endsWith(".resolved") || kind.endsWith(".failed")) return 2;
110103
- return 1;
110104
- }
110105
- function compareActivitiesByOrder(left, right) {
110106
- if (left.sequence !== void 0 && right.sequence !== void 0) {
110107
- if (left.sequence !== right.sequence) return left.sequence - right.sequence;
110108
- } else if (left.sequence !== void 0) return 1;
110109
- else if (right.sequence !== void 0) return -1;
110110
- const createdAtComparison = left.createdAt.localeCompare(right.createdAt);
110111
- if (createdAtComparison !== 0) return createdAtComparison;
110112
- const lifecycleRankComparison = compareActivityLifecycleRank(left.kind) - compareActivityLifecycleRank(right.kind);
110113
- if (lifecycleRankComparison !== 0) return lifecycleRankComparison;
110114
- return left.id.localeCompare(right.id);
110115
- }
110116
- function requestKindFromRequestType(requestType) {
110117
- switch (requestType) {
110118
- case "command_execution_approval":
110119
- case "exec_command_approval":
110120
- case "dynamic_tool_call": return "command";
110121
- case "file_read_approval": return "file-read";
110122
- case "file_change_approval":
110123
- case "apply_patch_approval": return "file-change";
110124
- default: return null;
110125
- }
110126
- }
110127
- function isStalePendingRequestFailureDetail(detail) {
110128
- const normalized = detail?.toLowerCase();
110129
- if (normalized === void 0 || normalized.length === 0) return false;
110130
- return normalized.includes("stale pending approval request") || normalized.includes("stale pending user-input request") || normalized.includes("unknown pending approval request") || normalized.includes("unknown pending permission request") || normalized.includes("unknown pending user-input request");
110131
- }
110132
- function requestKindFromPayload(payload) {
110133
- if (payload.requestKind === "command" || payload.requestKind === "file-read" || payload.requestKind === "file-change") return payload.requestKind;
110134
- return requestKindFromRequestType(payload.requestType);
110135
- }
110136
- function derivePendingApprovals(activities) {
110137
- const openByRequestId = /* @__PURE__ */ new Map();
110138
- const ordered = [...activities].toSorted(compareActivitiesByOrder);
110139
- for (const activity of ordered) {
110140
- const payload = activityPayload(activity);
110141
- const requestId = payload !== null && typeof payload.requestId === "string" ? ApprovalRequestId.make(payload.requestId) : null;
110142
- const requestKind = payload !== null ? requestKindFromPayload(payload) : null;
110143
- const detail = payload !== null && typeof payload.detail === "string" ? payload.detail : void 0;
110144
- if (activity.kind === "approval.requested" && requestId !== null && requestKind !== null) {
110145
- openByRequestId.set(requestId, {
110146
- requestId,
110147
- requestKind,
110148
- createdAt: activity.createdAt,
110149
- ...detail !== void 0 ? { detail } : {}
110150
- });
110151
- continue;
110152
- }
110153
- if (activity.kind === "approval.resolved" && requestId !== null) {
110154
- openByRequestId.delete(requestId);
110155
- continue;
110156
- }
110157
- if (activity.kind === "provider.approval.respond.failed" && requestId !== null && isStalePendingRequestFailureDetail(detail)) openByRequestId.delete(requestId);
110158
- }
110159
- return [...openByRequestId.values()].toSorted((a, b) => a.createdAt.localeCompare(b.createdAt));
110160
- }
110161
- function parseUserInputQuestions(payload) {
110162
- const questions = payload?.questions;
110163
- if (!Array.isArray(questions)) return null;
110164
- const parsed = questions.map((entry) => {
110165
- if (!isRecord$1(entry)) return null;
110166
- const question = entry;
110167
- if (typeof question.id !== "string" || typeof question.header !== "string" || typeof question.question !== "string" || !Array.isArray(question.options)) return null;
110168
- const options = question.options.map((option) => {
110169
- if (!isRecord$1(option)) return null;
110170
- const record = option;
110171
- if (typeof record.label !== "string" || typeof record.description !== "string") return null;
110172
- return {
110173
- label: record.label,
110174
- description: record.description
110175
- };
110176
- }).filter((option) => option !== null);
110177
- if (options.length === 0) return null;
110178
- return {
110179
- id: question.id,
110180
- header: question.header,
110181
- question: question.question,
110182
- options,
110183
- multiSelect: question.multiSelect === true
110184
- };
110185
- }).filter((question) => question !== null);
110186
- return parsed.length > 0 ? parsed : null;
110187
- }
110188
- function derivePendingUserInputs(activities) {
110189
- const openByRequestId = /* @__PURE__ */ new Map();
110190
- const ordered = [...activities].toSorted(compareActivitiesByOrder);
110191
- for (const activity of ordered) {
110192
- const payload = activityPayload(activity);
110193
- const requestId = payload !== null && typeof payload.requestId === "string" ? ApprovalRequestId.make(payload.requestId) : null;
110194
- const detail = payload !== null && typeof payload.detail === "string" ? payload.detail : void 0;
110195
- if (activity.kind === "user-input.requested" && requestId !== null) {
110196
- const questions = parseUserInputQuestions(payload);
110197
- if (questions === null) continue;
110198
- openByRequestId.set(requestId, {
110199
- requestId,
110200
- createdAt: activity.createdAt,
110201
- questions
110202
- });
110203
- continue;
110204
- }
110205
- if (activity.kind === "user-input.resolved" && requestId !== null) {
110206
- openByRequestId.delete(requestId);
110207
- continue;
110208
- }
110209
- if (activity.kind === "provider.user-input.respond.failed" && requestId !== null && isStalePendingRequestFailureDetail(detail)) openByRequestId.delete(requestId);
110210
- }
110211
- return [...openByRequestId.values()].toSorted((a, b) => a.createdAt.localeCompare(b.createdAt));
110212
- }
110213
- //#endregion
110214
111879
  //#region src/application/thread-commands.ts
110215
111880
  const makeThreadStartCommands = fn("makeThreadStartCommands")(function* (input) {
110216
111881
  const crypto = yield* Crypto;
@@ -110288,6 +111953,57 @@ const makeThreadUnarchiveCommand = fn("makeThreadUnarchiveCommand")(function* (t
110288
111953
  threadId: ThreadId.make(threadId)
110289
111954
  };
110290
111955
  });
111956
+ const makeThreadSettleCommand = fn("makeThreadSettleCommand")(function* (threadId) {
111957
+ const crypto = yield* Crypto;
111958
+ return {
111959
+ type: "thread.settle",
111960
+ commandId: CommandId.make(`t3cli:thread-settle:${yield* crypto.randomUUIDv4.pipe(orDie)}`),
111961
+ threadId: ThreadId.make(threadId)
111962
+ };
111963
+ });
111964
+ const makeThreadUnsettleCommand = fn("makeThreadUnsettleCommand")(function* (threadId) {
111965
+ const crypto = yield* Crypto;
111966
+ return {
111967
+ type: "thread.unsettle",
111968
+ commandId: CommandId.make(`t3cli:thread-unsettle:${yield* crypto.randomUUIDv4.pipe(orDie)}`),
111969
+ threadId: ThreadId.make(threadId),
111970
+ reason: "user"
111971
+ };
111972
+ });
111973
+ const makeThreadSnoozeCommand = fn("makeThreadSnoozeCommand")(function* (input) {
111974
+ const crypto = yield* Crypto;
111975
+ return {
111976
+ type: "thread.snooze",
111977
+ commandId: CommandId.make(`t3cli:thread-snooze:${yield* crypto.randomUUIDv4.pipe(orDie)}`),
111978
+ threadId: ThreadId.make(input.threadId),
111979
+ snoozedUntil: input.snoozedUntil
111980
+ };
111981
+ });
111982
+ const makeThreadUnsnoozeCommand = fn("makeThreadUnsnoozeCommand")(function* (threadId) {
111983
+ const crypto = yield* Crypto;
111984
+ return {
111985
+ type: "thread.unsnooze",
111986
+ commandId: CommandId.make(`t3cli:thread-unsnooze:${yield* crypto.randomUUIDv4.pipe(orDie)}`),
111987
+ threadId: ThreadId.make(threadId),
111988
+ reason: "user"
111989
+ };
111990
+ });
111991
+ const makeThreadPinCommand = fn("makeThreadPinCommand")(function* (threadId) {
111992
+ const crypto = yield* Crypto;
111993
+ return {
111994
+ type: "thread.pin",
111995
+ commandId: CommandId.make(`t3cli:thread-pin:${yield* crypto.randomUUIDv4.pipe(orDie)}`),
111996
+ threadId: ThreadId.make(threadId)
111997
+ };
111998
+ });
111999
+ const makeThreadUnpinCommand = fn("makeThreadUnpinCommand")(function* (threadId) {
112000
+ const crypto = yield* Crypto;
112001
+ return {
112002
+ type: "thread.unpin",
112003
+ commandId: CommandId.make(`t3cli:thread-unpin:${yield* crypto.randomUUIDv4.pipe(orDie)}`),
112004
+ threadId: ThreadId.make(threadId)
112005
+ };
112006
+ });
110291
112007
  const makeThreadSessionStopCommand = fn("makeThreadSessionStopCommand")(function* (threadId) {
110292
112008
  const crypto = yield* Crypto;
110293
112009
  const createdAt = formatIso(yield* now);
@@ -110498,20 +112214,54 @@ const makeThreadApplication = fn("makeThreadApplication")(function* () {
110498
112214
  };
110499
112215
  });
110500
112216
  });
110501
- const getThreadMessages = fn("T3ApplicationLive.getThreadMessages")(function* (threadId) {
110502
- return yield* orchestration.getThreadSnapshot(threadId);
112217
+ const getThreadMessages = fn("T3ApplicationLive.getThreadMessages")(function* (input) {
112218
+ return yield* orchestration.getThreadDetailSnapshot(input);
112219
+ });
112220
+ const getThreadSummary = fn("T3ApplicationLive.getThreadSummary")(function* (threadId) {
112221
+ const thread = (yield* loadThreadsSnapshot("all").pipe(provideService$2(T3Orchestration, orchestration))).threads.find((item) => item.id === threadId);
112222
+ if (thread === void 0) return yield* fail$3(new ThreadLookupError({
112223
+ message: `thread not found: ${threadId}`,
112224
+ threadId
112225
+ }));
112226
+ return thread;
110503
112227
  });
110504
112228
  const showThread = fn("T3ApplicationLive.showThread")(function* (threadId) {
110505
112229
  return projectThreadShow(yield* orchestration.getThreadSnapshot(threadId));
110506
112230
  });
110507
112231
  const archiveThread = fn("T3ApplicationLive.archiveThread")(function* (threadId) {
110508
112232
  const command = yield* makeThreadArchiveCommand(threadId).pipe(provideService$2(Crypto, crypto));
110509
- return yield* orchestration.dispatch(command);
112233
+ const dispatch = yield* orchestration.dispatch(command);
112234
+ yield* awaitShellSequence(dispatch.sequence);
112235
+ return dispatch;
110510
112236
  });
110511
112237
  const unarchiveThread = fn("T3ApplicationLive.unarchiveThread")(function* (threadId) {
110512
112238
  const command = yield* makeThreadUnarchiveCommand(threadId).pipe(provideService$2(Crypto, crypto));
110513
112239
  return yield* orchestration.dispatch(command);
110514
112240
  });
112241
+ const settleThread = fn("T3ApplicationLive.settleThread")(function* (threadId) {
112242
+ const command = yield* makeThreadSettleCommand(threadId).pipe(provideService$2(Crypto, crypto));
112243
+ return yield* orchestration.dispatch(command);
112244
+ });
112245
+ const unsettleThread = fn("T3ApplicationLive.unsettleThread")(function* (threadId) {
112246
+ const command = yield* makeThreadUnsettleCommand(threadId).pipe(provideService$2(Crypto, crypto));
112247
+ return yield* orchestration.dispatch(command);
112248
+ });
112249
+ const snoozeThread = fn("T3ApplicationLive.snoozeThread")(function* (input) {
112250
+ const command = yield* makeThreadSnoozeCommand(input).pipe(provideService$2(Crypto, crypto));
112251
+ return yield* orchestration.dispatch(command);
112252
+ });
112253
+ const unsnoozeThread = fn("T3ApplicationLive.unsnoozeThread")(function* (threadId) {
112254
+ const command = yield* makeThreadUnsnoozeCommand(threadId).pipe(provideService$2(Crypto, crypto));
112255
+ return yield* orchestration.dispatch(command);
112256
+ });
112257
+ const pinThread = fn("T3ApplicationLive.pinThread")(function* (threadId) {
112258
+ const command = yield* makeThreadPinCommand(threadId).pipe(provideService$2(Crypto, crypto));
112259
+ return yield* orchestration.dispatch(command);
112260
+ });
112261
+ const unpinThread = fn("T3ApplicationLive.unpinThread")(function* (threadId) {
112262
+ const command = yield* makeThreadUnpinCommand(threadId).pipe(provideService$2(Crypto, crypto));
112263
+ return yield* orchestration.dispatch(command);
112264
+ });
110515
112265
  const interruptThread = fn("T3ApplicationLive.interruptThread")(function* (threadId) {
110516
112266
  const activeTurnId = (yield* orchestration.getThreadSnapshot(threadId)).session?.activeTurnId ?? void 0;
110517
112267
  const command = yield* makeThreadInterruptCommand({
@@ -110520,6 +112270,14 @@ const makeThreadApplication = fn("makeThreadApplication")(function* () {
110520
112270
  }).pipe(provideService$2(Crypto, crypto));
110521
112271
  return yield* orchestration.dispatch(command);
110522
112272
  });
112273
+ const interruptThreadTurn = fn("T3ApplicationLive.interruptThreadTurn")(function* (threadId, turnId) {
112274
+ if ((yield* orchestration.getThreadSnapshot(threadId)).session?.activeTurnId !== turnId) return;
112275
+ const command = yield* makeThreadInterruptCommand({
112276
+ threadId,
112277
+ turnId
112278
+ }).pipe(provideService$2(Crypto, crypto));
112279
+ return yield* orchestration.dispatch(command);
112280
+ });
110523
112281
  const deleteThread = fn("T3ApplicationLive.deleteThread")(function* (threadId) {
110524
112282
  const thread = (yield* loadThreadsSnapshot("all").pipe(provideService$2(T3Orchestration, orchestration))).threads.find((item) => item.id === threadId);
110525
112283
  if (thread === void 0) return yield* fail$3(new ThreadLookupError({
@@ -110559,13 +112317,16 @@ const makeThreadApplication = fn("makeThreadApplication")(function* () {
110559
112317
  project: scope.project,
110560
112318
  serverConfig
110561
112319
  }).pipe(provideService$2(Crypto, crypto));
112320
+ const threadId = commands.threadId;
110562
112321
  const createDispatch = yield* orchestration.dispatch(commands.createCommand);
112322
+ if (policy?.onThreadCreated !== void 0) yield* policy.onThreadCreated(threadId);
110563
112323
  yield* awaitShellSequence(createDispatch.sequence);
110564
112324
  const dispatch = yield* orchestration.dispatch(commands.turnCommand);
110565
- const threadId = commands.threadId;
112325
+ const messageId = commands.turnCommand.message.messageId;
110566
112326
  const until = policy?.until ?? "dispatch";
110567
112327
  if (until === "dispatch") return {
110568
112328
  dispatch,
112329
+ messageId,
110569
112330
  project: scope.project,
110570
112331
  threadId
110571
112332
  };
@@ -110576,6 +112337,7 @@ const makeThreadApplication = fn("makeThreadApplication")(function* () {
110576
112337
  }));
110577
112338
  return {
110578
112339
  dispatch,
112340
+ messageId,
110579
112341
  project: scope.project,
110580
112342
  threadId,
110581
112343
  thread
@@ -110585,6 +112347,7 @@ const makeThreadApplication = fn("makeThreadApplication")(function* () {
110585
112347
  yield* failIfThreadError(thread);
110586
112348
  return {
110587
112349
  dispatch,
112350
+ messageId,
110588
112351
  project: scope.project,
110589
112352
  threadId,
110590
112353
  thread
@@ -110597,9 +112360,11 @@ const makeThreadApplication = fn("makeThreadApplication")(function* () {
110597
112360
  ...modelSelection !== void 0 ? { modelSelection } : {}
110598
112361
  }).pipe(provideService$2(Crypto, crypto));
110599
112362
  const dispatch = yield* orchestration.dispatch(command);
112363
+ const messageId = command.message.messageId;
110600
112364
  const until = policy?.until ?? "dispatch";
110601
112365
  if (until === "dispatch") return {
110602
112366
  dispatch,
112367
+ messageId,
110603
112368
  threadId: input.threadId
110604
112369
  };
110605
112370
  yield* awaitShellSequence(dispatch.sequence);
@@ -110609,6 +112374,7 @@ const makeThreadApplication = fn("makeThreadApplication")(function* () {
110609
112374
  }));
110610
112375
  return {
110611
112376
  dispatch,
112377
+ messageId,
110612
112378
  threadId: input.threadId,
110613
112379
  thread
110614
112380
  };
@@ -110617,6 +112383,7 @@ const makeThreadApplication = fn("makeThreadApplication")(function* () {
110617
112383
  yield* failIfThreadError(thread);
110618
112384
  return {
110619
112385
  dispatch,
112386
+ messageId,
110620
112387
  threadId: input.threadId,
110621
112388
  thread
110622
112389
  };
@@ -110648,13 +112415,22 @@ const makeThreadApplication = fn("makeThreadApplication")(function* () {
110648
112415
  };
110649
112416
  }),
110650
112417
  archiveThread,
112418
+ awaitShellSequence,
110651
112419
  deleteThread,
110652
112420
  interruptThread,
112421
+ interruptThreadTurn,
112422
+ pinThread,
112423
+ settleThread,
112424
+ snoozeThread,
110653
112425
  updateThread,
110654
112426
  unarchiveThread,
112427
+ unpinThread,
112428
+ unsnoozeThread,
112429
+ unsettleThread,
110655
112430
  listThreads,
110656
112431
  searchThreads,
110657
112432
  getThreadMessages,
112433
+ getThreadSummary,
110658
112434
  respondToThread: fn("T3ApplicationLive.respondToThread")(function* (input) {
110659
112435
  const command = yield* makeThreadUserInputRespondCommand(input).pipe(provideService$2(Crypto, crypto));
110660
112436
  const dispatch = yield* orchestration.dispatch(command);
@@ -111385,6 +113161,88 @@ const T3PreparedConnectionProviderLive = effect$1(T3PreparedConnectionProvider,
111385
113161
  const get = connectionProvider.get.pipe(flatMap$3((connection) => makePreparedConnection(connection).pipe(provideService$2(HttpClient, httpClient))));
111386
113162
  return T3PreparedConnectionProvider.of({ get });
111387
113163
  })());
113164
+ //#endregion
113165
+ //#region upstream-t3code/packages/client-runtime/src/rpc/client.ts
113166
+ var EnvironmentRpcUnavailableError = class extends TaggedErrorClass()("EnvironmentRpcUnavailableError", {
113167
+ environmentId: String$1,
113168
+ message: String$1
113169
+ }) {};
113170
+ var EnvironmentRpcRequestObserver = class extends Reference("@t3tools/client-runtime/rpc/EnvironmentRpcRequestObserver", { defaultValue: () => ({ observe: () => succeed$4(void_$1) }) }) {};
113171
+ var EnvironmentRpcSubscriptionObserver = class extends Reference("@t3tools/client-runtime/rpc/EnvironmentRpcSubscriptionObserver", { defaultValue: () => ({ observe: () => succeed$4(void_$1) }) }) {};
113172
+ const isRpcClientError = is(RpcClientError);
113173
+ const currentSession = fn("EnvironmentRpc.currentSession")(function* () {
113174
+ const supervisor = yield* EnvironmentSupervisor;
113175
+ return yield* get$2(supervisor.session).pipe(flatMap$3(match$5({
113176
+ onNone: () => fail$3(new EnvironmentRpcUnavailableError({
113177
+ environmentId: supervisor.target.environmentId,
113178
+ message: `${supervisor.target.label} is not connected.`
113179
+ })),
113180
+ onSome: succeed$4
113181
+ })));
113182
+ });
113183
+ const request = fn("EnvironmentRpc.request")(function* (tag, input) {
113184
+ const supervisor = yield* EnvironmentSupervisor;
113185
+ yield* annotateCurrentSpan({
113186
+ "environment.id": supervisor.target.environmentId,
113187
+ "rpc.method": tag
113188
+ });
113189
+ const session = yield* currentSession();
113190
+ const observer = yield* EnvironmentRpcRequestObserver;
113191
+ const method = session.client[tag];
113192
+ const completeObservation = yield* observer.observe({
113193
+ environmentId: supervisor.target.environmentId,
113194
+ method: tag
113195
+ });
113196
+ return yield* method(input).pipe(ensuring$2(completeObservation));
113197
+ });
113198
+ function runStream(tag, input) {
113199
+ return unwrap(currentSession().pipe(map$7((session) => {
113200
+ const method = session.client[tag];
113201
+ return method(input);
113202
+ }))).pipe(withSpan("EnvironmentRpc.runStream", { attributes: { "rpc.method": tag } }));
113203
+ }
113204
+ function subscribeDynamic(tag, makeInput, options) {
113205
+ return unwrap(gen(function* () {
113206
+ const supervisor = yield* EnvironmentSupervisor;
113207
+ const observer = yield* EnvironmentRpcSubscriptionObserver;
113208
+ const sessionChanges = changes(supervisor.session);
113209
+ return (options?.resubscribe === void 0 ? sessionChanges : merge$1(sessionChanges, options.resubscribe.pipe(mapEffect$1(() => get$2(supervisor.session))))).pipe(switchMap(match$5({
113210
+ onNone: () => empty$7,
113211
+ onSome: (session) => {
113212
+ const method = session.client[tag];
113213
+ const subscribeToSession = () => suspend$1(() => unwrap(gen(function* () {
113214
+ const input = yield* makeInput(session);
113215
+ const completeObservation = yield* observer.observe({
113216
+ environmentId: supervisor.target.environmentId,
113217
+ method: tag,
113218
+ input
113219
+ });
113220
+ return method(input).pipe(ensuring(completeObservation), catchCause((cause) => {
113221
+ const hasOnlyExpectedFailures = cause.reasons.length > 0 && cause.reasons.every((reason) => reason._tag === "Fail");
113222
+ if (hasOnlyExpectedFailures && cause.reasons.every((reason) => reason._tag === "Fail" && isRpcClientError(reason.error))) return fromEffect(logWarning("Durable RPC subscription lost its transport; waiting for the next session.", {
113223
+ cause: pretty(cause),
113224
+ method: tag,
113225
+ environmentId: supervisor.target.environmentId
113226
+ })).pipe(drain);
113227
+ if (hasOnlyExpectedFailures && options?.onExpectedFailure !== void 0) {
113228
+ const handled = fromEffect(options.onExpectedFailure(cause)).pipe(drain);
113229
+ if (options.retryExpectedFailureAfter === void 0) return handled;
113230
+ return handled.pipe(concat$1(fromEffect(sleep(options.retryExpectedFailureAfter)).pipe(drain)), concat$1(subscribeToSession()));
113231
+ }
113232
+ return failCause$1(cause);
113233
+ }));
113234
+ })));
113235
+ return subscribeToSession();
113236
+ }
113237
+ })));
113238
+ })).pipe(withSpan("EnvironmentRpc.subscribe", { attributes: { "rpc.method": tag } }));
113239
+ }
113240
+ function subscribe(tag, input, options) {
113241
+ return subscribeDynamic(tag, () => succeed$4(input), options);
113242
+ }
113243
+ const config = gen(function* () {
113244
+ return yield* (yield* currentSession()).initialConfig;
113245
+ }).pipe(withSpan$2("EnvironmentRpc.config"));
111388
113246
  const ResultProto = {
111389
113247
  ["~effect/reactivity/AsyncResult"]: {
111390
113248
  E: identity,
@@ -111760,7 +113618,7 @@ const WritableTypeId = "~effect/reactivity/Atom/Writable";
111760
113618
  */
111761
113619
  const setIdleTTL = /*#__PURE__*/ dual(2, (self, durationInput) => {
111762
113620
  const duration = fromInputUnsafe(durationInput);
111763
- const isFinite = isFinite$2(duration);
113621
+ const isFinite = isFinite$3(duration);
111764
113622
  return Object.assign(Object.create(Object.getPrototypeOf(self)), {
111765
113623
  ...self,
111766
113624
  keepAlive: !isFinite,
@@ -112319,88 +114177,6 @@ const shouldRevalidateSWR = (result, staleTime) => {
112319
114177
  */
112320
114178
  const batch = batch$1;
112321
114179
  //#endregion
112322
- //#region upstream-t3code/packages/client-runtime/src/rpc/client.ts
112323
- var EnvironmentRpcUnavailableError = class extends TaggedErrorClass()("EnvironmentRpcUnavailableError", {
112324
- environmentId: String$1,
112325
- message: String$1
112326
- }) {};
112327
- var EnvironmentRpcRequestObserver = class extends Reference("@t3tools/client-runtime/rpc/EnvironmentRpcRequestObserver", { defaultValue: () => ({ observe: () => succeed$4(void_$1) }) }) {};
112328
- var EnvironmentRpcSubscriptionObserver = class extends Reference("@t3tools/client-runtime/rpc/EnvironmentRpcSubscriptionObserver", { defaultValue: () => ({ observe: () => succeed$4(void_$1) }) }) {};
112329
- const isRpcClientError = is(RpcClientError);
112330
- const currentSession = fn("EnvironmentRpc.currentSession")(function* () {
112331
- const supervisor = yield* EnvironmentSupervisor;
112332
- return yield* get$2(supervisor.session).pipe(flatMap$3(match$5({
112333
- onNone: () => fail$3(new EnvironmentRpcUnavailableError({
112334
- environmentId: supervisor.target.environmentId,
112335
- message: `${supervisor.target.label} is not connected.`
112336
- })),
112337
- onSome: succeed$4
112338
- })));
112339
- });
112340
- const request = fn("EnvironmentRpc.request")(function* (tag, input) {
112341
- const supervisor = yield* EnvironmentSupervisor;
112342
- yield* annotateCurrentSpan({
112343
- "environment.id": supervisor.target.environmentId,
112344
- "rpc.method": tag
112345
- });
112346
- const session = yield* currentSession();
112347
- const observer = yield* EnvironmentRpcRequestObserver;
112348
- const method = session.client[tag];
112349
- const completeObservation = yield* observer.observe({
112350
- environmentId: supervisor.target.environmentId,
112351
- method: tag
112352
- });
112353
- return yield* method(input).pipe(ensuring$2(completeObservation));
112354
- });
112355
- function runStream(tag, input) {
112356
- return unwrap(currentSession().pipe(map$7((session) => {
112357
- const method = session.client[tag];
112358
- return method(input);
112359
- }))).pipe(withSpan("EnvironmentRpc.runStream", { attributes: { "rpc.method": tag } }));
112360
- }
112361
- function subscribeDynamic(tag, makeInput, options) {
112362
- return unwrap(gen(function* () {
112363
- const supervisor = yield* EnvironmentSupervisor;
112364
- const observer = yield* EnvironmentRpcSubscriptionObserver;
112365
- const sessionChanges = changes(supervisor.session);
112366
- return (options?.resubscribe === void 0 ? sessionChanges : merge$1(sessionChanges, options.resubscribe.pipe(mapEffect$1(() => get$2(supervisor.session))))).pipe(switchMap(match$5({
112367
- onNone: () => empty$7,
112368
- onSome: (session) => {
112369
- const method = session.client[tag];
112370
- const subscribeToSession = () => suspend$1(() => unwrap(gen(function* () {
112371
- const input = yield* makeInput(session);
112372
- const completeObservation = yield* observer.observe({
112373
- environmentId: supervisor.target.environmentId,
112374
- method: tag,
112375
- input
112376
- });
112377
- return method(input).pipe(ensuring(completeObservation), catchCause((cause) => {
112378
- const hasOnlyExpectedFailures = cause.reasons.length > 0 && cause.reasons.every((reason) => reason._tag === "Fail");
112379
- if (hasOnlyExpectedFailures && cause.reasons.every((reason) => reason._tag === "Fail" && isRpcClientError(reason.error))) return fromEffect(logWarning("Durable RPC subscription lost its transport; waiting for the next session.", {
112380
- cause: pretty(cause),
112381
- method: tag,
112382
- environmentId: supervisor.target.environmentId
112383
- })).pipe(drain);
112384
- if (hasOnlyExpectedFailures && options?.onExpectedFailure !== void 0) {
112385
- const handled = fromEffect(options.onExpectedFailure(cause)).pipe(drain);
112386
- if (options.retryExpectedFailureAfter === void 0) return handled;
112387
- return handled.pipe(concat$1(fromEffect(sleep(options.retryExpectedFailureAfter)).pipe(drain)), concat$1(subscribeToSession()));
112388
- }
112389
- return failCause$1(cause);
112390
- }));
112391
- })));
112392
- return subscribeToSession();
112393
- }
112394
- })));
112395
- })).pipe(withSpan("EnvironmentRpc.subscribe", { attributes: { "rpc.method": tag } }));
112396
- }
112397
- function subscribe(tag, input, options) {
112398
- return subscribeDynamic(tag, () => succeed$4(input), options);
112399
- }
112400
- const config = gen(function* () {
112401
- return yield* (yield* currentSession()).initialConfig;
112402
- }).pipe(withSpan$2("EnvironmentRpc.config"));
112403
- //#endregion
112404
114180
  //#region upstream-t3code/packages/client-runtime/src/state/environmentHttpAuth.ts
112405
114181
  /**
112406
114182
  * Primary/local environments with no bearer or DPoP credential authenticate the
@@ -113044,9 +114820,19 @@ function createEnvironmentShellAtoms(runtime) {
113044
114820
  };
113045
114821
  }
113046
114822
  //#endregion
114823
+ //#region src/orchestration/error.ts
114824
+ var ThreadSnapshotRequestError = class extends TaggedErrorClass()("ThreadSnapshotRequestError", {
114825
+ message: String$1,
114826
+ threadId: String$1,
114827
+ cause: Defect()
114828
+ }) {};
114829
+ //#endregion
113047
114830
  //#region src/orchestration/layer.ts
114831
+ const THREAD_SNAPSHOT_TIMEOUT_MS = 3e4;
113048
114832
  const makeT3Orchestration = fn("makeT3Orchestration")(function* () {
113049
114833
  const rpc = yield* T3RpcOperations;
114834
+ const preparedConnectionProvider = yield* T3PreparedConnectionProvider;
114835
+ const httpClient = yield* HttpClient;
113050
114836
  const watchShellSnapshots = () => rpc.subscribe(ORCHESTRATION_WS_METHODS.subscribeShell, (client) => client[ORCHESTRATION_WS_METHODS.subscribeShell]({})).pipe(filter((item) => item.kind !== "synchronized"), mapAccum(() => none(), (current, item) => {
113051
114837
  if (item.kind === "snapshot") return [some(item.snapshot), [item.snapshot]];
113052
114838
  if (isNone(current)) return [current, []];
@@ -113055,13 +114841,15 @@ const makeT3Orchestration = fn("makeT3Orchestration")(function* () {
113055
114841
  }));
113056
114842
  const watchShellSequence = () => rpc.subscribe(ORCHESTRATION_WS_METHODS.subscribeShell, (client) => client[ORCHESTRATION_WS_METHODS.subscribeShell]({})).pipe(filter((item) => item.kind !== "synchronized"), map$5((item) => item.kind === "snapshot" ? item.snapshot.snapshotSequence : item.sequence));
113057
114843
  const watchThreadItems = (threadId) => rpc.subscribe(ORCHESTRATION_WS_METHODS.subscribeThread, (client) => client[ORCHESTRATION_WS_METHODS.subscribeThread]({ threadId: ThreadId.make(threadId) }));
114844
+ const dispatch = fn("T3OrchestrationLive.dispatch")(function* (command) {
114845
+ return yield* rpc.run(ORCHESTRATION_WS_METHODS.dispatchCommand, (client) => client[ORCHESTRATION_WS_METHODS.dispatchCommand](command));
114846
+ });
114847
+ const getServerConfig = fn("T3OrchestrationLive.getServerConfig")(function* () {
114848
+ return yield* rpc.run(WS_METHODS.serverGetConfig, (client) => client[WS_METHODS.serverGetConfig]({}));
114849
+ });
113058
114850
  return {
113059
- dispatch: fn("T3OrchestrationLive.dispatch")(function* (command) {
113060
- return yield* rpc.run(ORCHESTRATION_WS_METHODS.dispatchCommand, (client) => client[ORCHESTRATION_WS_METHODS.dispatchCommand](command));
113061
- }),
113062
- getServerConfig: fn("T3OrchestrationLive.getServerConfig")(function* () {
113063
- return yield* rpc.run(WS_METHODS.serverGetConfig, (client) => client[WS_METHODS.serverGetConfig]({}));
113064
- }),
114851
+ dispatch,
114852
+ getServerConfig,
113065
114853
  getShellSnapshot: fn("T3OrchestrationLive.getShellSnapshot")(function* () {
113066
114854
  const item = yield* runHead(rpc.subscribe(ORCHESTRATION_WS_METHODS.subscribeShell, (client) => client[ORCHESTRATION_WS_METHODS.subscribeShell]({})));
113067
114855
  const value = getOrUndefined$1(item);
@@ -113086,6 +114874,33 @@ const makeT3Orchestration = fn("makeT3Orchestration")(function* () {
113086
114874
  }));
113087
114875
  return value.snapshot.thread;
113088
114876
  }),
114877
+ getThreadDetailSnapshot: fn("T3OrchestrationLive.getThreadDetailSnapshot")(function* (input) {
114878
+ const window = (input.window === void 0 ? true : (yield* getServerConfig()).threadSnapshotPagination === true) ? input.window : void 0;
114879
+ const prepared = yield* preparedConnectionProvider.get.pipe(mapError$2((cause) => new ThreadSnapshotRequestError({
114880
+ message: "failed to prepare the thread snapshot request",
114881
+ threadId: input.threadId,
114882
+ cause
114883
+ })));
114884
+ const threadId = ThreadId.make(input.threadId);
114885
+ const requestUrl = environmentEndpointUrl(prepared.httpBaseUrl, `/api/orchestration/threads/${threadId}`);
114886
+ const client = yield* makeEnvironmentHttpApiClient(prepared.httpBaseUrl).pipe(provideService$2(HttpClient, httpClient), mapError$2((cause) => new ThreadSnapshotRequestError({
114887
+ message: "failed to create the thread snapshot client",
114888
+ threadId: input.threadId,
114889
+ cause
114890
+ })));
114891
+ return yield* executeEnvironmentHttpRequest(requestUrl, THREAD_SNAPSHOT_TIMEOUT_MS, client.orchestration.threadSnapshot({
114892
+ params: { threadId },
114893
+ payload: {
114894
+ ...window !== void 0 ? { turnLimit: window.turnLimit } : {},
114895
+ ...window?.beforeCursor !== void 0 ? { beforeCursor: window.beforeCursor } : {}
114896
+ },
114897
+ headers: { authorization: `Bearer ${prepared.httpAuthorization.token}` }
114898
+ })).pipe(provideService$2(HttpClient, httpClient), mapError$2((cause) => new ThreadSnapshotRequestError({
114899
+ message: "failed to load the thread snapshot",
114900
+ threadId: input.threadId,
114901
+ cause
114902
+ })));
114903
+ }),
113089
114904
  watchShellSnapshots,
113090
114905
  watchShellSequence,
113091
114906
  watchThreadItems,
@@ -113128,7 +114943,8 @@ const T3PreviewAutomationLive = effect$1(T3PreviewAutomation, makeT3PreviewAutom
113128
114943
  //#region src/rpc/ws-group.ts
113129
114944
  const CliServerConfig = Struct({
113130
114945
  environment: Struct({ capabilities: Struct({ connectionProbe: Boolean$2 }) }),
113131
- providers: ServerProviders
114946
+ providers: ServerProviders,
114947
+ threadSnapshotPagination: optionalKey(Boolean$2)
113132
114948
  });
113133
114949
  const CliWsRpcGroup = make$22(WsTerminalOpenRpc, WsTerminalAttachRpc, WsTerminalWriteRpc, WsTerminalResizeRpc, WsTerminalCloseRpc, WsSubscribeTerminalEventsRpc, WsSubscribeTerminalMetadataRpc, WsOrchestrationDispatchCommandRpc, WsOrchestrationGetArchivedShellSnapshotRpc, WsOrchestrationSearchThreadsRpc, WsOrchestrationSubscribeShellRpc, WsOrchestrationSubscribeThreadRpc, WsPreviewAutomationConnectRpc, WsPreviewAutomationRespondRpc, WsPreviewAutomationFocusHostRpc, WsServerProbeRpc, make$23(WS_METHODS.serverGetConfig, {
113134
114950
  payload: Struct({}),
@@ -113744,9 +115560,10 @@ const T3ConfigConnectionProviderLayer = effect$1(T3CodeConnectionProvider, gen(f
113744
115560
  cause: error
113745
115561
  }))));
113746
115562
  })).pipe(provide$2(T3ConfigLayer));
113747
- const T3RpcLayer = T3RpcLive.pipe(provide$2(mergeAll$1(T3PreparedConnectionProviderLive.pipe(provide$2(mergeAll$1(T3ConfigConnectionProviderLayer, layerUndici))), T3RpcSessionFactoryLive.pipe(provide$2(layerWebSocketConstructor)))));
115563
+ const T3PreparedConnectionLayer = T3PreparedConnectionProviderLive.pipe(provide$2(mergeAll$1(T3ConfigConnectionProviderLayer, layerUndici)));
115564
+ const T3RpcLayer = T3RpcLive.pipe(provide$2(mergeAll$1(T3PreparedConnectionLayer, T3RpcSessionFactoryLive.pipe(provide$2(layerWebSocketConstructor)))));
113748
115565
  const T3RpcOperationsLayer = T3RpcOperationsLive.pipe(provide$2(T3RpcLayer));
113749
- const T3OrchestrationLayer = T3OrchestrationLive.pipe(provide$2(T3RpcOperationsLayer));
115566
+ const T3OrchestrationLayer = T3OrchestrationLive.pipe(provide$2(mergeAll$1(T3RpcOperationsLayer, T3PreparedConnectionLayer, layerUndici)));
113750
115567
  const T3PreviewAutomationLayer = T3PreviewAutomationLive.pipe(provide$2(T3RpcOperationsLayer));
113751
115568
  const BaseAppLayer = mergeAll$1(T3ConfigLayer, T3AuthLayer, T3RpcLayer, T3RpcOperationsLayer, T3OrchestrationLayer, T3PreviewAutomationLayer, T3ApplicationLive.pipe(provide$2(mergeAll$1(T3RpcOperationsLayer, T3OrchestrationLayer))), NodeCliPathLayer);
113752
115569
  const BaseAuthAppLayer = mergeAll$1(T3ConfigLayer, T3AuthLayer);
@@ -114001,7 +115818,7 @@ function isExplicitRelativePath(value) {
114001
115818
  return value === "." || value === ".." || value.startsWith("./") || value.startsWith("../") || value.startsWith(".\\") || value.startsWith("..\\");
114002
115819
  }
114003
115820
  function isRootPath(value) {
114004
- return value === "/" || value === "\\" || /^[a-zA-Z]:[/\\]?$/.test(value);
115821
+ return value === "/" || value === "\\" || /^[a-zA-Z]:[/\\]$/.test(value);
114005
115822
  }
114006
115823
  function trimTrailingPathSeparators(value) {
114007
115824
  if (value.length === 0 || isRootPath(value)) return value;
@@ -114645,7 +116462,7 @@ function isGitLabHost(host) {
114645
116462
  return host === "gitlab.com" || host.includes("gitlab");
114646
116463
  }
114647
116464
  function isAzureDevOpsHost(host) {
114648
- return host === "dev.azure.com" || host.endsWith(".visualstudio.com");
116465
+ return host === "dev.azure.com" || host.endsWith(".dev.azure.com") || host.endsWith(".visualstudio.com");
114649
116466
  }
114650
116467
  function isBitbucketHost(host) {
114651
116468
  return host === "bitbucket.org" || host.includes("bitbucket");
@@ -115503,4 +117320,4 @@ function normalizeDpopHtu(url) {
115503
117320
  }
115504
117321
  }
115505
117322
  //#endregion
115506
- export { buildTemporaryWorktreeBranchName as $, make$72 as $A, BackgroundBooleanState as $C, ExitCode as $D, red as $E, isSink as $O, ExecutionEnvironmentPlatform as $S, loadT3CliEnv as $T, PreviewAnnotationScreenshotSchema as $_, tokenStore_exports as $a, OrchestrationGetFullThreadDiffError as $b, WsSubscribeServerConfigRpc as $c, VcsStatusResult as $d, ServerConfigStreamSettingsUpdatedEvent as $f, DesktopPreviewAutomationTypeInputSchema as $g, TaskAgentLinkage as $h, makeT3RpcOperations as $i, orElseSucceed as $k, ResourceMonitorReadHistoryCommand as $l, ServerSettingsPatch as $m, makeT3PreviewAutomation as $n, RelayClientTracer as $o, isProviderAvailable as $p, make as $r, WsOrchestrationGetFullThreadDiffRpc as $s, projectKey as $t, ProjectEntry as $u, PreviewUrlResolution as $v, config_exports as $w, ProviderRequestKind as $x, AuthClientSessionRevokeResult as $y, applyClaudePromptEffortPrefix as A, fail$4 as AA, AuthEnvironmentBootstrapTokenType as AC, TaggedErrorClass as AD, getParamMetadata as AE, fromQueue as AO, ThreadUnsettledPayload as AS, cipher_exports as AT, DesktopSshPasswordPromptCancelledType as A_, resolveRemotePairingTarget as Aa, RelayEnvironmentConnectScope as Ab, WsServerGetTraceDiagnosticsRpc as Ac, GitPreparePullRequestThreadResult as Ad, VcsListRemotesResult as Af, TerminalOpenInput as Ag, MAX_KEYBINDING_VALUE_LENGTH as Ah, T3LocalAuthTokenLive as Ai, none as Aj, exit as Ak, UsageSummary as Al, GlassOpacity as Am, unsettleThread as An, fetchRemoteSessionState as Ao, ServerProviderUpdatedPayload as Ap, runInEnvironment as Ar, layerWebSocketConstructor as As, getAddProjectInitialQuery as At, AssetCreateUrlInput as Au, PreviewAutomationRecordingArtifact as Av, PositiveInt as Aw, OrchestrationThreadActivityTone as Ax, get$1 as Ay, getProviderOptionCurrentValue as B, succeed$5 as BA, AuthRevokeClientSessionInput as BC, isNonEmpty as BD, float as BE, runFold as BO, ModelCapabilities as BS, threadFlag as BT, DesktopWslDistroSchema as B_, safeErrorLogAttributes as Ba, ModelSelection as Bb, WsServerUpdateServerRpc as Bc, VcsCreateRefResult as Bd, VcsProcessTimeoutError as Bf, TerminalWriteInput as Bg, THREAD_KEYBINDING_COMMANDS as Bh, AuthLocalSigningError as Bi, hasProperty as Bj, gen as Bk, DesktopTelemetrySetHostPowerIntervals as Bl, MIN_CODE_FONT_SIZE as Bm, BaseAuthAppLayer as Bn, makeEnvironmentHttpApiClient as Bo, ServerSelfUpdateProgressStage as Bp, buildEnvironmentAuthHeaders as Br, CliPath as Bs, hasTrailingPathSeparator as Bt, AssetWorkspaceContextNotFoundError as Bu, PreviewAutomationSetColorSchemeInput as Bv, TrimmedString as Bw, PROVIDER_SEND_TURN_MAX_INPUT_CHARS as Bx, AdvertisedEndpointCompatibility as By, HostProcessHostname as C, exponential as CA, AuthBrowserSessionRequest as CC, Literal as CD, withDescription as CE, decodeText as CO, ThreadTurnDiff as CS, file_exports as CT, DesktopSshEnvironmentEnsureInputSchema as C_, RemotePairingCodeMissingError as Ca, EnvironmentOperationForbiddenReason as Cb, WsServerDiscoverSourceControlRpc as Cc, GitActionProgressKind as Cd, SourceControlRepositoryVisibility as Cf, TerminalCwdNotFoundError as Cg, KeybindingShortcut as Ch, T3AuthPairingLive as Ci, getOrNull as Cj, catchCause$2 as Ck, UsagePricing as Cl, DEFAULT_SIDEBAR_THREAD_PREVIEW_COUNT as Cm, setThreadRuntimeMode as Cn, environmentMismatchError as Co, ServerProviderSlashCommand as Cp, executeAtomCommand as Cr, ConnectionTransientReason as Cs, addProjectRemoteSourceLabel as Ct, ReviewDiffPreviewError as Cu, PreviewAutomationMalformedResponseError as Cv, EnvironmentId as Cw, OrchestrationShellSnapshot as Cx, PreviewViewportPresetId as Cy, RotatingFileSink as D, currentTimeMillis as DA, AuthClientPresentationMetadata as DC, Number$1 as DD, argumentKind as DE, filterMap as DO, ThreadTurnStartRequestedPayload as DS, service_exports$2 as DT, DesktopSshHostSourceSchema as D_, getPairingTokenFromUrl as Da, EnvironmentResourceNotFoundError as Db, WsServerGetProcessResourceHistoryRpc as Dc, GitManagerError as Dd, VcsError as Df, TerminalHistoryError as Dg, KeybindingsConfig as Dh, T3LocalAuthLive as Di, isSome as Dj, catch_$1 as Dk, UsageSource as Dl, DEFAULT_UNIFIED_SETTINGS as Dm, stopThreadSession as Dn, bootstrapRemoteBearerSession as Do, ServerProviderUpdateInput as Dp, mapAtomCommandResult as Dr, SshConnectionTarget as Ds, buildProjectCreateCommand as Dt, ReviewDiffPreviewSourceKind as Du, PreviewAutomationOpenInput as Dv, MessageId as Dw, OrchestrationSubscribeThreadInput as Dx, shutdown as Dy, isHostWindows as E, upTo as EA, AuthClientMetadataDeviceType as EC, NullOr as ED, log as EE, filter as EO, ThreadTurnStartCommand as ES, resolveT3cliConfigDir as ET, DesktopSshEnvironmentTargetSchema as E_, RemotePairingUrlInvalidError as Ea, EnvironmentRequestInvalidReason as Eb, WsServerGetProcessDiagnosticsRpc as Ec, GitCommandError as Ed, VcsDriverKind as Ef, TerminalEvent as Eg, KeybindingWhenNode as Eh, T3LocalAuth as Ei, isNone as Ej, catchTags as Ek, UsageReadError as El, DEFAULT_TIMESTAMP_FORMAT as Em, startThreadTurn as En, profileMissingError as Eo, ServerProviderUpdateError as Ep, isAtomCommandInterrupted as Er, RelayConnectionTarget as Es, buildAddProjectRemoteSourceReadiness as Et, ReviewDiffPreviewSource as Eu, PreviewAutomationNoAvailableHostError as Ev, IsoDateTime as Ew, OrchestrationSubscribeShellInput as Ex, offer as Ey, getModelSelectionOptionDescriptors as F, squash as FA, AuthPairingCredentialResult as FC, decodeUnknownEffect as FD, optional$1 as FE, merge$1 as FO, DEFAULT_MODEL_BY_PROVIDER as FS, modelFlags as FT, DesktopUpdateChannelSchema as F_, PlatformEnvironmentRemovalError as Fa, ClientOrchestrationCommand as Fb, WsServerReportClientActivityRpc as Fc, GitRunStackedActionResult as Fd, VcsProcessMissingExitCodeError as Ff, TerminalSessionSnapshot as Fg, MODEL_PICKER_KEYBINDING_COMMANDS as Fh, resolveT3BaseDir as Fi, Struct$1 as Fj, fnUntraced as Fk, DesktopHostTelemetryHello as Fl, MAX_INTERFACE_FONT_SIZE as Fm, T3CodeRpcLayer as Fn, RemoteEnvironmentAuthFetchError as Fo, ServerRemoveKeybindingResult as Fp, squashAtomCommandFailure as Fr, cipher_node_exports as Fs, ensureBrowseDirectoryPath as Ft, AssetProjectFaviconResolutionError as Fu, PreviewAutomationResizeInput as Fv, RuntimeRequestId as Fw, OrchestrationThreadSearchSource as Fx, get$2 as Fy, normalizeCustomModelSlug as G, isDone$1 as GA, AuthTokenExchangeGrantType as GC, Crypto as GD, text$1 as GE, succeed$2 as GO, ProviderOptionDescriptorType as GS, canRenderLiveTerminal as GT, PickedElementPayloadSchema as G_, EnvironmentOwnedDataCleanup as Ga, OrchestrationCheckpointStatus as Gb, WsSourceControlCloneRepositoryRpc as Gc, VcsListRefsResult as Gd, ServerConfig as Gf, DesktopEnvironmentBootstrapSchema as Gg, MONITOR_TASK_TYPES as Gh, T3ApplicationSlicesLive as Gi, isString as Gj, map$7 as Gk, ResourceMonitorCommand as Gl, MIN_SIDEBAR_THREAD_PREVIEW_COUNT as Gm, T3LocalAuthOriginLayer as Gn, createAdvertisedEndpoint as Go, ServerTraceDiagnosticsFailureSummary as Gp, config as Gr, WsCloudGetRelayClientStatusRpc as Gs, createEnvironmentProjectAtoms as Gt, FilesystemBrowseEntry as Gu, PreviewAutomationTabNotFoundError as Gv, resolveProjectRef as Gw, ProjectMetaUpdatedPayload as Gx, AdvertisedEndpointSource as Gy, getProviderOptionSelectionValue as H, MinimumLogLevel as HA, AuthSessionState as HC, optionalKey as HD, password as HE, runHead as HO, PROVIDER_DISPLAY_NAMES as HS, waitFormatFlag as HT, PRIMARY_LOCAL_ENVIRONMENT_ID as H_, ConnectionRegistrationStore as Ha, OrchestrationActorKind as Hb, WsServerUpdateSettingsRpc as Hc, VcsCreateWorktreeResult as Hd, VcsRepositoryDetectionError as Hf, DesktopAppBrandingSchema as Hg, CanonicalRequestType as Hh, AuthTransportError as Hi, isNotUndefined as Hj, interrupt$2 as Hk, ResourceAttributionEntry as Hl, MIN_INTERFACE_FONT_SIZE as Hm, T3AuthPairingLayer as Hn, httpHeaderRedactionLayer as Ho, ServerSignalProcessInput as Hp, EnvironmentRpcRequestObserver as Hr, threadStatus as Hs, isFilesystemBrowseQuery as Ht, AssetWorkspacePathValidationError as Hu, PreviewAutomationSnapshot as Hv, cliEnvironmentSetting as Hw, ProjectCreatedPayload as Hx, AdvertisedEndpointProvider as Hy, getModelSelectionOptionValue as I, effect$1 as IA, AuthPairingLink as IC, decodeUnknownOption as ID, string$1 as IE, never$1 as IO, DEFAULT_TEXT_GENERATION_MODEL as IS, projectFlag as IT, DesktopUpdateCheckResultSchema as I_, EnvironmentSupervisor as Ia, CorrelationId as Ib, WsServerReportHostPowerStateRpc as Ic, GitRunStackedActionToastRunAction as Id, VcsProcessOutputLimitError as If, TerminalSessionStatus as Ig, ResolvedKeybindingRule as Ih, AuthConfigError as Ii, combine$2 as Ij, forEach$1 as Ik, DesktopHostTelemetryMessage as Il, MAX_PROMPT_FONT_SIZE as Im, makeT3CodeRpcLayer as In, RemoteEnvironmentAuthInvalidJsonError as Io, ServerSelfUpdateError as Ip, applyShellStreamEvent as Ir, layerNode$1 as Is, findProjectByPath as It, AssetResource as Iu, PreviewAutomationResizeResult as Iv, RuntimeSessionId as Iw, OrchestrationThreadShell as Ix, make$25 as Iy, resolvePromptInjectedEffort as J, succeed$6 as JA, EnvironmentAuthorizationError as JC, fromWritable as JD, blackBright as JE, transduce as JO, ProviderOptionSelections as JS, humanNdjsonFormatChoices as JT, PreviewAnnotationElementTargetSchema as J_, makeWsRpcProtocolClient as Ja, OrchestrationCommandReceiptStatus as Jb, WsSubscribeAuthAccessRpc as Jc, VcsRef as Jd, ServerConfigProviderStatusesPayload as Jf, DesktopPreviewArtifactInputSchema as Jg, ProviderRuntimeTurnStatus as Jh, T3TerminalApplicationLive as Ji, identity as Jj, matchEffect as Jk, ResourceMonitorEvent as Jl, OpenCodeSettings as Jm, T3PreviewAutomationLayer as Jn, OAuthScopeEncodingError as Jo, ServerTraceDiagnosticsResult as Jp, runStream as Jr, WsGitPreparePullRequestThreadRpc as Js, InvalidScopedThreadKeyError as Jt, FilesystemBrowseInput as Ju, PreviewAutomationTimeoutError as Jv, ProjectLookupError as Jw, ProjectionPendingApprovalDecision as Jx, RelayClientInstallFailedError as Jy, normalizeModelSlug as K, make$71 as KA, AuthTokenExchangeRequest as KC, make$54 as KD, toggle as KE, switchMap as KO, ProviderOptionSelection as KS, humanJsonFormatChoices as KT, PickedElementStackFrameSchema as K_, ConnectionDriver as Ka, OrchestrationCheckpointSummary as Kb, WsSourceControlLookupRepositoryRpc as Kc, VcsPullInput as Kd, ServerConfigIssue as Kf, DesktopPreviewAnnotationThemeInputSchema as Kg, ProviderRuntimeEvent as Kh, T3ModelApplicationLive as Ki, isUndefined as Kj, mapError$2 as Kk, ResourceMonitorConfigureCommand as Kl, MIN_TERMINAL_FONT_SIZE as Km, T3LocalAuthTokenLayer as Kn, deriveWsBaseUrl as Ko, ServerTraceDiagnosticsLogEvent as Kp, isRpcClientError as Kr, WsCloudInstallRelayClientRpc as Ks, InvalidScopedProjectKeyError as Kt, FilesystemBrowseError as Ku, PreviewAutomationTabTargetInput as Kv, resolveThreadId as Kw, ProjectScript as Kx, AdvertisedEndpointStatus as Ky, getModelSelectionStringOptionValue as L, mergeAll$1 as LA, AuthRelayReadScope as LC, decodeUnknownSync as LD, variadic as LE, retry$1 as LO, DEFAULT_TEXT_GENERATION_MODEL_BY_PROVIDER as LS, projectPathFlag as LT, DesktopUpdateReleaseNoteSchema as L_, ConnectionWakeups as La, DEFAULT_PROVIDER_INTERACTION_MODE as Lb, WsServerRetryResourceTelemetryRpc as Lc, GitStackedAction as Ld, VcsProcessOutputReadError as Lf, TerminalSummary as Lg, ResolvedKeybindingsConfig as Lh, AuthLocalDatabaseError as Li, combineAll as Lj, forever as Lk, DesktopHostTelemetrySnapshot as Ll, MAX_SIDEBAR_AUTO_SETTLE_AFTER_DAYS as Lm, AppLayer as Ln, RemoteEnvironmentAuthTimeoutError as Lo, ServerSelfUpdateInput as Lp, ShellSnapshotLoader as Lr, CredentialCipherError as Ls, getBrowseDirectoryPath as Lt, AssetSigningKeyLoadError as Lu, PreviewAutomationResponse as Lv, RuntimeTaskId as Lw, OrchestrationThreadStreamItem as Lx, set$2 as Ly, createModelCapabilities as M, hasInterruptsOnly as MA, AuthEnvironmentScopes as MC, Union as MD, isFlagParam as ME, map$5 as MO, TurnCountRange as MS, envNameFlag as MT, DesktopSshPasswordPromptResolutionInputSchema as M_, stripPairingTokenFromUrl as Ma, AssistantDeliveryMode as Mb, WsServerProbeRpc as Mc, GitPullRequestRefInput as Md, VcsOutputDecodeError as Mf, TerminalResizeInput as Mg, MAX_SCRIPT_ID_LENGTH as Mh, T3LocalAuthOrigin as Mi, toArray$1 as Mj, failCause$4 as Mk, UsageTokenTotals as Ml, InterfaceFontSize as Mm, updateProject as Mn, issueRemoteWebSocketTicket as Mo, ServerProviderVersionAdvisoryStatus as Mp, scheduleAtomCommandEffect as Mr, keyring_node_exports as Ms, sortAddProjectProviderSources as Mt, AssetPreviewTypeValidationError as Mu, PreviewAutomationRemoteUnavailableError as Mv, ProviderItemId as Mw, OrchestrationThreadDetailSnapshot as Mx, modify$1 as My, createModelSelection as N, isFailReason as NA, AuthOrchestrationOperateScope as NC, decodeExit as ND, isParam as NE, mapAccum as NO, BooleanProviderOptionDescriptor as NS, forceFlag as NT, DesktopThemeSchema as N_, EnvironmentNotRegisteredError as Na, ChatAttachment as Nb, WsServerRefreshProvidersRpc as Nc, GitResolvePullRequestResult as Nd, VcsProcessExitError as Nf, TerminalRestartInput as Ng, MAX_WHEN_EXPRESSION_DEPTH as Nh, T3LocalAuthOriginLive as Ni, Number$5 as Nj, flatMap$3 as Nk, DesktopElectronProcessMetric as Nl, MAX_CODE_FONT_SIZE as Nm, updateThreadMetadata as Nn, resolveRemoteDpopWebSocketConnectionUrl as No, ServerProviders as Np, settleAsyncResult as Nr, layerNode as Ns, appendBrowsePathSegment as Nt, AssetProjectFaviconInspectionError as Nu, PreviewAutomationRequest as Nv, RpcClientId as Nw, OrchestrationThreadDetailWindow as Nx, update$1 as Ny, RotatingFileSinkConfigurationError as O, currentTimeNanos as OA, AuthClientSession as OC, String$1 as OD, extractSingleParams as OE, fromEffect as OO, ThreadUnarchivedPayload as OS, ConfigError as OT, DesktopSshHttpBaseUrlInputSchema as O_, readHashParams as Oa, EnvironmentResourceNotFoundReason as Ob, WsServerGetResourceTelemetryHistoryRpc as Oc, GitManagerServiceError as Od, VcsFreshness as Of, TerminalMetadataStreamEvent as Og, KeybindingsConfigError as Oh, makeT3LocalAuth as Oi, map$13 as Oj, effectify as Ok, UsageSourceFingerprint as Ol, EnvironmentIdentificationMode as Om, unarchiveThread as On, exchangeRemoteDpopAccessToken as Oo, ServerProviderUpdateState as Op, reportAtomCommandResult as Or, connectionProjectionPhase as Os, canCreateProjectInEnvironment as Ot, AssetAccessError as Ou, PreviewAutomationOperation as Ov, NonNegativeInt as Ow, OrchestrationThread as Ox, take as Oy, getModelSelectionBooleanOptionValue as P, pretty as PA, AuthOrchestrationReadScope as PC, decodeTo as PD, mapEffect as PE, mapEffect$1 as PO, DEFAULT_MODEL as PS, formatFlag as PT, DesktopUpdateActionResultSchema as P_, EnvironmentRegistry as Pa, ChatImageAttachment as Pb, WsServerRemoveKeybindingRpc as Pc, GitRunStackedActionInput as Pd, VcsProcessExitFailureKind as Pf, TerminalSessionLookupError as Pg, MODEL_PICKER_JUMP_KEYBINDING_COMMANDS as Ph, makeT3LocalAuthOrigin as Pi, String$5 as Pj, fn as Pk, DesktopElectronProcessType as Pl, MAX_GLASS_OPACITY as Pm, findErrorTraceId as Pn, resolveRemoteWebSocketConnectionUrl as Po, ServerRemoveKeybindingInput as Pp, settlePromise as Pr, KeystoreUnavailableError as Ps, canNavigateUp as Pt, AssetProjectFaviconNotFoundError as Pu, PreviewAutomationRequestQueueClosedError as Pv, RuntimeItemId as Pw, OrchestrationThreadSearchMatch as Px, changes as Py, applyGitStatusStreamEvent as Q, NativeSpan as QA, ServerAuthSessionMethod as QC, ChildProcessSpawner as QD, magenta as QE, drain$1 as QO, ExecutionEnvironmentDescriptor as QS, T3CliEnvConfig as QT, PreviewAnnotationRegionTargetSchema as Q_, RemoteDpopAccessToken as Qa, OrchestrationEventType as Qb, WsSubscribeResourceTelemetryRpc as Qc, VcsStatusRemoteResult as Qd, ServerConfigStreamProviderStatusesEvent as Qf, DesktopPreviewAutomationScrollInputSchema as Qg, TOOL_LIFECYCLE_ITEM_TYPES as Qh, T3RpcOperationsLive as Qi, orDie as Qk, ResourceMonitorProcessSample as Ql, ServerSettingsOperation as Qm, T3PreviewAutomationLive as Qn, parseOAuthScope as Qo, ServerUpsertKeybindingResult as Qp, keepAlive as Qr, WsOrchestrationGetArchivedShellSnapshotRpc as Qs, parseThreadKey as Qt, ProjectEntriesFailure as Qu, PreviewAutomationWaitForInput as Qv, T3Config as Qw, ProviderInteractionMode as Qx, RelayClientStatusSchema as Qy, getProviderOptionBooleanSelectionValue as R, provide$2 as RA, AuthRelayWriteScope as RC, fromJsonString as RD, confirm as RE, run$3 as RO, DEFAULT_TEXT_GENERATION_REASONING_EFFORT as RS, replaceFlag as RT, DesktopUpdateStateSchema as R_, shouldResubscribeAfterWakeup as Ra, DEFAULT_RUNTIME_MODE as Rb, WsServerSignalProcessRpc as Rc, TextGenerationError as Rd, VcsProcessSpawnError as Rf, TerminalThreadInput as Rg, SCRIPT_RUN_COMMAND_PATTERN as Rh, AuthLocalError as Ri, flip$1 as Rj, forkChild as Rk, DesktopTelemetryControlMessage as Rl, MAX_SIDEBAR_THREAD_PREVIEW_COUNT as Rm, AuthAppLayer as Rn, RemoteEnvironmentAuthUndeclaredStatusError as Ro, ServerSelfUpdateOutcome as Rp, fetchEnvironmentShellSnapshot as Rr, layer$15 as Rs, getBrowseLeafPathSegment as Rt, AssetWorkspaceAssetInspectionError as Ru, PreviewAutomationResultTooLargeError as Rv, ThreadId as Rw, PROVIDER_SEND_TURN_MAX_ATTACHMENTS as Rx, update$2 as Ry, HostProcessExecutablePath as S, zipWith as SA, AuthAdministrativeScopes as SC, Int as SD, withDefault as SE, debounce as SO, ThreadTitleRegeneration as SS, service_exports$1 as ST, DesktopSshEnvironmentBootstrapSchema as S_, RemoteBackendUrlMissingError as Sa, EnvironmentOperationForbiddenError as Sb, WsRpcGroup as Sc, GitActionProgressEvent as Sd, SourceControlRepositoryLookupInput as Sf, TerminalCwdNotDirectoryError as Sg, KeybindingRule as Sh, T3AuthPairing as Si, getOrElse as Sj, callback$1 as Sk, UsageDay as Sl, DEFAULT_SIDEBAR_PROJECT_SORT_ORDER as Sm, setThreadInteractionMode as Sn, credentialMissingError as So, ServerProviderSkill as Sp, environmentRpcKey as Sr, ConnectionTransientError as Ss, vcsCommandScheduler as St, ReviewDiffFileContentsResult as Su, PreviewAutomationInvalidSelectorError as Sv, CommandId as Sw, OrchestrationSessionStatus as Sx, PreviewTabId as Sy, HostProcessWorkingDirectory as T, spaced as TA, AuthClientMetadata as TC, Never as TD, error as TE, empty$7 as TO, ThreadTurnInterruptRequestedPayload as TS, resolveKeyFilePath as TT, DesktopSshEnvironmentEnsureResultSchema as T_, RemotePairingTokenMissingError as Ta, EnvironmentRequestInvalidError as Tb, WsServerGetConfigRpc$1 as Tc, GitActionProgressStream as Td, VcsDriverCapabilities as Tf, TerminalError as Tg, KeybindingWhen as Th, parsePairingUrl as Ti, getOrUndefined$1 as Tj, catchTag as Tk, UsageProviderKind as Tl, DEFAULT_TERMINAL_FONT_SIZE as Tm, snoozeThread as Tn, mapRemoteEnvironmentError as To, ServerProviderState as Tp, followStreamInEnvironment as Tr, PrimaryConnectionTarget as Ts, addProjectRemoteSourceProvider as Tt, ReviewDiffPreviewResult as Tu, PreviewAutomationNetworkEntry as Tv, ForwardCompatibleArray as Tw, OrchestrationShellStreamItem as Tx, PreviewViewportSize as Ty, getProviderOptionStringSelectionValue as U, _await as UA, AuthStandardClientScopes as UC, toJsonSchemaDocument as UD, run$1 as UE, runLast as UO, ProviderOptionChoice as US, worktreeFlag as UT, PersistedSavedEnvironmentRecordSchema as U_, ConnectionTargetStore as Ua, OrchestrationAggregateKind as Ub, WsServerUpsertKeybindingRpc as Uc, VcsInitInput as Ud, VcsRepositoryIdentity as Uf, DesktopAppStageLabelSchema as Ug, INERT_TASK_TYPES as Uh, T3ActionApplicationLive as Ui, isNullish as Uj, logDebug as Uk, ResourceAttributionSnapshot as Ul, MIN_PROMPT_FONT_SIZE as Um, T3AuthTransportLayer as Un, environmentEndpointUrl as Uo, ServerSignalProcessResult as Up, EnvironmentRpcSubscriptionObserver as Ur, WS_METHODS as Us, isUnsupportedWindowsProjectPath as Ut, AssetWorkspaceResolutionError as Uu, PreviewAutomationStatus as Uv, T3Auth as Uw, ProjectDeletedPayload as Ux, AdvertisedEndpointProviderKind as Uy, getProviderOptionDescriptors as V, sync$1 as VA, AuthRevokePairingLinkInput as VC, optional$2 as VD, integer$2 as VE, runForEach as VO, PREFERRED_DEFAULT_CODEX_MODELS as VS, threadFormatFlag as VT, DesktopWslStateSchema as V_, ConnectionPersistenceError as Va, ORCHESTRATION_WS_METHODS as Vb, WsServerUpdateServerWithProgressRpc as Vc, VcsCreateWorktreeInput as Vd, VcsRemote as Vf, ContextMenuItemSchema as Vg, CanonicalItemType as Vh, AuthPairingUrlError as Vi, isNotNull as Vj, ignore$1 as Vk, RESOURCE_MONITOR_PROTOCOL_VERSION as Vl, MIN_GLASS_OPACITY as Vm, T3AuthLayer as Vn, remoteHttpClientLayer as Vo, ServerSelfUpdateResult as Vp, withEnvironmentCredentials as Vr, latestAssistantMessage as Vs, inferProjectTitleFromPath as Vt, AssetWorkspaceContextResolutionError as Vu, PreviewAutomationSetColorSchemeResult as Vv, TurnId as Vw, ProjectCreateCommand as Vx, AdvertisedEndpointHostedHttpsCompatibility as Vy, isClaudeUltrathinkPrompt as W, doneUnsafe as WA, AuthTerminalOperateScope as WC, value$1 as WD, select as WE, scan as WO, ProviderOptionDescriptor as WS, yesFlag as WT, PickFolderOptionsSchema as W_, EnvironmentCacheStore as Wa, OrchestrationCheckpointFile as Wb, WsShellOpenInEditorRpc as Wc, VcsListRefsInput as Wd, VcsUnsupportedOperationError as Wf, DesktopDiscoveredSshHostSchema as Wg, ItemLifecyclePayload as Wh, T3ApplicationLive as Wi, isObject$1 as Wj, logWarning as Wk, ResourceMonitorCapabilities as Wl, MIN_SIDEBAR_AUTO_SETTLE_AFTER_DAYS as Wm, T3LocalAuthLayer as Wn, classifyHostedHttpsCompatibility as Wo, ServerTraceDiagnosticsErrorKind as Wp, EnvironmentRpcUnavailableError as Wr, WsAssetsCreateUrlRpc as Ws, resolveProjectPathForDispatch as Wt, AssetWorkspaceRootNormalizationError as Wu, PreviewAutomationStreamEvent as Wv, resolveCommandProjectRef as Ww, ProjectFaviconPath as Wx, AdvertisedEndpointReachability as Wy, trimOrNull as X, isSuccess$1 as XA, ServerAuthDescriptor as XC, make$55 as XD, cyanBright as XE, get$6 as XO, EnvironmentConnectionState as XS, isInteractiveHumanTerminal as XT, PreviewAnnotationPointSchema as X_, profileStore_exports as Xa, OrchestrationEvent as Xb, WsSubscribeDiscoveredLocalServersRpc as Xc, VcsStatusInput as Xd, ServerConfigStreamEvent as Xf, DesktopPreviewAutomationEvaluateInputSchema as Xg, RuntimeTaskStatus as Xh, makeT3Application as Xi, pipeArguments as Xj, onExit$1 as Xk, ResourceMonitorHelloEvent as Xl, ServerSettings as Xm, makeT3RpcLayer as Xn, oauthScopeSetEquals as Xo, ServerTraceDiagnosticsSpanSummary as Xp, subscribeDynamic as Xr, WsGitRunStackedActionRpc as Xs, parseProjectKey as Xt, ProjectContentMatch as Xu, PreviewAutomationUnavailableError as Xv, CliRuntime as Xw, ProviderApprovalDecision as Xx, RelayClientInstallProgressEventSchema as Xy, resolveSelectableModel as Y, isFailure$1 as YA, ServerAuthBootstrapMethod as YC, fdName as YD, bold as YE, unwrap as YO, SelectProviderOptionDescriptor as YS, isAgentEnvironment as YT, PreviewAnnotationPayloadSchema as Y_, ConnectionResolver as Ya, OrchestrationDispatchCommandError as Yb, WsSubscribeBackgroundPolicyRpc as Yc, VcsRemoveWorktreeInput as Yd, ServerConfigSettingsUpdatedPayload as Yf, DesktopPreviewAutomationClickInputSchema as Yg, RuntimeEventRaw as Yh, T3ThreadApplicationLive as Yi, pipe as Yj, never$3 as Yk, ResourceMonitorExternalProcess as Yl, PromptFontSize as Ym, T3RpcLive as Yn, encodeOAuthScope as Yo, ServerTraceDiagnosticsSpanOccurrence as Yp, subscribe as Yr, WsGitResolvePullRequestRpc as Ys, arrayElementsEqual as Yt, FilesystemBrowseResult as Yu, PreviewAutomationTypeInput as Yv, ThreadSessionError as Yw, ProjectionPendingApprovalStatus as Yx, RelayClientInstallFailureReasonSchema as Yy, WORKTREE_BRANCH_PREFIX as Z, succeed$7 as ZA, ServerAuthPolicy as ZC, parseFdName as ZD, green as ZE, make$61 as ZO, ExecutionEnvironmentCapabilities as ZS, resolveOutputFormat as ZT, PreviewAnnotationRectSchema as Z_, RemoteEnvironmentAuthorization as Za, OrchestrationEventMetadata as Zb, WsSubscribePreviewEventsRpc as Zc, VcsStatusLocalResult as Zd, ServerConfigStreamKeybindingsUpdatedEvent as Zf, DesktopPreviewAutomationPressInputSchema as Zg, RuntimeTaskUsage as Zh, T3RpcOperations as Zi, option$1 as Zk, ResourceMonitorHistoryChunkEvent as Zl, ServerSettingsError as Zm, T3PreviewAutomation as Zn, parseAllowedOAuthScope as Zo, ServerUpsertKeybindingInput as Zp, family as Zr, WsOrchestrationDispatchCommandRpc as Zs, parseProjectRefCollectionKey as Zt, ProjectContentMatchRange as Zu, PreviewAutomationUnsupportedClientError as Zv, layer$17 as Zw, ProviderApprovalPolicy as Zx, RelayClientInstallProgressStageSchema as Zy, fromLenientJsonString as _, tx as _A, AuthAccessStreamPairingLinkUpsertedEvent as _C, Terminal as _D, boolean as _E, WatchBackend as _O, ThreadRuntimeModeSetPayload as _S, get$4 as _T, DesktopRuntimeInfoSchema as __, prepareSshRegistration as _a, EnvironmentHttpInternalServerError as _b, WsProjectsSearchContentsRpc as _c, ProjectWriteFileResult as _d, SourceControlPublishRepositoryResult as _f, TerminalAttachInput as _g, ExternalLauncherUnknownEditorError as _h, scopedThreadKey as _i, make$74 as _j, all$1 as _k, WsVcsRemoveWorktreeRpc as _l, DEFAULT_PROMPT_FONT_SIZE as _m, pinThread as _n, CloudSession as _o, ServerProviderAuth as _p, createEnvironmentRpcStreamCommand as _r, AVAILABLE_CONNECTION_STATE as _s, resolveChangeRequestPresentationForKind as _t, ResourceTelemetryRetryResult as _u, PreviewAutomationEvaluateInput as _v, defaultInstanceIdForDriver as _w, OrchestrationRpcSchemas as _x, PreviewRenderedViewportSize as _y, getBackgroundActivityPresetSettings as a, scoped$2 as aA, ScopedThreadRef as aC, isTrueValue as aD, T3ThreadApplication as aE, decodeBase64Url as aO, ThreadApprovalResponseRequestedPayload as aS, validateEnvironmentName as aT, DesktopPreviewPointerEventSchema as a_, connectionStatusText as aa, EnvironmentAuthenticatedAuth as ab, WsPreviewAutomationConnectRpc as ac, ProjectListEntriesResult as ad, SourceControlCloneProtocol as af, classifyTaskAgentKind as ag, SourceControlWritingStyleMode as ah, failure as ai, failVoid as aj, offerUnsafe as ak, WsTerminalClearRpc as al, ClientSettingsPatch as am, isExplicitRelativePath as an, RELAY_ACTIVITY_PUBLISH_TYP as ao, ServerLifecycleStreamWelcomeEvent as ap, makeEnvironmentShellState as ar, BearerConnectionProfile as as, normalizeGitRemoteUrl as at, ResourceMonitorSnapshotEvent as au, PREVIEW_AUTOMATION_OPERATIONS as av, ClientKind as aw, OrchestrationGetTurnDiffResult as ax, PREVIEW_VIEWPORT_MIN_DIMENSION as ay, HostProcessArguments as b, void_$1 as bA, AuthAccessTokenType as bC, ArraySchema as bD, optional as bE, changes$1 as bO, ThreadSettledPayload as bS, set$4 as bT, DesktopSshBearerBootstrapInputSchema as b_, updateBearerConnection as ba, EnvironmentInternalErrorReason as bb, WsReviewGetDiffFileContentsRpc as bc, T3_PROJECT_FILE_NAME as bd, SourceControlRepositoryError as bf, TerminalCloseInput as bg, isExternalLauncherError as bh, T3AuthLive as bi, fromNullishOr as bj, as as bk, UsageBucket as bl, DEFAULT_SIDEBAR_AUTO_SETTLE_AFTER_DAYS as bm, respondToThreadUserInput as bn, SshEnvironmentGateway as bo, ServerProviderContinuation as bp, createRuntimeCommand as br, ConnectionBlockedReason as bs, withVcsRefsPersistenceLock as bt, ResourceTelemetrySourceStatus as bu, PreviewAutomationHostFocus as bv, AuthSessionId as bw, OrchestrationSearchThreadsResult as bx, PreviewSessionLookupError as by, resolveBackgroundActivitySettings as c, succeed$4 as cA, ServerSelfUpdateMethod as cC, ShowHelp as cD, Wizard as cE, encodeHex as cO, ThreadCreatedPayload as cS, toWebSocketBaseUrl as cT, DesktopPreviewRecordingSaveInputSchema as c_, presentEnvironmentConnection as ca, EnvironmentCloudLinkStateResult as cb, WsPreviewCloseRpc as cc, ProjectReadFileResult as cd, SourceControlDiscoveryResult as cf, ProviderInterruptTurnInput as cg, TimestampFormat as ch, T3CodeConnectionProvider as ci, isSuccess$2 as cj, sliding as ck, WsTerminalResizeRpc as cl, CodexSettings as cm, isWindowsDrivePath as cn, RELAY_LINK_PROOF_TYP as co, ServerProcessDiagnosticsEntry as cp, createShellEnvironmentAtoms as cr, ConnectionProfile as cs, sanitizeBranchFragment as ct, ResourceTelemetryHealth as cu, PreviewAutomationClickInput as cv, HostPowerThermalState as cw, OrchestrationGetWorkflowScriptResult as cx, PreviewError as cy, decodeJsonResult as d, tap$2 as dA, AuthAccessSnapshot as dC, isCliError as dD, getHelpForCommandPath as dE, InvalidValue$1 as dO, ThreadMessageSentPayload as dS, HttpClient as dT, DesktopPreviewSetColorSchemeInputSchema as d_, RelayEnvironmentDiscovery as da, EnvironmentConnectHttpApi as db, WsPreviewOpenRpc as dc, ProjectSearchContentsResult as dd, SourceControlProviderAuthStatus as df, ProviderSendTurnInput as dg, EditorId as dh, parseScopedProjectKey as di, min$1 as dj, BadArgument as dk, WsVcsCreateRefRpc as dl, DEFAULT_BACKGROUND_ACTIVITY_PROFILE as dm, archiveThread as dn, RelayJwtError as do, ServerProcessResourceHistoryFailureTag as dp, scopeThreadShell as dr, PrimaryConnectionRegistration as ds, detectSourceControlProviderFromRemoteUrl as dt, ResourceTelemetryHistoryInput as du, PreviewAutomationColorScheme as dv, ProviderInstanceConfigMap as dw, OrchestrationMessageRole as dx, PreviewListInput as dy, provide as eA, ExecutionEnvironmentPlatformArch as eC, white as eD, T3ActionApplication as eE, ProcessId as eO, ProviderSandboxMode as eS, service_exports as eT, DesktopPreviewAutomationWaitForInputSchema as e_, T3Rpc as ea, AuthOtherClientSessionsRevokeResult as eb, WsOrchestrationGetTurnDiffRpc as ec, ProjectEntryKind as ed, VcsStatusStreamEvent as ef, TaskRunHandles as eg, SidebarAutoSettleAfterDays as eh, setIdleTTL as ei, append$3 as ej, make$63 as ek, WsSubscribeServerLifecycleRpc as el, BackgroundActivityOverrides as em, projectRefCollectionKey as en, ManagedRelayClient as eo, ServerConfigStreamSnapshotEvent as ep, T3OrchestrationLive as er, makeRelayClientTracingLayer as es, dedupeRemoteBranchesWithLocalMatches as et, ResourceMonitorSampleNowCommand as eu, PreviewAnnotationStrokeTargetSchema as ev, BackgroundPolicySnapshot as ew, OrchestrationGetFullThreadDiffInput as ex, DiscoveredLocalServer as ey, decodeUnknownJsonResult as f, tapError$2 as fA, AuthAccessStreamClientRemovedEvent as fC, all as fD, TypeId$33 as fE, Path as fO, ThreadMetaUpdatedPayload as fS, filterStatusOk as fT, DesktopPreviewTabIdSchema as f_, discovery_exports as fa, EnvironmentHttpApi as fb, WsPreviewRefreshRpc as fc, ProjectSearchEntriesError as fd, SourceControlProviderDiscoveryItem as ff, ProviderSession as fg, EditorLaunchStyle as fh, parseScopedThreadKey as fi, minutes as fj, badArgument as fk, WsVcsCreateWorktreeRpc as fl, DEFAULT_CLIENT_SETTINGS as fm, createProject as fn, decodeRelayJwt as fo, ServerProcessResourceHistoryInput as fp, selectEnvironmentThreadShell as fr, RelayConnectionRegistration as fs, formatChangeRequestAction as ft, ResourceTelemetryIoSemantics as fu, PreviewAutomationConnectionId as fv, ProviderInstanceEnvironment as fw, OrchestrationProject as fx, PreviewListResult as fy, fromLenientJson as g, try_ as gA, AuthAccessStreamPairingLinkRemovedEvent as gC, QuitError as gD, parseConfig as gE, Size as gO, ThreadRevertedPayload as gS, filterStatusOk$1 as gT, DesktopRuntimeArchSchema as g_, preparePairingRegistration as ga, EnvironmentHttpForbiddenError as gb, WsProjectsReadFileRpc as gc, ProjectWriteFileInput as gd, SourceControlPublishRepositoryInput as gf, DEFAULT_TERMINAL_ID as gg, ExternalLauncherError as gh, scopedRefKey as gi, empty$14 as gj, addFinalizer as gk, WsVcsRefreshStatusRpc as gl, DEFAULT_INTERFACE_FONT_SIZE as gm, interruptThreadTurn as gn, ClientPresentation as go, ServerProvider as gp, createEnvironmentRpcQueryAtomFamily as gr, connectionRegistrationTarget as gs, resolveChangeRequestPresentation as gt, ResourceTelemetryProcessSummary as gu, PreviewAutomationError as gv, ProviderInstanceRef as gw, OrchestrationReadModel as gx, PreviewRefreshInput as gy, fromJsonStringPretty as h, tryPromise as hA, AuthAccessStreamEvent as hC, string$3 as hD, toImpl as hE, FileTypeId as hO, ThreadProposedPlanUpsertedPayload as hS, transform$1 as hT, DesktopPreviewWebviewConfigSchema as h_, prepareBearerConnectionUpdate as ha, EnvironmentHttpConflictError as hb, WsProjectsListEntriesRpc as hc, ProjectWriteFileError as hd, SourceControlProviderKind as hf, ProviderTurnStartResult as hg, ExternalLauncherEditorSpawnError as hh, scopedProjectKey as hi, Service$1 as hj, acquireRelease as hk, WsVcsPullRpc as hl, DEFAULT_GLASS_OPACITY as hm, deleteThread as hn, verifyRelayJwt as ho, ServerProcessSignal as hp, createEnvironmentRpcCommand as hr, connectionRegistrationCatalogEntry as hs, getChangeRequestTerminologyForKind as ht, ResourceTelemetryProcessIdentity as hu, PreviewAutomationElement as hv, ProviderInstanceId as hw, OrchestrationProposedPlanId as hx, PreviewOpenInput as hy, getBackgroundActivityBaseProfile as i, runFork as iA, ScopedProjectRef as iC, isFalseValue as iD, T3TerminalApplication as iE, transformOrFail$1 as iO, ThreadActivityAppendedPayload as iS, slugifyEnvironmentName as iT, DesktopPreviewNavigateInputSchema as i_, connectionPhaseMessage as ia, EnvironmentAuthInvalidReason as ib, WsOrchestrationSubscribeThreadRpc as ic, ProjectListEntriesInput as id, ChangeRequestState as if, UserInputQuestion as ig, SidebarThreadSortOrder as ih, toStream as ii, fail$8 as ij, offer$1 as ik, WsTerminalAttachRpc as il, ClaudeSettings as im, createProjectEnvironmentAtoms as in, normalizeSecureRelayUrl as io, ServerLifecycleStreamReadyEvent as ip, createEnvironmentShellSummaryAtom as ir, BearerConnectionCredential as is, mergeGitStatusParts as it, ResourceMonitorShutdownCommand as iu, BrowserNavigationTarget as iv, ClientActivityReportInput as iw, OrchestrationGetTurnDiffInput as ix, PREVIEW_VIEWPORT_MAX_DIMENSION as iy, buildProviderOptionSelectionsFromDescriptors as j, findErrorOption as jA, AuthEnvironmentScope as jC, Tuple as jD, getUnderlyingSingleOrThrow as jE, isStream as jO, ThreadUnsnoozedPayload as jS, credentialTokenFromEnv as jT, DesktopSshPasswordPromptRequestSchema as j_, setPairingTokenOnUrl as ja, RelayEnvironmentStatusScope as jb, WsServerGetUsageSummaryRpc as jc, GitPullRequestMaterializationError as jd, VcsListWorkspaceFilesResult as jf, TerminalResizeError as jg, MAX_KEYBINDING_WHEN_LENGTH as jh, makeT3LocalAuthToken as ji, some as jj, fail$3 as jk, UsageSummaryInput as jl, GrokSettings as jm, unsnoozeThread as jn, issueRemoteDpopWebSocketTicket as jo, ServerProviderVersionAdvisory as jp, runStreamInEnvironment as jr, layerUndici as js, resolveAddProjectPath as jt, AssetCreateUrlResult as ju, PreviewAutomationRecordingStatus as jv, ProjectId as jw, OrchestrationThreadDetailPage as jx, make$24 as jy, RotatingFileSinkError as k, TaggedError as kA, AuthCreatePairingCredentialInput as kC, Struct as kD, flagKind as kE, fromIterable$1 as kO, ThreadUnpinnedPayload as kS, T3CredentialCipher as kT, DesktopSshPasswordPromptCancelledResultSchema as k_, readHostedPairingRequest as ka, EnvironmentScopeRequiredError as kb, WsServerGetSettingsRpc as kc, GitPreparePullRequestThreadInput as kd, VcsFreshnessSource as kf, TerminalNotRunningError as kg, MAX_KEYBINDINGS_COUNT as kh, T3LocalAuthToken as ki, match$5 as kj, ensuring$2 as kk, UsageSourceStatus as kl, FontFamilyPreference as km, unpinThread as kn, fetchRemoteDpopSessionState as ko, ServerProviderUpdateStatus as kp, runAtomCommand as kr, T3Orchestration as ks, findExistingAddProject as kt, AssetAttachmentNotFoundError as ku, PreviewAutomationPressInput as kv, PortSchema as kw, OrchestrationThreadActivity as kx, unbounded as ky, resolveServerBackgroundActivitySettings as l, suspend$3 as lA, ThreadEnvMode as lC, UnknownSubcommand as lD, getGlobalFlagsForCommandPath as lE, nowUnsafe as lO, ThreadDeletedPayload as lS, toWebSocketEndpointUrl as lT, DesktopPreviewRegisterWebviewInputSchema as l_, layer_exports as la, EnvironmentCloudPreferencesRequest as lb, WsPreviewListRpc as lc, ProjectSearchContentsError as ld, SourceControlDiscoveryStatus as lf, ProviderRespondToRequestInput as lg, makeProviderSettingsSchema as lh, T3CodeConnectionProviderLive as li, succeed$9 as lj, take$1 as lk, WsTerminalRestartRpc as ll, CursorSettings as lm, normalizeProjectPathForComparison as ln, RELAY_MINT_REQUEST_TYP as lo, ServerProcessDiagnosticsResult as lp, scopeProject as lr, ConnectionRegistration as ls, sanitizeFeatureBranchName as lt, ResourceTelemetryHistory as lu, PreviewAutomationClientDisconnectedError as lv, ProviderDriverKind as lw, OrchestrationLatestTurn as lx, PreviewEvent as ly, formatSchemaError as m, timeoutOrElse as mA, AuthAccessStreamError as mC, option as mD, makeCommand as mE, FileSystem as mO, ThreadPinnedPayload as mS, tap as mT, DesktopPreviewTabStateSchema as m_, ConnectionOnboarding as ma, EnvironmentHttpCommonError as mb, WsPreviewResizeRpc as mc, ProjectSearchEntriesResult as md, SourceControlProviderInfo as mf, ProviderStopSessionInput as mg, ExternalLauncherCommandNotFoundError as mh, scopeThreadRef as mi, Reference as mj, makeRunMain as mk, WsVcsListRefsRpc as ml, DEFAULT_ENVIRONMENT_IDENTIFICATION_MODE as mm, deleteProject as mn, signRelayJwt as mo, ServerProcessResourceHistorySummary as mp, createEnvironmentCommand as mr, SshConnectionRegistration as ms, getChangeRequestTerminology as mt, ResourceTelemetryProcessCategory as mu, PreviewAutomationControlInterruptedError as mv, ProviderInstanceEnvironmentVariableName as mw, OrchestrationProposedPlan as mx, PreviewNavigateInput as my, normalizeDpopHtu as n, provideService$2 as nA, RepositoryIdentity as nC, getTypeName as nD, T3ModelApplication as nE, makeHandle as nO, ProviderUserInputAnswers as nS, defaultEnvironmentNameFromUrl as nT, DesktopPreviewConfigInputSchema as n_, T3CodeConnectionError as na, EnvironmentAuthHttpApi as nb, WsOrchestrationSearchThreadsRpc as nc, ProjectFileOperation as nd, VcsSwitchRefResult as nf, ThreadTokenUsageSnapshot as ng, SidebarProjectSortOrder as nh, withLabel as ni, map$10 as nj, failCauseUnsafe as nk, WsSubscribeTerminalMetadataRpc as nl, BackgroundActivityProfileSelection as nm, threadKey as nn, managedRelay_exports as no, ServerLifecycleReadyPayload as np, createEnvironmentServerConfigsAtom as nr, credentialStore_exports as ns, detectSourceControlProviderFromGitRemoteUrl as nt, ResourceMonitorSetSampleIntervalCommand as nu, PreviewAnnotationSubmissionResultSchema as nv, ClientActivityClientId as nw, OrchestrationGetSnapshotError as nx, FILL_PREVIEW_VIEWPORT as ny, normalizeBackgroundActivitySettings as o, serviceOption as oA, ScopedThreadSessionRef as oC, require_dist as oD, BuiltIns as oE, decodeBase64UrlString as oO, ThreadArchivedPayload as oS, normalizeHttpBaseUrl$1 as oT, DesktopPreviewRecordingArtifactSchema as o_, connectionStatusTitle as oa, EnvironmentAuthenticatedPrincipal as ob, WsPreviewAutomationFocusHostRpc as oc, ProjectReadFileError as od, SourceControlCloneRepositoryInput as of, isToolLifecycleItemType as og, SourceControlWritingStyleSettings as oh, isSuccess as oi, getOrThrow$1 as oj, poll as ok, WsTerminalCloseRpc as ol, ClientSettingsSchema as om, isUncPath as on, RELAY_HEALTH_REQUEST_TYP as oo, ServerLifecycleWelcomePayload as op, shellStateChanges as or, BearerConnectionRegistration as os, parseGitHubRepositoryNameWithOwnerFromRemoteUrl as ot, ResourceTelemetryAggregate as ou, PREVIEW_AUTOMATION_V1_OPERATIONS as ov, HostPowerSnapshot as ow, OrchestrationGetWorkflowScriptError as ox, PREVIEW_VIEWPORT_PRESET_IDS as oy, extractJsonObject as p, timeoutOption as pA, AuthAccessStreamClientUpsertedEvent as pC, map$3 as pD, checkForDuplicateFlags as pE, TypeId$49 as pO, ThreadPinReorderedPayload as pS, retry as pT, DesktopPreviewTabInputSchema as p_, PlatformConnectionSource as pa, EnvironmentHttpBadRequestError as pb, WsPreviewReportStatusRpc as pc, ProjectSearchEntriesInput as pd, SourceControlProviderError as pf, ProviderSessionStartInput as pg, ExternalLauncherBrowserSpawnError as ph, scopeProjectRef as pi, seconds as pj, systemError as pk, WsVcsInitRpc as pl, DEFAULT_CODE_FONT_SIZE as pm, createThread as pn, normalizeRelayIssuer as po, ServerProcessResourceHistoryResult as pp, createAtomCommandScheduler as pr, SshConnectionProfile as ps, formatCreateChangeRequestPhrase as pt, ResourceTelemetryProcess as pu, PreviewAutomationConsoleEntry as pv, ProviderInstanceEnvironmentVariable as pw, OrchestrationProjectShell as px, PreviewNavStatus as py, resolveModelSlugForProvider as q, makeUnsafe$12 as qA, AuthWebSocketTicketResult as qC, fromReadable as qD, annotate$1 as qE, tap$1 as qO, ProviderOptionSelectionValue as qS, humanJsonNdjsonFormatChoices as qT, PickedThemeFileSchema as q_, RpcSessionFactory as qa, OrchestrationCommand as qb, WsSourceControlPublishRepositoryRpc as qc, VcsPullResult as qd, ServerConfigKeybindingsUpdatedPayload as qf, DesktopPreviewAnnotationThemeSchema as qg, ProviderRuntimeEventV2 as qh, T3ProjectApplicationLive as qi, dual as qj, match as qk, ResourceMonitorErrorEvent as ql, ObservabilitySettings as qm, T3OrchestrationLayer as qn, normalizeHttpBaseUrl as qo, ServerTraceDiagnosticsRecentFailure as qp, request as qr, WsFilesystemBrowseRpc as qs, InvalidScopedProjectRefCollectionKeyError as qt, FilesystemBrowseFailure as qu, PreviewAutomationTargetNotEditableError as qv, resolveWorktreePath as qw, ProjectScriptIcon as qx, DesktopBackendBootstrap as qy, stableStringify as r, result as rA, RepositoryIdentityLocator as rC, isBoolean as rD, T3ProjectApplication as rE, Transformation as rO, RuntimeMode as rS, migrateV1EnvironmentName as rT, DesktopPreviewNavStatusSchema as r_, connectionCatalogDisplayUrl as ra, EnvironmentAuthInvalidError as rb, WsOrchestrationSubscribeShellRpc as rc, ProjectListEntriesError as rd, ChangeRequest as rf, ToolLifecycleItemType as rg, SidebarThreadPreviewCount as rh, AtomRegistry as ri, sort as rj, make$64 as rk, WsSubscribeVcsStatusRpc as rl, BackgroundActivitySettings as rm, threadRefsEqual as rn, isSecureRelayUrl as ro, ServerLifecycleStreamEvent as rp, createEnvironmentShellAtoms as rr, connectivity_exports as rs, isTemporaryWorktreeBranch as rt, ResourceMonitorSetStreamingCommand as ru, PreviewAnnotationSubmissionSchema as rv, ClientActivityLease as rw, OrchestrationGetTurnDiffError as rx, PREVIEW_VIEWPORT_MAX_AREA as ry, normalizeServerBackgroundActivitySettings as s, sleep as sA, ServerSelfUpdateCapability as sC, InvalidValue as sD, LogLevel as sE, encodeBase64Url as sO, ThreadCheckpointRevertRequestedPayload as sS, toHttpEndpointUrl as sT, DesktopPreviewRecordingFrameSchema as s_, presentConnectionState as sa, EnvironmentCloudEndpointUnavailableError as sb, WsPreviewAutomationRespondRpc as sc, ProjectReadFileInput as sd, SourceControlCloneRepositoryResult as sf, ProviderEvent as sg, TerminalFontSize as sh, value as si, isResult as sj, shutdown$1 as sk, WsTerminalOpenRpc as sl, CodeFontSize as sm, isWindowsAbsolutePath as sn, RELAY_HEALTH_RESPONSE_TYP as so, ServerObservability as sp, createEnvironmentSnapshotAtom as sr, ConnectionCredential as ss, resolveAutoFeatureBranchName as st, ResourceTelemetryGroups as su, PreviewAutomationActionEvent as sv, HostPowerSource as sw, OrchestrationGetWorkflowScriptInput as sx, PreviewCloseInput as sy, DpopPublicJwk as t, provideContext$2 as tA, ExecutionEnvironmentPlatformOs as tC, getChoiceKeys as tD, T3Application as tE, make$56 as tO, ProviderSessionRuntimeStatus as tS, defaultEnvironmentNameForLocal as tT, DesktopPreviewColorSchemeSchema as t_, RpcError as ta, AuthPairingLinkRevokeResult as tb, WsOrchestrationGetWorkflowScriptRpc as tc, ProjectFileFailure as td, VcsSwitchRefInput as tf, TaskWorkflowPhase as tg, SidebarProjectGroupingMode as th, swr as ti, filter$2 as tj, endUnsafe as tk, WsSubscribeTerminalEventsRpc as tl, BackgroundActivityProfile as tm, projectRefsEqual as tn, ManagedRelayDpopSigner as to, ServerConfigUpdatedPayload as tp, makeT3Orchestration as tr, withRelayClientTracing as ts, deriveLocalBranchNameFromRemoteRef as tt, ResourceMonitorSetExternalProcessesCommand as tu, PreviewAnnotationStyleChangeSchema as tv, BackgroundScope as tw, OrchestrationGetFullThreadDiffResult as tx, DiscoveredLocalServerList as ty, deepMerge as u, sync as uA, AuthAccessReadScope as uC, UnrecognizedOption as uD, getGlobalFlagsForCommandTree as uE, toEpochMillis as uO, ThreadInteractionModeSetPayload as uS, UrlError as uT, DesktopPreviewScreenshotArtifactSchema as u_, EMPTY_RELAY_ENVIRONMENT_DISCOVERY_STATE as ua, EnvironmentCloudRelayConfigResult as ub, WsPreviewNavigateRpc as uc, ProjectSearchContentsInput as ud, SourceControlProviderAuth as uf, ProviderRespondToUserInputInput as ug, EDITORS as uh, makeT3CodeConnectionProvider as ui, millis as uj, unbounded$1 as uk, WsTerminalWriteRpc as ul, DEFAULT_AUTOMATIC_GIT_FETCH_INTERVAL as um, normalizeProjectPathForDispatch as un, RELAY_MINT_RESPONSE_TYP as uo, ServerProcessResourceHistoryBucket as up, scopeThread as ur, PlatformConnectionRegistration as us, DEFAULT_CHANGE_REQUEST_TERMINOLOGY as ut, ResourceTelemetryHistoryBucket as uu, PreviewAutomationClientId as uv, ProviderInstanceConfig as uw, OrchestrationMessage as ux, PreviewInvalidUrlError as uy, prettyJsonString as v, txRetry as vA, AuthAccessStreamSnapshotEvent as vC, isQuitError as vD, choice as vE, make$60 as vO, ThreadSessionSetPayload as vS, get$5 as vT, DesktopServerExposureModeSchema as v_, registerPairingConnection as va, EnvironmentHttpUnauthorizedError as vb, WsProjectsSearchEntriesRpc as vc, T3ProjectFile as vd, SourceControlPublishStatus as vf, TerminalAttachStreamEvent as vg, ExternalLauncherUnsupportedEditorError as vh, attachEnvironmentDescriptor as vi, flatMap$5 as vj, andThen as vk, WsVcsSwitchRefRpc as vl, DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL as vm, reorderPinnedThread as vn, PrimaryEnvironmentAuth as vo, ServerProviderAuthStatus as vp, createEnvironmentRpcSubscriptionAtomFamily as vr, BearerConnectionTarget as vs, invalidateCachedVcsRefs as vt, ResourceTelemetrySnapshot as vu, PreviewAutomationExecutionError as vv, isProviderDriverKind as vw, OrchestrationSearchThreadsError as vx, PreviewReportStatusInput as vy, HostProcessPlatform as w, modifyDelay as wA, AuthBrowserSessionResult as wC, Literals as wD, Formatter as wE, drop$1 as wO, ThreadTurnDiffCompletedPayload as wS, resolveConfigFilePath as wT, DesktopSshEnvironmentEnsureOptionsSchema as w_, RemotePairingTargetError as wa, EnvironmentOrchestrationHttpApi as wb, WsServerGetBackgroundPolicyRpc as wc, GitActionProgressPhase as wd, VcsDiscoveryItem as wf, TerminalCwdStatError as wg, KeybindingValue as wh, makeT3AuthPairing as wi, getOrThrow$2 as wj, catchFilter as wk, UsagePricingStatus as wl, DEFAULT_SIDEBAR_THREAD_SORT_ORDER as wm, settleThread as wn, mapManagedRelayError as wo, ServerProviderSlashCommandInput as wp, executeAtomQuery as wr, PersistedConnectionTarget as ws, addProjectRemoteSourcePathHint as wt, ReviewDiffPreviewInput as wu, PreviewAutomationNavigateInput as wv, EventId as ww, OrchestrationShellStreamEvent as wx, PreviewViewportSetting as wy, HostProcessEnvironment as x, withTracerEnabled as xA, AuthAccessWriteScope as xC, Defect as xD, string as xE, concat$1 as xO, ThreadSnoozedPayload as xS, update$3 as xT, DesktopSshBearerRequestInputSchema as x_, RemoteBackendUrlInvalidError as xa, EnvironmentMetadataHttpApi as xb, WsReviewGetDiffPreviewRpc as xc, T3_PROJECT_FILE_SCHEMA_URL as xd, SourceControlRepositoryInfo as xf, TerminalCwdError as xg, KeybindingCommand as xh, makeT3Auth as xi, fromUndefinedOr as xj, asVoid as xk, UsageCostSource as xl, DEFAULT_SIDEBAR_PROJECT_GROUPING_MODE as xm, revertThreadCheckpoint as xn, fetchRemoteEnvironmentDescriptor as xo, ServerProviderModel as xp, createRuntimeStreamCommand as xr, ConnectionTarget as xs, vcsCommandConcurrency as xt, ReviewDiffFileContentsInput as xu, PreviewAutomationHostIdentity as xv, CheckpointRef as xw, OrchestrationSession as xx, PreviewSessionSnapshot as xy, HostProcessArchitecture as y, uninterruptible as yA, AuthAccessTokenResult as yC, make$49 as yD, integer as yE, callback as yO, ThreadSessionStopRequestedPayload as yS, make$44 as yT, DesktopServerExposureStateSchema as y_, registerSshConnection as ya, EnvironmentInternalError as yb, WsProjectsWriteFileRpc as yc, T3ProjectFileScript as yd, SourceControlRepositoryCloneUrls as yf, TerminalClearInput as yg, LaunchEditorInput as yh, createKnownEnvironment as yi, flatten$4 as yj, annotateLogs as yk, USAGE_CONTRACT_VERSION as yl, DEFAULT_SERVER_SETTINGS as ym, respondToThreadApproval as yn, RelayDeviceIdentity as yo, ServerProviderAvailability as yp, createEnvironmentSubscriptionAtomFamily as yr, ConnectionBlockedError as ys, vcsRefsCacheStateAtom as yt, ResourceTelemetrySourceHealth as yu, PreviewAutomationHost as yv, ApprovalRequestId as yw, OrchestrationSearchThreadsInput as yx, PreviewResizeInput as yy, getProviderOptionCurrentLabel as z, provideMerge as zA, AuthReviewWriteScope as zC, is as zD, date as zE, runDrain as zO, MODEL_SLUG_ALIASES_BY_PROVIDER as zS, selfActionForceFlag as zT, DesktopUpdateStatusSchema as z_, wakeups_exports as za, DispatchResult as zb, WsServerUpdateProviderRpc as zc, VcsCreateRefInput as zd, VcsProcessStdinWriteError as zf, TerminalWriteError as zg, THREAD_JUMP_KEYBINDING_COMMANDS as zh, AuthLocalSecretError as zi, mapInput as zj, forkScoped as zk, DesktopTelemetrySetDiagnosticsDemand as zl, MAX_TERMINAL_FONT_SIZE as zm, BaseAppLayer as zn, executeEnvironmentHttpRequest as zo, ServerSelfUpdateProgressEvent as zp, shellSnapshotLoaderLayer as zr, selection_layer_exports as zs, getBrowseParentPath as zt, AssetWorkspaceAssetNotFoundError as zu, PreviewAutomationScrollInput as zv, TrimmedNonEmptyString as zw, PROVIDER_SEND_TURN_MAX_IMAGE_BYTES as zx, AdvertisedEndpoint as zy };
117323
+ export { buildTemporaryWorktreeBranchName as $, runHead as $A, ProjectFaviconPath as $C, humanJsonFormatChoices as $D, resolveThreadId as $E, succeed$5 as $M, flip$1 as $N, toggle as $O, OrchestrationCheckpointFile as $S, AuthTerminalOperateScope as $T, PreviewAnnotationPointSchema as $_, RemoteEnvironmentAuthorization as $a, PullRequestDetail as $b, WsPullRequestsSubmitReviewRpc as $c, ProjectWriteFileInput as $d, ServerLifecycleStreamReadyEvent as $f, DesktopPreviewAutomationTypeInputSchema as $g, TaskAgentLinkage as $h, T3RpcOperations as $i, ignore$1 as $j, value$1 as $k, WsVcsRemoveWorktreeRpc as $l, SidebarThreadSortOrder as $m, makeT3PreviewAutomation as $n, oauthScopeSetEquals as $o, ClaudeSettings as $p, isSuccess as $r, threadRaisedHandWhileSnoozed as $s, projectKey as $t, ResourceTelemetryProcessSummary as $u, PreviewAutomationUnavailableError as $v, ProviderOptionDescriptor as $w, ChangeRequest as $x, DesktopBackendBootstrap as $y, applyClaudePromptEffortPrefix as A, callback as AA, OrchestrationSession as AC, file_exports as AD, CheckpointRef as AE, tx as AM, Service$1 as AN, withDescription as AO, VcsProcessExitFailureKind as AS, AuthAccessWriteScope as AT, DesktopSshPasswordPromptCancelledResultSchema as A_, readHashParams as Aa, EnvironmentOrchestrationHttpApi as Ab, WsPreviewNavigateRpc as Ac, FilesystemBrowseFailure as Ad, VcsPullResult as Af, TerminalOpenInput as Ag, MAX_KEYBINDING_VALUE_LENGTH as Ah, makeT3LocalAuth as Ai, andThen as Aj, DurationFromString as Ak, WsSubscribeAuthAccessRpc as Al, MAX_INTERFACE_FONT_SIZE as Am, unsettleThread as An, exchangeRemoteDpopAccessToken as Ao, ServerRemoveKeybindingResult as Ap, reportAtomCommandResult as Ar, SshConnectionTarget as As, getAddProjectInitialQuery as At, ResourceMonitorErrorEvent as Au, PreviewAutomationOpenInput as Av, ThreadSnoozedPayload as Aw, PullRequestReviewCapabilities as Ax, PreviewViewportSetting as Ay, getProviderOptionCurrentValue as B, fromIterable$1 as BA, OrchestrationThreadDetailPage as BC, forceFlag as BD, ProjectId as BE, currentTimeMillis as BM, getOrUndefined$1 as BN, isParam as BO, VcsUnsupportedOperationError as BS, AuthEnvironmentScope as BT, DesktopUpdateStatusSchema as B_, shouldResubscribeAfterWakeup as Ba, PullRequestActionInput as Bb, WsPullRequestsActivityRpc as Bc, ProjectListEntriesError as Bd, ServerConfig as Bf, TerminalWriteInput as Bg, THREAD_KEYBINDING_COMMANDS as Bh, AuthLocalError as Bi, effectify as Bj, Tuple as Bk, WsTerminalAttachRpc as Bl, MIN_SIDEBAR_THREAD_PREVIEW_COUNT as Bm, BaseAuthAppLayer as Bn, RemoteEnvironmentAuthUndeclaredStatusError as Bo, ServerTraceDiagnosticsFailureSummary as Bp, fetchEnvironmentShellSnapshot as Br, CredentialCipherError as Bs, hasTrailingPathSeparator as Bt, ResourceMonitorSetStreamingCommand as Bu, PreviewAutomationResponse as Bv, ThreadUnsnoozedPayload as Bw, PullRequestState as Bx, changes as By, HostProcessHostname as C, Path as CA, OrchestrationProposedPlan as CC, filterStatusOk$1 as CD, ProviderInstanceEnvironmentVariableName as CE, sync as CM, format$1 as CN, parseConfig as CO, VcsError as CS, AuthAccessStreamError as CT, DesktopSshEnvironmentBootstrapSchema as C_, RemoteBackendUrlInvalidError as Ca, EnvironmentHttpInternalServerError as Cb, WsOrchestrationSubscribeShellRpc as Cc, AssetWorkspaceContextNotFoundError as Cd, VcsCreateRefResult as Cf, TerminalCwdNotFoundError as Cg, KeybindingShortcut as Ch, makeT3Auth as Ci, BadArgument as Cj, QuitError as Ck, WsServerUpdateServerWithProgressRpc as Cl, EnvironmentIdentificationMode as Cm, setThreadRuntimeMode as Cn, fetchRemoteEnvironmentDescriptor as Co, ServerProviderUpdateState as Cp, createRuntimeStreamCommand as Cr, ConnectionBlockedReason as Cs, addProjectRemoteSourceLabel as Ct, DesktopTelemetrySetHostPowerIntervals as Cu, PreviewAutomationHostFocus as Cv, ThreadPinnedPayload as Cw, PullRequestOmittedFileStat as Cx, PreviewRenderedViewportSize as Cy, RotatingFileSink as D, Size as DA, OrchestrationSearchThreadsError as DC, set$4 as DD, isProviderDriverKind as DE, timeoutOrElse as DM, seconds as DN, optional as DO, VcsListWorkspaceFilesResult as DS, AuthAccessStreamSnapshotEvent as DT, DesktopSshEnvironmentTargetSchema as D_, RemotePairingTokenMissingError as Da, EnvironmentMetadataHttpApi as Db, WsPreviewAutomationRespondRpc as Dc, AssetWorkspaceRootNormalizationError as Dd, VcsListRefsInput as Df, TerminalHistoryError as Dg, KeybindingsConfig as Dh, parsePairingUrl as Di, acquireRelease as Dj, ArraySchema as Dk, WsSourceControlCloneRepositoryRpc as Dl, InterfaceFontSize as Dm, stopThreadSession as Dn, mapRemoteEnvironmentError as Do, ServerProviderVersionAdvisoryStatus as Dp, followStreamInEnvironment as Dr, PersistedConnectionTarget as Ds, buildProjectCreateCommand as Dt, ResourceMonitorCapabilities as Du, PreviewAutomationNavigateInput as Dv, ThreadSessionSetPayload as Dw, PullRequestReactionContent as Dx, PreviewSessionSnapshot as Dy, isHostWindows as E, FileTypeId as EA, OrchestrationRpcSchemas as EC, make$44 as ED, defaultInstanceIdForDriver as EE, timeoutOption as EM, minutes as EN, integer as EO, VcsListRemotesResult as ES, AuthAccessStreamPairingLinkUpsertedEvent as ET, DesktopSshEnvironmentEnsureResultSchema as E_, RemotePairingTargetError as Ea, EnvironmentInternalErrorReason as Eb, WsPreviewAutomationFocusHostRpc as Ec, AssetWorkspaceResolutionError as Ed, VcsInitInput as Ef, TerminalEvent as Eg, KeybindingWhenNode as Eh, makeT3AuthPairing as Ei, makeRunMain as Ej, make$49 as Ek, WsShellOpenInEditorRpc as El, GrokSettings as Em, startThreadTurn as En, mapManagedRelayError as Eo, ServerProviderVersionAdvisory as Ep, executeAtomQuery as Er, ConnectionTransientReason as Es, buildAddProjectRemoteSourceReadiness as Et, ResourceAttributionSnapshot as Eu, PreviewAutomationMalformedResponseError as Ev, ThreadRuntimeModeSetPayload as Ew, PullRequestReaction as Ex, PreviewSessionLookupError as Ey, getModelSelectionOptionDescriptors as F, drop$1 as FA, OrchestrationSubscribeShellInput as FC, ConfigError as FD, IsoDateTime as FE, zipWith as FM, fromNullishOr as FN, extractSingleParams as FO, VcsProcessStdinWriteError as FS, AuthClientMetadataDeviceType as FT, DesktopUpdateActionResultSchema as F_, EnvironmentNotRegisteredError as Fa, EnvironmentResourceNotFoundReason as Fb, WsProjectsListEntriesRpc as Fc, ProjectEntriesFailure as Fd, VcsStatusRemoteResult as Ff, TerminalSessionSnapshot as Fg, MODEL_PICKER_KEYBINDING_COMMANDS as Fh, T3LocalAuthOriginLive as Fi, catchCause$2 as Fj, NullOr as Fk, WsSubscribeServerConfigRpc as Fl, MIN_CODE_FONT_SIZE as Fm, T3CodeRpcLayer as Fn, resolveRemoteDpopWebSocketConnectionUrl as Fo, ServerSelfUpdateProgressStage as Fp, settleAsyncResult as Fr, keyring_node_exports as Fs, ensureBrowseDirectoryPath as Ft, ResourceMonitorProcessSample as Fu, PreviewAutomationRemoteUnavailableError as Fv, ThreadTurnStartCommand as Fw, PullRequestReviewerCandidate as Fx, unbounded as Fy, normalizeCustomModelSlug as G, mapEffect$1 as GA, OrchestrationThreadShell as GC, replaceFlag as GD, RuntimeSessionId as GE, hasInterruptsOnly as GM, none as GN, confirm as GO, CorrelationId as GS, AuthPairingLink as GT, PRIMARY_LOCAL_ENVIRONMENT_ID as G_, ConnectionTargetStore as Ga, PullRequestCheck as Gb, WsPullRequestsListRpc as Gc, ProjectReadFileResult as Gd, ServerConfigStreamEvent as Gf, DesktopEnvironmentBootstrapSchema as Gg, MONITOR_TASK_TYPES as Gh, T3ActionApplicationLive as Gi, flatMap$3 as Gj, decodeUnknownOption as Gk, WsTerminalRestartRpc as Gl, ServerSettings as Gm, T3LocalAuthOriginLayer as Gn, httpHeaderRedactionLayer as Go, ServerTraceDiagnosticsSpanSummary as Gp, keepAlive as Gr, canSnooze as Gs, createEnvironmentProjectAtoms as Gt, ResourceTelemetryHealth as Gu, PreviewAutomationSnapshot as Gv, DEFAULT_TEXT_GENERATION_MODEL as Gw, PullRequestUnavailableError as Gx, AdvertisedEndpoint as Gy, getProviderOptionSelectionValue as H, isStream as HA, OrchestrationThreadDetailWindow as HC, modelFlags as HD, RpcClientId as HE, TaggedError as HM, isSome as HN, optional$1 as HO, ChatAttachment as HS, AuthOrchestrationOperateScope as HT, DesktopWslStateSchema as H_, safeErrorLogAttributes as Ha, PullRequestActor as Hb, WsPullRequestsDetailRpc as Hc, ProjectListEntriesResult as Hd, ServerConfigKeybindingsUpdatedPayload as Hf, DesktopAppBrandingSchema as Hg, CanonicalRequestType as Hh, AuthLocalSigningError as Hi, exit as Hj, decodeExit as Hk, WsTerminalCloseRpc as Hl, ObservabilitySettings as Hm, T3AuthPairingLayer as Hn, makeEnvironmentHttpApiClient as Ho, ServerTraceDiagnosticsRecentFailure as Hp, buildEnvironmentAuthHeaders as Hr, selection_layer_exports as Hs, isFilesystemBrowseQuery as Ht, ResourceMonitorSnapshotEvent as Hu, PreviewAutomationScrollInput as Hv, BooleanProviderOptionDescriptor as Hw, PullRequestThreadComment as Hx, make$25 as Hy, getModelSelectionOptionValue as I, empty$7 as IA, OrchestrationSubscribeThreadInput as IC, T3CredentialCipher as ID, MessageId as IE, exponential as IM, fromUndefinedOr as IN, flagKind as IO, VcsProcessTimeoutError as IS, AuthClientPresentationMetadata as IT, DesktopUpdateChannelSchema as I_, EnvironmentRegistry as Ia, EnvironmentScopeRequiredError as Ib, WsProjectsReadFileRpc as Ic, ProjectEntry as Id, VcsStatusResult as If, TerminalSessionStatus as Ig, ResolvedKeybindingRule as Ih, makeT3LocalAuthOrigin as Ii, catchFilter as Ij, Number$1 as Ik, WsSubscribeServerLifecycleRpc as Il, MIN_GLASS_OPACITY as Im, makeT3CodeRpcLayer as In, resolveRemoteWebSocketConnectionUrl as Io, ServerSelfUpdateResult as Ip, settlePromise as Ir, layerNode as Is, findProjectByPath as It, ResourceMonitorReadHistoryCommand as Iu, PreviewAutomationRequest as Iv, ThreadTurnStartRequestedPayload as Iw, PullRequestReviewerCandidateList as Ix, get$1 as Iy, resolvePromptInjectedEffort as J, retry$1 as JA, PROVIDER_SEND_TURN_MAX_IMAGE_BYTES as JC, threadFormatFlag as JD, TrimmedNonEmptyString as JE, squash as JM, Number$5 as JN, integer$2 as JO, DispatchResult as JS, AuthReviewWriteScope as JT, PickedElementPayloadSchema as J_, ConnectionDriver as Ja, PullRequestComment as Jb, WsPullRequestsRequestReviewersRpc as Jc, ProjectSearchContentsResult as Jd, ServerConfigStreamSettingsUpdatedEvent as Jf, DesktopPreviewArtifactInputSchema as Jg, ProviderRuntimeTurnStatus as Jh, T3ModelApplicationLive as Ji, forEach$1 as Jj, is as Jk, WsVcsCreateWorktreeRpc as Jl, ServerSettingsPatch as Jm, T3PreviewAutomationLayer as Jn, createAdvertisedEndpoint as Jo, isProviderAvailable as Jp, swr as Jr, effectiveSnoozed as Js, InvalidScopedThreadKeyError as Jt, ResourceTelemetryHistoryInput as Ju, PreviewAutomationTabNotFoundError as Jv, MODEL_SLUG_ALIASES_BY_PROVIDER as Jw, PullRequestUpdateMethod as Jx, AdvertisedEndpointProvider as Jy, normalizeModelSlug as K, merge$1 as KA, OrchestrationThreadStreamItem as KC, selfActionForceFlag as KD, RuntimeTaskId as KE, isFailReason as KM, some as KN, date as KO, DEFAULT_PROVIDER_INTERACTION_MODE as KS, AuthRelayReadScope as KT, PersistedSavedEnvironmentRecordSchema as K_, EnvironmentCacheStore as Ka, PullRequestCheckStatus as Kb, WsPullRequestsListStatsRpc as Kc, ProjectSearchContentsError as Kd, ServerConfigStreamKeybindingsUpdatedEvent as Kf, DesktopPreviewAnnotationThemeInputSchema as Kg, ProviderRuntimeEvent as Kh, T3ApplicationLive as Ki, fn as Kj, decodeUnknownSync as Kk, WsTerminalWriteRpc as Kl, ServerSettingsError as Km, T3LocalAuthTokenLayer as Kn, environmentEndpointUrl as Ko, ServerUpsertKeybindingInput as Kp, make as Kr, changeRequestAutoSettles as Ks, InvalidScopedProjectKeyError as Kt, ResourceTelemetryHistory as Ku, PreviewAutomationStatus as Kv, DEFAULT_TEXT_GENERATION_MODEL_BY_PROVIDER as Kw, PullRequestUnavailableReason as Kx, AdvertisedEndpointCompatibility as Ky, getModelSelectionStringOptionValue as L, filter as LA, OrchestrationThread as LC, cipher_exports as LD, NonNegativeInt as LE, modifyDelay as LM, getOrElse as LN, getParamMetadata as LO, VcsRemote as LS, AuthClientSession as LT, DesktopUpdateCheckResultSchema as L_, PlatformEnvironmentRemovalError as La, RelayEnvironmentConnectScope as Lb, WsProjectsSearchContentsRpc as Lc, ProjectEntryKind as Ld, VcsStatusStreamEvent as Lf, TerminalSummary as Lg, ResolvedKeybindingsConfig as Lh, resolveT3BaseDir as Li, catchTag as Lj, String$1 as Lk, WsSubscribeTerminalEventsRpc as Ll, MIN_INTERFACE_FONT_SIZE as Lm, AppLayer as Ln, RemoteEnvironmentAuthFetchError as Lo, ServerSignalProcessInput as Lp, squashAtomCommandFailure as Lr, KeystoreUnavailableError as Ls, getBrowseDirectoryPath as Lt, ResourceMonitorSampleNowCommand as Lu, PreviewAutomationRequestQueueClosedError as Lv, ThreadUnarchivedPayload as Lw, PullRequestReviewerCapabilities as Lx, make$24 as Ly, createModelCapabilities as M, concat$1 as MA, OrchestrationShellSnapshot as MC, resolveKeyFilePath as MD, EnvironmentId as ME, uninterruptible as MM, make$74 as MN, error as MO, VcsProcessOutputLimitError as MS, AuthBrowserSessionRequest as MT, DesktopSshPasswordPromptRequestSchema as M_, resolveRemotePairingTarget as Ma, EnvironmentRequestInvalidError as Mb, WsPreviewRefreshRpc as Mc, FilesystemBrowseResult as Md, VcsRemoveWorktreeInput as Mf, TerminalResizeInput as Mg, MAX_SCRIPT_ID_LENGTH as Mh, T3LocalAuthTokenLive as Mi, as as Mj, Literal as Mk, WsSubscribeDiscoveredLocalServersRpc as Ml, MAX_SIDEBAR_AUTO_SETTLE_AFTER_DAYS as Mm, updateProject as Mn, fetchRemoteSessionState as Mo, ServerSelfUpdateInput as Mp, runInEnvironment as Mr, T3Orchestration as Ms, sortAddProjectProviderSources as Mt, ResourceMonitorExternalProcess as Mu, PreviewAutomationPressInput as Mv, ThreadTurnDiff as Mw, PullRequestReviewDecision as Mx, offer as My, createModelSelection as N, debounce as NA, OrchestrationShellStreamEvent as NC, resolveT3cliConfigDir as ND, EventId as NE, void_$1 as NM, flatMap$5 as NN, log as NO, VcsProcessOutputReadError as NS, AuthBrowserSessionResult as NT, DesktopSshPasswordPromptResolutionInputSchema as N_, setPairingTokenOnUrl as Na, EnvironmentRequestInvalidReason as Nb, WsPreviewReportStatusRpc as Nc, ProjectContentMatch as Nd, VcsStatusInput as Nf, TerminalRestartInput as Ng, MAX_WHEN_EXPRESSION_DEPTH as Nh, makeT3LocalAuthToken as Ni, asVoid as Nj, Literals as Nk, WsSubscribePreviewEventsRpc as Nl, MAX_SIDEBAR_THREAD_PREVIEW_COUNT as Nm, updateThreadMetadata as Nn, issueRemoteDpopWebSocketTicket as No, ServerSelfUpdateOutcome as Np, runStreamInEnvironment as Nr, layerWebSocketConstructor as Ns, appendBrowsePathSegment as Nt, ResourceMonitorHelloEvent as Nu, PreviewAutomationRecordingArtifact as Nv, ThreadTurnDiffCompletedPayload as Nw, PullRequestReviewThread as Nx, shutdown as Ny, RotatingFileSinkConfigurationError as O, WatchBackend as OA, OrchestrationSearchThreadsInput as OC, update$3 as OD, ApprovalRequestId as OE, tryPromise as OM, toMillis as ON, string as OO, VcsOutputDecodeError as OS, AuthAccessTokenResult as OT, DesktopSshHostSourceSchema as O_, RemotePairingUrlInvalidError as Oa, EnvironmentOperationForbiddenError as Ob, WsPreviewCloseRpc as Oc, FilesystemBrowseEntry as Od, VcsListRefsResult as Of, TerminalMetadataStreamEvent as Og, KeybindingsConfigError as Oh, T3LocalAuth as Oi, addFinalizer as Oj, DateTimeUtcFromString as Ok, WsSourceControlLookupRepositoryRpc as Ol, MAX_CODE_FONT_SIZE as Om, unarchiveThread as On, profileMissingError as Oo, ServerProviders as Op, isAtomCommandInterrupted as Or, PrimaryConnectionTarget as Os, canCreateProjectInEnvironment as Ot, ResourceMonitorCommand as Ou, PreviewAutomationNetworkEntry as Ov, ThreadSessionStopRequestedPayload as Ow, PullRequestReactionInput as Ox, PreviewTabId as Oy, getModelSelectionBooleanOptionValue as P, decodeText as PA, OrchestrationShellStreamItem as PC, service_exports$2 as PD, ForwardCompatibleArray as PE, withTracerEnabled as PM, flatten$4 as PN, argumentKind as PO, VcsProcessSpawnError as PS, AuthClientMetadata as PT, DesktopThemeSchema as P_, stripPairingTokenFromUrl as Pa, EnvironmentResourceNotFoundError as Pb, WsPreviewResizeRpc as Pc, ProjectContentMatchRange as Pd, VcsStatusLocalResult as Pf, TerminalSessionLookupError as Pg, MODEL_PICKER_JUMP_KEYBINDING_COMMANDS as Ph, T3LocalAuthOrigin as Pi, callback$1 as Pj, Never as Pk, WsSubscribeResourceTelemetryRpc as Pl, MAX_TERMINAL_FONT_SIZE as Pm, findErrorTraceId as Pn, issueRemoteWebSocketTicket as Po, ServerSelfUpdateProgressEvent as Pp, scheduleAtomCommandEffect as Pr, layerUndici as Ps, canNavigateUp as Pt, ResourceMonitorHistoryChunkEvent as Pu, PreviewAutomationRecordingStatus as Pv, ThreadTurnInterruptRequestedPayload as Pw, PullRequestReviewVerdict as Px, take as Py, applyGitStatusStreamEvent as Q, runForEach as QA, ProjectDeletedPayload as QC, canRenderLiveTerminal as QD, resolveProjectRef as QE, provideMerge as QM, combineAll as QN, text$1 as QO, OrchestrationAggregateKind as QS, AuthStandardClientScopes as QT, PreviewAnnotationPayloadSchema as Q_, profileStore_exports as Qa, PullRequestCommit as Qb, WsPullRequestsSetThreadResolutionRpc as Qc, ProjectWriteFileError as Qd, ServerLifecycleStreamEvent as Qf, DesktopPreviewAutomationScrollInputSchema as Qg, TOOL_LIFECYCLE_ITEM_TYPES as Qh, makeT3Application as Qi, gen as Qj, toJsonSchemaDocument as Qk, WsVcsRefreshStatusRpc as Ql, SidebarThreadPreviewCount as Qm, T3PreviewAutomationLive as Qn, encodeOAuthScope as Qo, BackgroundActivitySettings as Qp, failure as Qr, threadLastActivityAt as Qs, parseThreadKey as Qt, ResourceTelemetryProcessIdentity as Qu, PreviewAutomationTypeInput as Qv, ProviderOptionChoice as Qw, resolvePullRequestAuthorFilter as Qx, AdvertisedEndpointStatus as Qy, getProviderOptionBooleanSelectionValue as R, filterMap as RA, OrchestrationThreadActivity as RC, credentialTokenFromEnv as RD, PortSchema as RE, spaced as RM, getOrNull as RN, getUnderlyingSingleOrThrow as RO, VcsRepositoryDetectionError as RS, AuthCreatePairingCredentialInput as RT, DesktopUpdateReleaseNoteSchema as R_, EnvironmentSupervisor as Ra, RelayEnvironmentStatusScope as Rb, WsProjectsSearchEntriesRpc as Rc, ProjectFileFailure as Rd, VcsSwitchRefInput as Rf, TerminalThreadInput as Rg, SCRIPT_RUN_COMMAND_PATTERN as Rh, AuthConfigError as Ri, catchTags as Rj, Struct as Rk, WsSubscribeTerminalMetadataRpc as Rl, MIN_PROMPT_FONT_SIZE as Rm, AuthAppLayer as Rn, RemoteEnvironmentAuthInvalidJsonError as Ro, ServerSignalProcessResult as Rp, applyShellStreamEvent as Rr, cipher_node_exports as Rs, getBrowseLeafPathSegment as Rt, ResourceMonitorSetExternalProcessesCommand as Ru, PreviewAutomationResizeInput as Rv, ThreadUnpinnedPayload as Rw, PullRequestReviewerKind as Rx, modify$1 as Ry, HostProcessExecutablePath as S, InvalidValue$1 as SA, OrchestrationProjectShell as SC, transform$1 as SD, ProviderInstanceEnvironmentVariable as SE, suspend$3 as SM, succeed$9 as SN, toImpl as SO, VcsDriverKind as SS, AuthAccessStreamClientUpsertedEvent as ST, DesktopSshBearerRequestInputSchema as S_, updateBearerConnection as Sa, EnvironmentHttpForbiddenError as Sb, WsOrchestrationSearchThreadsRpc as Sc, AssetWorkspaceAssetNotFoundError as Sd, VcsCreateRefInput as Sf, TerminalCwdNotDirectoryError as Sg, KeybindingRule as Sh, T3AuthLive as Si, unbounded$1 as Sj, string$3 as Sk, WsServerUpdateServerRpc as Sl, DEFAULT_UNIFIED_SETTINGS as Sm, setThreadInteractionMode as Sn, SshEnvironmentGateway as So, ServerProviderUpdateInput as Sp, createRuntimeCommand as Sr, ConnectionBlockedError as Ss, vcsCommandScheduler as St, DesktopTelemetrySetDiagnosticsDemand as Su, PreviewAutomationHost as Sv, ThreadPinReorderedPayload as Sw, PullRequestMergeability as Sx, PreviewRefreshInput as Sy, HostProcessWorkingDirectory as T, FileSystem as TA, OrchestrationReadModel as TC, get$5 as TD, ProviderInstanceRef as TE, tapError$2 as TM, min$1 as TN, choice as TO, VcsFreshnessSource as TS, AuthAccessStreamPairingLinkRemovedEvent as TT, DesktopSshEnvironmentEnsureOptionsSchema as T_, RemotePairingCodeMissingError as Ta, EnvironmentInternalError as Tb, WsPreviewAutomationConnectRpc as Tc, AssetWorkspacePathValidationError as Td, VcsCreateWorktreeResult as Tf, TerminalError as Tg, KeybindingWhen as Th, T3AuthPairingLive as Ti, systemError as Tj, isQuitError as Tk, WsServerUpsertKeybindingRpc as Tl, GlassOpacity as Tm, snoozeThread as Tn, environmentMismatchError as To, ServerProviderUpdatedPayload as Tp, executeAtomCommand as Tr, ConnectionTransientError as Ts, addProjectRemoteSourceProvider as Tt, ResourceAttributionEntry as Tu, PreviewAutomationInvalidSelectorError as Tv, ThreadRevertedPayload as Tw, PullRequestProviderSummary as Tx, PreviewResizeInput as Ty, getProviderOptionStringSelectionValue as U, map$5 as UA, OrchestrationThreadSearchMatch as UC, projectFlag as UD, RuntimeItemId as UE, fail$4 as UM, map$13 as UN, string$1 as UO, ChatImageAttachment as US, AuthOrchestrationReadScope as UT, FAVICON_CAPTURED_AT_MAX as U_, ConnectionPersistenceError as Ua, PullRequestBaseComparison as Ub, WsPullRequestsDiffFileContentsRpc as Uc, ProjectReadFileError as Ud, ServerConfigProviderStatusesPayload as Uf, DesktopAppStageLabelSchema as Ug, INERT_TASK_TYPES as Uh, AuthPairingUrlError as Ui, fail$3 as Uj, decodeTo as Uk, WsTerminalOpenRpc as Ul, OpenCodeSettings as Um, T3AuthTransportLayer as Un, makeEnvironmentHttpApiUrlBuilder as Uo, ServerTraceDiagnosticsResult as Up, withEnvironmentCredentials as Ur, QUEUED_TURN_START_GRACE_MS as Us, isUnsupportedWindowsProjectPath as Ut, ResourceTelemetryAggregate as Uu, PreviewAutomationSetColorSchemeInput as Uv, DEFAULT_MODEL as Uw, PullRequestThreadReplyInput as Ux, set$2 as Uy, getProviderOptionDescriptors as V, fromQueue as VA, OrchestrationThreadDetailSnapshot as VC, formatFlag as VD, ProviderItemId as VE, currentTimeNanos as VM, isNone as VN, mapEffect as VO, AssistantDeliveryMode as VS, AuthEnvironmentScopes as VT, DesktopWslDistroSchema as V_, wakeups_exports as Va, PullRequestActivity as Vb, WsPullRequestsCommentRpc as Vc, ProjectListEntriesInput as Vd, ServerConfigIssue as Vf, ContextMenuItemSchema as Vg, CanonicalItemType as Vh, AuthLocalSecretError as Vi, ensuring$2 as Vj, Union as Vk, WsTerminalClearRpc as Vl, MIN_TERMINAL_FONT_SIZE as Vm, T3AuthLayer as Vn, executeEnvironmentHttpRequest as Vo, ServerTraceDiagnosticsLogEvent as Vp, shellSnapshotLoaderLayer as Vr, layer$15 as Vs, inferProjectTitleFromPath as Vt, ResourceMonitorShutdownCommand as Vu, PreviewAutomationResultTooLargeError as Vv, TurnCountRange as Vw, PullRequestSubmitReviewInput as Vx, get$2 as Vy, isClaudeUltrathinkPrompt as W, mapAccum as WA, OrchestrationThreadSearchSource as WC, projectPathFlag as WD, RuntimeRequestId as WE, findErrorOption as WM, match$5 as WN, variadic as WO, ClientOrchestrationCommand as WS, AuthPairingCredentialResult as WT, FAVICON_DATA_URL_MAX_LENGTH as W_, ConnectionRegistrationStore as Wa, PullRequestCapabilities as Wb, WsPullRequestsInvalidateRpc as Wc, ProjectReadFileInput as Wd, ServerConfigSettingsUpdatedPayload as Wf, DesktopDiscoveredSshHostSchema as Wg, ItemLifecyclePayload as Wh, AuthTransportError as Wi, failCause$4 as Wj, decodeUnknownEffect as Wk, WsTerminalResizeRpc as Wl, PromptFontSize as Wm, T3LocalAuthLayer as Wn, remoteHttpClientLayer as Wo, ServerTraceDiagnosticsSpanOccurrence as Wp, family as Wr, canSettle as Ws, resolveProjectPathForDispatch as Wt, ResourceTelemetryGroups as Wu, PreviewAutomationSetColorSchemeResult as Wv, DEFAULT_MODEL_BY_PROVIDER as Ww, PullRequestThreadResolutionInput as Wx, update$2 as Wy, trimOrNull as X, runDrain as XA, ProjectCreateCommand as XC, worktreeFlag as XD, TurnId as XE, mergeAll$1 as XM, Struct$1 as XN, run$1 as XO, ORCHESTRATION_WS_METHODS as XS, AuthRevokePairingLinkInput as XT, PickedThemeFileSchema as X_, makeWsRpcProtocolClient as Xa, PullRequestCommentKind as Xb, WsPullRequestsRunActionRpc as Xc, ProjectSearchEntriesInput as Xd, ServerConfigUpdatedPayload as Xf, DesktopPreviewAutomationEvaluateInputSchema as Xg, RuntimeTaskStatus as Xh, T3TerminalApplicationLive as Xi, forkChild as Xj, optional$2 as Xk, WsVcsListRefsRpc as Xl, SidebarProjectGroupingMode as Xm, makeT3RpcLayer as Xn, normalizeHttpBaseUrl as Xo, BackgroundActivityProfile as Xp, AtomRegistry as Xr, resolveSnoozePresets as Xs, parseProjectKey as Xt, ResourceTelemetryProcess as Xu, PreviewAutomationTargetNotEditableError as Xv, PREFERRED_DEFAULT_CODEX_MODELS as Xw, pullRequestHostOf as Xx, AdvertisedEndpointReachability as Xy, resolveSelectableModel as Y, run$3 as YA, PROVIDER_SEND_TURN_MAX_INPUT_CHARS as YC, waitFormatFlag as YD, TrimmedString as YE, effect$1 as YM, String$5 as YN, password as YO, ModelSelection as YS, AuthRevokeClientSessionInput as YT, PickedElementStackFrameSchema as Y_, RpcSessionFactory as Ya, PullRequestCommentInput as Yb, WsPullRequestsReviewerCandidatesRpc as Yc, ProjectSearchEntriesError as Yd, ServerConfigStreamSnapshotEvent as Yf, DesktopPreviewAutomationClickInputSchema as Yg, RuntimeEventRaw as Yh, T3ProjectApplicationLive as Yi, forever as Yj, isNonEmpty as Yk, WsVcsInitRpc as Yl, SidebarAutoSettleAfterDays as Ym, T3RpcLive as Yn, deriveWsBaseUrl as Yo, BackgroundActivityOverrides as Yp, withLabel as Yr, hasQueuedTurnStart as Ys, arrayElementsEqual as Yt, ResourceTelemetryIoSemantics as Yu, PreviewAutomationTabTargetInput as Yv, ModelCapabilities as Yw, PullRequestViewerPermissions as Yx, AdvertisedEndpointProviderKind as Yy, WORKTREE_BRANCH_PREFIX as Z, runFold as ZA, ProjectCreatedPayload as ZC, yesFlag as ZD, resolveCommandProjectRef as ZE, provide$2 as ZM, combine$2 as ZN, select as ZO, OrchestrationActorKind as ZS, AuthSessionState as ZT, PreviewAnnotationElementTargetSchema as Z_, ConnectionResolver as Za, PullRequestCommentUpdateInput as Zb, WsPullRequestsSetReactionRpc as Zc, ProjectSearchEntriesResult as Zd, ServerLifecycleReadyPayload as Zf, DesktopPreviewAutomationPressInputSchema as Zg, RuntimeTaskUsage as Zh, T3ThreadApplicationLive as Zi, forkScoped as Zj, optionalKey as Zk, WsVcsPullRpc as Zl, SidebarProjectSortOrder as Zm, T3PreviewAutomation as Zn, OAuthScopeEncodingError as Zo, BackgroundActivityProfileSelection as Zp, toStream as Zr, snoozeWakeLabel as Zs, parseProjectRefCollectionKey as Zt, ResourceTelemetryProcessCategory as Zu, PreviewAutomationTimeoutError as Zv, PROVIDER_DISPLAY_NAMES as Zw, pullRequestProviderRequirement as Zx, AdvertisedEndpointSource as Zy, fromLenientJsonString as _, encodeHex as _A, OrchestrationGetWorkflowScriptResult as _C, UrlError as _D, HostPowerThermalState as _E, runFork as _M, fail$8 as _N, getGlobalFlagsForCommandTree as _O, SourceControlRepositoryInfo as _S, ServerSelfUpdateMethod as _T, DesktopRuntimeArchSchema as __, prepareBearerConnectionUpdate as _a, EnvironmentConnectHttpApi as _b, WsOrchestrationDispatchCommandRpc as _c, AssetProjectFaviconNotFoundError as _d, GitRunStackedActionInput as _f, TerminalAttachInput as _g, RemoteOpenTargetKind as _h, scopedProjectKey as _i, offerUnsafe as _j, UnrecognizedOption as _k, WsServerReportClientActivityRpc as _l, DEFAULT_SIDEBAR_PROJECT_SORT_ORDER as _m, pinThread as _n, verifyRelayJwt as _o, ServerProviderSkill as _p, createEnvironmentRpcCommand as _r, SshConnectionRegistration as _s, resolveChangeRequestPresentationForKind as _t, DesktopElectronProcessType as _u, PreviewAutomationControlInterruptedError as _v, ThreadCreatedPayload as _w, PullRequestListState as _x, PreviewListInput as _y, getBackgroundActivityPresetSettings as a, make$55 as aA, OrchestrationEvent as aC, T3Config as aD, ServerAuthDescriptor as aE, match as aM, make$71 as aN, T3CliEnvConfig as aO, isObject$1 as aP, SourceControlDiscoveryStatus as aS, EnvironmentConnectionState as aT, DesktopPreviewNavigateInputSchema as a_, connectionCatalogDisplayUrl as aa, AuthClientSessionRevokeResult as ab, derivePendingUserInputs as ac, ReviewDiffFileContentsResult as ad, GitActionProgressEvent as af, classifyTaskAgentKind as ag, EDITORS as ah, isRpcClientError as ai, tap$1 as aj, magenta as ak, WsServerDiscoverSourceControlRpc as al, DEFAULT_AUTOMATIC_GIT_FETCH_INTERVAL as am, isExplicitRelativePath as an, isSecureRelayUrl as ao, ServerProcessResourceHistoryBucket as ap, createEnvironmentShellSummaryAtom as ar, credentialStore_exports as as, normalizeGitRemoteUrl as at, UsagePricing as au, PreviewAnnotationSubmissionResultSchema as av, ProviderApprovalDecision as aw, PullRequestDiffSide as ax, DiscoveredLocalServer as ay, HostProcessArguments as b, nowUnsafe as bA, OrchestrationMessageRole as bC, retry as bD, ProviderInstanceConfigMap as bE, sleep as bM, isResult as bN, checkForDuplicateFlags as bO, VcsDiscoveryItem as bS, AuthAccessSnapshot as bT, DesktopServerExposureStateSchema as b_, registerPairingConnection as ba, EnvironmentHttpCommonError as bb, WsOrchestrationGetTurnDiffRpc as bc, AssetSigningKeyLoadError as bd, GitStackedAction as bf, TerminalCloseInput as bg, remoteSchemeForEditor as bh, attachEnvironmentDescriptor as bi, sliding as bj, map$3 as bk, WsServerSignalProcessRpc as bl, DEFAULT_TERMINAL_FONT_SIZE as bm, respondToThreadUserInput as bn, PrimaryEnvironmentAuth as bo, ServerProviderState as bp, createEnvironmentRpcSubscriptionAtomFamily as br, AVAILABLE_CONNECTION_STATE as bs, withVcsRefsPersistenceLock as bt, DesktopHostTelemetrySnapshot as bu, PreviewAutomationEvaluateInput as bv, ThreadMessageSentPayload as bw, PullRequestMergeCapabilities as bx, PreviewNavigateInput as by, resolveBackgroundActivitySettings as c, ExitCode as cA, OrchestrationGetFullThreadDiffError as cC, defaultEnvironmentNameForLocal as cD, BackgroundBooleanState as cE, onExit$1 as cM, isFailure$1 as cN, T3Application as cO, dual as cP, SourceControlProviderDiscoveryItem as cS, ExecutionEnvironmentPlatform as cT, DesktopPreviewRecordingFrameSchema as c_, connectionStatusTitle as ca, EnvironmentAuthHttpApi as cb, threadStatus as cc, ReviewDiffPreviewResult as cd, GitActionProgressStream as cf, ProviderInterruptTurnInput as cg, ExternalLauncherBrowserSpawnError as ch, subscribe as ci, get$6 as cj, getChoiceKeys as ck, WsServerGetProcessDiagnosticsRpc as cl, DEFAULT_CODE_FONT_SIZE as cm, isWindowsDrivePath as cn, RELAY_HEALTH_REQUEST_TYP as co, ServerProcessResourceHistoryResult as cp, createEnvironmentSnapshotAtom as cr, BearerConnectionProfile as cs, sanitizeBranchFragment as ct, UsageReadError as cu, PREVIEW_AUTOMATION_OPERATIONS as cv, ProviderRequestKind as cw, PullRequestInvalidateInput as cx, PREVIEW_URL_MAX_LENGTH as cy, decodeJsonResult as d, makeHandle as dA, OrchestrationGetSnapshotError as dC, slugifyEnvironmentName as dD, ClientActivityClientId as dE, orDie as dM, NativeSpan as dN, T3TerminalApplication as dO, pipeArguments as dP, SourceControlProviderKind as dS, RepositoryIdentity as dT, DesktopPreviewScreenshotArtifactSchema as d_, layer_exports as da, EnvironmentAuthenticatedAuth as db, WsCloudGetRelayClientStatusRpc as dc, AssetAccessError as dd, GitManagerServiceError as df, ProviderSendTurnInput as dg, ExternalLauncherError as dh, T3CodeConnectionProviderLive as di, isSink as dj, isFalseValue as dk, WsServerGetSettingsRpc as dl, DEFAULT_INTERFACE_FONT_SIZE as dm, archiveThread as dn, RELAY_MINT_REQUEST_TYP as do, ServerProvider as dp, scopeThread as dr, ConnectionProfile as ds, detectSourceControlProviderFromRemoteUrl as dt, UsageSourceFingerprint as du, PreviewAutomationClickInput as dv, ProviderUserInputAnswers as dw, PullRequestListCursors as dx, PREVIEW_VIEWPORT_MIN_DIMENSION as dy, Crypto as eA, OrchestrationCheckpointStatus as eC, resolveWorktreePath as eD, AuthTokenExchangeGrantType as eE, interrupt$2 as eM, sync$1 as eN, humanJsonNdjsonFormatChoices as eO, mapInput as eP, ChangeRequestState as eS, ProviderOptionDescriptorType as eT, DesktopPreviewAutomationWaitForInputSchema as e_, T3RpcOperationsLive as ea, RelayClientInstallFailedError as eb, threadWokeAt as ec, ResourceTelemetryRetryResult as ed, ProjectWriteFileResult as ef, TaskRunHandles as eg, SourceControlWritingStyleMode as eh, value as ei, runLast as ej, annotate$1 as ek, WsPullRequestsUpdateCommentRpc as el, ClientSettingsPatch as em, projectRefCollectionKey as en, RemoteDpopAccessToken as eo, ServerLifecycleStreamWelcomeEvent as ep, T3OrchestrationLive as er, parseAllowedOAuthScope as es, dedupeRemoteBranchesWithLocalMatches as et, WsVcsSwitchRefRpc as eu, PreviewAnnotationRectSchema as ev, ProjectMetaUpdatedPayload as ew, PullRequestDetailView as ex, PreviewAutomationUnsupportedClientError as ey, decodeUnknownJsonResult as f, Transformation as fA, OrchestrationGetTurnDiffError as fC, validateEnvironmentName as fD, ClientActivityLease as fE, orElseSucceed as fM, make$72 as fN, T3ThreadApplication as fO, SourceControlPublishRepositoryInput as fS, RepositoryIdentityLocator as fT, DesktopPreviewSetColorSchemeInputSchema as f_, EMPTY_RELAY_ENVIRONMENT_DISCOVERY_STATE as fa, EnvironmentAuthenticatedPrincipal as fb, WsCloudInstallRelayClientRpc as fc, AssetAttachmentNotFoundError as fd, GitPreparePullRequestThreadInput as ff, ProviderSession as fg, ExternalLauncherUnknownEditorError as fh, makeT3CodeConnectionProvider as fi, make$63 as fj, isTrueValue as fk, WsServerGetTraceDiagnosticsRpc as fl, DEFAULT_PROMPT_FONT_SIZE as fm, createProject as fn, RELAY_MINT_RESPONSE_TYP as fo, ServerProviderAuth as fp, scopeThreadShell as fr, ConnectionRegistration as fs, formatChangeRequestAction as ft, UsageSourceStatus as fu, PreviewAutomationClientDisconnectedError as fv, RuntimeMode as fw, PullRequestListEntry as fx, PREVIEW_VIEWPORT_PRESET_IDS as fy, fromLenientJson as g, encodeBase64Url as gA, OrchestrationGetWorkflowScriptInput as gC, toWebSocketEndpointUrl as gD, HostPowerSource as gE, result as gM, sort as gN, getGlobalFlagsForCommandPath as gO, SourceControlRepositoryError as gS, ServerSelfUpdateCapability as gT, DesktopPreviewWebviewConfigSchema as g_, ConnectionOnboarding as ga, EnvironmentCloudRelayConfigResult as gb, WsGitRunStackedActionRpc as gc, AssetProjectFaviconInspectionError as gd, GitResolvePullRequestResult as gf, DEFAULT_TERMINAL_ID as gg, RemoteOpenTarget as gh, scopeThreadRef as gi, offer$1 as gj, UnknownSubcommand as gk, WsServerRemoveKeybindingRpc as gl, DEFAULT_SIDEBAR_PROJECT_GROUPING_MODE as gm, interruptThreadTurn as gn, signRelayJwt as go, ServerProviderModel as gp, createEnvironmentQueryAtomFamily as gr, SshConnectionProfile as gs, resolveChangeRequestPresentation as gt, DesktopElectronProcessMetric as gu, PreviewAutomationConsoleEntry as gv, ThreadCheckpointRevertRequestedPayload as gw, PullRequestListResult as gx, PreviewInvalidUrlError as gy, fromJsonStringPretty as h, decodeBase64UrlString as hA, OrchestrationGetWorkflowScriptError as hC, toWebSocketBaseUrl as hD, HostPowerSnapshot as hE, provideService$2 as hM, map$10 as hN, Wizard as hO, SourceControlRepositoryCloneUrls as hS, ScopedThreadSessionRef as hT, DesktopPreviewTabStateSchema as h_, PlatformConnectionSource as ha, EnvironmentCloudPreferencesRequest as hb, WsGitResolvePullRequestRpc as hc, AssetPreviewTypeValidationError as hd, GitPullRequestRefInput as hf, ProviderTurnStartResult as hg, REMOTE_CAPABLE_EDITOR_IDS as hh, scopeProjectRef as hi, make$64 as hj, ShowHelp as hk, WsServerRefreshProvidersRpc as hl, DEFAULT_SIDEBAR_AUTO_SETTLE_AFTER_DAYS as hm, deleteThread as hn, normalizeRelayIssuer as ho, ServerProviderContinuation as hp, createEnvironmentCommand as hr, RelayConnectionRegistration as hs, getChangeRequestTerminologyForKind as ht, UsageTokenTotals as hu, PreviewAutomationConnectionId as hv, ThreadArchivedPayload as hw, PullRequestListProjectError as hx, PreviewEvent as hy, getBackgroundActivityBaseProfile as i, fdName as iA, OrchestrationDispatchCommandError as iC, layer$17 as iD, ServerAuthBootstrapMethod as iE, mapError$2 as iM, isDone$1 as iN, resolveOutputFormat as iO, isNullish as iP, SourceControlDiscoveryResult as iS, SelectProviderOptionDescriptor as iT, DesktopPreviewNavStatusSchema as i_, T3CodeConnectionError as ia, RelayClientStatusSchema as ib, derivePendingApprovals as ic, ReviewDiffFileContentsInput as id, T3_PROJECT_FILE_SCHEMA_URL as if, UserInputQuestion as ig, makeProviderSettingsSchema as ih, config as ii, takeUntil as ij, green as ik, WsRpcGroup as il, CursorSettings as im, createProjectEnvironmentAtoms as in, managedRelay_exports as io, ServerProcessDiagnosticsResult as ip, createEnvironmentShellAtoms as ir, withRelayClientTracing as is, mergeGitStatusParts as it, UsageDay as iu, PreviewAnnotationStyleChangeSchema as iv, ProjectionPendingApprovalStatus as iw, PullRequestDiffResult as ix, ConfiguredLocalServerUrls as iy, buildProviderOptionSelectionsFromDescriptors as j, changes$1 as jA, OrchestrationSessionStatus as jC, resolveConfigFilePath as jD, CommandId as jE, txRetry as jM, empty$14 as jN, Formatter as jO, VcsProcessMissingExitCodeError as jS, AuthAdministrativeScopes as jT, DesktopSshPasswordPromptCancelledType as j_, readHostedPairingRequest as ja, EnvironmentPullRequestsHttpApi as jb, WsPreviewOpenRpc as jc, FilesystemBrowseInput as jd, VcsRef as jf, TerminalResizeError as jg, MAX_KEYBINDING_WHEN_LENGTH as jh, T3LocalAuthToken as ji, annotateLogs as jj, Int as jk, WsSubscribeBackgroundPolicyRpc as jl, MAX_PROMPT_FONT_SIZE as jm, unsnoozeThread as jn, fetchRemoteDpopSessionState as jo, ServerSelfUpdateError as jp, runAtomCommand as jr, connectionProjectionPhase as js, resolveAddProjectPath as jt, ResourceMonitorEvent as ju, PreviewAutomationOperation as jv, ThreadTitleRegeneration as jw, PullRequestReviewCommentDraft as jx, PreviewViewportSize as jy, RotatingFileSinkError as k, make$60 as kA, OrchestrationSearchThreadsResult as kC, service_exports$1 as kD, AuthSessionId as kE, try_ as kM, Reference as kN, withDefault as kO, VcsProcessExitError as kS, AuthAccessTokenType as kT, DesktopSshHttpBaseUrlInputSchema as k_, getPairingTokenFromUrl as ka, EnvironmentOperationForbiddenReason as kb, WsPreviewListRpc as kc, FilesystemBrowseError as kd, VcsPullInput as kf, TerminalNotRunningError as kg, MAX_KEYBINDINGS_COUNT as kh, T3LocalAuthLive as ki, all$1 as kj, Defect as kk, WsSourceControlPublishRepositoryRpc as kl, MAX_GLASS_OPACITY as km, unpinThread as kn, bootstrapRemoteBearerSession as ko, ServerRemoveKeybindingInput as kp, mapAtomCommandResult as kr, RelayConnectionTarget as ks, findExistingAddProject as kt, ResourceMonitorConfigureCommand as ku, PreviewAutomationNoAvailableHostError as kv, ThreadSettledPayload as kw, PullRequestRef as kx, PreviewViewportPresetId as ky, resolveServerBackgroundActivitySettings as l, ProcessId as lA, OrchestrationGetFullThreadDiffInput as lC, defaultEnvironmentNameFromUrl as lD, BackgroundPolicySnapshot as lE, onInterrupt as lM, isSuccess$1 as lN, T3ModelApplication as lO, identity as lP, SourceControlProviderError as lS, ExecutionEnvironmentPlatformArch as lT, DesktopPreviewRecordingSaveInputSchema as l_, presentConnectionState as la, EnvironmentAuthInvalidError as lb, WS_METHODS as lc, ReviewDiffPreviewSource as ld, GitCommandError as lf, ProviderRespondToRequestInput as lg, ExternalLauncherCommandNotFoundError as lh, subscribeDynamic as li, make$61 as lj, getTypeName as lk, WsServerGetProcessResourceHistoryRpc as ll, DEFAULT_ENVIRONMENT_IDENTIFICATION_MODE as lm, normalizeProjectPathForComparison as ln, RELAY_HEALTH_RESPONSE_TYP as lo, ServerProcessResourceHistorySummary as lp, createShellEnvironmentAtoms as lr, BearerConnectionRegistration as ls, sanitizeFeatureBranchName as lt, UsageResolution as lu, PREVIEW_AUTOMATION_V1_OPERATIONS as lv, ProviderSandboxMode as lw, PullRequestInvolvement as lx, PREVIEW_VIEWPORT_MAX_AREA as ly, formatSchemaError as m, decodeBase64Url as mA, OrchestrationGetTurnDiffResult as mC, toHttpEndpointUrl as mD, ClientKind as mE, provideContext$2 as mM, filter$2 as mN, LogLevel as mO, SourceControlPublishStatus as mS, ScopedThreadRef as mT, DesktopPreviewTabInputSchema as m_, discovery_exports as ma, EnvironmentCloudLinkStateResult as mb, WsGitPreparePullRequestThreadRpc as mc, AssetCreateUrlResult as md, GitPullRequestMaterializationError as mf, ProviderStopSessionInput as mg, LaunchEditorInput as mh, parseScopedThreadKey as mi, failCauseUnsafe as mj, InvalidValue as mk, WsServerProbeRpc as ml, DEFAULT_SERVER_SETTINGS as mm, deleteProject as mn, decodeRelayJwt as mo, ServerProviderAvailability as mp, createAtomCommandScheduler as mr, PrimaryConnectionRegistration as ms, getChangeRequestTerminology as mt, UsageSummaryInput as mu, PreviewAutomationColorScheme as mv, ThreadApprovalResponseRequestedPayload as mw, PullRequestListInput as mx, PreviewError as my, normalizeDpopHtu as n, fromReadable as nA, OrchestrationCommand as nC, ThreadSessionError as nD, AuthWebSocketTicketResult as nE, logWarning as nM, _await as nN, isAgentEnvironment as nO, isNotNull as nP, SourceControlCloneRepositoryInput as nS, ProviderOptionSelectionValue as nT, DesktopPreviewConfigInputSchema as n_, T3Rpc as na, RelayClientInstallProgressEventSchema as nb, cliEnvironmentSetting as nc, ResourceTelemetrySourceHealth as nd, T3ProjectFileScript as nf, ThreadTokenUsageSnapshot as ng, TerminalFontSize as nh, EnvironmentRpcSubscriptionObserver as ni, succeed$2 as nj, bold as nk, WsReviewGetDiffFileContentsRpc as nl, CodeFontSize as nm, threadKey as nn, ManagedRelayClient as no, ServerObservability as np, ThreadSnapshotRequestError as nr, RelayClientTracer as ns, detectSourceControlProviderFromGitRemoteUrl as nt, UsageBucket as nu, PreviewAnnotationScreenshotSchema as nv, ProjectScriptIcon as nw, PullRequestDiffFileContentsResult as nx, PreviewUrlResolution as ny, normalizeBackgroundActivitySettings as o, parseFdName as oA, OrchestrationEventMetadata as oC, config_exports as oD, ServerAuthPolicy as oE, matchEffect as oM, makeUnsafe$12 as oN, loadT3CliEnv as oO, isString as oP, SourceControlProviderAuth as oS, ExecutionEnvironmentCapabilities as oT, DesktopPreviewPointerEventSchema as o_, connectionPhaseMessage as oa, AuthOtherClientSessionsRevokeResult as ob, isThreadActive as oc, ReviewDiffPreviewError as od, GitActionProgressKind as of, isToolLifecycleItemType as og, EditorId as oh, request as oi, transduce as oj, red as ok, WsServerGetBackgroundPolicyRpc as ol, DEFAULT_BACKGROUND_ACTIVITY_PROFILE as om, isUncPath as on, normalizeSecureRelayUrl as oo, ServerProcessResourceHistoryFailureTag as op, makeEnvironmentShellState as or, connectivity_exports as os, parseGitHubRepositoryNameWithOwnerFromRemoteUrl as ot, UsagePricingStatus as ou, PreviewAnnotationSubmissionSchema as ov, ProviderApprovalPolicy as ow, PullRequestDiffStat as ox, DiscoveredLocalServerList as oy, extractJsonObject as p, transformOrFail$1 as pA, OrchestrationGetTurnDiffInput as pC, normalizeHttpBaseUrl$1 as pD, ClientActivityReportInput as pE, provide as pM, append$3 as pN, BuiltIns as pO, SourceControlPublishRepositoryResult as pS, ScopedProjectRef as pT, DesktopPreviewTabIdSchema as p_, RelayEnvironmentDiscovery as pa, EnvironmentCloudEndpointUnavailableError as pb, WsFilesystemBrowseRpc as pc, AssetCreateUrlInput as pd, GitPreparePullRequestThreadResult as pf, ProviderSessionStartInput as pg, ExternalLauncherUnsupportedEditorError as ph, parseScopedProjectKey as pi, endUnsafe as pj, require_dist as pk, WsServerGetUsageSummaryRpc as pl, DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL as pm, createThread as pn, RelayJwtError as po, ServerProviderAuthStatus as pp, selectEnvironmentThreadShell as pr, PlatformConnectionRegistration as ps, formatCreateChangeRequestPhrase as pt, UsageSummary as pu, PreviewAutomationClientId as pv, ThreadActivityAppendedPayload as pw, PullRequestListFilters as px, PreviewCloseInput as py, resolveModelSlugForProvider as q, never$1 as qA, PROVIDER_SEND_TURN_MAX_ATTACHMENTS as qC, threadFlag as qD, ThreadId as qE, pretty as qM, toArray$1 as qN, float as qO, DEFAULT_RUNTIME_MODE as qS, AuthRelayWriteScope as qT, PickFolderOptionsSchema as q_, EnvironmentOwnedDataCleanup as qa, PullRequestChecksState as qb, WsPullRequestsReplyToThreadRpc as qc, ProjectSearchContentsInput as qd, ServerConfigStreamProviderStatusesEvent as qf, DesktopPreviewAnnotationThemeSchema as qg, ProviderRuntimeEventV2 as qh, T3ApplicationSlicesLive as qi, fnUntraced as qj, fromJsonString as qk, WsVcsCreateRefRpc as ql, ServerSettingsOperation as qm, T3OrchestrationLayer as qn, classifyHostedHttpsCompatibility as qo, ServerUpsertKeybindingResult as qp, setIdleTTL as qr, effectiveSettled as qs, InvalidScopedProjectRefCollectionKeyError as qt, ResourceTelemetryHistoryBucket as qu, PreviewAutomationStreamEvent as qv, DEFAULT_TEXT_GENERATION_REASONING_EFFORT as qw, PullRequestUpdateInput as qx, AdvertisedEndpointHostedHttpsCompatibility as qy, stableStringify as r, fromWritable as rA, OrchestrationCommandReceiptStatus as rC, CliRuntime as rD, EnvironmentAuthorizationError as rE, map$7 as rM, doneUnsafe as rN, isInteractiveHumanTerminal as rO, isNotUndefined as rP, SourceControlCloneRepositoryResult as rS, ProviderOptionSelections as rT, DesktopPreviewFaviconSchema as r_, RpcError as ra, RelayClientInstallProgressStageSchema as rb, T3Auth as rc, ResourceTelemetrySourceStatus as rd, T3_PROJECT_FILE_NAME as rf, ToolLifecycleItemType as rg, TimestampFormat as rh, EnvironmentRpcUnavailableError as ri, switchMap as rj, cyanBright as rk, WsReviewGetDiffPreviewRpc as rl, CodexSettings as rm, threadRefsEqual as rn, ManagedRelayDpopSigner as ro, ServerProcessDiagnosticsEntry as rp, createEnvironmentServerConfigsAtom as rr, makeRelayClientTracingLayer as rs, isTemporaryWorktreeBranch as rt, UsageCostSource as ru, PreviewAnnotationStrokeTargetSchema as rv, ProjectionPendingApprovalDecision as rw, PullRequestDiffInput as rx, CONFIGURED_LOCAL_SERVER_URLS_MAX_ITEMS as ry, normalizeServerBackgroundActivitySettings as s, ChildProcessSpawner as sA, OrchestrationEventType as sC, service_exports as sD, ServerAuthSessionMethod as sE, never$3 as sM, succeed$6 as sN, T3ActionApplication as sO, isUndefined as sP, SourceControlProviderAuthStatus as sS, ExecutionEnvironmentDescriptor as sT, DesktopPreviewRecordingArtifactSchema as s_, connectionStatusText as sa, AuthPairingLinkRevokeResult as sb, latestAssistantMessage as sc, ReviewDiffPreviewInput as sd, GitActionProgressPhase as sf, ProviderEvent as sg, EditorLaunchStyle as sh, runStream as si, unwrap as sj, white as sk, WsServerGetConfigRpc$1 as sl, DEFAULT_CLIENT_SETTINGS as sm, isWindowsAbsolutePath as sn, RELAY_ACTIVITY_PUBLISH_TYP as so, ServerProcessResourceHistoryInput as sp, shellStateChanges as sr, BearerConnectionCredential as ss, resolveAutoFeatureBranchName as st, UsageProviderKind as su, BrowserNavigationTarget as sv, ProviderInteractionMode as sw, PullRequestEditCapabilities as sx, FILL_PREVIEW_VIEWPORT as sy, DpopPublicJwk as t, make$54 as tA, OrchestrationCheckpointSummary as tC, ProjectLookupError as tD, AuthTokenExchangeRequest as tE, logDebug as tM, MinimumLogLevel as tN, humanNdjsonFormatChoices as tO, hasProperty as tP, SourceControlCloneProtocol as tS, ProviderOptionSelection as tT, DesktopPreviewColorSchemeSchema as t_, makeT3RpcOperations as ta, RelayClientInstallFailureReasonSchema as tb, CliPath as tc, ResourceTelemetrySnapshot as td, T3ProjectFile as tf, TaskWorkflowPhase as tg, SourceControlWritingStyleSettings as th, EnvironmentRpcRequestObserver as ti, scan as tj, blackBright as tk, WsPullRequestsUpdateRpc as tl, ClientSettingsSchema as tm, projectRefsEqual as tn, tokenStore_exports as to, ServerLifecycleWelcomePayload as tp, makeT3Orchestration as tr, parseOAuthScope as ts, deriveLocalBranchNameFromRemoteRef as tt, USAGE_CONTRACT_VERSION as tu, PreviewAnnotationRegionTargetSchema as tv, ProjectScript as tw, PullRequestDiffFileContentsInput as tx, PreviewAutomationWaitForInput as ty, deepMerge as u, make$56 as uA, OrchestrationGetFullThreadDiffResult as uC, migrateV1EnvironmentName as uD, BackgroundScope as uE, option$1 as uM, succeed$7 as uN, T3ProjectApplication as uO, pipe as uP, SourceControlProviderInfo as uS, ExecutionEnvironmentPlatformOs as uT, DesktopPreviewRegisterWebviewInputSchema as u_, presentEnvironmentConnection as ua, EnvironmentAuthInvalidReason as ub, WsAssetsCreateUrlRpc as uc, ReviewDiffPreviewSourceKind as ud, GitManagerError as uf, ProviderRespondToUserInputInput as ug, ExternalLauncherEditorSpawnError as uh, T3CodeConnectionProvider as ui, drain$1 as uj, isBoolean as uk, WsServerGetResourceTelemetryHistoryRpc as ul, DEFAULT_GLASS_OPACITY as um, normalizeProjectPathForDispatch as un, RELAY_LINK_PROOF_TYP as uo, ServerProcessSignal as up, scopeProject as ur, ConnectionCredential as us, DEFAULT_CHANGE_REQUEST_TERMINOLOGY as ut, UsageSource as uu, PreviewAutomationActionEvent as uv, ProviderSessionRuntimeStatus as uw, PullRequestLabel as ux, PREVIEW_VIEWPORT_MAX_DIMENSION as uy, prettyJsonString as v, formatIso as vA, OrchestrationLatestTurn as vC, HttpClient as vD, ProviderDriverKind as vE, scoped$2 as vM, failVoid as vN, getHelpForCommandPath as vO, SourceControlRepositoryLookupInput as vS, ThreadEnvMode as vT, DesktopRuntimeInfoSchema as v_, preparePairingRegistration as va, EnvironmentHttpApi as vb, WsOrchestrationGetArchivedShellSnapshotRpc as vc, AssetProjectFaviconResolutionError as vd, GitRunStackedActionResult as vf, TerminalAttachStreamEvent as vg, buildRemoteOpenUrl as vh, scopedRefKey as vi, poll as vj, isCliError as vk, WsServerReportHostPowerStateRpc as vl, DEFAULT_SIDEBAR_THREAD_PREVIEW_COUNT as vm, reorderPinnedThread as vn, ClientPresentation as vo, ServerProviderSlashCommand as vp, createEnvironmentRpcQueryAtomFamily as vr, connectionRegistrationCatalogEntry as vs, invalidateCachedVcsRefs as vt, DesktopHostTelemetryHello as vu, PreviewAutomationElement as vv, ThreadDeletedPayload as vw, PullRequestListStatsInput as vx, PreviewListResult as vy, HostProcessPlatform as w, TypeId$49 as wA, OrchestrationProposedPlanId as wC, get$4 as wD, ProviderInstanceId as wE, tap$2 as wM, millis as wN, boolean as wO, VcsFreshness as wS, AuthAccessStreamEvent as wT, DesktopSshEnvironmentEnsureInputSchema as w_, RemoteBackendUrlMissingError as wa, EnvironmentHttpUnauthorizedError as wb, WsOrchestrationSubscribeThreadRpc as wc, AssetWorkspaceContextResolutionError as wd, VcsCreateWorktreeInput as wf, TerminalCwdStatError as wg, KeybindingValue as wh, T3AuthPairing as wi, badArgument as wj, Terminal as wk, WsServerUpdateSettingsRpc as wl, FontFamilyPreference as wm, settleThread as wn, credentialMissingError as wo, ServerProviderUpdateStatus as wp, environmentRpcKey as wr, ConnectionTarget as ws, addProjectRemoteSourcePathHint as wt, RESOURCE_MONITOR_PROTOCOL_VERSION as wu, PreviewAutomationHostIdentity as wv, ThreadProposedPlanUpsertedPayload as ww, PullRequestOperationError as wx, PreviewReportStatusInput as wy, HostProcessEnvironment as x, toEpochMillis as xA, OrchestrationProject as xC, tap as xD, ProviderInstanceEnvironment as xE, succeed$4 as xM, isSuccess$2 as xN, makeCommand as xO, VcsDriverCapabilities as xS, AuthAccessStreamClientRemovedEvent as xT, DesktopSshBearerBootstrapInputSchema as x_, registerSshConnection as xa, EnvironmentHttpConflictError as xb, WsOrchestrationGetWorkflowScriptRpc as xc, AssetWorkspaceAssetInspectionError as xd, TextGenerationError as xf, TerminalCwdError as xg, KeybindingCommand as xh, createKnownEnvironment as xi, take$1 as xj, option as xk, WsServerUpdateProviderRpc as xl, DEFAULT_TIMESTAMP_FORMAT as xm, revertThreadCheckpoint as xn, RelayDeviceIdentity as xo, ServerProviderUpdateError as xp, createEnvironmentSubscriptionAtomFamily as xr, BearerConnectionTarget as xs, vcsCommandConcurrency as xt, DesktopTelemetryControlMessage as xu, PreviewAutomationExecutionError as xv, ThreadMetaUpdatedPayload as xw, PullRequestMergeMethod as xx, PreviewOpenInput as xy, HostProcessArchitecture as y, nowAsDate as yA, OrchestrationMessage as yC, filterStatusOk as yD, ProviderInstanceConfig as yE, serviceOption as yM, getOrThrow$1 as yN, TypeId$33 as yO, SourceControlRepositoryVisibility as yS, AuthAccessReadScope as yT, DesktopServerExposureModeSchema as y_, prepareSshRegistration as ya, EnvironmentHttpBadRequestError as yb, WsOrchestrationGetFullThreadDiffRpc as yc, AssetResource as yd, GitRunStackedActionToastRunAction as yf, TerminalClearInput as yg, isExternalLauncherError as yh, scopedThreadKey as yi, shutdown$1 as yj, all as yk, WsServerRetryResourceTelemetryRpc as yl, DEFAULT_SIDEBAR_THREAD_SORT_ORDER as ym, respondToThreadApproval as yn, CloudSession as yo, ServerProviderSlashCommandInput as yp, createEnvironmentRpcStreamCommand as yr, connectionRegistrationTarget as ys, vcsRefsCacheStateAtom as yt, DesktopHostTelemetryMessage as yu, PreviewAutomationError as yv, ThreadInteractionModeSetPayload as yw, PullRequestListStatsResult as yx, PreviewNavStatus as yy, getProviderOptionCurrentLabel as z, fromEffect as zA, OrchestrationThreadActivityTone as zC, envNameFlag as zD, PositiveInt as zE, upTo as zM, getOrThrow$2 as zN, isFlagParam as zO, VcsRepositoryIdentity as zS, AuthEnvironmentBootstrapTokenType as zT, DesktopUpdateStateSchema as z_, ConnectionWakeups as za, PullRequestAction as zb, WsProjectsWriteFileRpc as zc, ProjectFileOperation as zd, VcsSwitchRefResult as zf, TerminalWriteError as zg, THREAD_JUMP_KEYBINDING_COMMANDS as zh, AuthLocalDatabaseError as zi, catch_$1 as zj, TaggedErrorClass as zk, WsSubscribeVcsStatusRpc as zl, MIN_SIDEBAR_AUTO_SETTLE_AFTER_DAYS as zm, BaseAppLayer as zn, RemoteEnvironmentAuthTimeoutError as zo, ServerTraceDiagnosticsErrorKind as zp, ShellSnapshotLoader as zr, layerNode$1 as zs, getBrowseParentPath as zt, ResourceMonitorSetSampleIntervalCommand as zu, PreviewAutomationResizeResult as zv, ThreadUnsettledPayload as zw, PullRequestReviewerRequestInput as zx, update$1 as zy };