Files
orca/src/shared/agent-detection.ts
T
Brennan Benson cb41f3c5f4 fix(terminal): require agent identity for guarded sends (STA-4028) (#14092)
* fix(terminal): require agent identity for guarded sends (STA-4028)

Quarter-circle spinner glyphs (U+25D0-U+25D3) started classifying a title
as "working" in #13925, and that status alone authorized guarded agent
sends — which auto-submit with Enter — into any pane whose TUI animates
those generic progress frames.

Keep the glyphs as an activity signal, but stop treating a title whose
only agent evidence is a quarter circle as proof an agent owns the pane:
send authorization now falls through to recognized-agent identity in the
title or a recognized foreground process. Braille-spinner behavior is
unchanged.

* fix(terminal): preserve verified managed busy identity

* fix(terminal): bind busy identity to process incarnation

* chore(test): avoid duplicate terminal gate suite
2026-08-12 16:22:06 -07:00

41 lines
1.4 KiB
TypeScript

/**
* Compatibility barrel for shared terminal agent-title detection.
*
* Why shared: main and renderer both consume OSC titles for facts, stats, and
* UI state. Keep existing imports stable while the implementation stays split
* into focused modules that satisfy max-lines. (main's #7612 split into
* `terminal-title-*` modules coexists — those files stay on disk for their
* direct `resolveTerminalTitleAgentType`/`synthetic-agent-title` consumers.)
*/
export type { AgentStatus } from './agent-title-core'
export {
isClaudeManagementTitle,
isCursorAgentTitle,
isCursorNativeAgentTitle,
isGeminiTerminalTitle,
isPiTerminalTitle,
shouldSuppressCursorNativeTitle,
STRONG_IDLE_KEYWORDS_RE,
STRONG_WORKING_KEYWORDS_RE
} from './agent-title-core'
export { isOpenCodeNativeTitle, isMeaningfulOpenCodeTerminalTitle } from './opencode-terminal-title'
export { getAgentLabel, isClaudeAgent } from './agent-title-identity'
export {
clearWorkingIndicators,
createAgentStatusTracker,
detectAgentStatusFromTitle,
isQuarterCircleSpinnerOnlyAgentTitle,
normalizeTerminalTitle
} from './agent-title-status'
// Re-export so existing `agent-detection` importers keep working.
export { AGENT_NAMES, titleHasAgentName } from './agent-name-token-match'
export {
extractAllOscTitles,
extractLastOscTitle,
MAX_OSC_TITLE_CHARS,
MAX_OSC_TITLES_PER_CHUNK
} from './osc-title-extraction'
export { isShellProcess } from './shell-process-detection'