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

This commit is contained in:
Julius Marminge authored and GitHub committed 2026-09-08 01:11:09 -07:00
1 parent 0af04f1801
commit 161715b1e4
20 files changed
+21 -7

No files matched your search

@@ -206,6 +206,7 @@ const resolveNativeAppIconUncached = Effect.fn("NativeAppIconResolver.resolveUnc
return yield* existingFile(cachePath);
});
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* () {
const fileSystem = yield* FileSystem.FileSystem;
const hostPlatform = yield* HostProcessPlatform;
@@ -25,7 +25,7 @@ const DESKTOP_INSTALL_TIMEOUT = Duration.minutes(2);
/** Progress stage a desktop update state maps to, or null when the state
carries no progress worth streaming. */
export function desktopUpdateProgressStage(
function desktopUpdateProgressStage(
state: DesktopUpdateState,
): ServerSelfUpdateProgressStage | null {
switch (state.status) {
@@ -142,6 +142,7 @@ function nonRepositoryListRefs(): VcsListRefsResult {
};
}
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* () {
const registry = yield* VcsDriverRegistry.VcsDriverRegistry;
const git = yield* GitVcsDriver.GitVcsDriver;
@@ -10,6 +10,7 @@ export class BrowserTraceCollector extends Context.Service<
}
>()("t3/observability/BrowserTraceCollector") {}
/** @public Service construction is part of the canonical Effect module API. */
export const make = (sink: TraceSink): BrowserTraceCollector["Service"] =>
BrowserTraceCollector.of({
record: (records) =>
+1
View File
@@ -153,6 +153,7 @@ const buildIdleSnapshot = (input: {
updatedAt: input.updatedAt,
});
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* PreviewManagerMake() {
const serverEpoch = NodeCrypto.randomUUID();
const stateRef = yield* SynchronizedRef.make<ManagerState>(initialState);
+1
View File
@@ -289,6 +289,7 @@ const serversEqual = (
return true;
};
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* PortDiscoveryMake() {
const net = yield* Net.NetService;
const processRunner = yield* ProcessRunner.ProcessRunner;
@@ -615,6 +615,7 @@ function sameTranscriptIdentity(
);
}
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* () {
const fileSystem = yield* FileSystem.FileSystem;
// Different project imports can arrive concurrently from multiple clients.
@@ -83,6 +83,7 @@ export class ProjectSetupScriptRunner extends Context.Service<
}
>()("t3/project/ProjectSetupScriptRunner") {}
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* () {
const projectionSnapshotQuery = yield* ProjectionSnapshotQuery.ProjectionSnapshotQuery;
const terminalManager = yield* TerminalManager.TerminalManager;
@@ -59,6 +59,7 @@ const logT3ProjectFileLoadError = (error: T3ProjectFileLoadError) =>
}),
);
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* () {
const fileSystem = yield* FileSystem.FileSystem;
const path = yield* Path.Path;
+2 -1
View File
@@ -211,7 +211,7 @@ const makePublishProof = Effect.fn("makePublishProof")(function* (input: {
});
// Compact, log-safe view of the fields the awareness phase ladder reads.
export function describeThreadShellForAwareness(
function describeThreadShellForAwareness(
thread: Option.Option<OrchestrationThreadShell>,
): Record<string, unknown> {
if (Option.isNone(thread)) {
@@ -290,6 +290,7 @@ export function resolveAgentAwarenessRelayActiveThreadIds(input: {
.map((thread) => thread.id);
}
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* () {
const secrets = yield* ServerSecretStore.ServerSecretStore;
const serverEnvironment = yield* ServerEnvironment.ServerEnvironment;
+1
View File
@@ -31,6 +31,7 @@ export class ReviewService extends Context.Service<
}
>()("t3/review/ReviewService") {}
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* () {
const config = yield* ServerConfig.ServerConfig;
const fileSystem = yield* FileSystem.FileSystem;
+1
View File
@@ -1385,6 +1385,7 @@ export const resolveProviderInstanceTerminalEnvironment = Effect.fn(
);
});
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.fn("TerminalManager.make")(function* () {
const { terminalLogsDir } = yield* ServerConfig.ServerConfig;
const ptyAdapter = yield* PtyAdapter.PtyAdapter;
@@ -153,6 +153,7 @@ export const makeTextGenerationFromRegistry = (
),
});
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* () {
const registry = yield* ProviderInstanceRegistry.ProviderInstanceRegistry;
return makeTextGenerationFromRegistry(registry);
@@ -1,10 +1,5 @@
import type { TextGenerationPolicy } from "./TextGenerationPolicy.ts";
export const defaultTextGenerationPolicy: TextGenerationPolicy = {
kind: "default",
inferRepositoryConventions: false,
};
export const conventionalCommitsTextGenerationPolicy: TextGenerationPolicy = {
kind: "conventional_commits",
commitInstructions:
+1
View File
@@ -64,6 +64,7 @@ const logVcsProjectConfigError = (error: VcsProjectConfigError) =>
}),
);
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* () {
const fileSystem = yield* FileSystem.FileSystem;
const path = yield* Path.Path;
@@ -35,6 +35,7 @@ function resolveRequestedKind(
return Effect.succeed(kind);
}
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* () {
const registry = yield* VcsDriverRegistry.VcsDriverRegistry;
@@ -217,6 +217,7 @@ const normalizeCwd = (cwd: string) =>
Effect.orElseSucceed(() => cwd),
);
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* () {
const autoPullPolicy = yield* VcsAutoPullPolicy;
const workflow = yield* GitWorkflowService.GitWorkflowService;
@@ -128,6 +128,7 @@ const resolveBrowseTarget = Effect.fn("WorkspaceEntries.resolveBrowseTarget")(fu
return path.resolve(expandHomePathWith(input.cwd, path), input.partialPath);
});
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* () {
const path = yield* Path.Path;
const workspacePaths = yield* WorkspacePaths.WorkspacePaths;
@@ -132,6 +132,7 @@ export class WorkspaceFileSystem extends Context.Service<
}
>()("t3/workspace/WorkspaceFileSystem") {}
/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* () {
const fileSystem = yield* FileSystem.FileSystem;
const path = yield* Path.Path;
@@ -551,6 +551,8 @@ function parseWorkspaceSearchIndexKey(key: string): {
* workspace root and variant. WorkspaceSearchIndexMap owns memoization and
* idle cleanup; using a default cwd here would mix resources from different
* workspaces.
*
* @public Service construction is part of the canonical Effect module API.
*/
export const layer = (key: string) => {
const { cwd, variant } = parseWorkspaceSearchIndexKey(key);