# refactor\(desktop\): classify electron exports · PR \#10266 · pingdotgg/t3code

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

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

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: cleanup-desktop/electron-helpers

Target branch: cleanup-desktop/runtime-core

Head commit: bf20c623db759b3d1f960d3250dacadb6cf348cf

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

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

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

## Description

---

Electron modules had 15 unclassified runtime exports. This marks ten canonical Effect service constructors as intentional public APIs, narrows four protocol implementation exports, and removes one unused safe-storage predicate without changing the exported error schema.

This is layer 2 of 5 in the desktop Knip cleanup stack.

Verification after the full stack: desktop typecheck; desktop Knip export audit; 831 desktop tests; changed-file lint and format checks. The native libsecret test cannot start on this machine because the system libsecret-1 development package is unavailable.

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

<!-- 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 electron helper functions and constants private across desktop modules
> - Changes `PRODUCTION_SCHEME`, `DEVELOPMENT_SCHEME`, `getDesktopOrigin`, and `registerDesktopSchemePrivilegesSync` in [ElectronProtocol.ts](https://github.com/pingdotgg/t3code/pull/10266/files#diff-25fd7328df6d1131991bc9498d73c423aef7bf0aee3e8b2c863c05b908090f78) from named exports to module-private bindings.
> - Removes the `isElectronSafeStorageError` named export from [ElectronSafeStorage.ts](https://github.com/pingdotgg/t3code/pull/10266/files#diff-9a9dc7e1513887fd2ca19c72a20d609e1fe04270ea6bed1e97ecc6dff9d74ed4).
> - Adds public API documentation comments to the `make` service construction export across all electron service modules.
> - Behavioral Change: `isElectronSafeStorageError`, the protocol scheme constants, `getDesktopOrigin`, and `registerDesktopSchemePrivilegesSync` are no longer importable from their modules; any out-of-tree consumers must update.
>
> <!-- Macroscope's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized bf20c62.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- Macroscope's pull request summary ends here -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Documentation**
  - Added public API documentation for desktop service construction APIs.
  - Clarified canonical entry points for Electron services.
- **Refactor**
  - Restricted visibility of internal desktop protocol helpers and constants.
  - Removed an internal safe-storage error predicate from the public API.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
