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 { CommandHandler } from '../dispatch'
import { printResult } from '../format'
import { getRequiredStringFlag, getRequiredStringFlagAllowingEmpty } from '../flags'
import { getBrowserCommandTarget } from '../selectors'
export const BROWSER_STORAGE_HANDLERS: Record<string, CommandHandler> = {
'storage local get': async ({ flags, client, cwd, json }) => {
const key = getRequiredStringFlag(flags, 'key')
const target = await getBrowserCommandTarget(flags, cwd, client)
const result = await client.call<unknown>('browser.storage.local.get', { key, ...target })
printResult(result, json, (v) => JSON.stringify(v, null, 2))
},
'storage local set': async ({ flags, client, cwd, json }) => {
const key = getRequiredStringFlag(flags, 'key')
// An empty value differs from an absent key.
const value = getRequiredStringFlagAllowingEmpty(flags, 'value')
const target = await getBrowserCommandTarget(flags, cwd, client)
const result = await client.call<unknown>('browser.storage.local.set', {
key,
value,
...target
})
printResult(result, json, () => `localStorage["${key}"] set`)
},
'storage local clear': async ({ flags, client, cwd, json }) => {
const target = await getBrowserCommandTarget(flags, cwd, client)
const result = await client.call<unknown>('browser.storage.local.clear', target)
printResult(result, json, () => 'localStorage cleared')
},
'storage session get': async ({ flags, client, cwd, json }) => {
const key = getRequiredStringFlag(flags, 'key')
const target = await getBrowserCommandTarget(flags, cwd, client)
const result = await client.call<unknown>('browser.storage.session.get', { key, ...target })
printResult(result, json, (v) => JSON.stringify(v, null, 2))
},
'storage session set': async ({ flags, client, cwd, json }) => {
const key = getRequiredStringFlag(flags, 'key')
const value = getRequiredStringFlagAllowingEmpty(flags, 'value')
const target = await getBrowserCommandTarget(flags, cwd, client)
const result = await client.call<unknown>('browser.storage.session.set', {
key,
value,
...target
})
printResult(result, json, () => `sessionStorage["${key}"] set`)
},
'storage session clear': async ({ flags, client, cwd, json }) => {
const target = await getBrowserCommandTarget(flags, cwd, client)
const result = await client.call<unknown>('browser.storage.session.clear', target)
printResult(result, json, () => 'sessionStorage cleared')
}
}