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 type { HostCatalogEntry, HostProfile } from './types'
export type HostListSnapshot = {
catalog: HostCatalogEntry[]
profiles: HostProfile[]
}
// Share slow keychain reads until durable writes invalidate them (#8791).
let inflight: Promise<HostListSnapshot> | null = null
let revision = 0
export function getHostListLoadRevision(): number {
return revision
}
export function shareHostListLoad(
load: () => Promise<HostListSnapshot>
): Promise<HostListSnapshot> {
if (inflight) {
return inflight
}
const started = load().finally(() => {
// Retire only this pass; an older completion must not discard its replacement.
if (inflight === started) {
inflight = null
}
})
inflight = started
return started
}
/** Call after every durable host write so no later read is served a pre-write pass. */
export function dropSharedHostListLoad(): void {
revision += 1
inflight = null
}