Replies: 3 comments
|
Independent support for this from the client side, and one thing I would like the design to leave room for. I drive panes from a phone client and hit the same wall. Measured on 0.7.5 today: The follow-on: a trustworthy revision fixes detection, but it does not fix writes. My case is a human approving an agent's permission prompt from somewhere else. Read at revision N, push the prompt to a phone, the human decides seconds later, then What closes it is an optional precondition on the write, rejected server-side: refuse unless the pane is still at N. That only becomes possible once revisions mean something, which is why I am putting it here rather than opening a competing thread. Worth designing the counter with that in mind, and it would apply to |
|
I maintain https://github.com/0cv/herdr-mobile-relay which lets users control Herdr agents from a phone. Terminal output currently requires repeated pane.read calls, producing up to several seconds of visible delay or wasteful polling. A fixed output revision and pane_output_changed events would let us get sub seconds update. Strong support for this proposal from a real client integration. |
|
Third integrator here with the same problem, arriving from a slightly different angle — I think the ask is one step wider than a change signal. I run an unattended supervisor around a coding agent. It has to notice one-shot things in the agent's output: a login prompt, a rate-limit message, a crash banner. Each of those is an edge, not a state — reacting twice tears down a healthy worker, and missing one leaves a dead worker reported healthy. On tmux this is boring: I can't express that against So a revision that moves — the ask in this thread — is necessary but not sufficient for me. It tells me that something changed; I still can't get what changed. What I actually need is one of:
Two measurements worth adding to the thread, because together they changed my mind about which of those two matters. First: for a full-screen agent, reads cap at the viewport (54 rows here, at Second, and this is the one I'd flag: That's why I lean toward the transcript rather than a read-side parameter: both existing output surfaces are projections of the grid, so no parameter on either can return bytes the grid never kept. Related threads for whoever picks this up: #2577 (a CLI verb for the event stream), #908 (per-pane recording and replay), #1270 (subscribe replay semantics — a resumable position would settle that one too). Happy to test anything against a long-running unattended workload; that's the case where the duplicate-vs-dropped distinction actually bites. |
Uh oh!
There was an error while loading. Please reload this page.
Hi! I'd like to propose a way for socket-API clients to detect new pane output without polling.
Problem: today the only way to know whether a pane produced new output is to call
pane.readrepeatedly and diff the text. That's racy (there's no way to express "wait for output after point X"), wasteful for large scrollbacks, and any client-side heuristic breaks across respawn and live handoff. I hit this while driving herdr panes from an agent orchestrator that needs to wake up when a command produces output.Idea:
u64output revision, bumped on PTY outputpane.readandPaneInforeport the current revision, so any read doubles as a sync pointpane_output_changed { pane_id, revision }event plus a wait/subscription variant, so clients can wait for "revision > N" race-freeIt's purely additive — new event kind and optional fields, no cost for clients that don't subscribe.
I have a working implementation with integration tests that I can put up if the idea is accepted. (I mistakenly opened PR #1276 before reading CONTRIBUTING.md — apologies for that. Happy to follow whatever process you prefer, including splitting into smaller pieces or a different API shape.)
Would you be open to this?
All reactions