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 { RpcClientRequestTracker } from './rpc-client-request-tracker'
import { RpcClientStreamRegistry } from './rpc-client-stream-registry'
import { buildDirectRpcWireRequest, type RpcRequestFrame } from './rpc-envelope-fields'
export const DIRECT_WIRE_DEVICE_TOKEN = 'device-token'
export type DirectWire = ReturnType<typeof directWire>
export function directWire() {
const sent: string[] = []
let counter = 0
return {
sent,
frames: () => sent.map((json) => JSON.parse(json)),
nextId: () => `rpc-${++counter}`,
sendFrame: (frame: RpcRequestFrame) => {
sent.push(JSON.stringify(buildDirectRpcWireRequest(frame, DIRECT_WIRE_DEVICE_TOKEN)))
return true
}
}
}
export function directWireTracker(socket: DirectWire): RpcClientRequestTracker {
return new RpcClientRequestTracker({
nextId: socket.nextId,
getState: () => 'connected',
waitForConnected: async () => undefined,
sendFrame: socket.sendFrame
})
}
export function directWireRegistry(socket: DirectWire): RpcClientStreamRegistry {
return new RpcClientStreamRegistry({
nextId: socket.nextId,
getState: () => 'connected',
sendFrame: socket.sendFrame
})
}