Add Orca terminal surface backend

Subagents run in unfocused Orca terminal tabs in the current worktree,
selected automatically between Herdr, Orca (ORCA_TERMINAL_HANDLE), and tmux.

- Tabs are created against ORCA_WORKTREE_ID since pi's cwd may live outside
  any Orca worktree, and start in pi's cwd via the startup command
- createSurface blocks on two-phase readiness (startup marker, then a
  verified probe echo) because input typed during shell init is swallowed
  by the initial shell's exec or flushed during bash startup
- terminal read reports ok with status exited for closed terminals, so
  reads throw on non-running status to match herdr/tmux semantics
- Integration harness gains Orca focus support via terminal switch and
  visual-layout active-pane lookup
This commit is contained in:
jb
2026-08-30 15:54:59 -04:00
parent bc3e3d6049
commit 208cd6f4e7
8 changed files with 421 additions and 23 deletions
+3 -3
View File
@@ -8,7 +8,7 @@
* Costs: ~$0.01-0.05 per test run (haiku).
* Duration: ~30-90s per test.
*
* Run inside Herdr, or inside tmux:
* Run inside Herdr, inside an Orca terminal, or inside tmux:
* tmux new 'npm run test:integration'
*
* Configuration:
@@ -38,8 +38,8 @@ import {
const backends = getAvailableBackends();
if (backends.length === 0) {
console.log("⚠️ Herdr/tmux is not available — skipping subagent lifecycle integration tests");
console.log(" Run inside Herdr or tmux to enable these tests.");
console.log("⚠️ Herdr/Orca/tmux is not available — skipping subagent lifecycle integration tests");
console.log(" Run inside Herdr, Orca, or tmux to enable these tests.");
}
for (const backend of backends) {