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 {
releaseRemoteRuntimePreparedRequest,
type RemoteRuntimePendingRequest
} from './remote-runtime-prepared-request-admission'
import { parseRemoteRuntimeRpcFrame } from './remote-runtime-request-frames'
export function settleRemoteRuntimeRequestRpcFrame(args: {
plaintext: string
pendingRequests: Map<string, RemoteRuntimePendingRequest<unknown>>
}): { resolved: boolean; error?: Error } {
const parsed = parseRemoteRuntimeRpcFrame(args.plaintext)
if (parsed.type === 'keepalive') {
return { resolved: false }
}
if (parsed.type === 'error') {
return { resolved: false, error: parsed.error }
}
const pending = args.pendingRequests.get(parsed.response.id)
if (!pending) {
return { resolved: false }
}
args.pendingRequests.delete(parsed.response.id)
clearTimeout(pending.timeout)
releaseRemoteRuntimePreparedRequest(pending)
pending.resolve(parsed.response)
return { resolved: true }
}