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
206206 return yield* existingFile(cachePath);
207207});
208208
209/** @public Service construction is part of the canonical Effect module API. */
209210export const make = Effect.gen(function* () {
210211 const fileSystem = yield* FileSystem.FileSystem;
211212 const hostPlatform = yield* HostProcessPlatform;
apps/server/src/desktopUpdate/DesktopAppUpdate.ts+1-1
......@@ -25,7 +25,7 @@ const DESKTOP_INSTALL_TIMEOUT = Duration.minutes(2);
2525
2626/** Progress stage a desktop update state maps to, or null when the state
2727 carries no progress worth streaming. */
28export function desktopUpdateProgressStage(
28function desktopUpdateProgressStage(
2929 state: DesktopUpdateState,
3030): ServerSelfUpdateProgressStage | null {
3131 switch (state.status) {
apps/server/src/git/GitWorkflowService.ts+1
......@@ -142,6 +142,7 @@ function nonRepositoryListRefs(): VcsListRefsResult {
142142 };
143143}
144144
145/** @public Service construction is part of the canonical Effect module API. */
145146export const make = Effect.gen(function* () {
146147 const registry = yield* VcsDriverRegistry.VcsDriverRegistry;
147148 const git = yield* GitVcsDriver.GitVcsDriver;
apps/server/src/observability/BrowserTraceCollector.ts+1
......@@ -10,6 +10,7 @@ export class BrowserTraceCollector extends Context.Service<
1010 }
1111>()("t3/observability/BrowserTraceCollector") {}
1212
13/** @public Service construction is part of the canonical Effect module API. */
1314export const make = (sink: TraceSink): BrowserTraceCollector["Service"] =>
1415 BrowserTraceCollector.of({
1516 record: (records) =>
apps/server/src/preview/Manager.ts+1
......@@ -153,6 +153,7 @@ const buildIdleSnapshot = (input: {
153153 updatedAt: input.updatedAt,
154154});
155155
156/** @public Service construction is part of the canonical Effect module API. */
156157export const make = Effect.gen(function* PreviewManagerMake() {
157158 const serverEpoch = NodeCrypto.randomUUID();
158159 const stateRef = yield* SynchronizedRef.make<ManagerState>(initialState);
apps/server/src/preview/PortScanner.ts+1
......@@ -289,6 +289,7 @@ const serversEqual = (
289289 return true;
290290};
291291
292/** @public Service construction is part of the canonical Effect module API. */
292293export const make = Effect.gen(function* PortDiscoveryMake() {
293294 const net = yield* Net.NetService;
294295 const processRunner = yield* ProcessRunner.ProcessRunner;
apps/server/src/project/AgentSessionScanner.ts+1
......@@ -615,6 +615,7 @@ function sameTranscriptIdentity(
615615 );
616616}
617617
618/** @public Service construction is part of the canonical Effect module API. */
618619export const make = Effect.gen(function* () {
619620 const fileSystem = yield* FileSystem.FileSystem;
620621 // 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<
8383 }
8484>()("t3/project/ProjectSetupScriptRunner") {}
8585
86/** @public Service construction is part of the canonical Effect module API. */
8687export const make = Effect.gen(function* () {
8788 const projectionSnapshotQuery = yield* ProjectionSnapshotQuery.ProjectionSnapshotQuery;
8889 const terminalManager = yield* TerminalManager.TerminalManager;
apps/server/src/project/T3ProjectFileLoader.ts+1
......@@ -59,6 +59,7 @@ const logT3ProjectFileLoadError = (error: T3ProjectFileLoadError) =>
5959 }),
6060 );
6161
62/** @public Service construction is part of the canonical Effect module API. */
6263export const make = Effect.gen(function* () {
6364 const fileSystem = yield* FileSystem.FileSystem;
6465 const path = yield* Path.Path;
apps/server/src/relay/AgentAwarenessRelay.ts+2-1
......@@ -211,7 +211,7 @@ const makePublishProof = Effect.fn("makePublishProof")(function* (input: {
211211});
212212
213213// Compact, log-safe view of the fields the awareness phase ladder reads.
214export function describeThreadShellForAwareness(
214function describeThreadShellForAwareness(
215215 thread: Option.Option<OrchestrationThreadShell>,
216216): Record<string, unknown> {
217217 if (Option.isNone(thread)) {
......@@ -290,6 +290,7 @@ export function resolveAgentAwarenessRelayActiveThreadIds(input: {
290290 .map((thread) => thread.id);
291291}
292292
293/** @public Service construction is part of the canonical Effect module API. */
293294export const make = Effect.gen(function* () {
294295 const secrets = yield* ServerSecretStore.ServerSecretStore;
295296 const serverEnvironment = yield* ServerEnvironment.ServerEnvironment;
apps/server/src/review/ReviewService.ts+1
......@@ -31,6 +31,7 @@ export class ReviewService extends Context.Service<
3131 }
3232>()("t3/review/ReviewService") {}
3333
34/** @public Service construction is part of the canonical Effect module API. */
3435export const make = Effect.gen(function* () {
3536 const config = yield* ServerConfig.ServerConfig;
3637 const fileSystem = yield* FileSystem.FileSystem;
apps/server/src/terminal/Manager.ts+1
......@@ -1385,6 +1385,7 @@ export const resolveProviderInstanceTerminalEnvironment = Effect.fn(
13851385 );
13861386});
13871387
1388/** @public Service construction is part of the canonical Effect module API. */
13881389export const make = Effect.fn("TerminalManager.make")(function* () {
13891390 const { terminalLogsDir } = yield* ServerConfig.ServerConfig;
13901391 const ptyAdapter = yield* PtyAdapter.PtyAdapter;
apps/server/src/textGeneration/TextGeneration.ts+1
......@@ -153,6 +153,7 @@ export const makeTextGenerationFromRegistry = (
153153 ),
154154 });
155155
156/** @public Service construction is part of the canonical Effect module API. */
156157export const make = Effect.gen(function* () {
157158 const registry = yield* ProviderInstanceRegistry.ProviderInstanceRegistry;
158159 return makeTextGenerationFromRegistry(registry);
apps/server/src/textGeneration/TextGenerationPresets.ts-5
......@@ -1,10 +1,5 @@
11import type { TextGenerationPolicy } from "./TextGenerationPolicy.ts";
22
3export const defaultTextGenerationPolicy: TextGenerationPolicy = {
4 kind: "default",
5 inferRepositoryConventions: false,
6};
7
83export const conventionalCommitsTextGenerationPolicy: TextGenerationPolicy = {
94 kind: "conventional_commits",
105 commitInstructions:
apps/server/src/vcs/VcsProjectConfig.ts+1
......@@ -64,6 +64,7 @@ const logVcsProjectConfigError = (error: VcsProjectConfigError) =>
6464 }),
6565 );
6666
67/** @public Service construction is part of the canonical Effect module API. */
6768export const make = Effect.gen(function* () {
6869 const fileSystem = yield* FileSystem.FileSystem;
6970 const path = yield* Path.Path;
apps/server/src/vcs/VcsProvisioningService.ts+1
......@@ -35,6 +35,7 @@ function resolveRequestedKind(
3535 return Effect.succeed(kind);
3636}
3737
38/** @public Service construction is part of the canonical Effect module API. */
3839export const make = Effect.gen(function* () {
3940 const registry = yield* VcsDriverRegistry.VcsDriverRegistry;
4041
apps/server/src/vcs/VcsStatusBroadcaster.ts+1
......@@ -217,6 +217,7 @@ const normalizeCwd = (cwd: string) =>
217217 Effect.orElseSucceed(() => cwd),
218218 );
219219
220/** @public Service construction is part of the canonical Effect module API. */
220221export const make = Effect.gen(function* () {
221222 const autoPullPolicy = yield* VcsAutoPullPolicy;
222223 const workflow = yield* GitWorkflowService.GitWorkflowService;
apps/server/src/workspace/WorkspaceEntries.ts+1
......@@ -128,6 +128,7 @@ const resolveBrowseTarget = Effect.fn("WorkspaceEntries.resolveBrowseTarget")(fu
128128 return path.resolve(expandHomePathWith(input.cwd, path), input.partialPath);
129129});
130130
131/** @public Service construction is part of the canonical Effect module API. */
131132export const make = Effect.gen(function* () {
132133 const path = yield* Path.Path;
133134 const workspacePaths = yield* WorkspacePaths.WorkspacePaths;
apps/server/src/workspace/WorkspaceFileSystem.ts+1
......@@ -132,6 +132,7 @@ export class WorkspaceFileSystem extends Context.Service<
132132 }
133133>()("t3/workspace/WorkspaceFileSystem") {}
134134
135/** @public Service construction is part of the canonical Effect module API. */
135136export const make = Effect.gen(function* () {
136137 const fileSystem = yield* FileSystem.FileSystem;
137138 const path = yield* Path.Path;
apps/server/src/workspace/WorkspaceSearchIndex.ts+2
......@@ -551,6 +551,8 @@ function parseWorkspaceSearchIndexKey(key: string): {
551551 * workspace root and variant. WorkspaceSearchIndexMap owns memoization and
552552 * idle cleanup; using a default cwd here would mix resources from different
553553 * workspaces.
554 *
555 * @public Service construction is part of the canonical Effect module API.
554556 */
555557export const layer = (key: string) => {
556558 const { cwd, variant } = parseWorkspaceSearchIndexKey(key);