t3code-cli 0.14.1 → 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 (162) 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 +544 -262
  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/cli/app.ts +2 -0
  155. package/src/cli/format/thread.ts +23 -1
  156. package/src/cli/search.ts +48 -0
  157. package/src/config/persist/schema.ts +1 -1
  158. package/src/orchestration/layer.ts +6 -0
  159. package/src/orchestration/service.ts +5 -0
  160. package/src/rpc/error.ts +2 -0
  161. package/src/rpc/operation.ts +2 -0
  162. package/src/rpc/ws-group.ts +2 -0
package/dist/rpc.js CHANGED
@@ -1,2 +1,2 @@
1
- import { Gi as T3RpcOperations, Gn as T3RpcLive, Ji as T3Rpc, Ki as T3RpcOperationsLive, Kn as makeT3RpcLayer, Yi as RpcError, qi as makeT3RpcOperations } from "./shared.js";
1
+ import { $i as makeT3RpcOperations, Qi as T3RpcOperationsLive, Xn as makeT3RpcLayer, Yn as T3RpcLive, Zi as T3RpcOperations, ea as T3Rpc, ta as RpcError } from "./shared.js";
2
2
  export { RpcError, T3Rpc, T3RpcLive, T3RpcOperations, T3RpcOperationsLive, makeT3RpcLayer, makeT3RpcOperations };
package/dist/runtime.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { An as T3LocalAuthTokenLayer, Cn as BaseAppLayer, Dn as T3AuthTransportLayer, En as T3AuthPairingLayer, Mn as T3PreviewAutomationLayer, On as T3LocalAuthLayer, Sn as AuthAppLayer, Tn as T3AuthLayer, jn as T3OrchestrationLayer, kn as T3LocalAuthOriginLayer, wn as BaseAuthAppLayer, xn as AppLayer } from "./shared.js";
1
+ import { An as AppLayer, Bn as T3OrchestrationLayer, Fn as T3AuthPairingLayer, In as T3AuthTransportLayer, Ln as T3LocalAuthLayer, Mn as BaseAppLayer, Nn as BaseAuthAppLayer, Pn as T3AuthLayer, Rn as T3LocalAuthOriginLayer, Vn as T3PreviewAutomationLayer, jn as AuthAppLayer, zn as T3LocalAuthTokenLayer } from "./shared.js";
2
2
  export { AppLayer, AuthAppLayer, BaseAppLayer, BaseAuthAppLayer, T3AuthLayer, T3AuthPairingLayer, T3AuthTransportLayer, T3LocalAuthLayer, T3LocalAuthOriginLayer, T3LocalAuthTokenLayer, T3OrchestrationLayer, T3PreviewAutomationLayer };
package/dist/runtime.js CHANGED
@@ -1,2 +1,2 @@
1
- import { Bn as T3LocalAuthLayer, Fn as BaseAppLayer, Hn as T3LocalAuthTokenLayer, In as BaseAuthAppLayer, Ln as T3AuthLayer, Nn as AppLayer, Pn as AuthAppLayer, Rn as T3AuthPairingLayer, Un as T3OrchestrationLayer, Vn as T3LocalAuthOriginLayer, Wn as T3PreviewAutomationLayer, zn as T3AuthTransportLayer } from "./shared.js";
1
+ import { Bn as BaseAuthAppLayer, Gn as T3LocalAuthOriginLayer, Hn as T3AuthPairingLayer, Jn as T3PreviewAutomationLayer, Kn as T3LocalAuthTokenLayer, Ln as AppLayer, Rn as AuthAppLayer, Un as T3AuthTransportLayer, Vn as T3AuthLayer, Wn as T3LocalAuthLayer, qn as T3OrchestrationLayer, zn as BaseAppLayer } from "./shared.js";
2
2
  export { AppLayer, AuthAppLayer, BaseAppLayer, BaseAuthAppLayer, T3AuthLayer, T3AuthPairingLayer, T3AuthTransportLayer, T3LocalAuthLayer, T3LocalAuthOriginLayer, T3LocalAuthTokenLayer, T3OrchestrationLayer, T3PreviewAutomationLayer };
