Files
orca/src/shared/orcad-server-launch-env.ts
NeilandClaude 19a73ff0b4 fix(wsl-host): keep a host's launch markers out of its shells; a corrupt WSL store hides only WSL hosts (#36772)
- ORCA_WSL_ORCAD_HOST and ORCA_WSL_DISTRO_GUID joined the server launch env both pane spawn
  paths scrub (one shared list with the activation root and idle window), so a user's own orcad
  started in a host shell no longer acts as a WSL host.
- An unreadable orca-wsl-host-deployments.json (corrupt, or a newer envelope) used to fail the
  whole server list closed while hosts were served, hiding every SSH and paired server. It now
  hides only the servers that could be WSL hosts, logs why, and writes still refuse the file so
  a newer build's copy is kept.

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-31 14:39:16 -07:00

23 lines
899 B
TypeScript

import { ORCAD_IDLE_TIMEOUT_ENV } from './orcad-idle-exit'
import { ORCAD_MANAGED_ACTIVATION_ROOT_ENV } from './orcad-managed-launch-env'
/** WSL-host launch marker; SSH guests and WSLg retain their original PATH. */
export const ORCAD_WSL_HOST_ENV = 'ORCA_WSL_ORCAD_HOST'
/** Desktop-provided registry ID; guests cannot read it themselves. */
export const ORCAD_WSL_DISTRO_GUID_ENV = 'ORCA_WSL_DISTRO_GUID'
/**
* What a client puts in a server's launch env. A user's own `orcad` started from one of the
* server's shells is not that server, so every pane scrubs these.
*/
export const ORCAD_SERVER_LAUNCH_ENV_KEYS = [
// Not client-managed.
ORCAD_MANAGED_ACTIVATION_ROOT_ENV,
// Keeps the default idle window.
ORCAD_IDLE_TIMEOUT_ENV,
// Not a WSL host: no migration capabilities, no /mnt/c refusal, no account-push wait.
ORCAD_WSL_HOST_ENV,
ORCAD_WSL_DISTRO_GUID_ENV
] as const