t3code-cli 0.14.0 → 0.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/README.md +1 -0
  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 +551 -265
  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 +5 -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 +2 -2
  17. package/dist/client-runtime/operations/projects.js +2 -2
  18. package/dist/client-runtime/operations.d.ts +2 -2
  19. package/dist/client-runtime/operations.js +2 -2
  20. package/dist/client-runtime/platform.d.ts +1 -1
  21. package/dist/client-runtime/platform.js +1 -1
  22. package/dist/client-runtime/relay.d.ts +5 -1
  23. package/dist/client-runtime/relay.js +1 -1
  24. package/dist/client-runtime/rpc.d.ts +2 -2
  25. package/dist/client-runtime/rpc.js +2 -2
  26. package/dist/client-runtime/state/assets.d.ts +17 -11
  27. package/dist/client-runtime/state/assets.js +1 -1
  28. package/dist/client-runtime/state/auth.d.ts +1 -1
  29. package/dist/client-runtime/state/auth.js +1 -1
  30. package/dist/client-runtime/state/connections.js +1 -1
  31. package/dist/client-runtime/state/entities.d.ts +1 -1
  32. package/dist/client-runtime/state/entities.js +1 -1
  33. package/dist/client-runtime/state/filesystem.d.ts +1 -1
  34. package/dist/client-runtime/state/filesystem.js +1 -1
  35. package/dist/client-runtime/state/git.d.ts +5 -5
  36. package/dist/client-runtime/state/git.js +1 -1
  37. package/dist/client-runtime/state/models.d.ts +1 -1
  38. package/dist/client-runtime/state/models.js +1 -1
  39. package/dist/client-runtime/state/orchestration.d.ts +42 -2
  40. package/dist/client-runtime/state/orchestration.js +13 -1
  41. package/dist/client-runtime/state/presentation.d.ts +9 -3
  42. package/dist/client-runtime/state/presentation.js +1 -1
  43. package/dist/client-runtime/state/preview.d.ts +55 -48
  44. package/dist/client-runtime/state/preview.js +1 -1
  45. package/dist/client-runtime/state/project-grouping.d.ts +26 -2
  46. package/dist/client-runtime/state/project-grouping.js +83 -3
  47. package/dist/client-runtime/state/projects.d.ts +24 -18
  48. package/dist/client-runtime/state/projects.js +1 -1
  49. package/dist/client-runtime/state/relay.d.ts +1 -1
  50. package/dist/client-runtime/state/relay.js +1 -1
  51. package/dist/client-runtime/state/review.d.ts +16 -1
  52. package/dist/client-runtime/state/review.js +27 -6
  53. package/dist/client-runtime/state/runtime.d.ts +2 -2
  54. package/dist/client-runtime/state/runtime.js +2 -2
  55. package/dist/client-runtime/state/server.d.ts +299 -172
  56. package/dist/client-runtime/state/server.js +192 -16
  57. package/dist/client-runtime/state/session.d.ts +65 -7
  58. package/dist/client-runtime/state/session.js +32 -3
  59. package/dist/client-runtime/state/shell.d.ts +41 -7
  60. package/dist/client-runtime/state/shell.js +1 -1
  61. package/dist/client-runtime/state/source-control.d.ts +2 -2
  62. package/dist/client-runtime/state/source-control.js +1 -1
  63. package/dist/client-runtime/state/subagentRuntime.d.ts +145 -0
  64. package/dist/client-runtime/state/subagentRuntime.js +521 -0
  65. package/dist/client-runtime/state/terminal.d.ts +17 -17
  66. package/dist/client-runtime/state/terminal.js +1 -1
  67. package/dist/client-runtime/state/thread-search.d.ts +23 -0
  68. package/dist/client-runtime/state/thread-search.js +38 -0
  69. package/dist/client-runtime/state/thread-settled.d.ts +28 -3
  70. package/dist/client-runtime/state/thread-settled.js +74 -2
  71. package/dist/client-runtime/state/thread-sort.d.ts +59 -2
  72. package/dist/client-runtime/state/thread-sort.js +128 -2
  73. package/dist/client-runtime/state/threads.d.ts +115 -3
  74. package/dist/client-runtime/state/threads.js +309 -28
  75. package/dist/client-runtime/state/vcs.d.ts +14 -14
  76. package/dist/client-runtime/state/vcs.js +1 -1
  77. package/dist/config.d.ts +1 -1
  78. package/dist/config.js +1 -1
  79. package/dist/connection.d.ts +1 -1
  80. package/dist/connection.js +1 -1
  81. package/dist/contracts.d.ts +1 -1
  82. package/dist/contracts.js +1 -1
  83. package/dist/index.d.ts +1 -1
  84. package/dist/index.js +1 -1
  85. package/dist/node.d.ts +1 -1
  86. package/dist/node.js +1 -1
  87. package/dist/orchestration.d.ts +144 -1
  88. package/dist/orchestration.js +1 -1
  89. package/dist/preview.d.ts +1 -1
  90. package/dist/preview.js +1 -1
  91. package/dist/rpc.d.ts +883 -351
  92. package/dist/rpc.js +1 -1
  93. package/dist/runtime.d.ts +1 -1
  94. package/dist/runtime.js +1 -1
  95. package/dist/shared/DrainableWorker.js +1 -1
  96. package/dist/shared/KeyedCoalescingWorker.js +1 -1
  97. package/dist/shared/Net.js +1 -1
  98. package/dist/shared/advertisedEndpoint.d.ts +1 -1
  99. package/dist/shared/advertisedEndpoint.js +1 -1
  100. package/dist/shared/agentAwareness.d.ts +1 -1
  101. package/dist/shared/backgroundActivitySettings.d.ts +1 -1
  102. package/dist/shared/composerInlineTokens.js +1 -1
  103. package/dist/shared/connectAuth.js +1 -1
  104. package/dist/shared/devHome.js +1 -1
  105. package/dist/shared/dpop.js +1 -1
  106. package/dist/shared/git.d.ts +1 -1
  107. package/dist/shared/httpObservability.js +1 -1
  108. package/dist/shared/httpReadiness.js +1 -1
  109. package/dist/shared/keybindings.d.ts +2 -2
  110. package/dist/shared/keybindings.js +15 -1
  111. package/dist/shared/model.d.ts +1 -1
  112. package/dist/shared/oauthScope.js +1 -1
  113. package/dist/shared/observability.d.ts +8 -1
  114. package/dist/shared/observability.js +49 -5
  115. package/dist/shared/path.js +1 -1
  116. package/dist/shared/preview.js +1 -1
  117. package/dist/shared/previewViewport.d.ts +1 -1
  118. package/dist/shared/previewViewport.js +1 -1
  119. package/dist/shared/projectFavicon.d.ts +2 -1
  120. package/dist/shared/projectFavicon.js +13 -1
  121. package/dist/shared/projectScripts.d.ts +1 -1
  122. package/dist/shared/relayAuth.js +1 -1
  123. package/dist/shared/relayClient.d.ts +1 -1
  124. package/dist/shared/relayClient.js +1 -1
  125. package/dist/shared/relayJwt.js +1 -1
  126. package/dist/shared/relayTracing.js +1 -1
  127. package/dist/shared/relayUrl.js +1 -1
  128. package/dist/shared/remote.js +1 -1
  129. package/dist/shared/schemaYaml.js +3 -3
  130. package/dist/shared/semver.js +1 -1
  131. package/dist/shared/serverSettings.d.ts +1 -1
  132. package/dist/shared/serverSettings.js +1 -1
  133. package/dist/shared/shell.d.ts +6 -1
  134. package/dist/shared/shell.js +42 -4
  135. package/dist/shared/sourceControl.d.ts +1 -1
  136. package/dist/shared/t3ProjectFile.d.ts +9 -1
  137. package/dist/shared/t3ProjectFile.js +12 -2
  138. package/dist/shared/terminalLabels.d.ts +1 -1
  139. package/dist/shared/threadEnvMode.d.ts +29 -0
  140. package/dist/shared/threadEnvMode.js +24 -0
  141. package/dist/shared/toolActivity.d.ts +1 -1
  142. package/dist/shared/usageFormat.d.ts +21 -0
  143. package/dist/shared/usageFormat.js +90 -0
  144. package/dist/shared/usageMerge.d.ts +67 -0
  145. package/dist/shared/usageMerge.js +218 -0
  146. package/dist/shared.d.ts +4472 -668
  147. package/dist/shared.js +16867 -16273
  148. package/dist/t3tools.d.ts +2 -2
  149. package/dist/t3tools.js +2 -2
  150. package/package.json +5 -5
  151. package/src/application/index.ts +1 -0
  152. package/src/application/service.ts +5 -1
  153. package/src/application/threads.ts +43 -1
  154. package/src/bin.ts +10 -7
  155. package/src/cli/app.ts +2 -0
  156. package/src/cli/format/thread.ts +23 -1
  157. package/src/cli/search.ts +48 -0
  158. package/src/config/persist/schema.ts +1 -1
  159. package/src/orchestration/layer.ts +6 -0
  160. package/src/orchestration/service.ts +5 -0
  161. package/src/rpc/error.ts +2 -0
  162. package/src/rpc/operation.ts +2 -0
  163. package/src/rpc/ws-group.ts +2 -0
