@devries-cameron20 / t3code-1 / commits / 161715b1e4
Fork 0

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

refactor(server): classify service exports (#10276)

Julius Marminge committed Sep 8, 2026 at 01:11 UTC 161715b1e4fa6d20fe3eb1cb9c91904bf83ca4c1
20 files changed +21 -7
apps/server/src/assets/NativeAppIconResolver.ts
+1
@@ -206,6 +206,7 @@ const resolveNativeAppIconUncached = Effect.fn("NativeAppIconResolver.resolveUnc
206 return yield* existingFile(cachePath);
207 });
208
209 +/** @public Service construction is part of the canonical Effect module API. */
210 export const make = Effect.gen(function* () {
211 const fileSystem = yield* FileSystem.FileSystem;
212 const hostPlatform = yield* HostProcessPlatform;
apps/server/src/desktopUpdate/DesktopAppUpdate.ts
+1 -1
@@ -25,7 +25,7 @@ const DESKTOP_INSTALL_TIMEOUT = Duration.minutes(2);
25
26 /** Progress stage a desktop update state maps to, or null when the state
27 carries no progress worth streaming. */
28 -export function desktopUpdateProgressStage(
28 +function desktopUpdateProgressStage(
29 state: DesktopUpdateState,
30 ): ServerSelfUpdateProgressStage | null {
31 switch (state.status) {
apps/server/src/git/GitWorkflowService.ts
+1
@@ -142,6 +142,7 @@ function nonRepositoryListRefs(): VcsListRefsResult {
142 };
143 }
144
145 +/** @public Service construction is part of the canonical Effect module API. */
146 export const make = Effect.gen(function* () {
147 const registry = yield* VcsDriverRegistry.VcsDriverRegistry;
148 const git = yield* GitVcsDriver.GitVcsDriver;
apps/server/src/observability/BrowserTraceCollector.ts
+1
@@ -10,6 +10,7 @@ export class BrowserTraceCollector extends Context.Service<
10 }
11 >()("t3/observability/BrowserTraceCollector") {}
12
13 +/** @public Service construction is part of the canonical Effect module API. */
14 export const make = (sink: TraceSink): BrowserTraceCollector["Service"] =>
15 BrowserTraceCollector.of({
16 record: (records) =>
apps/server/src/preview/Manager.ts
+1
@@ -153,6 +153,7 @@ const buildIdleSnapshot = (input: {
153 updatedAt: input.updatedAt,
154 });
155
156 +/** @public Service construction is part of the canonical Effect module API. */
157 export const make = Effect.gen(function* PreviewManagerMake() {
158 const serverEpoch = NodeCrypto.randomUUID();
159 const stateRef = yield* SynchronizedRef.make<ManagerState>(initialState);
apps/server/src/preview/PortScanner.ts
+1
@@ -289,6 +289,7 @@ const serversEqual = (
289 return true;
290 };
291
292 +/** @public Service construction is part of the canonical Effect module API. */
293 export const make = Effect.gen(function* PortDiscoveryMake() {
294 const net = yield* Net.NetService;
295 const processRunner = yield* ProcessRunner.ProcessRunner;
apps/server/src/project/AgentSessionScanner.ts
+1
@@ -615,6 +615,7 @@ function sameTranscriptIdentity(
615 );
616 }
617
618 +/** @public Service construction is part of the canonical Effect module API. */
619 export const make = Effect.gen(function* () {
620 const fileSystem = yield* FileSystem.FileSystem;
621 // Different project imports can arrive concurrently from multiple clients.
apps/server/src/project/ProjectSetupScriptRunner.ts
+1
@@ -83,6 +83,7 @@ export class ProjectSetupScriptRunner extends Context.Service<
83 }
84 >()("t3/project/ProjectSetupScriptRunner") {}
85
86 +/** @public Service construction is part of the canonical Effect module API. */
87 export const make = Effect.gen(function* () {
88 const projectionSnapshotQuery = yield* ProjectionSnapshotQuery.ProjectionSnapshotQuery;
89 const terminalManager = yield* TerminalManager.TerminalManager;
apps/server/src/project/T3ProjectFileLoader.ts
+1
@@ -59,6 +59,7 @@ const logT3ProjectFileLoadError = (error: T3ProjectFileLoadError) =>
59 }),
60 );
61
62 +/** @public Service construction is part of the canonical Effect module API. */
63 export const make = Effect.gen(function* () {
64 const fileSystem = yield* FileSystem.FileSystem;
65 const path = yield* Path.Path;
apps/server/src/relay/AgentAwarenessRelay.ts
+2 -1
@@ -211,7 +211,7 @@ const makePublishProof = Effect.fn("makePublishProof")(function* (input: {
211 });
212
213 // Compact, log-safe view of the fields the awareness phase ladder reads.
214 -export function describeThreadShellForAwareness(
214 +function describeThreadShellForAwareness(
215 thread: Option.Option<OrchestrationThreadShell>,
216 ): Record<string, unknown> {
217 if (Option.isNone(thread)) {
@@ -290,6 +290,7 @@ export function resolveAgentAwarenessRelayActiveThreadIds(input: {
290 .map((thread) => thread.id);
291 }
292
293 +/** @public Service construction is part of the canonical Effect module API. */
294 export const make = Effect.gen(function* () {
295 const secrets = yield* ServerSecretStore.ServerSecretStore;
296 const serverEnvironment = yield* ServerEnvironment.ServerEnvironment;
apps/server/src/review/ReviewService.ts
+1
@@ -31,6 +31,7 @@ export class ReviewService extends Context.Service<
31 }
32 >()("t3/review/ReviewService") {}
33
34 +/** @public Service construction is part of the canonical Effect module API. */
35 export const make = Effect.gen(function* () {
36 const config = yield* ServerConfig.ServerConfig;
37 const fileSystem = yield* FileSystem.FileSystem;
apps/server/src/terminal/Manager.ts
+1
@@ -1385,6 +1385,7 @@ export const resolveProviderInstanceTerminalEnvironment = Effect.fn(
1385 );
1386 });
1387
1388 +/** @public Service construction is part of the canonical Effect module API. */
1389 export const make = Effect.fn("TerminalManager.make")(function* () {
1390 const { terminalLogsDir } = yield* ServerConfig.ServerConfig;
1391 const ptyAdapter = yield* PtyAdapter.PtyAdapter;
apps/server/src/textGeneration/TextGeneration.ts
+1
@@ -153,6 +153,7 @@ export const makeTextGenerationFromRegistry = (
153 ),
154 });
155
156 +/** @public Service construction is part of the canonical Effect module API. */
157 export const make = Effect.gen(function* () {
158 const registry = yield* ProviderInstanceRegistry.ProviderInstanceRegistry;
159 return makeTextGenerationFromRegistry(registry);
apps/server/src/textGeneration/TextGenerationPresets.ts
-5
@@ -1,10 +1,5 @@
1 import type { TextGenerationPolicy } from "./TextGenerationPolicy.ts";
2
3 -export const defaultTextGenerationPolicy: TextGenerationPolicy = {
4 - kind: "default",
5 - inferRepositoryConventions: false,
6 -};
7 -
3 export const conventionalCommitsTextGenerationPolicy: TextGenerationPolicy = {
4 kind: "conventional_commits",
5 commitInstructions:
apps/server/src/vcs/VcsProjectConfig.ts
+1
@@ -64,6 +64,7 @@ const logVcsProjectConfigError = (error: VcsProjectConfigError) =>
64 }),
65 );
66
67 +/** @public Service construction is part of the canonical Effect module API. */
68 export const make = Effect.gen(function* () {
69 const fileSystem = yield* FileSystem.FileSystem;
70 const path = yield* Path.Path;
apps/server/src/vcs/VcsProvisioningService.ts
+1
@@ -35,6 +35,7 @@ function resolveRequestedKind(
35 return Effect.succeed(kind);
36 }
37
38 +/** @public Service construction is part of the canonical Effect module API. */
39 export const make = Effect.gen(function* () {
40 const registry = yield* VcsDriverRegistry.VcsDriverRegistry;
41
apps/server/src/vcs/VcsStatusBroadcaster.ts
+1
@@ -217,6 +217,7 @@ const normalizeCwd = (cwd: string) =>
217 Effect.orElseSucceed(() => cwd),
218 );
219
220 +/** @public Service construction is part of the canonical Effect module API. */
221 export const make = Effect.gen(function* () {
222 const autoPullPolicy = yield* VcsAutoPullPolicy;
223 const workflow = yield* GitWorkflowService.GitWorkflowService;
apps/server/src/workspace/WorkspaceEntries.ts
+1
@@ -128,6 +128,7 @@ const resolveBrowseTarget = Effect.fn("WorkspaceEntries.resolveBrowseTarget")(fu
128 return path.resolve(expandHomePathWith(input.cwd, path), input.partialPath);
129 });
130
131 +/** @public Service construction is part of the canonical Effect module API. */
132 export const make = Effect.gen(function* () {
133 const path = yield* Path.Path;
134 const workspacePaths = yield* WorkspacePaths.WorkspacePaths;
apps/server/src/workspace/WorkspaceFileSystem.ts
+1
@@ -132,6 +132,7 @@ export class WorkspaceFileSystem extends Context.Service<
132 }
133 >()("t3/workspace/WorkspaceFileSystem") {}
134
135 +/** @public Service construction is part of the canonical Effect module API. */
136 export const make = Effect.gen(function* () {
137 const fileSystem = yield* FileSystem.FileSystem;
138 const path = yield* Path.Path;
apps/server/src/workspace/WorkspaceSearchIndex.ts
+2
@@ -551,6 +551,8 @@ function parseWorkspaceSearchIndexKey(key: string): {
551 * workspace root and variant. WorkspaceSearchIndexMap owns memoization and
552 * idle cleanup; using a default cwd here would mix resources from different
553 * workspaces.
554 + *
555 + * @public Service construction is part of the canonical Effect module API.
556 */
557 export const layer = (key: string) => {
558 const { cwd, variant } = parseWorkspaceSearchIndexKey(key);