mirror of
https://github.com/stablyai/orca.git
synced 2026-10-22 00:03:47 +00:00
The relay CLI shim on SSH remotes rejected every orchestration/mutation command with 'Unsupported SSH Orca CLI command' because the host handled relay CLI requests with a hand-rolled allowlist of five read-only-ish commands. The host now runs the real bundled orca CLI entry (same entry as the local shell command, via ELECTRON_RUN_AS_NODE) as a captured subprocess, so remote invocations get the full command surface by construction. Remote cwd is carried via ORCA_CLI_CWD so cwd-based selectors (--worktree active) resolve against the caller's remote directory; only Orca terminal-context env vars cross the bridge. Host-interactive commands (serve, claude-teams, agent-teams-tmux) get a targeted error, and the legacy in-process switch remains as a fallback when the host CLI entry cannot be launched. Relay-side request timeouts are raised to fit mutation and long-poll (--wait/--timeout-ms) commands, and stdin forwarding now covers *-stdin payload flags. Fixes #7716 Co-authored-by: Orca <help@stably.ai>
19 lines
422 B
TypeScript
19 lines
422 B
TypeScript
export function pickRemoteCliEnv(env: NodeJS.ProcessEnv): Record<string, string> {
|
|
const picked: Record<string, string> = {}
|
|
for (const key of [
|
|
'ORCA_TERMINAL_HANDLE',
|
|
'ORCA_WORKTREE_ID',
|
|
'ORCA_PANE_KEY',
|
|
'ORCA_WORKSPACE_ID',
|
|
'ORCA_USER_DATA_PATH',
|
|
'PATH',
|
|
'Path'
|
|
]) {
|
|
const value = env[key]
|
|
if (typeof value === 'string') {
|
|
picked[key] = value
|
|
}
|
|
}
|
|
return picked
|
|
}
|