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

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

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

Visibility: public

[refactor\(shared\): remove unused runtime helpers and exports](https://git.cafe/pingdotgg/t3code/pull/10166.md)

Version: 8

Head commit: 56a7d66e15efa66ce4c934324cdcd7fd5ab6f798

Base commit: cb9a6942363ed7f097c7d1fb075bf3a265fbf5d2

Comparison base: cb9a6942363ed7f097c7d1fb075bf3a265fbf5d2

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

## apps/web/src/sourceControlPresentation.ts

Status: modified; +0; −2

```diff
@@ -3,8 +3,6 @@
 import type { SourceControlProviderInfo, SourceControlProviderKind } from "@t3tools/contracts";
 export {
   DEFAULT_CHANGE_REQUEST_TERMINOLOGY,
-  formatChangeRequestAction,
-  formatCreateChangeRequestPhrase,
   getChangeRequestTerminology,
   resolveChangeRequestPresentation,
   type ChangeRequestPresentation,
```

## packages/shared/src/Net.ts

Status: modified; +1; −0

```diff
@@ -63,6 +63,7 @@
   "@t3tools/shared/Net/NetService",
 ) {}
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = () => {
   /**
    * Returns true when a TCP server can bind to {host, port}.
```

## packages/shared/src/agentAwareness.ts

Status: modified; +1; −1

```diff
@@ -43,7 +43,7 @@
   >;
 }
 
-export function buildAgentAwarenessDeepLink(input: {
+function buildAgentAwarenessDeepLink(input: {
   readonly environmentId: EnvironmentId;
   readonly threadId: ThreadId;
 }): string {
```

## packages/shared/src/composerTrigger.ts

Status: modified; +0; −12

```diff
@@ -115,18 +115,6 @@
   };
 }
 
-export function parseStandaloneComposerSlashCommand(
-  text: string,
-): Exclude<ComposerSlashCommand, "model"> | null {
-  const match = /^\/(plan|default)\s*$/i.exec(text.trim());
-  if (!match) {
-    return null;
-  }
-  const command = match[1]?.toLowerCase();
-  if (command === "plan") return "plan";
-  return "default";
-}
-
 export function replaceTextRange(
   text: string,
   rangeStart: number,
```

## packages/shared/src/httpReadiness.ts

Status: modified; +1; −1

```diff
@@ -5,7 +5,7 @@
 import * as Schedule from "effect/Schedule";
 import { HttpClient, HttpClientRequest } from "effect/unstable/http";
 
-export const DEFAULT_HTTP_READY_PROBE_TIMEOUT_MS = 1_000;
+const DEFAULT_HTTP_READY_PROBE_TIMEOUT_MS = 1_000;
 
 /**
  * Normalizes an arbitrary readiness probe failure into a plain, structured value
```

## packages/shared/src/model.ts

Status: modified; +2; −7

```diff
@@ -35,7 +35,7 @@
   return selection?.value;
 }
 
-export function getProviderOptionSelectionValue(
+function getProviderOptionSelectionValue(
   selections: ReadonlyArray<ProviderOptionSelection> | null | undefined,
   id: string,
 ): string | boolean | undefined {
@@ -298,11 +298,6 @@
   return entries;
 }
 
-/** Slugs of a `customModels` setting, in stored order. */
-export function readCustomModelSlugs(value: unknown): string[] {
-  return readCustomModelEntries(value).map((entry) => entry.slug);
-}
-
 /**
  * Write a definition back to the compact stored shape: a bare slug when it
  * carries nothing custom, otherwise an entry with only the set fields.
@@ -361,7 +356,7 @@
 }
 
 /** Trim a string, returning null for empty/missing values. */
-export function trimOrNull<T extends string>(value: T | null | undefined): T | null {
+function trimOrNull<T extends string>(value: T | null | undefined): T | null {
   if (typeof value !== "string") return null;
   const trimmed = value.trim() as T;
   return trimmed || null;
```

## packages/shared/src/observability.ts

Status: modified; +1; −1

```diff
@@ -303,7 +303,7 @@
   return truncated ?? attributes;
 }
 
-export function spanToTraceRecord(span: SerializableSpan): EffectTraceRecord {
+function spanToTraceRecord(span: SerializableSpan): EffectTraceRecord {
   const status = span.status as Extract<Tracer.SpanStatus, { _tag: "Ended" }>;
   const parentSpanId = Option.getOrUndefined(span.parent)?.spanId;
 
```

## packages/shared/src/orchestrationTiming.ts

Status: modified; +1; −1

```diff
@@ -28,7 +28,7 @@
   return parts.join(" ");
 }
 
-export function isLatestTurnSettled(
+function isLatestTurnSettled(
   latestTurn: LatestTurnTiming | null,
   session: SessionActivityState | null,
 ): boolean {
```

## packages/shared/src/relayClient.ts

Status: modified; +1; −1

```diff
@@ -20,7 +20,7 @@
 import { HostProcessArchitecture, HostProcessPlatform } from "./hostProcess.ts";
 
 export const CLOUDFLARED_VERSION = "2026.5.2";
-export const CLOUDFLARED_PATH_ENV_NAME = "T3CODE_CLOUDFLARED_PATH";
+const CLOUDFLARED_PATH_ENV_NAME = "T3CODE_CLOUDFLARED_PATH";
 
 export type RelayClientExecutableSource = "override" | "managed" | "path";
 
```

## packages/shared/src/schemaJson.ts

Status: modified; +2; −2

```diff
@@ -199,12 +199,12 @@
  * strips trailing commas and JS-style comments before parsing.
  * Encoding produces strict JSON via `JSON.stringify`.
  */
-export const fromLenientJsonString = new SchemaTransformation.Transformation(
+const fromLenientJsonString = new SchemaTransformation.Transformation(
   parseLenientJsonGetter,
   SchemaGetter.stringifyJson(),
 );
 
-export const prettyJsonString = SchemaGetter.parseJson<string>().compose(
+const prettyJsonString = SchemaGetter.parseJson<string>().compose(
   SchemaGetter.stringifyJson({ space: 2 }),
 );
 
```

## packages/shared/src/schemaYaml.ts

Status: modified; +4; −52

````diff
@@ -32,32 +32,8 @@
   return `Invalid YAML (code=${error.code}${location}).`;
 }
 
