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
// Not `Map.groupBy`: the relay runs this core on Node 18, which lacks it.
export function groupedBy<T, K>(items: readonly T[], keyOf: (item: T) => K): Map<K, T[]> {
const groups = new Map<K, T[]>()
for (const item of items) {
const key = keyOf(item)
const group = groups.get(key)
if (group) {
group.push(item)
} else {
groups.set(key, [item])
}
}
return groups
}