Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
449 changes: 270 additions & 179 deletions cli/Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ clap_complete = "4.5"
crossterm = "0.29"
base64 = "0.22"
portable-pty = "0.9"
rand = "0.9"
axum = { version = "0.7", features = ["ws"] }
tower-http = { version = "0.5", features = ["cors"] }
rand = "0.10"
axum = { version = "0.8", features = ["ws"] }
tower-http = { version = "0.7", features = ["cors"] }
libc = "0.2"
signal-hook = "0.4"
sysinfo = "0.33"
sysinfo = "0.38.4"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
tracing-appender = "0.2"
Expand All @@ -56,13 +56,13 @@ crossbeam-channel = "0.5"
bytes = "1.11.1"
shell-words = "1.1"
url = "2.5"
tungstenite = "0.24"
tungstenite = "0.30"
assert_cmd = "2.1"
predicates = "3.1"
tempfile = "3.24"
once_cell = "1.19"
cargo_metadata = "0.23"
sha2 = "0.10"
sha2 = "0.11"
walkdir = "2.5"
insta = "1.43"

Expand Down
6 changes: 3 additions & 3 deletions cli/crates/agent-tui-app/src/app/daemon/ws_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ async fn send_keepalive_ping(
if pong_watchdog.is_waiting() {
return Ok(());
}
send_ws_message(socket, Message::Ping(Vec::new())).await?;
send_ws_message(socket, Message::Ping(Vec::new().into())).await?;
pong_watchdog.start();
Ok(())
}
Expand Down Expand Up @@ -861,7 +861,7 @@ async fn run_stream_connection(
let Some(payload) = payload else {
break;
};
if let Err(err) = send_ws_message(socket, Message::Text(payload)).await {
if let Err(err) = send_ws_message(socket, Message::Text(payload.into())).await {
return cancel_stream_task_preserving_end(
&stream_cancelled,
&mut rx,
Expand Down Expand Up @@ -997,7 +997,7 @@ async fn send_rpc_response(
return Err(WsConnectionError::SerializeResponse { source: err });
}
};
send_ws_message(socket, Message::Text(payload)).await
send_ws_message(socket, Message::Text(payload.into())).await
}

fn parse_bool(value: &str) -> Option<bool> {
Expand Down
35 changes: 23 additions & 12 deletions cli/crates/agent-tui-app/src/app/daemon/ws_server_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ fn read_text_responding_to_pings(
) -> String {
for _ in 0..16 {
match socket.read().expect("read websocket frame") {
WsMessage::Text(text) => return text,
WsMessage::Text(text) => return text.to_string(),
WsMessage::Ping(payload) => socket
.send(WsMessage::Pong(payload))
.expect("pong should send"),
Expand Down Expand Up @@ -604,7 +604,8 @@ fn ws_pong_keeps_connection_alive() {
"id": "after-pong",
"method": "ping",
})
.to_string(),
.to_string()
.into(),
))
.expect("send ping request");

Expand All @@ -628,7 +629,8 @@ fn ws_rpc_echoes_string_request_id() {
"id": "req-1",
"method": "ping",
})
.to_string(),
.to_string()
.into(),
))
.expect("send ping request");

Expand Down Expand Up @@ -690,7 +692,8 @@ fn blocking_ws_rpc_does_not_starve_other_connections() {
"timeout_ms": 2000,
}
})
.to_string(),
.to_string()
.into(),
)
};
waiting_a.send(wait_request(10)).expect("send first wait");
Expand All @@ -715,7 +718,8 @@ fn blocking_ws_rpc_does_not_starve_other_connections() {
"id": "responsive-ping",
"method": "ping",
})
.to_string(),
.to_string()
.into(),
))
.expect("send ping while waits are active");
let started = Instant::now();
Expand Down Expand Up @@ -758,7 +762,8 @@ fn ws_missing_pong_disconnects_stream_connection() {
"interval_ms": 1000,
}
})
.to_string(),
.to_string()
.into(),
))
.expect("send flightdeck request");

Expand Down Expand Up @@ -793,7 +798,8 @@ fn ws_stream_peer_close_is_quiet() {
"interval_ms": 1000,
}
})
.to_string(),
.to_string()
.into(),
))
.expect("send flightdeck request");

Expand Down Expand Up @@ -828,7 +834,8 @@ fn api_stream_alias_accepts_authenticated_flightdeck_stream() {
"interval_ms": 1000,
}
})
.to_string(),
.to_string()
.into(),
))
.expect("send flightdeck request");

Expand Down Expand Up @@ -858,7 +865,8 @@ fn ws_shutdown_terminates_active_stream_connection() {
"interval_ms": 1000,
}
})
.to_string(),
.to_string()
.into(),
))
.expect("send flightdeck request");

Expand Down Expand Up @@ -904,7 +912,8 @@ fn live_preview_stream_over_ws_emits_ready_init_output_and_closed() {
"session": session_id,
}
})
.to_string(),
.to_string()
.into(),
))
.expect("send live preview request");

Expand Down Expand Up @@ -1020,7 +1029,8 @@ fn live_preview_stream_client_disconnect_after_closed_event_is_quiet() {
"session": session_id,
}
})
.to_string(),
.to_string()
.into(),
))
.expect("send live preview request");

Expand Down Expand Up @@ -1097,7 +1107,8 @@ fn live_preview_stream_over_ws_emits_heartbeat_when_idle() {
"session": session_id,
}
})
.to_string(),
.to_string()
.into(),
))
.expect("send live preview request");

Expand Down
4 changes: 2 additions & 2 deletions cli/crates/agent-tui-infra/src/infra/ipc/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ impl ClientConnection {
}
Self::Ws(conn) => {
conn.socket
.send(Message::Text(message.to_string()))
.send(Message::Text(message.to_string().into()))
.map_err(ws_error_to_client)?;
}
}
Expand All @@ -287,7 +287,7 @@ impl ClientConnection {
}
Self::Ws(conn) => loop {
match conn.socket.read() {
Ok(Message::Text(text)) => return Ok(Some(text)),
Ok(Message::Text(text)) => return Ok(Some(text.to_string())),
Ok(Message::Binary(_)) => {
return Err(ClientError::UnexpectedResponse {
message: "received binary websocket frame; expected text JSON-RPC"
Expand Down
6 changes: 5 additions & 1 deletion cli/crates/xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2269,7 +2269,11 @@ fn sha256_file(path: &Path) -> Result<String> {
hasher.update(&buf[..bytes_read]);
}

Ok(format!("{:x}", hasher.finalize()))
Ok(hasher
.finalize()
.iter()
.map(|byte| format!("{byte:02x}"))
.collect())
}

fn make_executable(_path: &Path) -> Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion cli/crates/xtask/src/tui_explorer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ fn compute_state_hash(screenshot: &str, cursor: &Cursor, cols: u16, rows: u16) -
let mut hasher = Sha256::new();
hasher.update(payload.as_bytes());
let digest = hasher.finalize();
format!("{digest:x}")
digest.iter().map(|byte| format!("{byte:02x}")).collect()
}

fn contains_clock_like_token(line: &str) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion docs/api/clients/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ encoding_rs = "0.8"
futures-util = "0.3"
serde_json = "1.0"
tokio = { version = "1.38", features = ["rt-multi-thread", "macros"] }
tokio-tungstenite = "0.21"
tokio-tungstenite = "0.30"
url = "2.5"
Loading