Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

981 B
Raw Blame
/** Fresh isolated HOME lacks macOS login-keychain OSCrypt keys, so Chromium can block main/readiness on an unanswered authorization prompt (#25453). Apply matching switches to sidecar and CLI-launched foreground serve. */
export function usesIsolatedProfile(env: NodeJS.ProcessEnv = process.env): boolean {
  return Boolean(env.ORCA_E2E_USER_DATA_DIR || env.ORCA_E2E_HOME_DIR)
}

const ISOLATED_PROFILE_SWITCHES = ['--password-store=basic', '--use-mock-keychain']

export function electronIsolatedProfileSwitches(env: NodeJS.ProcessEnv = process.env): string[] {
  return usesIsolatedProfile(env) ? [...ISOLATED_PROFILE_SWITCHES] : []
}

/** Foreground serve reads selected-profile secrets: only USER_DATA_DIR isolates those. HOME alone must not switch the real profile to plaintext storage. */
export function foregroundServeIsolatedProfileSwitches(
  env: NodeJS.ProcessEnv = process.env
): string[] {
  return env.ORCA_E2E_USER_DATA_DIR ? [...ISOLATED_PROFILE_SWITCHES] : []
}