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.

658 B
Raw Blame
import {
  getConnectionExecutionHostId,
  LOCAL_EXECUTION_HOST_ID,
  normalizeExecutionHostId,
  parseExecutionHostId,
  type ExecutionHostId
} from '../execution-host'

export function resolveJiraSourceHostId(args: {
  workspaceHostId?: string | null
  groupExecutionHostId?: string | null
  groupConnectionId?: string | null
}): ExecutionHostId {
  const groupHostId =
    normalizeExecutionHostId(args.groupExecutionHostId) ??
    getConnectionExecutionHostId(args.groupConnectionId)
  const hostId = normalizeExecutionHostId(args.workspaceHostId) ?? groupHostId
  return parseExecutionHostId(hostId)?.kind === 'ssh' ? LOCAL_EXECUTION_HOST_ID : hostId
}