@devries-cameron20 / t3code-1 / commits / dbfd517313
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

refactor(client-runtime): remove unused runtime exports and helpers (#10167)

Julius Marminge committed Sep 5, 2026 at 15:54 UTC dbfd5173131deb1a7ad2a9438b8941ade43f9a89
40 files changed +42 -208
apps/web/src/components/Sidebar.logic.ts
+1 -5
@@ -600,11 +600,7 @@ export function sortThreadsForSidebar<
600
601 // Pinned-reorder key math and the keyed sort live in client-runtime
602 // (state/thread-sort) so web and mobile compute identical pinned orders.
603 -export {
604 - generateSpreadPinOrderKeys,
605 - pinOrderKeyBetween,
606 - planPinnedReorder,
607 -} from "@t3tools/client-runtime/state/thread-sort";
603 +export { pinOrderKeyBetween, planPinnedReorder } from "@t3tools/client-runtime/state/thread-sort";
604 export { sortPinnedThreadsByOrderKey as sortPinnedThreadsForSidebar } from "@t3tools/client-runtime/state/thread-sort";
605
606 /**
apps/web/src/components/chat/MessagesTimeline.logic.ts
-1
@@ -16,7 +16,6 @@ export {
16 normalizeCompactToolLabel,
17 summarizeToolGroup,
18 toolGroupAction,
19 - workLogEntryIsLocalCodeSearch,
19 } from "@t3tools/client-runtime/work-log/presentation";
20 import {
21 formatDuration,
apps/web/src/logicalProject.ts
-1
@@ -1,7 +1,6 @@
1 export {
2 buildProjectGroups,
3 deriveLogicalProjectKey,
4 - deriveLogicalProjectKeyFromRef,
4 deriveLogicalProjectKeyFromSettings,
5 derivePhysicalProjectKey,
6 derivePhysicalProjectKeyFromPath,
packages/client-runtime/src/authorization/index.ts
-1
@@ -2,6 +2,5 @@ export * from "./remote.ts";
2 export {
3 type AuthorizedRemoteEnvironment,
4 type AuthorizedRemoteHttpEnvironment,
5 - RemoteEnvironmentAuthorization,
5 } from "./service.ts";
6 export * as TokenStore from "./tokenStore.ts";
packages/client-runtime/src/authorization/remote.ts
-1
@@ -16,7 +16,6 @@ import {
16 } from "../rpc/http.ts";
17
18 export {
19 - RemoteEnvironmentAuthFetchError,
19 RemoteEnvironmentAuthInvalidJsonError,
20 RemoteEnvironmentAuthTimeoutError,
21 RemoteEnvironmentAuthUndeclaredStatusError,
packages/client-runtime/src/codexArtifactTemplates.ts
+3 -3
@@ -1,4 +1,4 @@
1 -export const CODEX_ARTIFACT_TEMPLATE_KINDS = [
1 +const CODEX_ARTIFACT_TEMPLATE_KINDS = [
2 "document",
3 "presentation",
4 "spreadsheet",
@@ -13,7 +13,7 @@ export const CODEX_ARTIFACT_TEMPLATE_KINDS = [
13
14 export type CodexArtifactTemplateKind = (typeof CODEX_ARTIFACT_TEMPLATE_KINDS)[number];
15
16 -export const CODEX_ARTIFACT_TEMPLATE_GALLERY_KINDS = ["imagegen", "product-design"] as const;
16 +const CODEX_ARTIFACT_TEMPLATE_GALLERY_KINDS = ["imagegen", "product-design"] as const;
17
18 export type CodexArtifactTemplateGalleryKind =
19 (typeof CODEX_ARTIFACT_TEMPLATE_GALLERY_KINDS)[number];
@@ -26,7 +26,7 @@ export interface CodexArtifactTemplate {
26 readonly skillName: string;
27 }
28
29 -export const CODEX_ARTIFACT_TEMPLATE_LABEL_BY_KIND = {
29 +const CODEX_ARTIFACT_TEMPLATE_LABEL_BY_KIND = {
30 document: "Document template",
31 presentation: "Presentation template",
32 spreadsheet: "Spreadsheet template",
packages/client-runtime/src/connection/connectivity.ts
+1 -1
@@ -13,7 +13,7 @@ export class Connectivity extends Context.Service<
13 }
14 >()("@t3tools/client-runtime/connection/connectivity") {}
15
16 -export const make = (service: Connectivity["Service"]) => Connectivity.of(service);
16 +const make = (service: Connectivity["Service"]) => Connectivity.of(service);
17
18 export const layer = (service: Connectivity["Service"]) =>
19 Layer.succeed(Connectivity, make(service));
packages/client-runtime/src/connection/credentialStore.ts
-4
@@ -1,6 +1,5 @@
1 import * as Context from "effect/Context";
2 import type * as Effect from "effect/Effect";
3 -import * as Layer from "effect/Layer";
3 import type * as Option from "effect/Option";
4
5 import type { ConnectionCredential } from "./catalog.ts";
@@ -22,6 +21,3 @@ export class ConnectionCredentialStore extends Context.Service<
21
22 export const make = (service: ConnectionCredentialStore["Service"]) =>
23 ConnectionCredentialStore.of(service);
25 -
26 -export const layer = (service: ConnectionCredentialStore["Service"]) =>
27 - Layer.succeed(ConnectionCredentialStore, make(service));
packages/client-runtime/src/connection/driver.ts
+1
@@ -36,6 +36,7 @@ export class ConnectionDriver extends Context.Service<
36 }
37 >()("@t3tools/client-runtime/connection/driver/ConnectionDriver") {}
38
39 +/** @public Service construction is part of the canonical Effect module API. */
40 export const make = Effect.gen(function* () {
41 const resolver = yield* ConnectionResolver.ConnectionResolver;
42 const sessions = yield* RpcSession.RpcSessionFactory;
packages/client-runtime/src/connection/index.ts
+1 -12
@@ -1,11 +1,7 @@
1 export * from "./catalog.ts";
2 export * as Connectivity from "./connectivity.ts";
3 export * as CredentialStore from "./credentialStore.ts";
4 -export {
5 - ConnectionDriver,
6 - type ConnectionDriverProgress,
7 - type EnvironmentConnectionLease,
8 -} from "./driver.ts";
4 +export { type ConnectionDriverProgress, type EnvironmentConnectionLease } from "./driver.ts";
5 export * from "./errors.ts";
6 export * as Connection from "./layer.ts";
7 export * from "./model.ts";
@@ -14,12 +10,6 @@ export {
10 ConnectionOnboarding,
11 type PairingConnectionInput,
12 type SshConnectionInput,
17 - prepareBearerConnectionUpdate,
18 - preparePairingRegistration,
19 - prepareSshRegistration,
20 - registerPairingConnection,
21 - registerSshConnection,
22 - updateBearerConnection,
13 } from "./onboarding.ts";
14 export * from "./presentation.ts";
15 export * as ProfileStore from "./profileStore.ts";
@@ -28,6 +18,5 @@ export {
18 EnvironmentRegistry,
19 PlatformEnvironmentRemovalError,
20 } from "./registry.ts";
31 -export { ConnectionResolver } from "./resolver.ts";
21 export { EnvironmentSupervisor, type EnvironmentSupervisorOptions } from "./supervisor.ts";
22 export * as Wakeups from "./wakeups.ts";
packages/client-runtime/src/connection/onboarding.ts
+4 -3
@@ -118,7 +118,7 @@ export const preparePairingRegistration = Effect.fn(
118 });
119 });
120
121 -export const registerPairingConnection = Effect.fn(
121 +const registerPairingConnection = Effect.fn(
122 "clientRuntime.connection.onboarding.registerPairingConnection",
123 )(function* (input: PairingConnectionInput) {
124 const registration = yield* preparePairingRegistration(input);
@@ -130,7 +130,7 @@ export const registerPairingConnection = Effect.fn(
130 const isBearerCredential = Schema.is(BearerConnectionCredential);
131 const isBearerProfile = Schema.is(BearerConnectionProfile);
132
133 -export const updateBearerConnection = Effect.fn(
133 +const updateBearerConnection = Effect.fn(
134 "clientRuntime.connection.onboarding.updateBearerConnection",
135 )(function* (input: BearerConnectionUpdateInput) {
136 const registry = yield* EnvironmentRegistry.EnvironmentRegistry;
@@ -233,7 +233,7 @@ export const prepareSshRegistration = Effect.fn(
233 });
234 });
235
236 -export const registerSshConnection = Effect.fn(
236 +const registerSshConnection = Effect.fn(
237 "clientRuntime.connection.onboarding.registerSshConnection",
238 )(function* (input: SshConnectionInput) {
239 const registration = yield* prepareSshRegistration(input);
@@ -242,6 +242,7 @@ export const registerSshConnection = Effect.fn(
242 return registration.target.environmentId;
243 });
244
245 +/** @public Service construction is part of the canonical Effect module API. */
246 export const make = Effect.gen(function* () {
247 const registry = yield* EnvironmentRegistry.EnvironmentRegistry;
248 const presentation = yield* ClientCapabilities.ClientPresentation;
packages/client-runtime/src/connection/profileStore.ts
-4
@@ -1,6 +1,5 @@
1 import * as Context from "effect/Context";
2 import type * as Effect from "effect/Effect";
3 -import * as Layer from "effect/Layer";
3 import type * as Option from "effect/Option";
4
5 import type { ConnectionProfile } from "./catalog.ts";
@@ -19,6 +18,3 @@ export class ConnectionProfileStore extends Context.Service<
18
19 export const make = (service: ConnectionProfileStore["Service"]) =>
20 ConnectionProfileStore.of(service);
22 -
23 -export const layer = (service: ConnectionProfileStore["Service"]) =>
24 - Layer.succeed(ConnectionProfileStore, make(service));
packages/client-runtime/src/connection/registry.ts
+1
@@ -125,6 +125,7 @@ interface EnvironmentServiceScope {
125 readonly scope: Scope.Closeable;
126 }
127
128 +/** @public Service construction is part of the canonical Effect module API. */
129 export const make = Effect.gen(function* () {
130 const registryScope = yield* Scope.Scope;
131 const storage = yield* Persistence.ConnectionTargetStore;
packages/client-runtime/src/connection/resolver.ts
+1
@@ -218,6 +218,7 @@ const makeSshBroker = Effect.fn("clientRuntime.connection.broker.makeSsh")(funct
218 });
219 });
220
221 +/** @public Service construction is part of the canonical Effect module API. */
222 export const make = Effect.gen(function* () {
223 const primary = yield* makePrimaryBroker();
224 const bearer = yield* makeBearerBroker();
packages/client-runtime/src/connection/supervisor.ts
-12
@@ -5,7 +5,6 @@ import * as Context from "effect/Context";
5 import * as Effect from "effect/Effect";
6 import * as Exit from "effect/Exit";
7 import * as Fiber from "effect/Fiber";
8 -import * as Layer from "effect/Layer";
8 import * as Option from "effect/Option";
9 import * as Queue from "effect/Queue";
10 import * as Ref from "effect/Ref";
@@ -798,14 +797,3 @@ export const make = Effect.fn("EnvironmentSupervisor.make")(function* (
797 retryNow,
798 });
799 });
801 -
802 -export const layer = (
803 - entry: ConnectionCatalogEntry,
804 - options?: EnvironmentSupervisorOptions,
805 -): Layer.Layer<
806 - EnvironmentSupervisor,
807 - never,
808 - | Connectivity.Connectivity
809 - | ConnectionDriver.ConnectionDriver
810 - | ConnectionWakeups.ConnectionWakeups
811 -> => Layer.effect(EnvironmentSupervisor, make(entry, options));
packages/client-runtime/src/connection/wakeups.ts
+1 -1
@@ -27,7 +27,7 @@ export class ConnectionWakeups extends Context.Service<
27 }
28 >()("@t3tools/client-runtime/connection/wakeups/ConnectionWakeups") {}
29
30 -export const make = (service: ConnectionWakeups["Service"]) => ConnectionWakeups.of(service);
30 +const make = (service: ConnectionWakeups["Service"]) => ConnectionWakeups.of(service);
31
32 export const layer = (service: ConnectionWakeups["Service"]) =>
33 Layer.succeed(ConnectionWakeups, make(service));
packages/client-runtime/src/relay/discovery.ts
+1
@@ -102,6 +102,7 @@ function relayAccountId(clerkToken: string): Option.Option<string> {
102 }
103 }
104
105 +/** @public Service construction is part of the canonical Effect module API. */
106 export const make = Effect.fn("RelayEnvironmentDiscovery.make")(function* () {
107 const relay = yield* ManagedRelay.ManagedRelayClient;
108 const session = yield* ClientCapabilities.CloudSession;
packages/client-runtime/src/relay/errorPresentation.ts
+1 -1
@@ -11,7 +11,7 @@ export const DPOP_UNKNOWN_HINT =
11
12 export const DPOP_RETRY_HINT = "Hint: Try again. If the problem continues, copy the trace ID.";
13
14 -export function dpopFailureHint(reason: DpopFailureReason | undefined): string {
14 +function dpopFailureHint(reason: DpopFailureReason | undefined): string {
15 if (reason === "time_window") return DPOP_CLOCK_HINT;
16 if (reason === undefined) return DPOP_UNKNOWN_HINT;
17 return DPOP_RETRY_HINT;
packages/client-runtime/src/relay/managedRelay.ts
+1
@@ -429,6 +429,7 @@ function disabledManagedRelayClient(relayUrl: string): ManagedRelayClient["Servi
429 });
430 }
431
432 +/** @public Service construction is part of the canonical Effect module API. */
433 export const make = Effect.fn("ManagedRelayClient.make")(function* (
434 options: ManagedRelayClientLayerOptions,
435 ) {
packages/client-runtime/src/rpc/client.ts
-5
@@ -325,8 +325,3 @@ export function subscribe<TTag extends EnvironmentSubscriptionRpcTag>(
325 > {
326 return subscribeDynamic(tag, () => Effect.succeed(input), options);
327 }
328 -
329 -export const config = Effect.gen(function* () {
330 - const session = yield* currentSession();
331 - return yield* session.initialConfig;
332 -}).pipe(Effect.withSpan("EnvironmentRpc.config"));
packages/client-runtime/src/rpc/index.ts
+1 -1
@@ -1,4 +1,4 @@
1 export * from "./client.ts";
2 export * from "./http.ts";
3 export * from "./protocol.ts";
4 -export { type RpcSession, RpcSessionFactory } from "./session.ts";
4 +export { type RpcSession } from "./session.ts";
packages/client-runtime/src/rpc/session.ts
+1 -2
@@ -145,6 +145,7 @@ function mapSessionRpcError(
145 }
146 }
147
148 +/** @public Service construction is part of the canonical Effect module API. */
149 export const make = Effect.fn("RpcSessionFactory.make")(function* (
150 options: RpcSessionOptions = {},
151 ) {
@@ -369,5 +370,3 @@ export const make = Effect.fn("RpcSessionFactory.make")(function* (
370
371 export const layerWithOptions = (options: RpcSessionOptions) =>
372 Layer.effect(RpcSessionFactory, make(options));
372 -
373 -export const layer = layerWithOptions({});
packages/client-runtime/src/state/auth.ts
+1 -1
@@ -61,7 +61,7 @@ export function applyAuthAccessStreamEvent(
61 }
62 }
63
64 -export function projectAuthAccessSnapshot(
64 +function projectAuthAccessSnapshot(
65 current: AuthAccessSnapshot,
66 event: AuthAccessStreamEvent,
67 ): readonly [AuthAccessSnapshot, ReadonlyArray<AuthAccessStreamEvent>] {
packages/client-runtime/src/state/connections.ts
+1 -1
@@ -20,7 +20,7 @@ export interface EnvironmentCatalogState {
20 readonly entries: ReadonlyMap<EnvironmentIdType, ConnectionCatalogEntry>;
21 }
22
23 -export const EMPTY_ENVIRONMENT_CATALOG_STATE: EnvironmentCatalogState = Object.freeze({
23 +const EMPTY_ENVIRONMENT_CATALOG_STATE: EnvironmentCatalogState = Object.freeze({
24 isReady: false,
25 entries: new Map(),
26 });
packages/client-runtime/src/state/environmentHttpAuth.ts
+2 -2
@@ -27,7 +27,7 @@ export interface EnvironmentHttpAuthHeaders {
27 * per-request via `FetchHttpClient.RequestInit`, which the fetch client reads
28 * from the fiber context at request time.
29 */
30 -export const withEnvironmentCredentials = <A, E, R>(
30 +const withEnvironmentCredentials = <A, E, R>(
31 authorization: PreparedHttpAuthorization | null,
32 request: Effect.Effect<A, E, R>,
33 ): Effect.Effect<A, E, R> =>
@@ -46,7 +46,7 @@ export const withEnvironmentCredentials = <A, E, R>(
46 * for relay/DPoP connections, so bearer/primary connections work even when no
47 * signer is available.
48 */
49 -export const buildEnvironmentAuthHeaders = (
49 +const buildEnvironmentAuthHeaders = (
50 authorization: PreparedHttpAuthorization | null,
51 method: HttpMethod.HttpMethod,
52 url: string,
packages/client-runtime/src/state/gitActions.ts
-82
@@ -1,10 +1,8 @@
1 import type {
2 GitRunStackedActionInput,
3 - GitRunStackedActionResult,
3 GitStackedAction,
4 VcsStatusResult,
5 } from "@t3tools/contracts";
7 -import { isTemporaryWorktreeBranch } from "@t3tools/shared/git";
6
7 export type GitActionIconName = "commit" | "push" | "pr";
8
@@ -44,44 +42,6 @@ export type GitActionRequestInput = Pick<
42 "action" | "commitMessage" | "featureBranch" | "filePaths"
43 >;
44
47 -export function buildGitActionProgressStages(input: {
48 - action: GitStackedAction;
49 - hasCustomCommitMessage: boolean;
50 - hasWorkingTreeChanges: boolean;
51 - pushTarget?: string;
52 - featureBranch?: boolean;
53 - shouldPushBeforePr?: boolean;
54 -}): string[] {
55 - const branchStages = input.featureBranch ? ["Preparing feature branch..."] : [];
56 - const pushStage = input.pushTarget ? `Pushing to ${input.pushTarget}...` : "Pushing...";
57 - const prStages = [
58 - "Preparing PR...",
59 - "Generating PR content...",
60 - "Creating GitHub pull request...",
61 - ];
62 -
63 - if (input.action === "push") {
64 - return [pushStage];
65 - }
66 - if (input.action === "create_pr") {
67 - return input.shouldPushBeforePr ? [pushStage, ...prStages] : prStages;
68 - }
69 -
70 - const shouldIncludeCommitStages = input.action === "commit" || input.hasWorkingTreeChanges;
71 - const commitStages = !shouldIncludeCommitStages
72 - ? []
73 - : input.hasCustomCommitMessage
74 - ? ["Committing..."]
75 - : ["Generating commit message...", "Committing..."];
76 - if (input.action === "commit") {
77 - return [...branchStages, ...commitStages];
78 - }
79 - if (input.action === "commit_push") {
80 - return [...branchStages, ...commitStages, pushStage];
81 - }
82 - return [...branchStages, ...commitStages, pushStage, ...prStages];
83 -}
84 -
45 export function buildMenuItems(
46 gitStatus: VcsStatusResult | null,
47 isBusy: boolean,
@@ -396,45 +356,3 @@ export function resolveDefaultBranchActionDialogCopy(input: {
356 continueLabel: "Push & create PR",
357 };
358 }
399 -
400 -export function resolveThreadBranchUpdate(
401 - result: GitRunStackedActionResult,
402 -): { branch: string } | null {
403 - if (result.branch.status !== "created" || !result.branch.name) {
404 - return null;
405 - }
406 -
407 - return {
408 - branch: result.branch.name,
409 - };
410 -}
411 -
412 -export function resolveLiveThreadBranchUpdate(input: {
413 - threadBranch: string | null;
414 - gitStatus: VcsStatusResult | null;
415 -}): { branch: string | null } | null {
416 - if (!input.gitStatus) {
417 - return null;
418 - }
419 -
420 - if (input.gitStatus.refName === null && input.threadBranch !== null) {
421 - return null;
422 - }
423 -
424 - if (input.threadBranch === input.gitStatus.refName) {
425 - return null;
426 - }
427 -
428 - if (
429 - input.threadBranch !== null &&
430 - input.gitStatus.refName !== null &&
431 - !isTemporaryWorktreeBranch(input.threadBranch) &&
432 - isTemporaryWorktreeBranch(input.gitStatus.refName)
433 - ) {
434 - return null;
435 - }
436 -
437 - return {
438 - branch: input.gitStatus.refName,
439 - };
440 -}
packages/client-runtime/src/state/projectGrouping.ts
-13
@@ -152,19 +152,6 @@ export function deriveLogicalProjectKeyFromSettings(
152 });
153 }
154
155 -export function deriveLogicalProjectKeyFromRef(
156 - projectRef: ScopedProjectRef,
157 - project:
158 - | Pick<EnvironmentProject, "environmentId" | "id" | "workspaceRoot" | "repositoryIdentity">
159 - | null
160 - | undefined,
161 - options?: {
162 - readonly groupingMode?: SidebarProjectGroupingMode;
163 - },
164 -): string {
165 - return project ? deriveLogicalProjectKey(project, options) : scopedProjectKey(projectRef);
166 -}
167 -
155 export function deriveProjectGroupLabel(input: {
156 readonly representative: Pick<EnvironmentProject, "title" | "repositoryIdentity">;
157 readonly members: ReadonlyArray<Pick<EnvironmentProject, "title" | "repositoryIdentity">>;
packages/client-runtime/src/state/pullRequests.ts
+2 -1
@@ -29,11 +29,12 @@ export {
29 pullRequestDiffLoaderLayer,
30 } from "./pullRequestDiffHttp.ts";
31
32 +/** @public Required to name the error in consumers' inferred pull request results. */
33 export class EnvironmentHttpConnectionNotReadyError extends Data.TaggedError(
34 "EnvironmentHttpConnectionNotReadyError",
35 )<{ readonly message: string }> {}
36
36 -export const LINKED_PULL_REQUEST_IDLE_TTL_MS = 5_000;
37 +const LINKED_PULL_REQUEST_IDLE_TTL_MS = 5_000;
38
39 function createPullRequestRefreshAtomFamily<R, E>(
40 runtime: Atom.AtomRuntime<EnvironmentRegistry | R, E>,
packages/client-runtime/src/state/runtime.ts
+1 -26
@@ -390,31 +390,6 @@ export function createRuntimeCommand<R, ER, W, A, E>(
390 };
391 }
392
393 -export function createRuntimeStreamCommand<R, ER, W, A, E>(
394 - runtime: Atom.AtomRuntime<R, ER>,
395 - options: {
396 - readonly label: string;
397 - readonly execute: (input: W, registry: AtomRegistry.AtomRegistry) => Stream.Stream<A, E, R>;
398 - readonly scheduler?: AtomCommandScheduler;
399 - readonly concurrency?: AtomCommandConcurrency<W>;
400 - },
401 -): AtomCommand<W, A, E | ER | Cause.NoSuchElementError> {
402 - const scheduler = options.scheduler ?? createAtomCommandScheduler();
403 - const concurrency = options.concurrency ?? { mode: "parallel" as const };
404 - return {
405 - label: options.label,
406 - run: (registry, input) =>
407 - settleAtomCommandResult(() =>
408 - scheduler.schedule(registry, concurrency, input, () => {
409 - const atom = runtime
410 - .atom(options.execute(input, registry))
411 - .pipe(Atom.withLabel(options.label));
412 - return executeAtomQuery(registry, atom, { reportDefect: false, reportFailure: false });
413 - }),
414 - ),
415 - };
416 -}
417 -
393 export function reportAtomCommandResult(
394 result: AtomCommandResult<unknown, unknown>,
395 options: AtomCommandOptions = {},
@@ -462,7 +437,7 @@ function parseEnvironmentRpcKey<Input>(key: string): {
437 };
438 }
439
465 -export function runInEnvironment<A, E, R>(
440 +function runInEnvironment<A, E, R>(
441 environmentId: EnvironmentIdType,
442 effect: Effect.Effect<A, E, R>,
443 ): Effect.Effect<
packages/client-runtime/src/state/server.ts
+2 -2
@@ -455,7 +455,7 @@ export const makeEnvironmentServerConfigState = Effect.fn("EnvironmentServerConf
455 },
456 );
457
458 -export function serverConfigStateChanges(
458 +function serverConfigStateChanges(
459 environmentId: EnvironmentId,
460 subscription: ServerConfigSubscriptionOptions,
461 ) {
@@ -580,7 +580,7 @@ export const makeEnvironmentServerWelcomeState = Effect.fn("EnvironmentServerWel
580 },
581 );
582
583 -export function serverWelcomeStateChanges(environmentId: EnvironmentId) {
583 +function serverWelcomeStateChanges(environmentId: EnvironmentId) {
584 return followStreamInEnvironment(
585 environmentId,
586 Stream.unwrap(
packages/client-runtime/src/state/sharedSettings.ts
+1 -1
@@ -20,7 +20,7 @@ import * as Struct from "effect/Struct";
20 import type { EnvironmentConnectionPhase } from "../connection/presentation.ts";
21
22 /** Server keys that hold a user preference rather than machine config. */
23 -export const SHARED_SERVER_SETTING_KEYS = [
23 +const SHARED_SERVER_SETTING_KEYS = [
24 "continueThreadsAfterServerUpdate",
25 "sidebarAutoSettleAfterDays",
26 "sidebarAutoSettleOnMerge",
packages/client-runtime/src/state/shell.ts
+1 -1
@@ -269,7 +269,7 @@ export const makeEnvironmentShellState = Effect.fn("EnvironmentShellState.make")
269 return state;
270 });
271
272 -export function shellStateChanges(environmentId: EnvironmentId) {
272 +function shellStateChanges(environmentId: EnvironmentId) {
273 return followStreamInEnvironment(
274 environmentId,
275 Stream.unwrap(makeEnvironmentShellState().pipe(Effect.map(SubscriptionRef.changes))),
packages/client-runtime/src/state/terminalSession.ts
+1 -1
@@ -96,7 +96,7 @@ export function nextTerminalAttachSeedState(): TerminalBufferState {
96 };
97 }
98
99 -export function terminalBufferStateFromSnapshot(
99 +function terminalBufferStateFromSnapshot(
100 snapshot: TerminalSessionSnapshot,
101 maxBufferBytes: number,
102 current: TerminalBufferState = EMPTY_TERMINAL_BUFFER_STATE,
packages/client-runtime/src/state/threadSort.ts
+1 -1
@@ -209,7 +209,7 @@ export function pinOrderKeyBetween(before: string | null, after: string | null):
209 drop lands next to keyless threads, so single-key insertion has nothing
210 to anchor on). Two base-26 digits give 675 slots — far beyond any real
211 pinned section — with monotonicity enforced as a belt-and-braces. */
212 -export function generateSpreadPinOrderKeys(count: number): string[] {
212 +function generateSpreadPinOrderKeys(count: number): string[] {
213 const space = PIN_ORDER_DIGITS.length * PIN_ORDER_DIGITS.length;
214 const step = space / (count + 1);
215 const keys: string[] = [];
packages/client-runtime/src/state/threads.ts
+3 -3
@@ -47,7 +47,7 @@ function statusWithoutLiveData(data: Option.Option<OrchestrationThread>): Enviro
47 * observed threads stays around 100K gzipped while median threads load fully.
48 */
49 export const INITIAL_THREAD_USER_TURN_LIMIT = 10;
50 -export const OLDER_THREAD_PAGE_USER_TURN_LIMIT = 20;
50 +const OLDER_THREAD_PAGE_USER_TURN_LIMIT = 20;
51
52 function pageStateFromSnapshot(
53 page: OrchestrationThreadDetailPage | undefined,
@@ -101,7 +101,7 @@ const defaultOlderTurnRequestRegistry = makeThreadOlderTurnRequestRegistry();
101 * instance is shared with the sync `requestOlderThreadTurns` entry point so
102 * the apps get working wiring without providing anything.
103 */
104 -export class ThreadOlderTurnRequests extends Context.Reference<ThreadOlderTurnRequestRegistry>(
104 +class ThreadOlderTurnRequests extends Context.Reference<ThreadOlderTurnRequestRegistry>(
105 "@t3tools/client-runtime/state/threads/ThreadOlderTurnRequests",
106 { defaultValue: () => defaultOlderTurnRequestRegistry },
107 ) {}
@@ -812,7 +812,7 @@ export const makeEnvironmentThreadState = Effect.fn("EnvironmentThreadState.make
812 return state;
813 });
814
815 -export function threadStateChanges(
815 +function threadStateChanges(
816 environmentId: EnvironmentIdType,
817 threadId: ThreadIdType,
818 resumeCache?: ThreadResumeCache,
packages/client-runtime/src/state/vcs.ts
+2 -3
@@ -33,7 +33,7 @@ const OFFLINE_BRANCH_LIST_LIMIT = 100;
33 const VCS_REFS_IDLE_TTL_MS = 30_000;
34 // Rows keep the last status they rendered, so the live stream only needs a
35 // short grace period when virtualization or scrolling releases its consumer.
36 -export const VCS_STATUS_IDLE_TTL_MS = 10_000;
36 +const VCS_STATUS_IDLE_TTL_MS = 10_000;
37 const VCS_REFS_RETRY_SCHEDULE = Schedule.exponential("1 second").pipe(
38 Schedule.modifyDelay(({ duration }) =>
39 Effect.succeed(Duration.min(duration, Duration.seconds(30))),
@@ -214,7 +214,7 @@ export const makeCachedVcsRefsChanges = Effect.fn("CachedVcsRefsState.makeChange
214 return Stream.concat(cachedRefs, refreshedRefs);
215 });
216
217 -export function cachedVcsRefsChanges(
217 +function cachedVcsRefsChanges(
218 environmentId: EnvironmentId,
219 input: VcsListRefsInput,
220 expectedRevision: number,
@@ -345,4 +345,3 @@ export function createVcsEnvironmentAtoms<R, E>(
345 export * from "./gitActions.ts";
346 export * from "./vcsAction.ts";
347 export * from "./vcsRef.ts";
348 -export * from "./vcsStatus.ts";
packages/client-runtime/src/state/vcsAction.ts
+4 -4
@@ -163,14 +163,14 @@ const decodeVcsActionTargetKey = Schema.decodeUnknownSync(
163 Schema.Tuple([EnvironmentId, Schema.String]),
164 );
165
166 -export const vcsActionStateAtom = Atom.family((key: string) => {
166 +const vcsActionStateAtom = Atom.family((key: string) => {
167 return Atom.make(EMPTY_VCS_ACTION_STATE).pipe(
168 Atom.keepAlive,
169 Atom.withLabel(`vcs-action:${key}`),
170 );
171 });
172
173 -export const EMPTY_VCS_ACTION_ATOM = Atom.make(EMPTY_VCS_ACTION_STATE).pipe(
173 +const EMPTY_VCS_ACTION_ATOM = Atom.make(EMPTY_VCS_ACTION_STATE).pipe(
174 Atom.keepAlive,
175 Atom.withLabel("vcs-action:null"),
176 );
@@ -191,7 +191,7 @@ export function parseVcsActionTargetKey(key: string): ResolvedVcsActionTarget {
191 }
192 }
193
194 -export function getVcsActionStateAtom(target: VcsActionTarget) {
194 +function getVcsActionStateAtom(target: VcsActionTarget) {
195 const key = getVcsActionTargetKey(target);
196 return key === null ? EMPTY_VCS_ACTION_ATOM : vcsActionStateAtom(key);
197 }
@@ -217,7 +217,7 @@ export function beginVcsActionState(
217 };
218 }
219
220 -export function failVcsActionState(
220 +function failVcsActionState(
221 operation: VcsActionOperation,
222 actionId: string,
223 error: unknown,
packages/client-runtime/src/state/vcsStatus.ts deleted
-6
@@ -1,6 +0,0 @@
1 -import type { EnvironmentId } from "@t3tools/contracts";
2 -
3 -export interface VcsStatusTarget {
4 - readonly environmentId: EnvironmentId | null;
5 - readonly cwd: string | null;
6 -}
packages/client-runtime/src/voice-input/index.ts
-1
@@ -1,7 +1,6 @@
1 export {
2 VoiceInputController,
3 VOICE_RECORDING_LIMIT_SECONDS,
4 - resolveTranscriptCommit,
4 voiceInputBlocksSubmission,
5 voiceInputFreezesEditor,
6 type VoiceDraftSnapshot,
packages/client-runtime/src/work-log/presentation.ts
+1 -1
@@ -305,7 +305,7 @@ function workLogEntryIsToolLike(entry: WorkLogPresentationEntry): boolean {
305 return entry.itemType !== undefined && isToolLifecycleItemType(entry.itemType);
306 }
307
308 -export function workLogEntryIsLocalCodeSearch(entry: WorkLogPresentationEntry): boolean {
308 +function workLogEntryIsLocalCodeSearch(entry: WorkLogPresentationEntry): boolean {
309 return (
310 entry.itemType === "web_search" &&
311 /\bgrep\b/i.test(normalizeCompactToolLabel(entry.toolTitle ?? entry.label))