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 { z } from 'zod'
import type { AppUpdateCheckResult, AppUpdateSource } from './app-update-source'
import { isNewerReleaseVersion } from './app-update-source'
const LOOKUP_URL = 'https://itunes.apple.com/lookup?bundleId=com.stably.orca.mobile'
type Fetch = typeof fetch
const lookupSchema = z.looseObject({ results: z.array(z.unknown()) })
const listingSchema = z.looseObject({ version: z.string(), trackViewUrl: z.string() })
// No TestFlight receipt dependency: builds at/ahead of App Store version remain quiet.
export function parseAppStoreLookup(reply: unknown): { version: string; url: string } | null {
const lookup = lookupSchema.safeParse(reply)
const listing = listingSchema.safeParse(lookup.success ? lookup.data.results[0] : null)
return listing.success ? { version: listing.data.version, url: listing.data.trackViewUrl } : null
}
export function createAppStoreUpdateSource(fetchImpl: Fetch): AppUpdateSource {
return {
async check(installedVersion, signal): Promise<AppUpdateCheckResult> {
const reply = await fetchImpl(LOOKUP_URL, { signal })
if (!reply.ok) {
throw new Error(`App Store lookup HTTP ${reply.status}`)
}
const listing = parseAppStoreLookup(await reply.json())
return listing && isNewerReleaseVersion(listing.version, installedVersion)
? { kind: 'available', version: listing.version, url: listing.url }
: { kind: 'current' }
}
}
}
export const appStoreUpdateSource = createAppStoreUpdateSource((input, init) => fetch(input, init))