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.
TypeScript adeagent-ideai-agentsautomationbotclaude-codecodexghosttygrok-bothermes-agentmobile-appmuseopenclawopencodeorchestrationpiruntimeterminalworktreesyc-backed
import { RelayOuterError } from './mobile-relay-e2ee-link'
import type { ConnectionLogLevel, ConnectionLogSink } from './types'
export type PairingRelayLogger = (
level: ConnectionLogLevel,
message: string,
detail?: string
) => void
// Use process-wide ids because separate relay loggers append into the same keyed list.
let sequence = 0
export function createPairingRelayLogger(onLog?: ConnectionLogSink): PairingRelayLogger {
if (!onLog) {
return () => {}
}
return (level, message, detail) => {
onLog({ id: `relay-pair-log-${++sequence}`, ts: Date.now(), level, message, detail })
}
}
export function pairingRelayErrorDetail(error: unknown): string {
if (error instanceof RelayOuterError) {
return `relay close code ${error.code}`
}
const failure = error instanceof Error ? error : new Error(String(error))
return `${failure.name}: ${String(failure.message).slice(0, 80)}`
}