@@ -1,4 +1,4 @@
1
- import { Fk as getOrElse, Gr as family, Xr as withLabel, na as presentEnvironmentConnection, qr as make, ti as value, us as AVAILABLE_CONNECTION_STATE } from "../../shared.js";
1
+ import { $r as make, Sj as getOrElse, Zr as family, _s as AVAILABLE_CONNECTION_STATE, ca as presentEnvironmentConnection, ni as withLabel, si as value } from "../../shared.js";
2
2
  //#region upstream-t3code/packages/client-runtime/src/state/presentation.ts
3
3
  function mapsEqual(left, right) {
4
4
  if (left.size !== right.size) return false;
@@ -1,4 +1,4 @@
1
- import { Ab as PreviewSessionLookupError, Hy as PreviewAutomationRemoteUnavailableError, Iy as PreviewAutomationNoAvailableHostError, Jy as PreviewAutomationResultTooLargeError, My as PreviewAutomationInvalidSelectorError, Ny as PreviewAutomationMalformedResponseError, Oy as PreviewAutomationExecutionError, Wy as PreviewAutomationRequestQueueClosedError, bT as EnvironmentAuthorizationError, bb as PreviewInvalidUrlError, f as AtomCommand, ha as EnvironmentRegistry, ib as PreviewAutomationTimeoutError, ma as EnvironmentNotRegisteredError, ob as PreviewAutomationUnavailableError, on as EnvironmentRpcUnavailableError, rb as PreviewAutomationTargetNotEditableError, sb as PreviewAutomationUnsupportedClientError, tb as PreviewAutomationTabNotFoundError, wy as PreviewAutomationControlInterruptedError, yy as PreviewAutomationClientDisconnectedError, zT as EnvironmentId } from "../../shared.js";
1
+ import { $b as PreviewAutomationControlInterruptedError, Ax as PreviewAutomationTabNotFoundError, CD as EnvironmentId, Cx as PreviewAutomationResultTooLargeError, Fx as PreviewAutomationUnavailableError, Ix as PreviewAutomationUnsupportedClientError, Jb as PreviewAutomationClientDisconnectedError, Mx as PreviewAutomationTargetNotEditableError, Nx as PreviewAutomationTimeoutError, Ta as EnvironmentRegistry, Yx as PreviewInvalidUrlError, _x as PreviewAutomationRemoteUnavailableError, aS as PreviewSessionLookupError, cx as PreviewAutomationMalformedResponseError, dx as PreviewAutomationNoAvailableHostError, f as AtomCommand, iD as EnvironmentAuthorizationError, mn as EnvironmentRpcUnavailableError, rx as PreviewAutomationExecutionError, sx as PreviewAutomationInvalidSelectorError, wa as EnvironmentNotRegisteredError, yx as PreviewAutomationRequestQueueClosedError } from "../../shared.js";
2
2
  import { Atom } from "effect/unstable/reactivity";
3
3
  //#region upstream-t3code/packages/client-runtime/src/state/preview.d.ts
4
4
  declare const previewAutomationHostFocusConcurrencyKey: (value: {
@@ -11,9 +11,9 @@ declare const previewAutomationHostFocusConcurrencyKey: (value: {
11
11
  declare function createPreviewEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<EnvironmentRegistry | R, E>): {
12
12
  list: (target: {
13
13
  readonly environmentId: EnvironmentId;
14
- readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{
15
- readonly threadId: import("effect/Schema").brand<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>, "ThreadId">;
16
- }>;
14
+ readonly input: {
15
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
16
+ };
17
17
  }) => Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
18
18
  readonly sessions: readonly {
19
19
  readonly threadId: string;
@@ -56,7 +56,7 @@ declare function createPreviewEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<E
56
56
  }, E | EnvironmentAuthorizationError | EnvironmentRpcUnavailableError | Error | import("effect/unstable/rpc/RpcClientError").RpcClientError>>;
57
57
  events: (target: {
58
58
  readonly environmentId: EnvironmentId;
59
- readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{}>;
59
+ readonly input: {};
60
60
  }) => Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
61
61
  readonly threadId: string;
62
62
  readonly tabId: string;
@@ -207,7 +207,7 @@ declare function createPreviewEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<E
207
207
  }, E | EnvironmentAuthorizationError | import("effect/Cause").NoSuchElementError | import("effect/unstable/rpc/RpcClientError").RpcClientError>>;
208
208
  discoveredServers: (target: {
209
209
  readonly environmentId: EnvironmentId;
210
- readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{}>;
210
+ readonly input: {};
211
211
  }) => Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
212
212
  readonly servers: readonly {
213
213
  readonly host: string;
@@ -333,20 +333,22 @@ declare function createPreviewEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<E
333
333
  }, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | PreviewInvalidUrlError | PreviewSessionLookupError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
334
334
  resize: AtomCommand<{
335
335
  readonly environmentId: EnvironmentId;
336
- readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{
337
- readonly threadId: import("effect/Schema").brand<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>, "ThreadId">;
338
- readonly tabId: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
339
- readonly viewport: import("effect/Schema").Union<readonly [import("effect/Schema").TaggedStruct<"fill", {}>, import("effect/Schema").Struct<{
340
- readonly _tag: import("effect/Schema").tag<"freeform">;
341
- readonly width: import("effect/Schema").Int;
342
- readonly height: import("effect/Schema").Int;
343
- }>, import("effect/Schema").Struct<{
344
- readonly _tag: import("effect/Schema").tag<"preset">;
345
- readonly width: import("effect/Schema").Int;
346
- readonly height: import("effect/Schema").Int;
347
- readonly presetId: import("effect/Schema").Literals<readonly ["iphone-se", "iphone-xr", "iphone-12-pro", "iphone-14-pro-max", "pixel-7", "samsung-galaxy-s8-plus", "samsung-galaxy-s20-ultra", "ipad-mini", "ipad-air", "ipad-pro", "surface-pro-7", "surface-duo", "galaxy-z-fold-5", "asus-zenbook-fold", "samsung-galaxy-a51-71", "nest-hub", "nest-hub-max", "desktop-1920x1080", "desktop-1440x900", "laptop-1366x768", "laptop-1280x800", "ipad-pro-11", "iphone-15-pro", "pixel-8", "galaxy-s24"]>;
348
- }>]>;
349
- }>;
336
+ readonly input: {
337
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
338
+ readonly tabId: string;
339
+ readonly viewport: {
340
+ readonly _tag?: "fill";
341
+ } | {
342
+ readonly _tag?: "freeform";
343
+ readonly width: number;
344
+ readonly height: number;
345
+ } | {
346
+ readonly _tag?: "preset";
347
+ readonly width: number;
348
+ readonly height: number;
349
+ readonly presetId: "asus-zenbook-fold" | "desktop-1440x900" | "desktop-1920x1080" | "galaxy-s24" | "galaxy-z-fold-5" | "ipad-air" | "ipad-mini" | "ipad-pro" | "ipad-pro-11" | "iphone-12-pro" | "iphone-14-pro-max" | "iphone-15-pro" | "iphone-se" | "iphone-xr" | "laptop-1280x800" | "laptop-1366x768" | "nest-hub" | "nest-hub-max" | "pixel-7" | "pixel-8" | "samsung-galaxy-a51-71" | "samsung-galaxy-s20-ultra" | "samsung-galaxy-s8-plus" | "surface-duo" | "surface-pro-7";
350
+ };
351
+ };
350
352
  }, {
351
353
  readonly threadId: string;
352
354
  readonly tabId: string;
@@ -385,10 +387,10 @@ declare function createPreviewEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<E
385
387
  }, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | PreviewInvalidUrlError | PreviewSessionLookupError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
386
388
  refresh: AtomCommand<{
387
389
  readonly environmentId: EnvironmentId;
388
- readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{
389
- readonly threadId: import("effect/Schema").brand<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>, "ThreadId">;
390
- readonly tabId: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
391
- }>;
390
+ readonly input: {
391
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
392
+ readonly tabId: string;
393
+ };
392
394
  }, void, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | PreviewInvalidUrlError | PreviewSessionLookupError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
393
395
  close: AtomCommand<{
394
396
  readonly environmentId: EnvironmentId;
@@ -399,24 +401,29 @@ declare function createPreviewEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<E
399
401
  }, void, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | PreviewInvalidUrlError | PreviewSessionLookupError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
400
402
  reportStatus: AtomCommand<{
401
403
  readonly environmentId: EnvironmentId;
402
- readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{
403
- readonly threadId: import("effect/Schema").brand<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>, "ThreadId">;
404
- readonly tabId: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
405
- readonly navStatus: import("effect/Schema").Union<readonly [import("effect/Schema").TaggedStruct<"Idle", {}>, import("effect/Schema").TaggedStruct<"Loading", {
406
- readonly url: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
407
- readonly title: import("effect/Schema").String;
408
- }>, import("effect/Schema").TaggedStruct<"Success", {
409
- readonly url: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
410
- readonly title: import("effect/Schema").String;
411
- }>, import("effect/Schema").TaggedStruct<"LoadFailed", {
412
- readonly url: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
413
- readonly title: import("effect/Schema").String;
414
- readonly code: import("effect/Schema").Int;
415
- readonly description: import("effect/Schema").String;
416
- }>]>;
417
- readonly canGoBack: import("effect/Schema").Boolean;
418
- readonly canGoForward: import("effect/Schema").Boolean;
419
- }>;
404
+ readonly input: {
405
+ readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
406
+ readonly tabId: string;
407
+ readonly navStatus: {
408
+ readonly _tag?: "Idle";
409
+ } | {
410
+ readonly _tag?: "Loading";
411
+ readonly url: string;
412
+ readonly title: string;
413
+ } | {
414
+ readonly _tag?: "Success";
415
+ readonly url: string;
416
+ readonly title: string;
417
+ } | {
418
+ readonly _tag?: "LoadFailed";
419
+ readonly url: string;
420
+ readonly title: string;
421
+ readonly code: number;
422
+ readonly description: string;
423
+ };
424
+ readonly canGoBack: boolean;
425
+ readonly canGoForward: boolean;
426
+ };
420
427
  }, void, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | PreviewInvalidUrlError | PreviewSessionLookupError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
421
428
  respondToAutomation: AtomCommand<{
422
429
  readonly environmentId: EnvironmentId;
@@ -435,12 +442,12 @@ declare function createPreviewEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<E
435
442
  }, void, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | PreviewAutomationClientDisconnectedError | PreviewAutomationControlInterruptedError | PreviewAutomationExecutionError | PreviewAutomationInvalidSelectorError | PreviewAutomationMalformedResponseError | PreviewAutomationNoAvailableHostError | PreviewAutomationRemoteUnavailableError | PreviewAutomationRequestQueueClosedError | PreviewAutomationResultTooLargeError | PreviewAutomationTabNotFoundError | PreviewAutomationTargetNotEditableError | PreviewAutomationTimeoutError | PreviewAutomationUnavailableError | PreviewAutomationUnsupportedClientError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
436
443
  focusAutomationHost: AtomCommand<{
437
444
  readonly environmentId: EnvironmentId;
438
- readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{
439
- readonly clientId: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
440
- readonly environmentId: import("effect/Schema").brand<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>, "EnvironmentId">;
441
- readonly connectionId: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
442
- readonly focused: import("effect/Schema").Boolean;
443
- }>;
445
+ readonly input: {
446
+ readonly clientId: string;
447
+ readonly environmentId: string & import("effect/Brand").Brand<"EnvironmentId">;
448
+ readonly connectionId: string;
449
+ readonly focused: boolean;
450
+ };
444
451
  }, void, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
445
452
  };
446
453
  //#endregion
@@ -1,4 +1,4 @@
1
- import { Fs as WS_METHODS, dr as createEnvironmentRpcCommand, fr as createEnvironmentRpcQueryAtomFamily, lr as createAtomCommandScheduler, mr as createEnvironmentRpcSubscriptionAtomFamily } from "../../shared.js";
1
+ import { Us as WS_METHODS, gr as createEnvironmentRpcQueryAtomFamily, hr as createEnvironmentRpcCommand, pr as createAtomCommandScheduler, vr as createEnvironmentRpcSubscriptionAtomFamily } from "../../shared.js";
2
2
  //#region upstream-t3code/packages/client-runtime/src/state/preview.ts
3
3
  const previewAutomationHostFocusConcurrencyKey = (value) => JSON.stringify([
4
4
  value.environmentId,
@@ -1,4 +1,4 @@
1
- import { jw as ScopedProjectRef, l_ as SidebarProjectGroupingMode, rt as EnvironmentProject, wg as ClientSettings } from "../../shared.js";
1
+ import { CD as EnvironmentId, Cv as SidebarProjectGroupingMode, S_ as ClientSettings, at as EnvironmentProject, mE as ScopedProjectRef } from "../../shared.js";
2
2
  //#region upstream-t3code/packages/client-runtime/src/state/projectGrouping.d.ts
3
3
  interface ProjectGroupingSettings {
4
4
  readonly sidebarProjectGroupingMode: SidebarProjectGroupingMode;
@@ -22,5 +22,29 @@ declare function deriveProjectGroupLabel(input: {
22
22
  readonly representative: Pick<EnvironmentProject, "title" | "repositoryIdentity">;
23
23
  readonly members: ReadonlyArray<Pick<EnvironmentProject, "title" | "repositoryIdentity">>;
24
24
  }): string;
25
+ interface ProjectGroupMember<TProject extends EnvironmentProject = EnvironmentProject> {
26
+ readonly physicalProjectKey: string;
27
+ readonly project: TProject;
28
+ }
29
+ interface ProjectGroup<TProject extends EnvironmentProject = EnvironmentProject> {
30
+ readonly key: string;
31
+ readonly label: string;
32
+ readonly representative: TProject;
33
+ readonly members: ReadonlyArray<ProjectGroupMember<TProject>>;
34
+ readonly memberProjectRefs: ReadonlyArray<ScopedProjectRef>;
35
+ }
36
+ /**
37
+ * Builds logical project groups without losing the physical projects that
38
+ * remain the actual navigation and task-creation targets.
39
+ *
40
+ * Presentation-specific metadata, filtering, and activity sorting stay in
41
+ * each client. Grouping modes, overrides, physical deduplication, labels, and
42
+ * member preservation live here so web and mobile cannot drift.
43
+ */
44
+ declare function buildProjectGroups<TProject extends EnvironmentProject>(input: {
45
+ readonly projects: ReadonlyArray<TProject>;
46
+ readonly settings: ProjectGroupingSettings;
47
+ readonly preferredEnvironmentId?: EnvironmentId | null;
48
+ }): ReadonlyArray<ProjectGroup<TProject>>;
25
49
  //#endregion
26
- export { ProjectGroupingMode, ProjectGroupingSettings, deriveLogicalProjectKey, deriveLogicalProjectKeyFromRef, deriveLogicalProjectKeyFromSettings, derivePhysicalProjectKey, derivePhysicalProjectKeyFromPath, deriveProjectGroupLabel, deriveProjectGroupingOverrideKey, getProjectOrderKey, resolveProjectGroupingMode, selectProjectGroupingSettings };
50
+ export { ProjectGroup, ProjectGroupMember, ProjectGroupingMode, ProjectGroupingSettings, buildProjectGroups, deriveLogicalProjectKey, deriveLogicalProjectKeyFromRef, deriveLogicalProjectKeyFromSettings, derivePhysicalProjectKey, derivePhysicalProjectKeyFromPath, deriveProjectGroupLabel, deriveProjectGroupingOverrideKey, getProjectOrderKey, resolveProjectGroupingMode, selectProjectGroupingSettings };
@@ -1,4 +1,4 @@
1
- import { cn as normalizeProjectPathForComparison, li as scopedProjectKey, si as scopeProjectRef } from "../../shared.js";
1
+ import { hi as scopedProjectKey, ln as normalizeProjectPathForComparison, pi as scopeProjectRef } from "../../shared.js";
2
2
  //#region upstream-t3code/packages/client-runtime/src/state/projectGrouping.ts
3
3
  function selectProjectGroupingSettings(settings) {
4
4
  return {
@@ -63,11 +63,91 @@ function deriveLogicalProjectKeyFromRef(projectRef, project, options) {
63
63
  return project ? deriveLogicalProjectKey(project, options) : scopedProjectKey(projectRef);
64
64
  }
65
65
  function deriveProjectGroupLabel(input) {
66
+ const sharedTitles = uniqueNonEmptyValues(input.members.map((member) => member.title));
66
67
  const sharedDisplayNames = uniqueNonEmptyValues(input.members.map((member) => member.repositoryIdentity?.displayName));
67
- if (sharedDisplayNames.length === 1) return sharedDisplayNames[0];
68
68
  const sharedRepositoryNames = uniqueNonEmptyValues(input.members.map((member) => member.repositoryIdentity?.name));
69
+ const sharedTitle = sharedTitles[0];
70
+ if (sharedTitles.length === 1 && sharedTitle !== void 0 && !sharedDisplayNames.includes(sharedTitle) && !sharedRepositoryNames.includes(sharedTitle)) return sharedTitle;
71
+ if (sharedDisplayNames.length === 1) return sharedDisplayNames[0];
69
72
  if (sharedRepositoryNames.length === 1) return sharedRepositoryNames[0];
70
73
  return input.representative.title;
71
74
  }
75
+ function projectFreshnessTime(project) {
76
+ const updatedAtTime = Date.parse(project.updatedAt);
77
+ if (Number.isFinite(updatedAtTime)) return updatedAtTime;
78
+ const createdAtTime = Date.parse(project.createdAt);
79
+ return Number.isFinite(createdAtTime) ? createdAtTime : 0;
80
+ }
81
+ function shouldReplacePhysicalProjectWinner(existing, candidate) {
82
+ const freshnessDelta = projectFreshnessTime(candidate) - projectFreshnessTime(existing);
83
+ return freshnessDelta > 0 || freshnessDelta === 0 && candidate.id > existing.id;
84
+ }
85
+ function selectProjectIdentitySource(projects, winner) {
86
+ if (winner.repositoryIdentity !== null) return winner;
87
+ let freshestIdentifiedProject = null;
88
+ for (const project of projects) {
89
+ if (project.repositoryIdentity === null) continue;
90
+ if (freshestIdentifiedProject === null || shouldReplacePhysicalProjectWinner(freshestIdentifiedProject, project)) freshestIdentifiedProject = project;
91
+ }
92
+ return freshestIdentifiedProject ?? winner;
93
+ }
94
+ /**
95
+ * Builds logical project groups without losing the physical projects that
96
+ * remain the actual navigation and task-creation targets.
97
+ *
98
+ * Presentation-specific metadata, filtering, and activity sorting stay in
99
+ * each client. Grouping modes, overrides, physical deduplication, labels, and
100
+ * member preservation live here so web and mobile cannot drift.
101
+ */
102
+ function buildProjectGroups(input) {
103
+ const projectsByPhysicalKey = /* @__PURE__ */ new Map();
104
+ for (const project of input.projects) {
105
+ const physicalProjectKey = derivePhysicalProjectKey(project);
106
+ const existing = projectsByPhysicalKey.get(physicalProjectKey);
107
+ if (existing) existing.push(project);
108
+ else projectsByPhysicalKey.set(physicalProjectKey, [project]);
109
+ }
110
+ const logicalKeyByPhysicalKey = /* @__PURE__ */ new Map();
111
+ const groupedMembers = /* @__PURE__ */ new Map();
112
+ for (const [physicalProjectKey, physicalProjects] of projectsByPhysicalKey) {
113
+ const winner = physicalProjects.reduce((current, candidate) => shouldReplacePhysicalProjectWinner(current, candidate) ? candidate : current);
114
+ const logicalKey = deriveLogicalProjectKey(selectProjectIdentitySource(physicalProjects, winner), { groupingMode: resolveProjectGroupingMode(winner, input.settings) });
115
+ logicalKeyByPhysicalKey.set(physicalProjectKey, logicalKey);
116
+ const member = {
117
+ physicalProjectKey,
118
+ project: winner
119
+ };
120
+ const existing = groupedMembers.get(logicalKey);
121
+ if (existing) existing.push(member);
122
+ else groupedMembers.set(logicalKey, [member]);
123
+ }
124
+ const projectRefsByLogicalKey = /* @__PURE__ */ new Map();
125
+ const seenProjectRefs = /* @__PURE__ */ new Set();
126
+ for (const project of input.projects) {
127
+ const physicalProjectKey = derivePhysicalProjectKey(project);
128
+ const logicalKey = logicalKeyByPhysicalKey.get(physicalProjectKey) ?? deriveLogicalProjectKeyFromSettings(project, input.settings);
129
+ const projectRefKey = scopedProjectKey(scopeProjectRef(project.environmentId, project.id));
130
+ if (seenProjectRefs.has(projectRefKey)) continue;
131
+ seenProjectRefs.add(projectRefKey);
132
+ const projectRef = scopeProjectRef(project.environmentId, project.id);
133
+ const existing = projectRefsByLogicalKey.get(logicalKey);
134
+ if (existing) existing.push(projectRef);
135
+ else projectRefsByLogicalKey.set(logicalKey, [projectRef]);
136
+ }
137
+ const preferredEnvironmentId = input.preferredEnvironmentId ?? null;
138
+ return Array.from(groupedMembers, ([key, members]) => {
139
+ const representative = (preferredEnvironmentId ? members.find((member) => member.project.environmentId === preferredEnvironmentId)?.project : null) ?? members[0].project;
140
+ return {
141
+ key,
142
+ label: members.length > 1 ? deriveProjectGroupLabel({
143
+ representative,
144
+ members: members.map((member) => member.project)
145
+ }) : representative.title,
146
+ representative,
147
+ members,
148
+ memberProjectRefs: projectRefsByLogicalKey.get(key) ?? []
149
+ };
150
+ });
151
+ }
72
152
  //#endregion
73
- export { deriveLogicalProjectKey, deriveLogicalProjectKeyFromRef, deriveLogicalProjectKeyFromSettings, derivePhysicalProjectKey, derivePhysicalProjectKeyFromPath, deriveProjectGroupLabel, deriveProjectGroupingOverrideKey, getProjectOrderKey, resolveProjectGroupingMode, selectProjectGroupingSettings };
153
+ export { buildProjectGroups, deriveLogicalProjectKey, deriveLogicalProjectKeyFromRef, deriveLogicalProjectKeyFromSettings, derivePhysicalProjectKey, derivePhysicalProjectKeyFromPath, deriveProjectGroupLabel, deriveProjectGroupingOverrideKey, getProjectOrderKey, resolveProjectGroupingMode, selectProjectGroupingSettings };
@@ -1,4 +1,4 @@
1
- import { Ot as UpdateProjectInput, _x as ProjectReadFileResult, bT as EnvironmentAuthorizationError, c as normalizeProjectPathForDispatch, cv as OrchestrationShellSnapshot, dt as CreateProjectInput, f as AtomCommand, fx as ProjectListEntriesError, ha as EnvironmentRegistry, hx as ProjectReadFileError, jw as ScopedProjectRef, ma as EnvironmentNotRegisteredError, on as EnvironmentRpcUnavailableError, pt as DeleteProjectInput, r as isExplicitRelativePath, rt as EnvironmentProject, s as normalizeProjectPathForComparison, u as EnvironmentCatalogState, vx as ProjectSearchEntriesError, xx as ProjectWriteFileError, zT as EnvironmentId, z_ as OrchestrationDispatchCommandError } from "../../shared.js";
1
+ import { $S as ProjectSearchEntriesError, $v as OrchestrationDispatchCommandError, CD as EnvironmentId, Nt as UpdateProjectInput, Oy as OrchestrationShellSnapshot, Ta as EnvironmentRegistry, WS as ProjectListEntriesError, YS as ProjectReadFileResult, at as EnvironmentProject, c as normalizeProjectPathForDispatch, f as AtomCommand, ht as DeleteProjectInput, iD as EnvironmentAuthorizationError, mE as ScopedProjectRef, mn as EnvironmentRpcUnavailableError, nC as ProjectWriteFileError, pt as CreateProjectInput, qS as ProjectReadFileError, r as isExplicitRelativePath, s as normalizeProjectPathForComparison, u as EnvironmentCatalogState, wa as EnvironmentNotRegisteredError } from "../../shared.js";
2
2
  import * as Crypto from "effect/Crypto";
3
3
  import { Atom } from "effect/unstable/reactivity";
4
4
  //#region upstream-t3code/packages/client-runtime/src/state/projectCommands.d.ts
@@ -14,11 +14,13 @@ interface OptimisticProjectFileTarget {
14
14
  declare function createProjectEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<EnvironmentRegistry | Crypto.Crypto | R, E>): {
15
15
  searchEntries: (target: {
16
16
  readonly environmentId: EnvironmentId;
17
- readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{
18
- readonly cwd: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
19
- readonly query: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
20
- readonly limit: import("effect/Schema").Int;
21
- }>;
17
+ readonly input: {
18
+ readonly cwd: string;
19
+ readonly query: string;
20
+ readonly limit: number;
21
+ readonly kind?: "directory" | "file" | undefined;
22
+ readonly imageOnly?: boolean | undefined;
23
+ };
22
24
  }) => Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
23
25
  readonly entries: readonly {
24
26
  readonly path: string;
@@ -28,9 +30,9 @@ declare function createProjectEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<E
28
30
  }, E | EnvironmentAuthorizationError | EnvironmentRpcUnavailableError | Error | ProjectSearchEntriesError | import("effect/unstable/rpc/RpcClientError").RpcClientError>>;
29
31
  listEntries: (target: {
30
32
  readonly environmentId: EnvironmentId;
31
- readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{
32
- readonly cwd: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
33
- }>;
33
+ readonly input: {
34
+ readonly cwd: string;
35
+ };
34
36
  }) => Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
35
37
  readonly entries: readonly {
36
38
  readonly path: string;
@@ -40,10 +42,10 @@ declare function createProjectEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<E
40
42
  }, E | EnvironmentAuthorizationError | EnvironmentRpcUnavailableError | Error | ProjectListEntriesError | import("effect/unstable/rpc/RpcClientError").RpcClientError>>;
41
43
  readFile: (target: {
42
44
  readonly environmentId: EnvironmentId;
43
- readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{
44
- readonly cwd: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
45
- readonly relativePath: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
46
- }>;
45
+ readonly input: {
46
+ readonly cwd: string;
47
+ readonly relativePath: string;
48
+ };
47
49
  }) => Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
48
50
  readonly relativePath: string;
49
51
  readonly contents: string;
@@ -71,11 +73,11 @@ declare function createProjectEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<E
71
73
  }, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | OrchestrationDispatchCommandError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
72
74
  writeFile: AtomCommand<{
73
75
  readonly environmentId: EnvironmentId;
74
- readonly input: import("effect/Schema").Struct.ReadonlyMakeIn<{
75
- readonly cwd: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
76
- readonly relativePath: import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").String, never, never>;
77
- readonly contents: import("effect/Schema").String;
78
- }>;
76
+ readonly input: {
77
+ readonly cwd: string;
78
+ readonly relativePath: string;
79
+ readonly contents: string;
80
+ };
79
81
  }, {
80
82
  readonly relativePath: string;
81
83
  }, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | ProjectWriteFileError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
@@ -111,6 +113,8 @@ declare function createEnvironmentProjectAtoms(input: {
111
113
  readonly value: string | boolean;
112
114
  }[];
113
115
  } | null;
116
+ readonly defaultThreadEnvMode?: "local" | "worktree" | null | undefined;
117
+ readonly faviconPath?: string | null | undefined;
114
118
  readonly scripts: readonly {
115
119
  readonly id: string;
116
120
  readonly name: string;
@@ -148,6 +152,8 @@ declare function createEnvironmentProjectAtoms(input: {
148
152
  readonly value: string | boolean;
149
153
  }[];
150
154
  } | null;
155
+ readonly defaultThreadEnvMode?: "local" | "worktree" | null | undefined;
156
+ readonly faviconPath?: string | null | undefined;
151
157
  readonly scripts: readonly {
152
158
  readonly id: string;
153
159
  readonly name: string;
@@ -1,2 +1,2 @@
1
- import { Bt as inferProjectTitleFromPath, Ft as findProjectByPath, Ht as isUnsupportedWindowsProjectPath, It as getBrowseDirectoryPath, Lt as getBrowseLeafPathSegment, Mt as appendBrowsePathSegment, Nt as canNavigateUp, Pt as ensureBrowseDirectoryPath, Rt as getBrowseParentPath, Ut as resolveProjectPathForDispatch, Vt as isFilesystemBrowseQuery, Wt as createEnvironmentProjectAtoms, cn as normalizeProjectPathForComparison, in as isExplicitRelativePath, ln as normalizeProjectPathForDispatch, rn as createProjectEnvironmentAtoms, zt as hasTrailingPathSeparator } from "../../shared.js";
1
+ import { Bt as hasTrailingPathSeparator, Ft as ensureBrowseDirectoryPath, Gt as createEnvironmentProjectAtoms, Ht as isFilesystemBrowseQuery, It as findProjectByPath, Lt as getBrowseDirectoryPath, Nt as appendBrowsePathSegment, Pt as canNavigateUp, Rt as getBrowseLeafPathSegment, Ut as isUnsupportedWindowsProjectPath, Vt as inferProjectTitleFromPath, Wt as resolveProjectPathForDispatch, an as isExplicitRelativePath, in as createProjectEnvironmentAtoms, ln as normalizeProjectPathForComparison, un as normalizeProjectPathForDispatch, zt as getBrowseParentPath } from "../../shared.js";
2
2
  export { appendBrowsePathSegment, canNavigateUp, createEnvironmentProjectAtoms, createProjectEnvironmentAtoms, ensureBrowseDirectoryPath, findProjectByPath, getBrowseDirectoryPath, getBrowseLeafPathSegment, getBrowseParentPath, hasTrailingPathSeparator, inferProjectTitleFromPath, isExplicitRelativePath as isExplicitRelativeProjectPath, isFilesystemBrowseQuery, isUnsupportedWindowsProjectPath, normalizeProjectPathForComparison, normalizeProjectPathForDispatch, resolveProjectPathForDispatch };
@@ -1,4 +1,4 @@
1
- import { ea as RelayEnvironmentDiscovery, f as AtomCommand, ta as RelayEnvironmentDiscoveryState } from "../../shared.js";
1
+ import { da as RelayEnvironmentDiscoveryState, f as AtomCommand, ua as RelayEnvironmentDiscovery } from "../../shared.js";
2
2
  import { AsyncResult, Atom } from "effect/unstable/reactivity";
3
3
  //#region upstream-t3code/packages/client-runtime/src/state/relayDiscovery.d.ts
4
4
  declare function createRelayEnvironmentDiscoveryAtoms<R, E>(runtime: Atom.AtomRuntime<RelayEnvironmentDiscovery | R, E>): {
@@ -1,4 +1,4 @@
1
- import { $D as flatMap, Fk as getOrElse, Sv as changes, Xr as withLabel, aa as RelayEnvironmentDiscovery, gr as createRuntimeCommand, ia as EMPTY_RELAY_ENVIRONMENT_DISCOVERY_STATE, lD as unwrap, qr as make, ti as value, uO as map } from "../../shared.js";
1
+ import { $r as make, Gk as map, Nk as flatMap, Py as changes, Sj as getOrElse, YO as unwrap, br as createRuntimeCommand, da as RelayEnvironmentDiscovery, ni as withLabel, si as value, ua as EMPTY_RELAY_ENVIRONMENT_DISCOVERY_STATE } from "../../shared.js";
2
2
  //#region upstream-t3code/packages/client-runtime/src/state/relayDiscovery.ts
3
3
  function createRelayEnvironmentDiscoveryAtoms(runtime) {
4
4
  const stateAtom = runtime.atom(unwrap(RelayEnvironmentDiscovery.pipe(map((discovery) => changes(discovery.state)))), { initialValue: EMPTY_RELAY_ENVIRONMENT_DISCOVERY_STATE });
@@ -1,4 +1,4 @@
1
- import { TS as GitCommandError, bS as VcsUnsupportedOperationError, bT as EnvironmentAuthorizationError, dS as VcsProcessOutputReadError, fS as VcsProcessSpawnError, hS as VcsProcessTimeoutError, ha as EnvironmentRegistry, lS as VcsProcessMissingExitCodeError, mS as VcsProcessStdinWriteError, oS as VcsProcessExitError, on as EnvironmentRpcUnavailableError, uS as VcsProcessOutputLimitError, vS as VcsRepositoryDetectionError, zT as EnvironmentId } from "../../shared.js";
1
+ import { CD as EnvironmentId, JC as VcsProcessOutputReadError, KC as VcsProcessMissingExitCodeError, QC as VcsProcessTimeoutError, Ta as EnvironmentRegistry, UC as VcsProcessExitError, YC as VcsProcessSpawnError, ZC as VcsProcessStdinWriteError, cw as GitCommandError, f as AtomCommand, iD as EnvironmentAuthorizationError, mn as EnvironmentRpcUnavailableError, qC as VcsProcessOutputLimitError, rw as VcsUnsupportedOperationError, tw as VcsRepositoryDetectionError, wa as EnvironmentNotRegisteredError } from "../../shared.js";
2
2
  import { Atom } from "effect/unstable/reactivity";
3
3
  //#region upstream-t3code/packages/client-runtime/src/state/review.d.ts
4
4
  declare function createReviewEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<EnvironmentRegistry | R, E>): {
@@ -23,6 +23,21 @@ declare function createReviewEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<En
23
23
  readonly truncated: boolean;
24
24
  }[];
25
25
  }, E | EnvironmentAuthorizationError | EnvironmentRpcUnavailableError | Error | GitCommandError | import("effect/unstable/rpc/RpcClientError").RpcClientError | VcsProcessExitError | VcsProcessMissingExitCodeError | VcsProcessOutputLimitError | VcsProcessOutputReadError | VcsProcessSpawnError | VcsProcessStdinWriteError | VcsProcessTimeoutError | VcsRepositoryDetectionError | VcsUnsupportedOperationError>>;
26
+ diffFileContents: AtomCommand<{
27
+ readonly environmentId: EnvironmentId;
28
+ readonly input: {
29
+ readonly cwd: string;
30
+ readonly sourceKind: "branch-range" | "working-tree";
31
+ readonly changeType: "change" | "deleted" | "new" | "rename-changed" | "rename-pure";
32
+ readonly baseRef: string | null;
33
+ readonly headRef: string | null;
34
+ readonly oldPath: string;
35
+ readonly newPath: string;
36
+ };
37
+ }, {
38
+ readonly oldContents: string;
39
+ readonly newContents: string;
40
+ }, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | GitCommandError | import("effect/unstable/rpc/RpcClientError").RpcClientError | VcsProcessExitError | VcsProcessMissingExitCodeError | VcsProcessOutputLimitError | VcsProcessOutputReadError | VcsProcessSpawnError | VcsProcessStdinWriteError | VcsProcessTimeoutError | VcsRepositoryDetectionError | VcsUnsupportedOperationError>;
26
41
  };
27
42
  //#endregion
28
43
  export { createReviewEnvironmentAtoms };
@@ -1,11 +1,32 @@
1
- import { Fs as WS_METHODS, fr as createEnvironmentRpcQueryAtomFamily } from "../../shared.js";
1
+ import { Us as WS_METHODS, gr as createEnvironmentRpcQueryAtomFamily, hr as createEnvironmentRpcCommand, pr as createAtomCommandScheduler } from "../../shared.js";
2
2
  //#region upstream-t3code/packages/client-runtime/src/state/review.ts
3
3
  function createReviewEnvironmentAtoms(runtime) {
4
- return { diffPreview: createEnvironmentRpcQueryAtomFamily(runtime, {
5
- label: "environment-data:review:diff-preview",
6
- tag: WS_METHODS.reviewGetDiffPreview,
7
- staleTimeMs: 5e3
8
- }) };
4
+ const diffFileScheduler = createAtomCommandScheduler();
5
+ return {
6
+ diffPreview: createEnvironmentRpcQueryAtomFamily(runtime, {
7
+ label: "environment-data:review:diff-preview",
8
+ tag: WS_METHODS.reviewGetDiffPreview,
9
+ staleTimeMs: 5e3
10
+ }),
11
+ diffFileContents: createEnvironmentRpcCommand(runtime, {
12
+ label: "environment-data:review:diff-file-contents",
13
+ tag: WS_METHODS.reviewGetDiffFileContents,
14
+ scheduler: diffFileScheduler,
15
+ concurrency: {
16
+ mode: "singleFlight",
17
+ key: ({ environmentId, input }) => JSON.stringify([
18
+ environmentId,
19
+ input.cwd,
20
+ input.sourceKind,
21
+ input.baseRef,
22
+ input.headRef,
23
+ input.oldPath,
24
+ input.newPath,
25
+ input.changeType
26
+ ])
27
+ }
28
+ })
29
+ };
9
30
  }
10
31
  //#endregion
11
32
  export { createReviewEnvironmentAtoms };
@@ -1,2 +1,2 @@
1
- import { A as environmentRpcKey, B as settleAsyncResult, C as createEnvironmentRpcCommand, D as createEnvironmentSubscriptionAtomFamily, E as createEnvironmentRpcSubscriptionAtomFamily, F as mapAtomCommandResult, H as squashAtomCommandFailure, I as reportAtomCommandResult, L as runAtomCommand, M as executeAtomQuery, N as followStreamInEnvironment, O as createRuntimeCommand, P as isAtomCommandInterrupted, R as runInEnvironment, S as createEnvironmentCommand, T as createEnvironmentRpcStreamCommand, V as settlePromise, _ as AtomCommandResult, b as SettledAsyncResult, f as AtomCommand, g as AtomCommandReporter, h as AtomCommandOptions, j as executeAtomCommand, k as createRuntimeStreamCommand, m as AtomCommandFailure, p as AtomCommandConcurrency, v as AtomCommandScheduler, w as createEnvironmentRpcQueryAtomFamily, x as createAtomCommandScheduler, y as AtomCommandSuccess, z as runStreamInEnvironment } from "../../shared.js";
2
- export { AtomCommand, AtomCommandConcurrency, AtomCommandFailure, AtomCommandOptions, AtomCommandReporter, AtomCommandResult, AtomCommandScheduler, AtomCommandSuccess, SettledAsyncResult, createAtomCommandScheduler, createEnvironmentCommand, createEnvironmentRpcCommand, createEnvironmentRpcQueryAtomFamily, createEnvironmentRpcStreamCommand, createEnvironmentRpcSubscriptionAtomFamily, createEnvironmentSubscriptionAtomFamily, createRuntimeCommand, createRuntimeStreamCommand, environmentRpcKey, executeAtomCommand, executeAtomQuery, followStreamInEnvironment, isAtomCommandInterrupted, mapAtomCommandResult, reportAtomCommandResult, runAtomCommand, runInEnvironment, runStreamInEnvironment, settleAsyncResult, settlePromise, squashAtomCommandFailure };
1
+ import { A as environmentRpcKey, B as scheduleAtomCommandEffect, C as createEnvironmentRpcCommand, D as createEnvironmentSubscriptionAtomFamily, E as createEnvironmentRpcSubscriptionAtomFamily, F as mapAtomCommandResult, H as settlePromise, I as reportAtomCommandResult, L as runAtomCommand, M as executeAtomQuery, N as followStreamInEnvironment, O as createRuntimeCommand, P as isAtomCommandInterrupted, R as runInEnvironment, S as createEnvironmentCommand, T as createEnvironmentRpcStreamCommand, U as squashAtomCommandFailure, V as settleAsyncResult, _ as AtomCommandResult, b as SettledAsyncResult, f as AtomCommand, g as AtomCommandReporter, h as AtomCommandOptions, j as executeAtomCommand, k as createRuntimeStreamCommand, m as AtomCommandFailure, p as AtomCommandConcurrency, v as AtomCommandScheduler, w as createEnvironmentRpcQueryAtomFamily, x as createAtomCommandScheduler, y as AtomCommandSuccess, z as runStreamInEnvironment } from "../../shared.js";
2
+ export { AtomCommand, AtomCommandConcurrency, AtomCommandFailure, AtomCommandOptions, AtomCommandReporter, AtomCommandResult, AtomCommandScheduler, AtomCommandSuccess, SettledAsyncResult, createAtomCommandScheduler, createEnvironmentCommand, createEnvironmentRpcCommand, createEnvironmentRpcQueryAtomFamily, createEnvironmentRpcStreamCommand, createEnvironmentRpcSubscriptionAtomFamily, createEnvironmentSubscriptionAtomFamily, createRuntimeCommand, createRuntimeStreamCommand, environmentRpcKey, executeAtomCommand, executeAtomQuery, followStreamInEnvironment, isAtomCommandInterrupted, mapAtomCommandResult, reportAtomCommandResult, runAtomCommand, runInEnvironment, runStreamInEnvironment, scheduleAtomCommandEffect, settleAsyncResult, settlePromise, squashAtomCommandFailure };
@@ -1,2 +1,2 @@
1
- import { Ar as squashAtomCommandFailure, Cr as mapAtomCommandResult, Dr as runStreamInEnvironment, Er as runInEnvironment, Or as settleAsyncResult, Sr as isAtomCommandInterrupted, Tr as runAtomCommand, _r as createRuntimeStreamCommand, br as executeAtomQuery, dr as createEnvironmentRpcCommand, fr as createEnvironmentRpcQueryAtomFamily, gr as createRuntimeCommand, hr as createEnvironmentSubscriptionAtomFamily, kr as settlePromise, lr as createAtomCommandScheduler, mr as createEnvironmentRpcSubscriptionAtomFamily, pr as createEnvironmentRpcStreamCommand, ur as createEnvironmentCommand, vr as environmentRpcKey, wr as reportAtomCommandResult, xr as followStreamInEnvironment, yr as executeAtomCommand } from "../../shared.js";
2
- export { createAtomCommandScheduler, createEnvironmentCommand, createEnvironmentRpcCommand, createEnvironmentRpcQueryAtomFamily, createEnvironmentRpcStreamCommand, createEnvironmentRpcSubscriptionAtomFamily, createEnvironmentSubscriptionAtomFamily, createRuntimeCommand, createRuntimeStreamCommand, environmentRpcKey, executeAtomCommand, executeAtomQuery, followStreamInEnvironment, isAtomCommandInterrupted, mapAtomCommandResult, reportAtomCommandResult, runAtomCommand, runInEnvironment, runStreamInEnvironment, settleAsyncResult, settlePromise, squashAtomCommandFailure };
1
+ import { Ar as runInEnvironment, Cr as executeAtomCommand, Dr as mapAtomCommandResult, Er as isAtomCommandInterrupted, Fr as squashAtomCommandFailure, Mr as scheduleAtomCommandEffect, Nr as settleAsyncResult, Or as reportAtomCommandResult, Pr as settlePromise, Sr as environmentRpcKey, Tr as followStreamInEnvironment, _r as createEnvironmentRpcStreamCommand, br as createRuntimeCommand, gr as createEnvironmentRpcQueryAtomFamily, hr as createEnvironmentRpcCommand, jr as runStreamInEnvironment, kr as runAtomCommand, mr as createEnvironmentCommand, pr as createAtomCommandScheduler, vr as createEnvironmentRpcSubscriptionAtomFamily, wr as executeAtomQuery, xr as createRuntimeStreamCommand, yr as createEnvironmentSubscriptionAtomFamily } from "../../shared.js";
2
+ export { createAtomCommandScheduler, createEnvironmentCommand, createEnvironmentRpcCommand, createEnvironmentRpcQueryAtomFamily, createEnvironmentRpcStreamCommand, createEnvironmentRpcSubscriptionAtomFamily, createEnvironmentSubscriptionAtomFamily, createRuntimeCommand, createRuntimeStreamCommand, environmentRpcKey, executeAtomCommand, executeAtomQuery, followStreamInEnvironment, isAtomCommandInterrupted, mapAtomCommandResult, reportAtomCommandResult, runAtomCommand, runInEnvironment, runStreamInEnvironment, scheduleAtomCommandEffect, settleAsyncResult, settlePromise, squashAtomCommandFailure };