tweak agent term scrollback, bump vers
release / build (push) Successful in 4m56s

bound agent terminal scrollback memory, for one term could hold a whole 32MB of stuff beforehand
This commit is contained in:
lda
2026-07-21 05:47:50 +07:00 Verified
parent ea789b75c7
commit 50f21a5be2
9 changed files with 14 additions and 14 deletions
Generated
+5 -5
View File
@@ -3624,7 +3624,7 @@ dependencies = [
[[package]]
name = "wakey"
version = "0.3.4"
version = "0.3.5"
dependencies = [
"anyhow",
"chrono",
@@ -3645,7 +3645,7 @@ dependencies = [
[[package]]
name = "wakey-agent"
version = "0.3.4"
version = "0.3.5"
dependencies = [
"anyhow",
"clap",
@@ -3670,7 +3670,7 @@ dependencies = [
[[package]]
name = "wakey-control-plane"
version = "0.3.4"
version = "0.3.5"
dependencies = [
"anyhow",
"axum",
@@ -3699,7 +3699,7 @@ dependencies = [
[[package]]
name = "wakey-core"
version = "0.3.4"
version = "0.3.5"
dependencies = [
"macaddr",
"serde",
@@ -3711,7 +3711,7 @@ dependencies = [
[[package]]
name = "wakey-linux"
version = "0.3.4"
version = "0.3.5"
dependencies = [
"anyhow",
"futures",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "wakey"
version = "0.3.4"
version = "0.3.5"
edition = "2024"
publish = ["gitea"]
+2 -2
View File
@@ -72,7 +72,7 @@ When the operator socket disconnects, the session becomes detached. Navigation,
The operator UI lists live sessions as tabs and stores only the active terminal ID in browser-tab-scoped `sessionStorage`. On reload it prefers that ID and briefly waits for the previous WebSocket to detach before requesting a fresh attachment credential. The stored ID is a navigation hint, not an ownership credential; another attached operator still locks the session at the control plane.
After operator attachment, the control plane sends a `snapshot` request. The agent serializes up to 5,000 retained physical rows followed by its parsed current screen and input modes as terminal escape bytes, sends them before subsequent live output, and then signals the PTY's current foreground process group with `SIGWINCH`. Historical rows retain their terminal attributes and are replayed as ordinary terminal output so xterm builds its native scrollback; the final formatted state restores the exact live screen. The signal lets full-screen applications redraw without assuming that the original shell remains in the foreground. Signal failure is logged but never terminates the session.
After operator attachment, the control plane sends a `snapshot` request. The agent serializes up to 1,000 retained physical rows followed by its parsed current screen and input modes as terminal escape bytes, sends them before subsequent live output, and then signals the PTY's current foreground process group with `SIGWINCH`. Historical rows retain their terminal attributes and are replayed as ordinary terminal output so xterm builds its native scrollback; the final formatted state restores the exact live screen. The signal lets full-screen applications redraw without assuming that the original shell remains in the foreground. Signal failure is logged but never terminates the session. The connected browser independently retains up to 10,000 rows because that memory belongs to the operator device rather than the agent host.
Wakey carries a small, read-only extension to `vt100` because its public API exposes only the active grid. A snapshot streams bounded history from the primary grid, redraws that grid with its saved cursor and attributes, and then reconstructs the alternate grid when a full-screen application is active. The parser is never resized or switched while taking a snapshot. Consequently, reconnecting during `btop` restores the application while preserving the hidden shell history and state that reappear when it exits.
@@ -90,7 +90,7 @@ The agent reports a normal exit status or terminating signal when available. The
Terminal transport must not use unbounded queues.
Every queue between PTY, agent socket, control-plane relay, and browser socket is bounded. The agent keeps draining and parsing the PTY while detached so a noisy child cannot stall the agent. Parsed state is bounded by the configured terminal dimensions and a 5,000-row scrollback limit. The control plane retains only a bounded queue of operator controls while an agent relay is reconnecting.
Every queue between PTY, agent socket, control-plane relay, and browser socket is bounded. The agent keeps draining and parsing the PTY while detached so a noisy child cannot stall the agent. Parsed state is bounded by the configured terminal dimensions and a 1,000-row reconnect scrollback limit. The control plane retains only a bounded queue of operator controls while an agent relay is reconnecting.
While a relay is attached, saturation applies lossless backpressure instead of dropping terminal bytes or disconnecting the relay. The agent retains the frame that discovered saturation and pauses further PTY reads until bounded relay capacity returns. Input, resize, close, lifecycle, and reconnect handling remain active while output is backpressured. Reconnect snapshots use the same ordered output path and duplicate snapshot requests are coalesced while one is pending. This is required for terminal protocols such as sixel, where dropping one output frame corrupts the rest of the stream.
+1 -1
View File
@@ -435,7 +435,7 @@ export function TerminalPage({
scrollbar: {
width: window.matchMedia("(pointer: coarse)").matches ? 22 : 16,
},
scrollback: 5000,
scrollback: 10_000,
theme: {
background: "#0b1117",
foreground: "#e5e7eb",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "wakey-agent"
version = "0.3.4"
version = "0.3.5"
edition = "2024"
publish = ["gitea"]
+1 -1
View File
@@ -13,7 +13,7 @@ use tokio_tungstenite::tungstenite::Message;
use tracing::{info, warn};
const MAX_TERMINAL_FRAME_BYTES: usize = 64 * 1024;
const TERMINAL_SCROLLBACK_ROWS: usize = 5_000;
const TERMINAL_SCROLLBACK_ROWS: usize = 1_000;
const RELAY_INPUT_QUEUE: usize = 32;
const RELAY_OUTPUT_QUEUE: usize = 32;
const PTY_EXIT_DRAIN_TIMEOUT: Duration = Duration::from_secs(1);
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "wakey-control-plane"
version = "0.3.4"
version = "0.3.5"
edition = "2024"
publish = ["gitea"]
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "wakey-core"
version = "0.3.4"
version = "0.3.5"
edition = "2024"
publish = ["gitea"]
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "wakey-linux"
version = "0.3.4"
version = "0.3.5"
edition = "2024"
publish = ["gitea"]