# refactor\(contracts\): keep unused settings and relay exports private · PR \#10170 · pingdotgg/t3code

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

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

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: cleanup-packages/domain-contracts

Target branch: cleanup-packages/client-contracts

Head commit: b37eb8ea1cf53ab16ad0c9e0ba21fd3bdc319cb4

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/10170)

[Commits](https://git.cafe/pingdotgg/t3code/pull/10170/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/10170/diffs?format=markdown)

## Description

---

Settings defaults, a schema factory, and assembled relay HTTP groups are exported without external consumers.

Keep those runtime implementation values private. Preserve the settings and relay schemas and all exported types. No schema aliases or checkpoint consumers change. This PR now touches only settings.ts and relay.ts.

Verification: contracts and consumer typechecks pass; existing contracts tests and the integrated Knip gate pass. No existing tests were changed or removed.

Follows [#10169](https://github.com/pingdotgg/t3code/pull/10169).

<!-- Macroscope's pull request summary starts here -->
<!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. -->
<!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. -->
> [!NOTE]
> ### Make `relay` API groups and `settings` defaults module-local in contracts
> Changes the seven relay HTTP API groups in [relay.ts](https://github.com/pingdotgg/t3code/pull/10170/files#diff-cb107044ca7f6b82daab8e559dd6407c25ff0c6fdb488cc9e1b58ebd31ed8310) from exported bindings to module-local bindings; their endpoints, annotations, and middleware are unchanged. Also makes the default settings constants and the `makeProviderSettingsSchema` factory in [settings.ts](https://github.com/pingdotgg/t3code/pull/10170/files#diff-82d7525e9c2a6a61cd5d416ceaeba40992140373eb7ac00fa3a91c2edd00bc3c) module-local; types and values are unchanged.
> - Risk: removes these symbols from the package's public API; any out-of-tree code importing `RelayHealthGroup`, `RelayMetadataGroup`, `RelayMobileGroup`, `RelayClientGroup`, `RelayTokenGroup`, `RelayDpopClientGroup`, `RelayServerGroup`, `DEFAULT_TIMESTAMP_FORMAT`, `DEFAULT_DIFF_LAYOUT`, `DEFAULT_SIDEBAR_PROJECT_GROUPING_MODE`, `DEFAULT_SIDEBAR_THREAD_PREVIEW_COUNT`, `DEFAULT_SIDEBAR_AUTO_SETTLE_AFTER_DAYS`, `DEFAULT_GLASS_OPACITY`, `DEFAULT_APPEARANCE_CONTRAST`, `DEFAULT_PANEL_ANIMATION_DURATION_MS`, `DEFAULT_TERMINAL_FONT_SIZE`, `DEFAULT_QUIT_CONFIRMATION_MODE`, or `makeProviderSettingsSchema` will fail to compile.
>
> <!-- Macroscope's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized b37eb8e.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- Macroscope's pull request summary ends here -->

Model: gpt-6 astra. Harness: Codex in T3 Code.

