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.

1.4 KB
Raw Blame
import type { AiVaultAgent } from './ai-vault-types'

/** One agent's history as counted while its folders and databases are listed. */
export type AiVaultScanAgentProgress = {
  agent: AiVaultAgent
  /** Distinct files: a hard link or a linked folder reaching the same file counts once. */
  files: number
  /** SQLite stores holding this agent's sessions. */
  databases: number
  /** A folder or database of this agent is still being listed. */
  walking: boolean
  /** Absent until the scan freezes its candidate workload. */
  read?: AiVaultScanReadingProgress
}

/** Terminal candidate outcomes; skipped candidates needed no parser invocation. */
export type AiVaultScanReadingProgress = { done: number; total: number; skipped?: number }

/** The scanner process's view of the scan it is running. */
export type AiVaultScanWork = {
  stage: 'finding' | 'reading'
  agents: AiVaultScanAgentProgress[]
  /** Fixed candidate workload; settled work is done + skipped. */
  read: AiVaultScanReadingProgress
}

/** One local Session History scan entry, as main pushes it to windows. */
export type AiVaultScanProgress = Omit<AiVaultScanWork, 'stage'> & {
  scanId: string
  stage: AiVaultScanWork['stage'] | 'finished'
  startedAt: number
  settledAt: number | null
}

export type AiVaultScanProgressUpdate = {
  scanKey: string
  progress: AiVaultScanProgress | null
}

export const AI_VAULT_SCAN_PROGRESS_CHANNEL = 'aiVault:scanProgress'