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.

721 B
Raw Blame
import * as Clipboard from 'expo-clipboard'
import {
  clipboardReadParamsSchema,
  clipboardWriteParamsSchema,
  type BridgeNativeVerb
} from '../mobile-web-shell/bridge/bridge-native-verbs'

// Text-only: images use staged media handles to stay below reply caps. Parse again at the device boundary for checked types without assertions.
export async function serveNativeClipboardVerb(
  verb: BridgeNativeVerb,
  params: unknown
): Promise<unknown> {
  if (verb === 'native.clipboard.write') {
    const { value } = clipboardWriteParamsSchema.parse(params)
    return { written: await Clipboard.setStringAsync(value) }
  }
  clipboardReadParamsSchema.parse(params)
  return { value: await Clipboard.getStringAsync() }
}