mirror of
https://github.com/stablyai/orca.git
synced 2026-09-23 08:02:31 +00:00
* fix: recover from an alternate shell install, and close the relay echo gap #18768: a startup profile that `exec`s a second install of the same shell keeps the pid but loses the wrapper's ready marker, and the recovery probe rejected the replacement's different canonical path -- costing plain Codex the full 15s barrier. The probe now also accepts an install that the pane's own PATH resolves, so a binary merely named bash/zsh outside it stays rejected. #18767: the SSH relay left plain Codex on early startup delivery, displaying the launch twice under a slow profile. The shell is the host's to know, so the relay now folds it into the same rule the daemon uses, and the SSH background client waits for the marker on any Codex launch. Bracketed paste is now gated on an observed marker rather than on the intent to wait, so a fallback release on a host shell that never publishes one submits raw. The non-daemon local provider needs no change: it hands Codex to the wrapper's own prompt hook and never writes it into the PTY. * review: correct an overclaiming comment, announce a silent skip, drop a shim Readiness review of #18796. The delivery comment claimed waiting "costs nothing", which is only true on a host that arms the marker -- fish, sh, Windows and hosts predating #18767 release on the fallback instead. Say so. The alternate-install recovery tests skip on usrmerge hosts, where /usr/bin/bash resolves back to /bin/bash; announce that rather than reading as coverage that does not exist. Import the line-editor predicate from shared directly instead of through a re-export left on daemon/shell-ready.
19 lines
859 B
TypeScript
19 lines
859 B
TypeScript
/**
|
|
* When in a shell's startup Orca's OSC 777 ready marker is published.
|
|
*
|
|
* Why this is a decision of its own: it is what separates "waiting for the marker
|
|
* is free" from "waiting for the marker costs the user real startup latency", and
|
|
* all three transports (daemon, relay, local provider) have to answer it the same
|
|
* way or a startup command is delivered twice on one of them.
|
|
*/
|
|
|
|
/**
|
|
* True when the marker rides the shell's line editor (zsh `precmd`, bash
|
|
* `PROMPT_COMMAND`), so it arrives at the same moment the prompt can accept input.
|
|
* Every other wrapped shell emits it from startup, ahead of the reader.
|
|
*/
|
|
export function shellReadyMarkerComesFromLineEditor(shellPath: string): boolean {
|
|
const shellName = shellPath.replace(/\\/g, '/').split('/').pop()?.toLowerCase() ?? ''
|
|
return shellName === 'bash' || shellName === 'zsh'
|
|
}
|