@@ -1,4 +1,4 @@
1
- import { FO as tx, IO as txRetry, LD as acquireRelease, RO as void_, ZD as ensuring, _v as unbounded, aO as gen, gv as take, hv as shutdown, iO as forkScoped, kO as tap, mv as offer, rO as forever, vv as get, xv as update, yv as make } from "../shared.js";
1
+ import { Ay as get, Bk as gen, Dy as shutdown, Ey as offer, Lk as forever, Ny as update, Oy as take, _A as tx, bA as void_, dA as tap, hk as acquireRelease, jy as make, kk as ensuring, ky as unbounded, vA as txRetry, zk as forkScoped } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/DrainableWorker.ts
3
3
  /**
4
4
  * Create a drainable worker that processes items from an unbounded queue.
@@ -1,4 +1,4 @@
1
- import { $D as flatMap, FO as tx, GD as catchCause, IO as txRetry, LD as acquireRelease, RO as void_, UD as asVoid, _v as unbounded, aO as gen, bv as modify, gv as take, hv as shutdown, iO as forkScoped, kO as tap, mv as offer, rO as forever, vv as get, yv as make } from "../shared.js";
1
+ import { Ay as get, Bk as gen, Ck as catchCause, Dy as shutdown, Ey as offer, Lk as forever, My as modify, Nk as flatMap, Oy as take, _A as tx, bA as void_, dA as tap, hk as acquireRelease, jy as make, ky as unbounded, vA as txRetry, xk as asVoid, zk as forkScoped } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/KeyedCoalescingWorker.ts
3
3
  const makeKeyedCoalescingWorker = (options) => gen(function* () {
4
4
  const queue = yield* acquireRelease(unbounded(), shutdown);
@@ -1,4 +1,4 @@
1
- import { $k as hasProperty, BO as zipWith, EO as succeed, KO as TaggedError, OO as sync, QD as fail, WD as callback, aO as gen, iA as isString, kk as Service, rA as isObject, rk as sync$1 } from "../shared.js";
1
+ import { Bj as hasProperty, Bk as gen, Gj as isString, SA as zipWith, Sk as callback, VA as sync$1, Wj as isObject, cA as succeed, hj as Service, jk as fail, kA as TaggedError, uA as sync } from "../shared.js";
2
2
  import * as NodeNet from "node:net";
3
3
  //#region upstream-t3code/packages/shared/src/Net.ts
4
4
  var NetError = class extends TaggedError("NetError") {};
@@ -1,2 +1,2 @@
1
- import { _n as classifyHostedHttpsCompatibility, bn as normalizeHttpBaseUrl, gn as CreateAdvertisedEndpointInput, vn as createAdvertisedEndpoint, yn as deriveWsBaseUrl } from "../shared.js";
1
+ import { Dn as createAdvertisedEndpoint, En as classifyHostedHttpsCompatibility, On as deriveWsBaseUrl, Tn as CreateAdvertisedEndpointInput, kn as normalizeHttpBaseUrl } from "../shared.js";
2
2
  export { CreateAdvertisedEndpointInput, classifyHostedHttpsCompatibility, createAdvertisedEndpoint, deriveWsBaseUrl, normalizeHttpBaseUrl };
@@ -1,2 +1,2 @@
1
- import { Bo as normalizeHttpBaseUrl, Lo as classifyHostedHttpsCompatibility, Ro as createAdvertisedEndpoint, zo as deriveWsBaseUrl } from "../shared.js";
1
+ import { Go as createAdvertisedEndpoint, Ko as deriveWsBaseUrl, Wo as classifyHostedHttpsCompatibility, qo as normalizeHttpBaseUrl } from "../shared.js";
2
2
  export { classifyHostedHttpsCompatibility, createAdvertisedEndpoint, deriveWsBaseUrl, normalizeHttpBaseUrl };
@@ -1,4 +1,4 @@
1
- import { $T as ThreadId, _v as OrchestrationThreadShell, tv as OrchestrationProjectShell, zT as EnvironmentId } from "../shared.js";
1
+ import { CD as EnvironmentId, RD as ThreadId, Vy as OrchestrationThreadShell, vy as OrchestrationProjectShell } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/agentAwareness.d.ts
3
3
  type AgentAwarenessPhase = "starting" | "running" | "waiting_for_approval" | "waiting_for_input" | "completed" | "failed" | "stale";
4
4
  interface AgentAwarenessState {
@@ -1,4 +1,4 @@
1
- import { Sg as BackgroundActivitySettings, bg as BackgroundActivityProfile, i_ as ServerSettings } from "../shared.js";
1
+ import { b_ as BackgroundActivitySettings, v_ as BackgroundActivityProfile, vv as ServerSettings } from "../shared.js";
2
2
  import * as Duration from "effect/Duration";
3
3
  //#region upstream-t3code/packages/shared/src/backgroundActivitySettings.d.ts
4
4
  interface ResolvedBackgroundActivitySettings {
@@ -1,7 +1,7 @@
1
1
  //#region upstream-t3code/packages/shared/src/composerInlineTokens.ts
2
2
  const SKILL_TOKEN_REGEX = /(^|\s)\$([a-zA-Z][a-zA-Z0-9:_-]*)(?=\s)/g;
3
3
  const MENTION_TOKEN_REGEX = /(^|\s)@(?:"((?:\\.|[^"\\])*)"|([^\s@"]+))(?=\s)/g;
4
- const FILE_LINK_TOKEN_REGEX = /(^|\s)\[((?:\\.|[^\]\\])*)\]\(([^)\s]+)\)(?=\s)/g;
4
+ const FILE_LINK_TOKEN_REGEX = new RegExp(`(^|\\s)\\[((?:\\\\.|[^\\]\\\\]){0,512})\\]\\(([^)\\s]+)\\)(?=\\s)`, "g");
5
5
  const URI_SCHEME_REGEX = /^[A-Za-z][A-Za-z0-9+.-]*:/;
6
6
  const WINDOWS_DRIVE_PATH_REGEX = /^[A-Za-z]:[\\/]/;
7
7
  const SCOPED_PACKAGE_REFERENCE_REGEX = /^[a-z0-9][a-z0-9._-]*\/[a-z0-9][a-z0-9._-]*(?:\/[^\s@"]+)*$/;
@@ -1,4 +1,4 @@
1
- import { Sa as readHashParams } from "../shared.js";
1
+ import { Oa as readHashParams } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/connectAuth.ts
3
3
  const CONNECT_AUTH_STATE_PARAM = "state";
4
4
  const CONNECT_AUTH_CHALLENGE_PARAM = "challenge";
@@ -1,4 +1,4 @@
1
- import { Bk as isSome, OE as FileSystem, TE as Path, _O as orElseSucceed, aO as gen, hO as option } from "../shared.js";
1
+ import { $k as orElseSucceed, Bk as gen, Dj as isSome, Zk as option, fO as Path, mO as FileSystem } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/devHome.ts
3
3
  /**
4
4
  * Where development state lives, and how to keep it away from the shared
@@ -1,4 +1,4 @@
1
- import { $T as Struct, AD as encodeBase64Url, KT as Int, OD as decodeBase64Url, QT as String$1, YT as Never, aE as decodeUnknownOption, dE as optionalKey, kD as decodeBase64UrlString, lE as isNonEmpty, n as normalizeDpopHtu, qT as Literal, r as stableStringify, sE as fromJsonString, t as DpopPublicJwk$1, xk as getOrThrow, zk as isNone } from "../shared.js";
1
+ import { BD as isNonEmpty, CD as Literal, Ej as isNone, HD as optionalKey, ID as decodeUnknownOption, OD as String$1, RD as fromJsonString, SD as Int, TD as Never, aO as decodeBase64Url, kD as Struct, n as normalizeDpopHtu, oO as decodeBase64UrlString, oj as getOrThrow, r as stableStringify, sO as encodeBase64Url, t as DpopPublicJwk$1 } from "../shared.js";
2
2
  import * as nc from "node:crypto";
3
3
  //#region node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/cryptoNode.js
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { $S as VcsStatusLocalResult, XS as VcsRef, eC as VcsStatusRemoteResult, gC as SourceControlProviderInfo, nC as VcsStatusStreamEvent, tC as VcsStatusResult } from "../shared.js";
1
+ import { $w as SourceControlProviderInfo, Iw as VcsStatusLocalResult, Lw as VcsStatusRemoteResult, Nw as VcsRef, Rw as VcsStatusResult, zw as VcsStatusStreamEvent } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/git.d.ts
3
3
  declare const WORKTREE_BRANCH_PREFIX = "t3code";
4
4
  /**
@@ -1,2 +1,2 @@
1
- import { Fo as httpHeaderRedactionLayer } from "../shared.js";
1
+ import { Ho as httpHeaderRedactionLayer } from "../shared.js";
2
2
  export { httpHeaderRedactionLayer };
@@ -1,4 +1,4 @@
1
- import { AO as tapError, BC as transform, EO as succeed, GC as set, HC as get, Hk as match, IC as HttpClient, LC as filterStatusOk, QD as fail, RC as retry, Tk as millis, UC as get$1, UO as spaced, WC as make, WO as upTo, aO as gen, cO as logDebug, dO as mapError, eO as fn, jO as timeoutOption, lO as logWarning, oO as ignore, zC as tap } from "../shared.js";
1
+ import { Bk as gen, EA as upTo, Kk as mapError, Pk as fn, TA as spaced, Uk as logDebug, Vk as ignore, Wk as logWarning, _T as get, bT as set, cA as succeed, dT as HttpClient, fA as tapError, fT as filterStatusOk, hT as transform, jk as fail, kj as match, mT as tap, pA as timeoutOption, pT as retry, uj as millis, vT as get$1, yT as make } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/httpReadiness.ts
3
3
  const DEFAULT_HTTP_READY_PROBE_TIMEOUT_MS = 1e3;
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { Hu as KeybindingRule, Ku as KeybindingWhenNode, Uu as KeybindingShortcut, ad as ResolvedKeybindingsConfig, id as ResolvedKeybindingRule } from "../shared.js";
1
+ import { Ld as ResolvedKeybindingRule, Rd as ResolvedKeybindingsConfig, Sd as KeybindingShortcut, Td as KeybindingWhenNode, xd as KeybindingRule } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/keybindings.d.ts
3
3
  declare const DEFAULT_KEYBINDINGS: ReadonlyArray<KeybindingRule>;
4
4
  declare function parseKeybindingShortcut(value: string): KeybindingShortcut | null;
@@ -6,7 +6,7 @@ declare function parseKeybindingWhenExpression(expression: string): KeybindingWh
6
6
  declare function compileResolvedKeybindingRule(rule: KeybindingRule): ResolvedKeybindingRule | null;
7
7
  declare function compileResolvedKeybindingsConfig(config: ReadonlyArray<KeybindingRule>): ResolvedKeybindingsConfig;
8
8
  declare const DEFAULT_RESOLVED_KEYBINDINGS: readonly {
9
- readonly command: "chat.new" | "chat.newLocal" | "commandPalette.toggle" | "composer.stash" | "diff.toggle" | "editor.openFavorite" | "modelPicker.jump.1" | "modelPicker.jump.2" | "modelPicker.jump.3" | "modelPicker.jump.4" | "modelPicker.jump.5" | "modelPicker.jump.6" | "modelPicker.jump.7" | "modelPicker.jump.8" | "modelPicker.jump.9" | "modelPicker.toggle" | "preview.focusUrl" | "preview.refresh" | "preview.resetZoom" | "preview.toggle" | "preview.zoomIn" | "preview.zoomOut" | "rightPanel.toggle" | "sidebar.toggle" | "terminal.close" | "terminal.new" | "terminal.split" | "terminal.splitVertical" | "terminal.toggle" | "thread.jump.1" | "thread.jump.2" | "thread.jump.3" | "thread.jump.4" | "thread.jump.5" | "thread.jump.6" | "thread.jump.7" | "thread.jump.8" | "thread.jump.9" | "thread.next" | "thread.previous" | `script.${string}.run`;
9
+ readonly command: "chat.new" | "chat.newLocal" | "commandPalette.toggle" | "composer.stash" | "diff.toggle" | "editor.openFavorite" | "filePicker.toggle" | "modelPicker.jump.1" | "modelPicker.jump.2" | "modelPicker.jump.3" | "modelPicker.jump.4" | "modelPicker.jump.5" | "modelPicker.jump.6" | "modelPicker.jump.7" | "modelPicker.jump.8" | "modelPicker.jump.9" | "modelPicker.toggle" | "preview.focusUrl" | "preview.refresh" | "preview.resetZoom" | "preview.toggle" | "preview.zoomIn" | "preview.zoomOut" | "projectSearch.toggle" | "rightPanel.toggle" | "sidebar.toggle" | "terminal.close" | "terminal.new" | "terminal.split" | "terminal.splitVertical" | "terminal.toggle" | "themeEditor.toggle" | "thread.jump.1" | "thread.jump.2" | "thread.jump.3" | "thread.jump.4" | "thread.jump.5" | "thread.jump.6" | "thread.jump.7" | "thread.jump.8" | "thread.jump.9" | "thread.next" | "thread.previous" | `script.${string}.run`;
10
10
  readonly shortcut: {
11
11
  readonly key: string;
12
12
  readonly metaKey: boolean;
@@ -1,4 +1,4 @@
1
- import { Nm as MODEL_PICKER_JUMP_KEYBINDING_COMMANDS, Rm as THREAD_JUMP_KEYBINDING_COMMANDS } from "../shared.js";
1
+ import { Ph as MODEL_PICKER_JUMP_KEYBINDING_COMMANDS, zh as THREAD_JUMP_KEYBINDING_COMMANDS } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/keybindings.ts
3
3
  const DEFAULT_KEYBINDINGS = [
4
4
  {
@@ -77,6 +77,20 @@ const DEFAULT_KEYBINDINGS = [
77
77
  command: "commandPalette.toggle",
78
78
  when: "!terminalFocus"
79
79
  },
80
+ {
81
+ key: "mod+p",
82
+ command: "filePicker.toggle",
83
+ when: "!terminalFocus"
84
+ },
85
+ {
86
+ key: "mod+shift+f",
87
+ command: "projectSearch.toggle",
88
+ when: "!terminalFocus"
89
+ },
90
+ {
91
+ key: "mod+alt+shift+t",
92
+ command: "themeEditor.toggle"
93
+ },
80
94
  {
81
95
  key: "mod+s",
82
96
  command: "composer.stash",
@@ -1,4 +1,4 @@
1
- import { A_ as ModelSelection, Cd as ProviderOptionSelection, Kp as ProviderDriverKind, Qp as ProviderInstanceId, _d as ModelCapabilities, xd as ProviderOptionDescriptor } from "../shared.js";
1
+ import { Hm as ProviderInstanceId, Im as ProviderDriverKind, Wv as ModelSelection, Zd as ModelCapabilities, rf as ProviderOptionSelection, tf as ProviderOptionDescriptor } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/model.d.ts
3
3
  interface SelectableModelOption {
4
4
  slug: string;
@@ -1,2 +1,2 @@
1
- import { Go as parseOAuthScope, Ho as encodeOAuthScope, Uo as oauthScopeSetEquals, Vo as OAuthScopeEncodingError, Wo as parseAllowedOAuthScope } from "../shared.js";
1
+ import { Jo as OAuthScopeEncodingError, Qo as parseOAuthScope, Xo as oauthScopeSetEquals, Yo as encodeOAuthScope, Zo as parseAllowedOAuthScope } from "../shared.js";
2
2
  export { OAuthScopeEncodingError, encodeOAuthScope, oauthScopeSetEquals, parseAllowedOAuthScope, parseOAuthScope };
@@ -92,6 +92,13 @@ interface SerializableSpan {
92
92
  readonly events: ReadonlyArray<readonly [name: string, startTime: bigint, attributes: Record<string, unknown>]>;
93
93
  }
94
94
  declare function compactTraceAttributes(attributes: Readonly<Record<string, unknown>>): TraceAttributes;
95
+ /**
96
+ * Clamps oversized attribute values on the serialized trace record so the file
97
+ * sink stays small, including strings nested inside arrays and objects (e.g.
98
+ * error stacks). Returns a new record when anything was clamped; never
99
+ * mutates the input (the live span's attributes are shared with other tracers).
100
+ */
101
+ declare function truncateTraceAttributes(attributes: TraceAttributes): TraceAttributes;
95
102
  declare function spanToTraceRecord(span: SerializableSpan): EffectTraceRecord;
