# Files changed · PR \#10277 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/10277/diffs)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

[refactor\(server\): classify telemetry exports](https://git.cafe/pingdotgg/t3code/pull/10277.md)

Version: 2

Head commit: 71d237b15304d483225aa9c5136618396b38db12

Base commit: 4f890a2689834d586693264eb984b6392359c77d

Comparison base: 4f890a2689834d586693264eb984b6392359c77d

Showing up to 20 entries from this revision. If the pull request changes, reopen the first page before continuing.

## apps/server/integration/NetworkTransferMeasurement.integration.ts

Status: modified; +3; −3

```diff
@@ -120,7 +120,7 @@
   return data.byteLength;
 }
 
-export function makeWebSocketTransferRecorder(): WebSocketTransferRecorder {
+function makeWebSocketTransferRecorder(): WebSocketTransferRecorder {
   let socket: NodeWebSocketWithTransport | null = null;
   // Held separately from the WebSocket so wire totals survive a close, which
   // is when a reconnect measurement reads them.
@@ -176,7 +176,7 @@
   };
 }
 
-export function countingWsRpcProtocolLayer(input: {
+function countingWsRpcProtocolLayer(input: {
   readonly url: string;
   readonly cookie: string;
   readonly recorder: WebSocketTransferRecorder;
@@ -194,7 +194,7 @@
   );
 }
 
+const makeCountingWsRpcClient = RpcClient.make(WsRpcGroup);
-export const makeCountingWsRpcClient = RpcClient.make(WsRpcGroup);
 export type CountingWsRpcClient = Effect.Success<typeof makeCountingWsRpcClient>;
 
 export interface MeasuredWsClient {
```

## apps/server/integration/TransferBudgetReport.integration.ts

Status: modified; +1; −1

```diff
@@ -56,7 +56,7 @@
   measuredTurnWebSocketMessages: 21,
 } satisfies ProviderTransferBudget;
 
-export const TRANSFER_BUDGETS: Readonly<Record<string, ProviderTransferBudget>> = {
+const TRANSFER_BUDGETS: Readonly<Record<string, ProviderTransferBudget>> = {
   codex: TRANSFER_BUDGET,
   claudeAgent: TRANSFER_BUDGET,
 };
```

## apps/server/integration/TransferBudgetScenario.integration.ts

Status: modified; +1; −1

```diff
@@ -26,7 +26,7 @@
   TRANSFER_HISTORY_TURN_COUNT,
 } from "./fixtures/transferBudget.ts";
 
-export const TRANSFER_PROJECT_ID = ProjectId.make("transfer-budget-project");
+const TRANSFER_PROJECT_ID = ProjectId.make("transfer-budget-project");
 export const TRANSFER_THREAD_ID = ThreadId.make("transfer-budget-thread");
 export const TRANSFER_MEASURED_TURN_INDEX = TRANSFER_HISTORY_TURN_COUNT;
 
```

## apps/server/src/diagnostics/ProcessDiagnostics.ts

Status: modified; +1; −0

```diff
@@ -54,6 +54,7 @@
   );
 }
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = Effect.fn("makeProcessDiagnostics")(function* () {
   const telemetry = yield* ResourceTelemetry.ResourceTelemetry;
   const refreshedTelemetry = telemetry.refresh.pipe(Effect.catch(() => telemetry.latest));
```

## apps/server/src/diagnostics/ProcessResourceMonitor.ts

Status: modified; +1; −0

```diff
@@ -28,6 +28,7 @@
   );
 }
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = Effect.fn("makeProcessResourceMonitor")(function* () {
   const telemetry = yield* ResourceTelemetry.ResourceTelemetry;
   const readHistory: ProcessResourceMonitor["Service"]["readHistory"] = (input) =>
```

## apps/server/src/diagnostics/TraceDiagnostics.ts

Status: modified; +1; −0

```diff
@@ -411,6 +411,7 @@
   );
 }
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = Effect.gen(function* () {
   const fileSystem = yield* FileSystem.FileSystem;
 
```

## apps/server/src/resourceTelemetry/DesktopTelemetryReceiver.ts

Status: modified; +1; −0

```diff
@@ -327,6 +327,7 @@
     : Effect.fail(new DesktopTelemetryControlStalled({ fd, remainingBytes }));
 }
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = Effect.fn("resourceTelemetry.desktopTelemetryReceiver.make")(function* () {
   const config = yield* ServerConfig;
   const serverSettings = yield* ServerSettingsService;
```

## apps/server/src/resourceTelemetry/Model.ts

Status: modified; +1; −1

```diff
@@ -68,7 +68,7 @@
   readonly deltas: ReadonlyArray<ProcessDelta>;
 }
 
-export const emptyGroupCounters = (): GroupCounters => ({
+const emptyGroupCounters = (): GroupCounters => ({
   cpuTimeMs: 0,
   ioReadBytes: 0,
   ioWriteBytes: 0,
```

## apps/server/src/resourceTelemetry/NativeTelemetryClient.ts

Status: modified; +1; −0

```diff
@@ -360,6 +360,7 @@
   return hasHandle && (status === "healthy" || status === "degraded");
 }
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = Effect.fn("resourceTelemetry.nativeTelemetryClient.make")(function* () {
   const binary = yield* ResourceMonitorBinary.ResourceMonitorBinary;
   const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
```

## apps/server/src/resourceTelemetry/ResourceMonitorBinary.ts

Status: modified; +2; −2

```diff
@@ -90,7 +90,7 @@
   },
 );
 
-export function resourceMonitorPlatformKey(
+function resourceMonitorPlatformKey(
   platform: NodeJS.Platform,
   architecture: NodeJS.Architecture,
 ): string | undefined {
@@ -103,7 +103,7 @@
   return `${platform}-${architecture}`;
 }
 
-export function resourceMonitorRustTarget(
+function resourceMonitorRustTarget(
   platform: NodeJS.Platform,
   architecture: NodeJS.Architecture,
   linuxLibc?: ResourceMonitorLinuxLibc,
```

## apps/server/src/resourceTelemetry/ResourceTelemetry.ts

Status: modified; +1; −0

```diff
@@ -142,6 +142,7 @@
   };
 }
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = Effect.fn("resourceTelemetry.resourceTelemetry.make")(function* () {
   const nativeClient = yield* NativeTelemetryClient.NativeTelemetryClient;
   const desktopReceiver = yield* DesktopTelemetryReceiver.DesktopTelemetryReceiver;
```

## apps/server/src/telemetry/AnalyticsService.ts

Status: modified; +2; −1

```diff
@@ -67,7 +67,7 @@
   );
 }
 
-export function serverOsFromNodePlatform(platform: string): ClientOs {
+function serverOsFromNodePlatform(platform: string): ClientOs {
   switch (platform) {
     case "darwin":
       return "macOS";
@@ -82,6 +82,7 @@
   }
 }
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = Effect.gen(function* () {
   const telemetryConfig = yield* TelemetryEnvConfig;
   const httpClient = yield* HttpClient.HttpClient;
```

## apps/server/src/usage/UsageLimitSources.ts

Status: modified; +1; −0

```diff
@@ -60,6 +60,7 @@
   }
 }
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = Effect.gen(function* () {
   const api = yield* makeCliproxyApi;
   const settingsService = yield* ServerSettingsService;
```

## apps/server/src/usage/usageAggregation.ts

Status: modified; +1; −1

```diff
@@ -23,7 +23,7 @@
  * `en-CA` yields ISO-ordered parts, which is why it is used here rather than
  * assembling the day from `Date` getters (those are host-local only).
  */
-export function makeDayFormatter(timeZone: string): (timestampMs: number) => string {
+function makeDayFormatter(timeZone: string): (timestampMs: number) => string {
   let format: Intl.DateTimeFormat;
   try {
     format = new Intl.DateTimeFormat("en-CA", {
```

## apps/server/src/usage/usageScanCache.ts

Status: modified; +1; −1

```diff
@@ -26,7 +26,7 @@
 // entries would keep serving double-counted records forever.
 // v3: entries carry the parse position and reducer state so a grown file
 // re-parses only its appended bytes instead of starting over.
-export const USAGE_SCAN_CACHE_VERSION = 3 as const;
+const USAGE_SCAN_CACHE_VERSION = 3 as const;
 
 export interface CachedFile {
   readonly size: number;
```

## apps/server/src/usage/usageTranscripts.ts

Status: modified; +1; −1

```diff
@@ -79,7 +79,7 @@
  */
 export const GROK_COST_USD_TICKS_PER_DOLLAR = 10_000_000_000;
 
-export function grokCostTicksToUsd(ticks: unknown): number | null {
+function grokCostTicksToUsd(ticks: unknown): number | null {
   if (typeof ticks !== "number" || !Number.isFinite(ticks) || ticks < 0) return null;
   return ticks / GROK_COST_USD_TICKS_PER_DOLLAR;
 }
```