-/**
- * Parses a YAML string into a value.
- *
- * **When to use**
- *
- * Use when you need a schema getter to parse a present encoded YAML string
- * during decoding.
- *
- * **Details**
- *
- * Parse failures become `SchemaIssue.InvalidValue` values.
- *
- * **Example** (Parse YAML)
- *
- * ```ts
- * import { parseYaml } from "@t3tools/shared/schemaYaml"
- *
- * const parse = parseYaml<string>()
- * // Getter<unknown, string>
- * ```
- *
- * @see {@link stringifyYaml} for the inverse operation
- */
+/** Parses YAML during decoding, reporting parse failures as InvalidValue issues. */
+function parseYaml<E extends string>(options?: YamlParseOptions): SchemaGetter.Getter<unknown, E> {
-export function parseYaml<E extends string>(
-  options?: YamlParseOptions,
-): SchemaGetter.Getter<unknown, E> {
   return SchemaGetter.transformOrFail((input: E) =>
     Effect.try({
       try: () => parseYamlString(input, options) as unknown,
@@ -66,32 +42,8 @@
   );
 }
 
-/**
- * Stringifies a present value as YAML.
- *
- * **When to use**
- *
- * Use when you need a schema getter to serialize a present decoded value to
- * YAML text during encoding.
- *
- * **Details**
- *
- * Stringify failures become `SchemaIssue.InvalidValue` values.
- *
- * **Example** (Stringify YAML)
- *
- * ```ts
- * import { stringifyYaml } from "@t3tools/shared/schemaYaml"
- *
- * const stringify = stringifyYaml()
- * // Getter<string, unknown>
- * ```
- *
- * @see {@link parseYaml} for the inverse operation
- */
+/** Serializes YAML during encoding, reporting stringify failures as InvalidValue issues. */
+function stringifyYaml(options?: YamlStringifyOptions): SchemaGetter.Getter<string, unknown> {
-export function stringifyYaml(
-  options?: YamlStringifyOptions,
-): SchemaGetter.Getter<string, unknown> {
   return SchemaGetter.transformOrFail((input: unknown) =>
     Effect.try({
       try: () => stringifyYamlValue(input, options),
````

## packages/shared/src/sourceControl.ts

Status: modified; +1; −12

```diff
@@ -92,23 +92,12 @@
   }
 }
 
-export function resolveChangeRequestPresentationForKind(
+function resolveChangeRequestPresentationForKind(
   kind: SourceControlProviderKind,
 ): ChangeRequestPresentation {
   return resolveChangeRequestPresentation({ kind, name: "", baseUrl: "" });
 }
 
-export function formatChangeRequestAction(
-  verb: "View" | "Create",
-  presentation: ChangeRequestPresentation,
-): string {
-  return `${verb} ${presentation.shortName}`;
-}
-
-export function formatCreateChangeRequestPhrase(presentation: ChangeRequestPresentation): string {
-  return `create ${presentation.shortName}`;
-}
-
 export function getChangeRequestTerminology(
   provider: SourceControlProviderInfo | null | undefined,
 ): ChangeRequestTerminology {
```

## packages/shared/src/usageLimits.ts

Status: modified; +1; −1

```diff
@@ -161,7 +161,7 @@
   return limits.windows.length === 0 ? "No limits reported." : null;
 }
 
-export function resetMillis(window: ServerProviderUsageWindow): number | null {
+function resetMillis(window: ServerProviderUsageWindow): number | null {
   if (window.resetsAt === undefined) return null;
   const at = Date.parse(window.resetsAt);
   return Number.isFinite(at) ? at : null;
```
