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 { CommandSpec } from '../args'
import { LOCAL_COMMAND_FLAGS } from '../args'
export const PROFILE_STATE_COMMAND_SPECS: CommandSpec[] = [
{
path: ['profile', 'state', 'exports'],
summary: 'List retained SQLite backups and JSON exports for profile-state recovery',
usage: 'orca profile state exports [--profile-id <id>] [--json]',
allowedFlags: [...LOCAL_COMMAND_FLAGS, 'profile-id']
},
{
path: ['profile', 'state', 'rollback'],
destructive: true,
summary:
'Repair damaged sections, restore a SQLite backup or retained JSON export, or keep the current JSON or SQLite profile',
usage:
'orca profile state rollback (--repair | --backup <id> | --revision <revision> | --current-json | --current-sqlite | --latest-json) [--profile-id <id>] [--json]',
allowedFlags: [
...LOCAL_COMMAND_FLAGS,
'repair',
'revision',
'backup',
'current-json',
'current-sqlite',
'latest-json',
'profile-id'
],
notes: [
'--profile-id selects another profile without changing the active profile. Prepare each profile before installing a JSON-only build.',
'Orca must be stopped. Recovery validates the selected artifact and archives the current database family, JSON, and retained recovery artifacts before replacing state.',
'--repair replaces only the damaged sections of the SQLite profile, each from the newest backup with a readable copy, and keeps everything else. A copy of the damaged database is archived first.',
'--backup restores SQLite authority; --revision restores a JSON export for an older compatible runtime.',
'--latest-json exports the latest SQLite state and restores it as JSON before launching an older JSON-only build. The current database and recovery artifacts are archived.',
'--current-json keeps the current orca-data.json, including edits from an older build. It replaces SQLite state without merging; both copies are archived. The next SQLite-capable start imports the selected JSON.',
'--current-sqlite keeps the current SQLite state and discards JSON edits from an older build. The JSON is archived, then rewritten from SQLite.'
],
examples: [
'orca profile state exports',
'orca profile state rollback --repair',
'orca profile state rollback --backup <id>',
'orca profile state rollback --revision 1',
'orca profile state rollback --latest-json',
'orca profile state rollback --current-json',
'orca profile state rollback --current-sqlite'
]
}
]