Files
t3code/packages/client-runtime
Ben DavisandClaude Fable 5 782ebb10f9 Merge origin/main into experiment/hermes-provider-ui
Brings the branch up to date with 36 commits of main, most notably the
Tailscale dev-sharing work (#4555, #4556), which independently rebuilt the
same remote-dev surface this branch carried (--public-url, port-scoped auth
cookies, reverse-proxied dev origins). Main's single-origin implementation
supersedes the branch's wholesale:

- auth/utils.ts, EnvironmentAuthPolicy, SessionStore, cli/config, config.ts:
  main's cookie naming (desktop/remote-host rules) replaces the branch's
  authCookiePort mechanism, which is dropped along with its flags and env
  wiring.
- scripts/dev-runner.ts + tests: main's version; the branch's --public-url
  flag, DevRunnerPublicUrlError, and T3CODE_AUTH_COOKIE_PORT plumbing are
  removed.
- apps/web/vite.config.ts: main's DEV_PROXIED_PATH_PREFIXES proxy map, with
  one addition — ws upgrades enabled on /api as well as /ws, because the
  Hermes gateway plugin dials /api/hermes-gateway/ws through the dev proxy.
  The branch's viteHelpers.ts (resolveDevProxyTarget) is deleted as orphaned.
- docs/reference/scripts.md: main's version (no --public-url documentation).

Genuine unions:
- serverSettings.ts: the branch's updateSettingsWith (write-locked
  read-modify-write) composed with main's resolveTextGenerationProvider
  normalization — the test service now applies both.
- ChatHeader/ChatView: the branch's requiresWorkspace prop and main's
  onNewThreadInProject prop coexist.

Migrations keep their numbers: main is at 034, this branch owns 035-038.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 13:33:03 -07:00
..

Client Runtime

Shared client behavior for web and mobile. Public APIs are organized by package subpath. The package intentionally has no root export.

Public subpaths

Subpath Responsibility
authorization Bearer and DPoP authorization plus token persistence contracts
connection Targets, catalog, supervision, retries, registry, and onboarding
environment Environment identity, descriptors, endpoints, and scoped keys
errors Shared client error inspection
operations Multi-step application workflows
operations/projects Multi-step project creation workflows
platform Platform capability and persistence service contracts
relay Managed relay API and environment discovery
rpc HTTP/RPC clients, protocol, sessions, and subscriptions
state/<domain> Focused shared state, retention, reducers, and Atom constructors

Dependency direction

Platform applications provide platform services. connection composes those capabilities with authorization, relay, and rpc to supervise environment sessions. Independent state modules consume the connection registry and expose focused state or Atom constructors to application-owned runtimes.

Applications should import the narrowest relevant subpath. There is no broad state export: use domain paths such as state/shell, state/threads, state/terminal, or state/vcs. Subpath indices and explicitly exported domain files are public API boundaries; all other files remain implementation details.