Skip to content

feat(berth): drive the herdr desktop app through hc as a second backend - #131

Merged
GraemeF merged 4 commits into
mainfrom
worktree-berth-herdr-app
Nov 25, 2026
Merged

GraemeF merged 4 commits into
mainfrom
worktree-berth-herdr-app

Conversation

@GraemeF

@GraemeF GraemeF commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

berth gains a second adapter, herdr-app, which drives the herdr desktop app's backend, herdr-core, through hc. A berth is an hc terminal and its id is the terminal id. The full port contract suite runs against it as a flake check, against a throwaway herdr-core in the sandbox.

Without BERTH_BACKEND, berth now takes the backend from the calling pane. HC_TERMINAL_ID selects the app and HERDR_PANE_ID selects herdr. A caller with both or neither is refused, and the design's environment section says so.

What a reviewer should know:

  • hc cannot type text without pressing Enter. So send-text holds the text until the next send-key Enter, which submits it in one paste. The contract suite gains a way for a run to declare a case its backend cannot meet yet. The app's run declares that unsent text does not show on screen, and the case fails once it holds.
  • Every hc command starts its session's core when none is running. So the adapter checks for a running core first, by the lock the core holds on its core.lock.
  • The contract's Claude stand-in now also reports its state over OSC 7501, because herdr-core never reads the screen. herdr's own contract run still passes with it.
  • Berths stay hidden from the app window. Placing them in the window's spaces and tabs is separate work that needs a real window to check.

@GraemeF
GraemeF marked this pull request as ready for review November 25, 2026 16:23
@GraemeF
GraemeF merged commit 034f211 into main Nov 25, 2026
2 checks passed
@GraemeF
GraemeF deleted the worktree-berth-herdr-app branch November 25, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant