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 {
stripAnsiEscapeSequences,
TERMINAL_CONTROL_CHARACTER_PATTERN
} from './ansi-escape-sequences'
// Strip terminal controls from untrusted remote text, including OSC 52 clipboard writes.
export function terminalSafe(value: string): string {
return stripAnsiEscapeSequences(value).replace(TERMINAL_CONTROL_CHARACTER_PATTERN, '')
}
/** Why: a line break inside a single-line field could spoof a separate output line. */
export function terminalSafeLine(value: string): string {
return terminalSafe(value).replaceAll(/[\r\n]+/g, ' ')
}