96
103
  declare const makeTraceSink: (options: TraceSinkOptions) => Effect.Effect<{
97
104
  filePath: string;
@@ -102,4 +109,4 @@ declare const makeTraceSink: (options: TraceSinkOptions) => Effect.Effect<{
102
109
  declare const makeLocalFileTracer: (options: LocalFileTracerOptions) => Effect.Effect<Tracer.Tracer, never, import("effect/Scope").Scope>;
103
110
  declare function decodeOtlpTraceRecords(payload: OtlpTracer.TraceData): ReadonlyArray<OtlpTraceRecord>;
104
111
  //#endregion
105
- export { EffectTraceRecord, LocalFileTracerOptions, OtlpTraceRecord, TraceAttributes, TraceRecord, TraceRecordEvent, TraceRecordLink, TraceSink, TraceSinkFlushStats, TraceSinkOptions, causeErrorTag, compactTraceAttributes, decodeOtlpTraceRecords, errorTag, makeLocalFileTracer, makeTraceSink, spanToTraceRecord };
112
+ export { EffectTraceRecord, LocalFileTracerOptions, OtlpTraceRecord, TraceAttributes, TraceRecord, TraceRecordEvent, TraceRecordLink, TraceSink, TraceSinkFlushStats, TraceSinkOptions, causeErrorTag, compactTraceAttributes, decodeOtlpTraceRecords, errorTag, makeLocalFileTracer, makeTraceSink, spanToTraceRecord, truncateTraceAttributes };
@@ -1,4 +1,4 @@
1
- import { $D as flatMap, BD as andThen, Bk as isSome, D as RotatingFileSink, JO as findErrorOption, OO as sync, RD as addFinalizer, RO as void_, Rk as getOrUndefined, TO as sleep, XO as pretty, YO as hasInterruptsOnly, dk as isSuccess, eO as fn, iO as forkScoped, mk as make, oO as ignore, pk as NativeSpan, rO as forever, zO as withTracerEnabled } from "../shared.js";
1
+ import { $A as make, D as RotatingFileSink, Dj as isSome, Lk as forever, MA as hasInterruptsOnly, Nk as flatMap, PA as pretty, Pk as fn, QA as NativeSpan, Tj as getOrUndefined, Vk as ignore, XA as isSuccess, bA as void_, gk as addFinalizer, jA as findErrorOption, sA as sleep, uA as sync, vk as andThen, xA as withTracerEnabled, zk as forkScoped } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/observability.ts
3
3
  const FLUSH_BUFFER_THRESHOLD = 256;
4
4
  const textEncoder = new TextEncoder();
@@ -68,6 +68,50 @@ function formatTraceExit(exit) {
68
68
  cause: pretty(exit.cause)
69
69
  };
70
70
  }
71
+ const TRACE_ATTRIBUTE_MAX_LENGTH = 500;
72
+ const TRACE_ATTRIBUTE_TRUNCATED_LENGTH = 200;
73
+ const TRACE_ATTRIBUTE_TRUNCATION_SUFFIX = "…[truncated]";
74
+ const ALWAYS_TRUNCATED_TRACE_ATTRIBUTES = /* @__PURE__ */ new Set(["db.query.text"]);
75
+ function truncateNestedValue(value) {
76
+ if (typeof value === "string") return value.length <= TRACE_ATTRIBUTE_MAX_LENGTH ? value : `${value.slice(0, TRACE_ATTRIBUTE_MAX_LENGTH)}${TRACE_ATTRIBUTE_TRUNCATION_SUFFIX}`;
77
+ if (Array.isArray(value)) {
78
+ const truncated = value.map(truncateNestedValue);
79
+ return truncated.some((entry, index) => entry !== value[index]) ? truncated : value;
80
+ }
81
+ if (isPlainObject(value)) {
82
+ let truncated;
83
+ for (const [key, entry] of Object.entries(value)) {
84
+ const next = truncateNestedValue(entry);
85
+ if (next === entry) continue;
86
+ truncated ??= { ...value };
87
+ truncated[key] = next;
88
+ }
89
+ return truncated ?? value;
90
+ }
91
+ return value;
92
+ }
93
+ /**
94
+ * Clamps oversized attribute values on the serialized trace record so the file
95
+ * sink stays small, including strings nested inside arrays and objects (e.g.
96
+ * error stacks). Returns a new record when anything was clamped; never
97
+ * mutates the input (the live span's attributes are shared with other tracers).
98
+ */
99
+ function truncateTraceAttributes(attributes) {
100
+ let truncated;
101
+ for (const [key, value] of Object.entries(attributes)) {
102
+ if (typeof value === "string" && ALWAYS_TRUNCATED_TRACE_ATTRIBUTES.has(key)) {
103
+ if (value.length <= TRACE_ATTRIBUTE_TRUNCATED_LENGTH) continue;
104
+ truncated ??= { ...attributes };
105
+ truncated[key] = `${value.slice(0, TRACE_ATTRIBUTE_TRUNCATED_LENGTH)}${TRACE_ATTRIBUTE_TRUNCATION_SUFFIX}`;
106
+ continue;
107
+ }
108
+ const next = truncateNestedValue(value);
109
+ if (next === value) continue;
110
+ truncated ??= { ...attributes };
111
+ truncated[key] = next;
112
+ }
113
+ return truncated ?? attributes;
114
+ }
71
115
  function spanToTraceRecord(span) {
72
116
  const status = span.status;
73
117
  const parentSpanId = getOrUndefined(span.parent)?.spanId;
@@ -82,16 +126,16 @@ function spanToTraceRecord(span) {
82
126
  startTimeUnixNano: String(status.startTime),
83
127
  endTimeUnixNano: String(status.endTime),
84
128
  durationMs: Number(status.endTime - status.startTime) / 1e6,
85
- attributes: compactTraceAttributes(Object.fromEntries(span.attributes)),
129
+ attributes: truncateTraceAttributes(compactTraceAttributes(Object.fromEntries(span.attributes))),
86
130
  events: span.events.map(([name, startTime, attributes]) => ({
87
131
  name,
88
132
  timeUnixNano: String(startTime),
89
- attributes: compactTraceAttributes(attributes)
133
+ attributes: truncateTraceAttributes(compactTraceAttributes(attributes))
90
134
  })),
91
135
  links: span.links.map((link) => ({
92
136
  traceId: link.span.traceId,
93
137
  spanId: link.span.spanId,
94
- attributes: compactTraceAttributes(link.attributes)
138
+ attributes: truncateTraceAttributes(compactTraceAttributes(link.attributes))
95
139
  })),
96
140
  exit: formatTraceExit(status.exit)
97
141
  };
@@ -343,4 +387,4 @@ function parseBigInt(input) {
343
387
  }
344
388
  }
345
389
  //#endregion
346
- export { causeErrorTag, compactTraceAttributes, decodeOtlpTraceRecords, errorTag, makeLocalFileTracer, makeTraceSink, spanToTraceRecord };
390
+ export { causeErrorTag, compactTraceAttributes, decodeOtlpTraceRecords, errorTag, makeLocalFileTracer, makeTraceSink, spanToTraceRecord, truncateTraceAttributes };
@@ -1,2 +1,2 @@
1
- import { an as isUncPath, cn as normalizeProjectPathForComparison, in as isExplicitRelativePath, ln as normalizeProjectPathForDispatch, on as isWindowsAbsolutePath, sn as isWindowsDrivePath } from "../shared.js";
1
+ import { an as isExplicitRelativePath, cn as isWindowsDrivePath, ln as normalizeProjectPathForComparison, on as isUncPath, sn as isWindowsAbsolutePath, un as normalizeProjectPathForDispatch } from "../shared.js";
2
2
  export { isExplicitRelativePath, isUncPath, isWindowsAbsolutePath, isWindowsDrivePath, normalizeProjectPathForComparison, normalizeProjectPathForDispatch };
@@ -1,4 +1,4 @@
1
- import { GT as Defect, JT as Literals, QT as String, ZT as Number, cE as is, eE as TaggedErrorClass, uE as optional } from "../shared.js";
1
+ import { AD as TaggedErrorClass, DD as Number, OD as String, VD as optional, wD as Literals, xD as Defect, zD as is } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/preview.ts
3
3
  /**
4
4
  * Pure URL helpers shared between the preview server, desktop main process,
@@ -1,4 +1,4 @@
1
- import { Gy as PreviewAutomationResizeInput, Nb as PreviewViewportPresetId, Pb as PreviewViewportSetting } from "../shared.js";
1
+ import { bx as PreviewAutomationResizeInput, cS as PreviewViewportPresetId, lS as PreviewViewportSetting } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/previewViewport.d.ts
3
3
  interface PreviewViewportPreset {
4
4
  readonly id: PreviewViewportPresetId;
@@ -1,4 +1,4 @@
1
- import { J_ as PREVIEW_VIEWPORT_PRESET_IDS } from "../shared.js";
1
+ import { oy as PREVIEW_VIEWPORT_PRESET_IDS } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/previewViewport.ts
3
3
  const PREVIEW_VIEWPORT_PRESET_DEFINITIONS = {
4
4
  "iphone-se": {
@@ -1,5 +1,6 @@
1
1
  //#region upstream-t3code/packages/shared/src/projectFavicon.d.ts
2
2
  declare const PROJECT_FAVICON_FALLBACK_MARKER = "project-favicon-missing";
3
+ declare function getProjectFaviconCacheKey(environmentId: string, workspaceRoot: string, url: string): string;
3
4
  declare function isProjectFaviconFallbackUrl(url: string | null | undefined): boolean;
4
5
  //#endregion
5
- export { PROJECT_FAVICON_FALLBACK_MARKER, isProjectFaviconFallbackUrl };
6
+ export { PROJECT_FAVICON_FALLBACK_MARKER, getProjectFaviconCacheKey, isProjectFaviconFallbackUrl };
@@ -1,5 +1,17 @@
1
1
  //#region upstream-t3code/packages/shared/src/projectFavicon.ts
2
2
  const PROJECT_FAVICON_FALLBACK_MARKER = "project-favicon-missing";
3
+ function getProjectFaviconCacheKey(environmentId, workspaceRoot, url) {
4
+ let revision = url;
5
+ try {
6
+ const pathname = new URL(url, "https://t3.invalid").pathname;
7
+ revision = pathname.slice(pathname.lastIndexOf("/") + 1);
8
+ } catch {}
9
+ return JSON.stringify([
10
+ environmentId,
11
+ workspaceRoot,
12
+ revision
13
+ ]);
14
+ }
3
15
  function isProjectFaviconFallbackUrl(url) {
4
16
  if (!url) return false;
5
17
  try {
@@ -10,4 +22,4 @@ function isProjectFaviconFallbackUrl(url) {
10
22
  }
11
23
  }
12
24
  //#endregion
13
- export { PROJECT_FAVICON_FALLBACK_MARKER, isProjectFaviconFallbackUrl };
25
+ export { PROJECT_FAVICON_FALLBACK_MARKER, getProjectFaviconCacheKey, isProjectFaviconFallbackUrl };
@@ -1,4 +1,4 @@
1
- import { Ev as ProjectScript } from "../shared.js";
1
+ import { Zy as ProjectScript } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/projectScripts.d.ts
3
3
  interface ProjectScriptRuntimeEnvInput {
4
4
  project: {
@@ -1,4 +1,4 @@
1
- import { GT as Defect, JT as Literals, QT as String, eE as TaggedErrorClass, uE as optional } from "../shared.js";
1
+ import { AD as TaggedErrorClass, OD as String, VD as optional, wD as Literals, xD as Defect } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/relayAuth.ts
3
3
  const ClerkPublishableKeyPrefix = Literals([
4
4
  "pk_test",
@@ -1,4 +1,4 @@
1
- import { zC as RelayClientInstallProgressEvent } from "../shared.js";
1
+ import { ST as RelayClientInstallProgressEvent } from "../shared.js";
2
2
  import * as Context from "effect/Context";
3
3
  import * as Effect from "effect/Effect";
4
4
  import * as Layer from "effect/Layer";
@@ -1,4 +1,4 @@
1
- import { $D as flatMap$1, BT as string, Bk as isSome, CO as scoped, DO as suspend, EO as succeed, GO as currentTimeMillis, HC as get, HD as as, IC as HttpClient, KO as TaggedError, LT as all, Mk as flatMap, OE as FileSystem, QD as fail, QO as effect, RO as void_, RT as map, Rk as getOrUndefined, TE as Path, TO as sleep, Uk as none, VC as filterStatusOk, Wk as some, YD as catch_, ZD as ensuring, aO as gen, bE as ChildProcessSpawner, dO as mapError, eO as fn, gO as orDie, hO as option$1, jD as encodeHex, kk as Service, mD as make, oO as ignore, pE as Crypto, qD as catchTag, vE as make$1, w as HostProcessPlatform, y as HostProcessArchitecture, zT as option, zk as isNone } from "../shared.js";
1
+ import { Aj as none, Bk as gen, DA as currentTimeMillis, Dj as isSome, Dk as catch_, Ej as isNone, GD as Crypto, IA as effect, Kk as mapError, Nk as flatMap$1, Pk as fn, QD as ChildProcessSpawner, Qk as orDie, Tj as getOrUndefined, Tk as catchTag, Vk as ignore, XD as make$1, Zk as option$1, _T as get, aA as scoped, bA as void_, bk as as, cA as succeed, cO as encodeHex, dT as HttpClient, ek as make, fD as all, fO as Path, gT as filterStatusOk, hD as string, hj as Service, jj as some, jk as fail, kA as TaggedError, kk as ensuring, lA as suspend, mD as option, mO as FileSystem, pD as map, sA as sleep, vj as flatMap, w as HostProcessPlatform, y as HostProcessArchitecture } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/relayClient.ts
3
3
  const CLOUDFLARED_VERSION = "2026.5.2";
4
4
  const CLOUDFLARED_PATH_ENV_NAME = "T3CODE_CLOUDFLARED_PATH";
@@ -1,2 +1,2 @@
1
- import { $a as RELAY_HEALTH_REQUEST_TYP, Qa as RELAY_ACTIVITY_PUBLISH_TYP, ao as decodeRelayJwt, co as verifyRelayJwt, eo as RELAY_HEALTH_RESPONSE_TYP, io as RelayJwtError, no as RELAY_MINT_REQUEST_TYP, oo as normalizeRelayIssuer, ro as RELAY_MINT_RESPONSE_TYP, so as signRelayJwt, to as RELAY_LINK_PROOF_TYP } from "../shared.js";
1
+ import { ao as RELAY_ACTIVITY_PUBLISH_TYP, co as RELAY_LINK_PROOF_TYP, do as RelayJwtError, fo as decodeRelayJwt, ho as verifyRelayJwt, lo as RELAY_MINT_REQUEST_TYP, mo as signRelayJwt, oo as RELAY_HEALTH_REQUEST_TYP, po as normalizeRelayIssuer, so as RELAY_HEALTH_RESPONSE_TYP, uo as RELAY_MINT_RESPONSE_TYP } from "../shared.js";
2
2
  export { RELAY_ACTIVITY_PUBLISH_TYP, RELAY_HEALTH_REQUEST_TYP, RELAY_HEALTH_RESPONSE_TYP, RELAY_LINK_PROOF_TYP, RELAY_MINT_REQUEST_TYP, RELAY_MINT_RESPONSE_TYP, RelayJwtError, decodeRelayJwt, normalizeRelayIssuer, signRelayJwt, verifyRelayJwt };
@@ -1,2 +1,2 @@
1
- import { Jo as withRelayClientTracing, Ko as RelayClientTracer, qo as makeRelayClientTracingLayer } from "../shared.js";
1
+ import { $o as RelayClientTracer, es as makeRelayClientTracingLayer, ts as withRelayClientTracing } from "../shared.js";
2
2
  export { RelayClientTracer, makeRelayClientTracingLayer, withRelayClientTracing };
@@ -1,2 +1,2 @@
1
- import { Xa as isSecureRelayUrl, Za as normalizeSecureRelayUrl } from "../shared.js";
1
+ import { io as normalizeSecureRelayUrl, ro as isSecureRelayUrl } from "../shared.js";
2
2
  export { isSecureRelayUrl, normalizeSecureRelayUrl };
@@ -1,2 +1,2 @@
1
- import { Ca as readHostedPairingRequest, Ea as stripPairingTokenFromUrl, Sa as readHashParams, Ta as setPairingTokenOnUrl, _a as RemotePairingCodeMissingError, ba as RemotePairingUrlInvalidError, ga as RemoteBackendUrlMissingError, ha as RemoteBackendUrlInvalidError, va as RemotePairingTargetError, wa as resolveRemotePairingTarget, xa as getPairingTokenFromUrl, ya as RemotePairingTokenMissingError } from "../shared.js";
1
+ import { Aa as resolveRemotePairingTarget, Ca as RemotePairingCodeMissingError, Da as getPairingTokenFromUrl, Ea as RemotePairingUrlInvalidError, Ma as stripPairingTokenFromUrl, Oa as readHashParams, Sa as RemoteBackendUrlMissingError, Ta as RemotePairingTokenMissingError, ja as setPairingTokenOnUrl, ka as readHostedPairingRequest, wa as RemotePairingTargetError, xa as RemoteBackendUrlInvalidError } from "../shared.js";
2
2
  export { RemoteBackendUrlInvalidError, RemoteBackendUrlMissingError, RemotePairingCodeMissingError, RemotePairingTargetError, RemotePairingTokenMissingError, RemotePairingUrlInvalidError, getPairingTokenFromUrl, readHashParams, readHostedPairingRequest, resolveRemotePairingTarget, setPairingTokenOnUrl, stripPairingTokenFromUrl };
@@ -1,5 +1,5 @@
1
1
  import { a as __toESM } from "../rolldown-runtime.js";
2
- import { DD as transformOrFail, ED as Transformation, PD as InvalidValue, PO as try_, QT as String, Uk as none, jT as require_dist, rE as decodeTo } from "../shared.js";
2
+ import { OD as String, PD as decodeTo, dO as InvalidValue, gA as try_, iO as transformOrFail, oD as require_dist, rO as Transformation } from "../shared.js";
3
3
  //#region upstream-t3code/packages/shared/src/schemaYaml.ts
4
4
  var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
5
5
  function formatYamlParseError(error) {
@@ -34,7 +34,7 @@ function formatYamlParseError(error) {
34
34
  function parseYaml(options) {
35
35
  return transformOrFail((input) => try_({
36
36
  try: () => (0, import_dist.parse)(input, options),
37
- catch: (error) => new InvalidValue(none(), { message: formatYamlParseError(error) })
37
+ catch: (error) => new InvalidValue({ message: formatYamlParseError(error) })
38
38
  }));
39
39
  }
40
40
  /**
@@ -63,7 +63,7 @@ function parseYaml(options) {
63
63
  function stringifyYaml(options) {
64
64
  return transformOrFail((input) => try_({
65
65
  try: () => (0, import_dist.stringify)(input, options),
66
- catch: () => new InvalidValue(none(), { message: "Failed to stringify YAML." })
66
+ catch: () => new InvalidValue({ message: "Failed to stringify YAML." })
67
67
  }));
68
68
  }
69
69
  /**
@@ -7,7 +7,7 @@ function normalizeSemverVersion(version) {
7
7
  const trimmed = segment.trim();
8
8
  if (trimmed.length > 0) segments.push(trimmed);
9
9
  }
10
- if (segments.length === 2) segments.push("0");
10
+ while (segments.length > 0 && segments.length < 3) segments.push("0");
11
11
  return prerelease ? `${segments.join(".")}-${prerelease}` : segments.join(".");
12
12
  }
13
13
  function parseSemver(value) {
@@ -1,4 +1,4 @@
1
- import { A_ as ModelSelection, i_ as ServerSettings, ou as ServerProvider, s_ as ServerSettingsPatch } from "../shared.js";
1
+ import { Iu as ServerProvider, Wv as ModelSelection, vv as ServerSettings, xv as ServerSettingsPatch } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/serverSettings.d.ts
3
3
  declare function isModelSelectionProviderEnabled(settings: ServerSettings, selection: ModelSelection): boolean;
4
4
  declare function resolveSourceControlWriterModelSelection(settings: ServerSettings, providers?: ReadonlyArray<ServerProvider>): ModelSelection;
@@ -1,4 +1,4 @@
1
- import { Bk as isSome, N as createModelSelection, US as isProviderDriverKind, Yp as ServerSettings, aE as decodeUnknownOption, c as resolveBackgroundActivitySettings, g as fromLenientJson, i as getBackgroundActivityBaseProfile, mp as isProviderAvailable, o as normalizeBackgroundActivitySettings, s as normalizeServerBackgroundActivitySettings, u as deepMerge } from "../shared.js";
1
+ import { $p as isProviderAvailable, Dj as isSome, ID as decodeUnknownOption, N as createModelSelection, Xm as ServerSettings, c as resolveBackgroundActivitySettings, g as fromLenientJson, i as getBackgroundActivityBaseProfile, o as normalizeBackgroundActivitySettings, s as normalizeServerBackgroundActivitySettings, u as deepMerge, vw as isProviderDriverKind } from "../shared.js";
2
2
  const decodeServerSettingsJson = decodeUnknownOption(fromLenientJson(ServerSettings));
3
3
  const getLegacyProviderSettings = (settings, provider) => settings.providers[provider];
4
4
  function isModelSelectionProviderEnabled(settings, selection) {
@@ -42,10 +42,15 @@ declare const CommandAvailability: Context.Reference<CommandAvailabilityChecker>
42
42
  declare function readEnvironmentFromWindowsShell(names: ReadonlyArray<string>, execFile?: ExecFileSyncLike): Partial<Record<string, string>>;
43
43
  declare function readEnvironmentFromWindowsShell(names: ReadonlyArray<string>, options?: WindowsEnvironmentProbeOptions, execFile?: ExecFileSyncLike): Partial<Record<string, string>>;
44
44
  declare function mergePathValues(preferredPath: string | undefined, inheritedPath: string | undefined, platform: NodeJS.Platform): string | undefined;
45
+ interface CommandResolutionCacheEntry {
46
+ readonly resolvedPath: string | null;
47
+ readonly expiresAtNanos: bigint;
48
+ }
49
+ declare const CommandResolutionCache: Context.Reference<Map<string, CommandResolutionCacheEntry>>;
45
50
  declare const resolveCommandPath: (command: string, options?: CommandAvailabilityOptions | undefined) => Effect.Effect<string, CommandResolutionError, FileSystem.FileSystem | Path.Path>;
46
51
  declare const resolveSpawnCommand: (command: string, args: readonly string[], options?: CommandAvailabilityOptions | undefined) => Effect.Effect<ResolvedSpawnCommand, never, never>;
47
52
  declare const isCommandAvailable: (command: string, options?: CommandAvailabilityOptions | undefined) => Effect.Effect<boolean, never, FileSystem.FileSystem | Path.Path>;
48
53
  declare function resolveKnownWindowsCliDirs(env: NodeJS.ProcessEnv): ReadonlyArray<string>;
49
54
  declare const resolveWindowsEnvironment: (env: NodeJS.ProcessEnv) => Effect.Effect<Partial<NodeJS.ProcessEnv>, never, FileSystem.FileSystem | Path.Path>;
50
55
  //#endregion
51
- export { CommandAvailability, CommandAvailabilityChecker, CommandAvailabilityOptions, CommandResolutionError, ResolvedSpawnCommand, ShellEnvironmentReader, SpawnExecutableResolution, SpawnExecutableResolver, WindowsEnvironmentProbeOptions, WindowsShellEnvironment, WindowsShellEnvironmentReader, extractPathFromShellOutput, isCommandAvailable, listLoginShellCandidates, mergePathEntries, mergePathValues, readEnvironmentFromLoginShell, readEnvironmentFromWindowsShell, readPathFromLaunchctl, readPathFromLoginShell, resolveCommandPath, resolveKnownWindowsCliDirs, resolveSpawnCommand, resolveWindowsEnvironment };
56
+ export { CommandAvailability, CommandAvailabilityChecker, CommandAvailabilityOptions, CommandResolutionCache, CommandResolutionError, ResolvedSpawnCommand, ShellEnvironmentReader, SpawnExecutableResolution, SpawnExecutableResolver, WindowsEnvironmentProbeOptions, WindowsShellEnvironment, WindowsShellEnvironmentReader, extractPathFromShellOutput, isCommandAvailable, listLoginShellCandidates, mergePathEntries, mergePathValues, readEnvironmentFromLoginShell, readEnvironmentFromWindowsShell, readPathFromLaunchctl, readPathFromLoginShell, resolveCommandPath, resolveKnownWindowsCliDirs, resolveSpawnCommand, resolveWindowsEnvironment };
@@ -1,4 +1,4 @@
1
- import { EO as succeed, HD as as, KO as TaggedError, OE as FileSystem, Ok as Reference, TE as Path, _O as orElseSucceed, eO as fn, qD as catchTag, w as HostProcessPlatform, x as HostProcessEnvironment } from "../shared.js";
1
+ import { $k as orElseSucceed, OA as currentTimeNanos, Pk as fn, Tk as catchTag, bk as as, cA as succeed, fO as Path, kA as TaggedError, mO as FileSystem, mj as Reference, w as HostProcessPlatform, x as HostProcessEnvironment } from "../shared.js";
2
2
  import * as NodeOS from "node:os";
3
3
  import * as NodeChildProcess from "node:child_process";
4
4
  import * as NodeFS from "node:fs";
@@ -278,6 +278,20 @@ function resolveCommandCandidates(command, platform, windowsPathExtensions, extn
278
278
  }
279
279
  return Array.from(new Set(candidates));
280
280
  }
281
+ const COMMAND_RESOLUTION_CACHE_TTL_NANOS = 30000000000n;
282
+ const COMMAND_RESOLUTION_CACHE_MAX_ENTRIES = 512;
283
+ const COMMAND_RESOLUTION_CACHE_KEY_SEPARATOR = String.fromCharCode(0);
284
+ const CommandResolutionCache = Reference("@t3tools/shared/shell/CommandResolutionCache", { defaultValue: () => /* @__PURE__ */ new Map() });
285
+ function cacheCommandResolution(cache, cacheKey, resolvedPath, nowNanos) {
286
+ if (cache.size >= COMMAND_RESOLUTION_CACHE_MAX_ENTRIES) {
287
+ const oldestKey = cache.keys().next().value;
288
+ if (oldestKey !== void 0) cache.delete(oldestKey);
289
+ }
290
+ cache.set(cacheKey, {
291
+ resolvedPath,
292
+ expiresAtNanos: nowNanos + COMMAND_RESOLUTION_CACHE_TTL_NANOS
293
+ });
294
+ }
281
295
  const isExecutableFile = fn("shell.isExecutableFile")(function* (filePath, platform, windowsPathExtensions) {
282
296
  const fileSystem = yield* FileSystem;
283
297
  const path = yield* Path;
@@ -308,6 +322,22 @@ const resolveCommandPathForPlatform = fn("shell.resolveCommandPathForPlatform")(
308
322
  command,
309
323
  reason: "not-found"
310
324
  });
325
+ const cacheKey = [
326
+ platform,
327
+ pathValue,
328
+ windowsPathExtensions.join(";"),
329
+ command
330
+ ].join(COMMAND_RESOLUTION_CACHE_KEY_SEPARATOR);
331
+ const cache = yield* CommandResolutionCache;
332
+ const nowNanos = yield* currentTimeNanos;
333
+ const cached = cache.get(cacheKey);
334
+ if (cached !== void 0 && cached.expiresAtNanos > nowNanos) {
335
+ if (cached.resolvedPath === null) return yield* new CommandResolutionError({
336
+ command,
337
+ reason: "not-found"
338
+ });
339
+ return cached.resolvedPath;
340
+ }
311
341
  const pathEntries = [];
312
342
  for (const entry of pathValue.split(pathDelimiterForPlatform(platform))) {
313
343
  const pathEntry = stripWrappingQuotes(entry.trim());
@@ -315,8 +345,12 @@ const resolveCommandPathForPlatform = fn("shell.resolveCommandPathForPlatform")(
315
345
  }
316
346
  for (const pathEntry of pathEntries) for (const candidate of commandCandidates) {
317
347
  const candidatePath = path.join(pathEntry, candidate);
318
- if (yield* isExecutableFile(candidatePath, platform, windowsPathExtensions)) return candidatePath;
348
+ if (yield* isExecutableFile(candidatePath, platform, windowsPathExtensions)) {
349
+ cacheCommandResolution(cache, cacheKey, candidatePath, nowNanos);
350
+ return candidatePath;
351
+ }
319
352
  }
353
+ cacheCommandResolution(cache, cacheKey, null, nowNanos);
320
354
  return yield* new CommandResolutionError({
321
355
  command,
322
356
  reason: "not-found"
@@ -364,7 +398,11 @@ function resolveKnownWindowsCliDirs(env) {
364
398
  ...appData ? [`${appData}\\npm`] : [],
365
399
  ...localAppData ? [`${localAppData}\\Programs\\nodejs`, `${localAppData}\\Volta\\bin`] : [],
366
400
  ...localAppData ? [`${localAppData}\\pnpm`] : [],
367
- ...userProfile ? [`${userProfile}\\.bun\\bin`, `${userProfile}\\scoop\\shims`] : []
401
+ ...userProfile ? [
402
+ `${userProfile}\\.local\\bin`,
403
+ `${userProfile}\\.bun\\bin`,
404
+ `${userProfile}\\scoop\\shims`
405
+ ] : []
368
406
  ];
369
407
  }
370
408
  function readWindowsEnvironmentSafely(readEnvironment, names, options) {
@@ -405,4 +443,4 @@ const resolveWindowsEnvironment = fn("shell.resolveWindowsEnvironment")(function
405
443
  } : baselinePatch;
406
444
  });
407
445
  //#endregion
408
- export { CommandAvailability, CommandResolutionError, SpawnExecutableResolution, WindowsShellEnvironment, extractPathFromShellOutput, isCommandAvailable, listLoginShellCandidates, mergePathEntries, mergePathValues, readEnvironmentFromLoginShell, readEnvironmentFromWindowsShell, readPathFromLaunchctl, readPathFromLoginShell, resolveCommandPath, resolveKnownWindowsCliDirs, resolveSpawnCommand, resolveWindowsEnvironment };
446
+ export { CommandAvailability, CommandResolutionCache, CommandResolutionError, SpawnExecutableResolution, WindowsShellEnvironment, extractPathFromShellOutput, isCommandAvailable, listLoginShellCandidates, mergePathEntries, mergePathValues, readEnvironmentFromLoginShell, readEnvironmentFromWindowsShell, readPathFromLaunchctl, readPathFromLoginShell, resolveCommandPath, resolveKnownWindowsCliDirs, resolveSpawnCommand, resolveWindowsEnvironment };
@@ -1,4 +1,4 @@
1
- import { _C as SourceControlProviderKind, gC as SourceControlProviderInfo } from "../shared.js";
1
+ import { $w as SourceControlProviderInfo, eT as SourceControlProviderKind } from "../shared.js";
2
2
  //#region upstream-t3code/packages/shared/src/sourceControl.d.ts
3
3
  interface ChangeRequestPresentation {
4
4
  readonly icon: "github" | "gitlab" | "azure-devops" | "bitbucket" | "change-request";