diff --git a/apps/server/scripts/t3-sqlite-state.ts b/apps/server/scripts/t3-sqlite-state.ts index b114b0e10d49a7b99cb5e38fa32ba918c5199dce..aae040470f50bcc4dc2def514154729e68cd3196 100644 --- a/apps/server/scripts/t3-sqlite-state.ts +++ b/apps/server/scripts/t3-sqlite-state.ts @@ -245,7 +245,7 @@ export const runSqliteState = Effect.fn("runSqliteState")(function* ( ); }); -export const t3SqliteStateCommand = Command.make( +const t3SqliteStateCommand = Command.make( "t3-sqlite-state", { operation: Argument.choice("operation", SqliteStateOperation.literals).pipe( diff --git a/apps/server/src/attachmentStore.ts b/apps/server/src/attachmentStore.ts index 261b094645b9a4e1aca7ca3736894972e4792ffa..4f098e1e6298316d3132cbff2ff9ead941e55634 100644 --- a/apps/server/src/attachmentStore.ts +++ b/apps/server/src/attachmentStore.ts @@ -22,7 +22,7 @@ const ATTACHMENT_ID_PATTERN = new RegExp( ); export const PENDING_ATTACHMENT_THREAD_SEGMENT = "pending"; -export const PENDING_ATTACHMENT_MAX_AGE_MS = 24 * 60 * 60 * 1000; +const PENDING_ATTACHMENT_MAX_AGE_MS = 24 * 60 * 60 * 1000; const PARTIAL_UPLOAD_MAX_AGE_MS = 60 * 60 * 1000; export function toSafeThreadAttachmentSegment(threadId: string): string | null { diff --git a/apps/server/src/auth/EnvironmentAuth.ts b/apps/server/src/auth/EnvironmentAuth.ts index bbc4a724c1d5d07c52be47d7d67c4edc468ddc6f..964fe6220d6b9977d84c9fa9524583a862539dfe 100644 --- a/apps/server/src/auth/EnvironmentAuth.ts +++ b/apps/server/src/auth/EnvironmentAuth.ts @@ -38,7 +38,7 @@ import * as SessionStore from "./SessionStore.ts"; import { verifyRequestDpopProof } from "./dpop.ts"; import { layerConfig as SqlitePersistenceLayer } from "../persistence/Layers/Sqlite.ts"; -export const DEFAULT_SESSION_SUBJECT = "cli-issued-session"; +const DEFAULT_SESSION_SUBJECT = "cli-issued-session"; export const INTERNAL_ADMINISTRATIVE_BOOTSTRAP_SUBJECT = "administrative-bootstrap"; export interface IssuedPairingLink { @@ -591,6 +591,7 @@ export function selectRequestCredential( return undefined; } +/** @public Service construction is part of the canonical Effect module API. */ export const make = Effect.gen(function* () { const policy = yield* EnvironmentAuthPolicy.EnvironmentAuthPolicy; const bootstrapCredentials = yield* PairingGrantStore.PairingGrantStore; @@ -1033,7 +1034,7 @@ export const layer = Layer.effect(EnvironmentAuth, make).pipe( Layer.provideMerge(EnvironmentAuthPolicy.layer), ); -export const storageLayer = Layer.mergeAll(ServerSecretStore.layer, SqlitePersistenceLayer); +const storageLayer = Layer.mergeAll(ServerSecretStore.layer, SqlitePersistenceLayer); export const runtimeLayer = layer.pipe( Layer.provideMerge(storageLayer), diff --git a/apps/server/src/auth/EnvironmentAuthPolicy.ts b/apps/server/src/auth/EnvironmentAuthPolicy.ts index 446b8a8bba95e0ea201b6dfaf35603116b37c926..0c3327d95f07e1d59bf81bf301cf7b0de61457a9 100644 --- a/apps/server/src/auth/EnvironmentAuthPolicy.ts +++ b/apps/server/src/auth/EnvironmentAuthPolicy.ts @@ -14,6 +14,7 @@ export class EnvironmentAuthPolicy extends Context.Service< } >()("t3/auth/EnvironmentAuthPolicy") {} +/** @public Service construction is part of the canonical Effect module API. */ export const make = Effect.gen(function* () { const config = yield* ServerConfig.ServerConfig; const serverEnvironment = yield* ServerEnvironment.ServerEnvironmentIdentity; diff --git a/apps/server/src/auth/PairingGrantStore.ts b/apps/server/src/auth/PairingGrantStore.ts index 14426d0ba0390c1158ba0c7686947475c125e49e..ec27c0a4e1473f092af1dcd7059fb2e70c671b8c 100644 --- a/apps/server/src/auth/PairingGrantStore.ts +++ b/apps/server/src/auth/PairingGrantStore.ts @@ -72,7 +72,6 @@ export const BootstrapCredentialInvalidError = Schema.Union([ UnavailableBootstrapCredentialError, ]); export type BootstrapCredentialInvalidError = typeof BootstrapCredentialInvalidError.Type; -export const isBootstrapCredentialInvalidError = Schema.is(BootstrapCredentialInvalidError); export class ActivePairingLinksLoadError extends Schema.TaggedError()( "ActivePairingLinksLoadError", @@ -173,7 +172,6 @@ export const BootstrapCredentialError = Schema.Union([ BootstrapCredentialInternalError, ]); export type BootstrapCredentialError = typeof BootstrapCredentialError.Type; -export const isBootstrapCredentialError = Schema.is(BootstrapCredentialError); export interface IssuedBootstrapCredential { readonly id: string; diff --git a/apps/server/src/auth/ServerSecretStore.ts b/apps/server/src/auth/ServerSecretStore.ts index dbeb5a7d07dda895dbbbe4e2f4096b9beae35819..e936a1f85c996a8e2bbc95eb6a38e5edc7065dc2 100644 --- a/apps/server/src/auth/ServerSecretStore.ts +++ b/apps/server/src/auth/ServerSecretStore.ts @@ -149,6 +149,7 @@ export class ServerSecretStore extends Context.Service< } >()("t3/auth/ServerSecretStore") {} +/** @public Service construction is part of the canonical Effect module API. */ export const make = Effect.gen(function* () { const crypto = yield* Crypto.Crypto; const fileSystem = yield* FileSystem.FileSystem; diff --git a/apps/server/src/auth/SessionStore.ts b/apps/server/src/auth/SessionStore.ts index 743b669bfdd814c4300ee6112ec1d38f4e4237e3..be8e7627bb204c376f1789f412353b61e9255cf9 100644 --- a/apps/server/src/auth/SessionStore.ts +++ b/apps/server/src/auth/SessionStore.ts @@ -349,14 +349,12 @@ export const SessionCredentialInternalError = Schema.Union([ OtherSessionsRevocationError, ]); export type SessionCredentialInternalError = typeof SessionCredentialInternalError.Type; -export const isSessionCredentialInternalError = Schema.is(SessionCredentialInternalError); export const SessionCredentialError = Schema.Union([ SessionCredentialInvalidError, SessionCredentialInternalError, ]); export type SessionCredentialError = typeof SessionCredentialError.Type; -export const isSessionCredentialError = Schema.is(SessionCredentialError); export class SessionStore extends Context.Service< SessionStore, diff --git a/apps/server/src/auth/http.ts b/apps/server/src/auth/http.ts index cc74966c41e24d87e03e61b95543fea2d275f31b..b50d6eae9a18f1fcc7c51cefe68dabf7828570c2 100644 --- a/apps/server/src/auth/http.ts +++ b/apps/server/src/auth/http.ts @@ -65,7 +65,7 @@ const appendDpopChallengeOnUnauthorized = (error: EnvironmentAuthInvalidError) = return yield* error; }); -export const currentEnvironmentTraceId = Effect.currentParentSpan.pipe( +const currentEnvironmentTraceId = Effect.currentParentSpan.pipe( Effect.map((span) => span.traceId), Effect.orElseSucceed(() => "unavailable"), ); diff --git a/apps/server/src/background/BackgroundPolicy.ts b/apps/server/src/background/BackgroundPolicy.ts index a2a8e99d33ce91338c56b1997bd34c132ce40fd0..ad74bf134a8956e5624366c44c9eb4a055a9488a 100644 --- a/apps/server/src/background/BackgroundPolicy.ts +++ b/apps/server/src/background/BackgroundPolicy.ts @@ -82,7 +82,7 @@ function leaseKey(lease: Pick, lease: ClientActivityLease, now: DateTime.Utc, @@ -208,6 +208,7 @@ function computeSnapshot(input: { }; } +/** @public Service construction is part of the canonical Effect module API. */ export const make = Effect.fn("background.policy.make")(function* () { const hostPowerMonitor = yield* HostPowerMonitor.HostPowerMonitor; const serverSettings = yield* ServerSettingsService; diff --git a/apps/server/src/background/HostPowerMonitor.ts b/apps/server/src/background/HostPowerMonitor.ts index 273548faa47f680a81b5f0d26a5a79b0f3349379..3d8c8b35998aa23c8c0e9fb8b67c9663dfbc4f2c 100644 --- a/apps/server/src/background/HostPowerMonitor.ts +++ b/apps/server/src/background/HostPowerMonitor.ts @@ -19,7 +19,7 @@ export class HostPowerMonitor extends Context.Service< } >()("t3/background/HostPowerMonitor") {} -export const makeUnknownSnapshot = ( +const makeUnknownSnapshot = ( source: HostPowerSnapshot["source"], updatedAt: HostPowerSnapshot["updatedAt"], ): HostPowerSnapshot => ({ diff --git a/apps/server/src/checkpointing/CheckpointDiffQuery.ts b/apps/server/src/checkpointing/CheckpointDiffQuery.ts index 077506ff3a84b1f94acdef8bb15a5a048b054150..5d6aa7c9d20aba20cc1f1ec51c7b2a022c5644ba 100644 --- a/apps/server/src/checkpointing/CheckpointDiffQuery.ts +++ b/apps/server/src/checkpointing/CheckpointDiffQuery.ts @@ -75,6 +75,7 @@ function buildTurnDiffResult( }; } +/** @public Service construction is part of the canonical Effect module API. */ export const make = Effect.gen(function* () { const projectionSnapshotQuery = yield* ProjectionSnapshotQuery.ProjectionSnapshotQuery; const checkpointStore = yield* CheckpointStore.CheckpointStore; diff --git a/apps/server/src/checkpointing/CheckpointStore.ts b/apps/server/src/checkpointing/CheckpointStore.ts index f1cc596b209d3531e478550d8e5c34d0e19a514f..0c9e60d76a6581a86e0763db1f1ff63e19b74aa4 100644 --- a/apps/server/src/checkpointing/CheckpointStore.ts +++ b/apps/server/src/checkpointing/CheckpointStore.ts @@ -98,6 +98,7 @@ export class CheckpointStore extends Context.Service< } >()("t3/checkpointing/CheckpointStore") {} +/** @public Service construction is part of the canonical Effect module API. */ export const make = Effect.gen(function* () { const vcsRegistry = yield* VcsDriverRegistry.VcsDriverRegistry; diff --git a/apps/server/src/checkpointing/Utils.ts b/apps/server/src/checkpointing/Utils.ts index 50d0163af5a6db650f8295e96c46de49996996f9..adc089f624a8c623e242706eb05456b48eb1efcf 100644 --- a/apps/server/src/checkpointing/Utils.ts +++ b/apps/server/src/checkpointing/Utils.ts @@ -1,7 +1,7 @@ import * as Encoding from "effect/Encoding"; import { CheckpointRef, ProjectId, type ThreadId } from "@t3tools/contracts"; -export const CHECKPOINT_REFS_PREFIX = "refs/t3/checkpoints"; +const CHECKPOINT_REFS_PREFIX = "refs/t3/checkpoints"; export function checkpointRefForThreadTurn(threadId: ThreadId, turnCount: number): CheckpointRef { return CheckpointRef.make( diff --git a/apps/server/src/cli/app.ts b/apps/server/src/cli/app.ts index 6342d4319a57c5947b41c401d316bd5c33f34c9e..3fc6deedb0ced2071251af386528ad8febe605df 100644 --- a/apps/server/src/cli/app.ts +++ b/apps/server/src/cli/app.ts @@ -81,7 +81,7 @@ function isDesktopPlatform(platform: NodeJS.Platform): platform is DesktopAppAct return platform === "darwin" || platform === "linux" || platform === "win32"; } -export function sendDesktopAppActivationRequest(input: { +function sendDesktopAppActivationRequest(input: { readonly address: string; readonly fallbackAddress?: string; readonly request: DesktopAppActivationRequest; diff --git a/apps/server/src/cli/config.ts b/apps/server/src/cli/config.ts index f739a4e2f22c694a238a177a223c44e81e2efae0..847edbbc4fe085fe05bb6eb1bcd55b2a5a903f42 100644 --- a/apps/server/src/cli/config.ts +++ b/apps/server/src/cli/config.ts @@ -17,7 +17,7 @@ import { readBootstrapEnvelope } from "../bootstrap.ts"; import * as ServerConfig from "../config.ts"; import { expandHomePath, resolveBaseDir } from "../os-jank.ts"; -export const modeFlag = Flag.choice("mode", ServerConfig.RuntimeMode.literals).pipe( +const modeFlag = Flag.choice("mode", ServerConfig.RuntimeMode.literals).pipe( Flag.withDescription("Runtime mode. `desktop` keeps loopback defaults unless overridden."), Flag.optional, ); @@ -69,7 +69,7 @@ const tailscaleServeFlag = Flag.boolean("tailscale-serve").pipe( ), Flag.optional, ); -export const tailscaleServePortFlag = Flag.integer("tailscale-serve-port").pipe( +const tailscaleServePortFlag = Flag.integer("tailscale-serve-port").pipe( Flag.withSchema(PortSchema), Flag.withDescription("HTTPS port for Tailscale Serve when --tailscale-serve is enabled."), Flag.optional, diff --git a/apps/server/src/cli/pair.ts b/apps/server/src/cli/pair.ts index 5e62f285be46fb38d763db99243f772374c38fd4..7fd376c6f8818a7c08867a9f50a23d419628d5fc 100644 --- a/apps/server/src/cli/pair.ts +++ b/apps/server/src/cli/pair.ts @@ -173,7 +173,7 @@ export const resolveTailscaleLocalTarget = ( return { localPort: state.port }; }; -export const formatPairOutput = (input: { +const formatPairOutput = (input: { readonly serverLabel: string; readonly origin: string; readonly pairingUrl: string; diff --git a/apps/server/src/cloud/CliTokenManager.ts b/apps/server/src/cloud/CliTokenManager.ts index a5829d90481a40bbb6a5c97a02e724007dec8a9a..8f7ac7bfc8d4a66c867489a6b171d1301d691bba 100644 --- a/apps/server/src/cloud/CliTokenManager.ts +++ b/apps/server/src/cloud/CliTokenManager.ts @@ -324,6 +324,7 @@ export const outOfBandOAuthLogin = Effect.fn("cloud.cli_token.out_of_band_oauth_ }); }); +/** @public Service construction is part of the canonical Effect module API. */ export const make = Effect.gen(function* () { // Capture exactly the services the login/refresh flows need at build time // (matching the behavior before the out-of-band flow captured the instances), not diff --git a/apps/server/src/cloud/ManagedEndpointRuntime.ts b/apps/server/src/cloud/ManagedEndpointRuntime.ts index 564d7346d0366d624045d1e149e2d354a233bd81..cc657bdebf1b390b4d5c36a5147a63223b12814a 100644 --- a/apps/server/src/cloud/ManagedEndpointRuntime.ts +++ b/apps/server/src/cloud/ManagedEndpointRuntime.ts @@ -111,6 +111,7 @@ const stopConnector = (connector: ActiveConnector | null) => ) : Effect.void; +/** @public Service construction is part of the canonical Effect module API. */ export const make = Effect.gen(function* () { const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; const relayClient = yield* RelayClient.RelayClient; diff --git a/apps/server/src/cloud/publicConfig.ts b/apps/server/src/cloud/publicConfig.ts index e977d7cfdf0d002ee8415d6cd5c4d0fa0ac2ccec..d60a09b6decb5eb0b45656510bebf6728bbbd2fe 100644 --- a/apps/server/src/cloud/publicConfig.ts +++ b/apps/server/src/cloud/publicConfig.ts @@ -49,21 +49,21 @@ function normalizeSecureUrl(value: string): string | null { } } -export const buildTimeRelayUrl = +const buildTimeRelayUrl = typeof __T3CODE_BUILD_RELAY_URL__ === "undefined" ? "" : (normalizeSecureRelayUrl(__T3CODE_BUILD_RELAY_URL__) ?? ""); -export const buildTimeClerkPublishableKey = readBuildTimeValue( +const buildTimeClerkPublishableKey = readBuildTimeValue( typeof __T3CODE_BUILD_CLERK_PUBLISHABLE_KEY__ === "undefined" ? undefined : __T3CODE_BUILD_CLERK_PUBLISHABLE_KEY__, ); -export const buildTimeClerkCliOAuthClientId = readBuildTimeValue( +const buildTimeClerkCliOAuthClientId = readBuildTimeValue( typeof __T3CODE_BUILD_CLERK_CLI_OAUTH_CLIENT_ID__ === "undefined" ? undefined : __T3CODE_BUILD_CLERK_CLI_OAUTH_CLIENT_ID__, ); -export const buildTimeRelayClientTracing = { +const buildTimeRelayClientTracing = { tracesUrl: readBuildTimeValue( typeof __T3CODE_BUILD_RELAY_CLIENT_OTLP_TRACES_URL__ === "undefined" ? undefined diff --git a/apps/server/src/cloud/serviceProtocol.ts b/apps/server/src/cloud/serviceProtocol.ts index af94c9b4b5c0ed4769a0270e1bd91b508f0ec17a..bb61866a93ffce0332ab71291b17664ac70a4196 100644 --- a/apps/server/src/cloud/serviceProtocol.ts +++ b/apps/server/src/cloud/serviceProtocol.ts @@ -71,7 +71,7 @@ export const isExactServiceVersion = (version: string): boolean => const isRecord = (value: unknown): value is Record => typeof value === "object" && value !== null && !Array.isArray(value); -export function decodeServiceUpdate(value: unknown): ServiceUpdateRecord | undefined { +function decodeServiceUpdate(value: unknown): ServiceUpdateRecord | undefined { if (!isRecord(value)) return undefined; const { id, fromVersion, targetVersion, status } = value; if ( diff --git a/apps/server/src/environment/RemoteOpenTargets.ts b/apps/server/src/environment/RemoteOpenTargets.ts index f70dfa68aaabde5794117cc41cb09d12c5545aa7..c0cd658a28c7f5a26850df7961ff3d6b86d6ffc3 100644 --- a/apps/server/src/environment/RemoteOpenTargets.ts +++ b/apps/server/src/environment/RemoteOpenTargets.ts @@ -26,6 +26,7 @@ export class RemoteOpenTargets extends Context.Service< } >()("t3/environment/RemoteOpenTargets") {} +/** @public Service construction is part of the canonical Effect module API. */ export const make = Effect.gen(function* () { const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; const net = yield* NetService.NetService; diff --git a/apps/server/src/environment/ServerEnvironment.ts b/apps/server/src/environment/ServerEnvironment.ts index a3840ca0caaab6276734ca6cda4ee467f9d59930..bf02cd90fbdf1dc48be3257268c7650c6240138b 100644 --- a/apps/server/src/environment/ServerEnvironment.ts +++ b/apps/server/src/environment/ServerEnvironment.ts @@ -179,6 +179,7 @@ const makeIdentity = Effect.gen(function* () { }); }); +/** @public Service construction is part of the canonical Effect module API. */ export const make = Effect.gen(function* () { const path = yield* Path.Path; const serverConfig = yield* ServerConfig.ServerConfig; diff --git a/apps/server/src/imageMime.ts b/apps/server/src/imageMime.ts index 66ce6096e853f2bd39ebc5b78b106d2df5b93fe8..1129edfd3ef1678070ff6d755152abb1594412c6 100644 --- a/apps/server/src/imageMime.ts +++ b/apps/server/src/imageMime.ts @@ -1,6 +1,6 @@ import Mime from "@effect/platform-node/Mime"; -export const IMAGE_EXTENSION_BY_MIME_TYPE: Record = { +const IMAGE_EXTENSION_BY_MIME_TYPE: Record = { "image/avif": ".avif", "image/bmp": ".bmp", "image/gif": ".gif", diff --git a/apps/server/src/persistence/AuthPairingLinks.ts b/apps/server/src/persistence/AuthPairingLinks.ts index e54c977e7ab7544a6364598a0aba0ca6934d0d51..aae55dd2fe06e20d9477884a6351c1614e3476a0 100644 --- a/apps/server/src/persistence/AuthPairingLinks.ts +++ b/apps/server/src/persistence/AuthPairingLinks.ts @@ -119,6 +119,7 @@ function toPersistenceSqlOrDecodeError( }); } +/** @public Service construction is part of the canonical Effect module API. */ export const make = Effect.gen(function* () { const sql = yield* SqlClient.SqlClient; diff --git a/apps/server/src/persistence/AuthSessions.ts b/apps/server/src/persistence/AuthSessions.ts index aebbb839e5ce35948e68ba79404dd501c5dc57ee..37db33556e230e4247fc84234b409092ed733f2f 100644 --- a/apps/server/src/persistence/AuthSessions.ts +++ b/apps/server/src/persistence/AuthSessions.ts @@ -200,6 +200,7 @@ function toPersistenceSqlOrDecodeError( }); } +/** @public Service construction is part of the canonical Effect module API. */ export const make = Effect.gen(function* () { const sql = yield* SqlClient.SqlClient; diff --git a/apps/server/src/persistence/Migrations.ts b/apps/server/src/persistence/Migrations.ts index c95f746d3648b7db5d8ccbe74e4132043230f325..bc176f62cc3c8a9779c61b6201947571e0fb354f 100644 --- a/apps/server/src/persistence/Migrations.ts +++ b/apps/server/src/persistence/Migrations.ts @@ -72,7 +72,7 @@ import Migration0049 from "./Migrations/049_ProjectionThreadsActiveOrderKey.ts"; * Uses Migrator.fromRecord which parses the key format and * returns migrations sorted by ID. */ -export const migrationEntries = [ +const migrationEntries = [ [1, "OrchestrationEvents", Migration0001], [2, "OrchestrationCommandReceipts", Migration0002], [3, "CheckpointDiffBlobs", Migration0003], @@ -126,7 +126,7 @@ export const migrationEntries = [ export const migrationManifest = migrationEntries.map(([id, name]) => [id, name] as const); -export const makeMigrationLoader = (throughId?: number) => +const makeMigrationLoader = (throughId?: number) => Migrator.fromRecord( Object.fromEntries( migrationEntries diff --git a/apps/server/src/persistence/ProviderSessionRuntime.ts b/apps/server/src/persistence/ProviderSessionRuntime.ts index d73f56aab9e0d81b6093742b147c9229bbe97db8..2673512edf10720e34d52b11e79c595181781d6d 100644 --- a/apps/server/src/persistence/ProviderSessionRuntime.ts +++ b/apps/server/src/persistence/ProviderSessionRuntime.ts @@ -166,6 +166,7 @@ function toPersistenceSqlOrDecodeError( }); } +/** @public Service construction is part of the canonical Effect module API. */ export const make = Effect.gen(function* () { const sql = yield* SqlClient.SqlClient; diff --git a/apps/server/src/process/externalLauncher.ts b/apps/server/src/process/externalLauncher.ts index 184c8b519a961936aa2f8040a864dca2d8a7cc91..2b7310051b894f71bf098f89154990aa725b024e 100644 --- a/apps/server/src/process/externalLauncher.ts +++ b/apps/server/src/process/externalLauncher.ts @@ -752,6 +752,7 @@ const launchEditorProcess = Effect.fn("externalLauncher.launchEditorProcess")(fu ); }); +/** @public Service construction is part of the canonical Effect module API. */ export const make = Effect.gen(function* () { const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; const fileSystem = yield* FileSystem.FileSystem; diff --git a/apps/server/src/processRunner.ts b/apps/server/src/processRunner.ts index 4aefc3ba43f56706646732f34c5d7056bdb22122..25ed54e44fc6ffb96dcc397e31d3d30e9e1ceac1 100644 --- a/apps/server/src/processRunner.ts +++ b/apps/server/src/processRunner.ts @@ -399,6 +399,7 @@ const runProcessCore = Effect.fn("processRunner.runProcessCore")(function* ( } satisfies ProcessRunOutput; }); +/** @public Service construction is part of the canonical Effect module API. */ export const make = Effect.fn("ProcessRunner.make")(function* () { const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; diff --git a/apps/server/src/server.ts b/apps/server/src/server.ts index 349644966f26e810c2494413a704d357983b252e..fd8ee4a4f699bf8db729fb5d85781f9d66f950f6 100644 --- a/apps/server/src/server.ts +++ b/apps/server/src/server.ts @@ -564,7 +564,7 @@ export const makeRoutesLayer = Layer.mergeAll( Layer.provide(httpCompressionLayer), ); -export const makeServerLayer = Layer.unwrap( +const makeServerLayer = Layer.unwrap( Effect.gen(function* () { const config = yield* ServerConfig.ServerConfig; const activation = yield* Deferred.make(); diff --git a/apps/server/src/serverRuntimeStartup.ts b/apps/server/src/serverRuntimeStartup.ts index 1751a130814e9852ded5ab8952f10262d9fc4886..3d04abaa1914d64deca77aa07031f27ee813bdc9 100644 --- a/apps/server/src/serverRuntimeStartup.ts +++ b/apps/server/src/serverRuntimeStartup.ts @@ -147,7 +147,7 @@ export const makeCommandGate = Effect.gen(function* () { } satisfies CommandGate; }); -export const recordStartupHeartbeat = Effect.gen(function* () { +const recordStartupHeartbeat = Effect.gen(function* () { const analytics = yield* AnalyticsService.AnalyticsService; const projectionSnapshotQuery = yield* ProjectionSnapshotQuery.ProjectionSnapshotQuery; @@ -466,7 +466,7 @@ const clearContinuationMarkers = ( { concurrency: "unbounded", discard: true }, ); -export const clearProviderSessionContinuationMarkers = (threadIds: ReadonlyArray) => +const clearProviderSessionContinuationMarkers = (threadIds: ReadonlyArray) => Effect.gen(function* () { const directory = yield* ProviderSessionDirectory.ProviderSessionDirectory; yield* clearContinuationMarkers(directory, threadIds); @@ -803,6 +803,7 @@ export const autoPullProjects = Effect.fn("autoPullProjects")(function* ( ); }); +/** @public Service construction is part of the canonical Effect module API. */ export const make = (options?: StartupOptions) => Effect.gen(function* () { const serverConfig = yield* ServerConfig.ServerConfig; diff --git a/apps/server/src/serverSettings.ts b/apps/server/src/serverSettings.ts index fe72147dfa0c392f732a359f023171c51c748128..0b64d445adf835a6ef0c8d64141912f6c80166e9 100644 --- a/apps/server/src/serverSettings.ts +++ b/apps/server/src/serverSettings.ts @@ -142,7 +142,7 @@ function providerEnvironmentSecretName(input: { */ const USAGE_LIMIT_SOURCE_KEY_REDACTED = "\u2022\u2022\u2022\u2022\u2022\u2022"; -export function usageLimitSourceSecretName(sourceId: string): string { +function usageLimitSourceSecretName(sourceId: string): string { return `usage-limit-source-${Buffer.from(sourceId, "utf8").toString("base64url")}`; }