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.

911 B
Raw Blame
/** ZCode’s desktop runtime can pass version/doctor/headless probes without @zcode/tui, then fail interactive launch. Detect the missing package to avoid reporting working hook setup as usable TUI support.
 * Recorded evidence: src/main/runtime/__fixtures__/zcode-missing-tui.txt. */

// Match Node’s unlocalized package/module resolution errors. A healthy build’s no-TTY message is localized and does not mean the TUI is missing.
const ZCODE_MISSING_TUI_RE = /Cannot find (?:package|module) ['"]@zcode\/tui['"]/

/** Unknown means the probe could not determine support; callers must not classify that build as broken. */
export type ZCodeInteractiveCapability = 'interactive' | 'missing-tui' | 'unknown'

/** True when this output is ZCode reporting that its terminal UI is not installed. */
export function isZCodeMissingTuiOutput(output: string): boolean {
  return ZCODE_MISSING_TUI_RE.test(output)
}