Skip to content

armgit / orca

Public Imported from GitHub
0

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.

994 B
Raw Blame
export function isTerminalSubscribedResult(
  value: unknown
): value is { type: 'subscribed'; streamId: number } {
  return (
    !!value &&
    typeof value === 'object' &&
    (value as { type?: unknown }).type === 'subscribed' &&
    typeof (value as { streamId?: unknown }).streamId === 'number'
  )
}

export function isStreamingSubscriptionReadyResult(
  value: unknown
): value is { type: 'ready'; subscriptionId: string } {
  return (
    !!value &&
    typeof value === 'object' &&
    (value as { type?: unknown }).type === 'ready' &&
    typeof (value as { subscriptionId?: unknown }).subscriptionId === 'string'
  )
}

export function isStreamEndResult(value: unknown): value is { type: 'end' } {
  return typeof value === 'object' && value !== null && 'type' in value && value.type === 'end'
}

export function isSnapshotResult(value: unknown): value is { type: 'snapshot' } {
  return typeof value === 'object' && value !== null && 'type' in value && value.type === 'snapshot'
}