authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-08 01:11:09-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-08 01:11:09-07:00
log161715b1e4fa6d20fe3eb1cb9c91904bf83ca4c1
treef135e789ad001062d4df3bdaf8d9e05fa5fc09d1
parent0af04f1801ea75119c74fd406ced7da6c9c71721
signature Signed by PGP key B5690EEEBB952194

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


20 files changed, 21 insertions(+), 7 deletions(-)

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