Files
orca/src/shared/orca-cli-command-name.ts
T
Neil 43097c517b fix(agents): launch Claude Agent Teams as plain orca on Orca servers (#34116)
* fix(agents): launch Claude Agent Teams as plain orca on Orca servers

A paired Orca server has no SSH connection id, so client launches treated it
as a local Linux desktop and typed `orca-ide claude-teams`. Headless servers
only put `orca` on PATH. Client launches now read the resolved execution host
(SSH or server, except WSL workspaces), and launches built on a headless Linux
server use the launcher that server publishes.

Fixes #33920. Reported by @williamhrs. Client-side approach from #33987 by
@coolwindX; #33975 by @Shubham-Padkonde showed the host-built launch gap.

* fix(orcad): keep orca-ide working for older clients on Linux servers

Older clients type the desktop orca-ide claude-teams into server terminals.
Write an identical orca-ide launcher beside orca. Idea and test from #33975
by @Shubham-Padkonde.
2026-10-26 17:02:51 -07:00

22 lines
775 B
TypeScript

import { getAppEnvironment, hasAppEnvironment } from './app-environment'
export function getOrcaCliCommandNameForPlatform(platform: NodeJS.Platform): string {
if (platform === 'linux') {
return 'orca-ide'
}
if (platform === 'win32') {
return 'orca.cmd'
}
return 'orca'
}
/** The GNOME-conflict `orca-ide` rename is desktop-only: SSH relays and headless Orca servers put plain `orca` on PATH. */
export function skipsLinuxOrcaCliRename(isRemote: boolean | undefined): boolean {
if (isRemote) {
return true
}
// Only a headless server publishes its own launcher; Windows ones (WSL launches) keep the rename.
const launcher = hasAppEnvironment() ? getAppEnvironment().getCliLauncherPath?.() : null
return launcher?.endsWith('/orca') ?? false
}