Skip to content
Merged
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
196 changes: 100 additions & 96 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = [".", "tinyharness-lib", "tinyharness-ui"]

[package]
name = "TinyHarness"
version = "0.3.0"
version = "0.3.1"
license = "MIT"
description = "tinyharness - ai coding harness"
edition = "2024"
Expand All @@ -13,8 +13,8 @@ name = "tinyharness"
path = "src/main.rs"

[dependencies]
tinyharness-lib = { version = "0.3.0", path = "tinyharness-lib" }
tinyharness-ui = { version = "0.3.0", path = "tinyharness-ui" }
tinyharness-lib = { version = "0.3.1", path = "tinyharness-lib" }
tinyharness-ui = { version = "0.3.1", path = "tinyharness-ui" }
clap = { version = "4.6.1", features = ["derive"] }
tokio = { version = "1.52.1", features = ["full"] }
serde = { version = "1.0.228", features = ["derive"] }
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/sockudo-worker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ description = "Sockudo AI Transport worker — connects to Sockudo, receives ai-

[dependencies]
tokio = { version = "1.52.1", features = ["full"] }
tokio-tungstenite = "0.24"
tokio-tungstenite = "0.29.0"
futures-util = "0.3"
reqwest = { version = "0.13.2", features = ["stream", "json"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
hmac = "0.12"
sha2 = "0.10"
md5 = "0.7"
hmac = "0.13.0"
sha2 = "0.11.0"
md5 = "0.8.0"
uuid = { version = "1", features = ["v4"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/sockudo-worker/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use std::time::{SystemTime, UNIX_EPOCH};

use hmac::{Hmac, Mac};
use hmac::{Hmac, KeyInit, Mac};
use sha2::Sha256;

type HmacSha256 = Hmac<Sha256>;
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/sockudo-worker/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl SockudoWorker {
tokio::select! {
// Periodic keepalive ping
_ = ping_ticker.tick() => {
if ws_write.send(WsMessage::Ping(vec![])).await.is_err() {
if ws_write.send(WsMessage::Ping(vec![].into())).await.is_err() {
return Err("WebSocket ping send failed".to_string());
}
continue;
Expand All @@ -148,7 +148,7 @@ impl SockudoWorker {
WsMessage::Text(t) => t.to_string(),
WsMessage::Binary(b) => String::from_utf8_lossy(&b).to_string(),
WsMessage::Ping(_) => {
let _ = ws_write.send(WsMessage::Pong(vec![])).await;
let _ = ws_write.send(WsMessage::Pong(vec![].into())).await;
continue;
}
WsMessage::Pong(_) | WsMessage::Close(_) | WsMessage::Frame(_) => continue,
Expand Down Expand Up @@ -179,7 +179,7 @@ impl SockudoWorker {
});
let _ = ws_write
.send(WsMessage::Text(
serde_json::to_string(&subscribe_msg).unwrap_or_default(),
serde_json::to_string(&subscribe_msg).unwrap_or_default().into(),
))
.await;
continue;
Expand Down
10 changes: 5 additions & 5 deletions tinyharness-lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tinyharness-lib"
version = "0.3.0"
version = "0.3.1"
license = "MIT"
description = "core liblary for tinyharness"
edition = "2024"
Expand All @@ -17,10 +17,10 @@ regex = "1.11.1"
glob = "0.3.2"
uuid = { version = "1", features = ["v4"] }
tracing = "0.1"
hmac = "0.12"
sha2 = "0.10"
md5 = "0.7"
tokio-tungstenite = "0.24"
hmac = "0.13.0"
sha2 = "0.11.0"
md5 = "0.8.0"
tokio-tungstenite = "0.29.0"
Comment thread
PTFOPlayer marked this conversation as resolved.
futures-util = "0.3"

[dev-dependencies]
Expand Down
8 changes: 5 additions & 3 deletions tinyharness-lib/src/provider/sockudo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::sync::{Arc, Mutex};
use std::time::{Duration, SystemTime, UNIX_EPOCH};

use futures_util::{SinkExt, StreamExt};
use hmac::{Hmac, Mac};
use hmac::{Hmac, KeyInit, Mac};
use reqwest::Client;
use serde::Deserialize;
use sha2::Sha256;
Expand Down Expand Up @@ -275,7 +275,7 @@ impl SockudoProvider {
WsMessage::Text(t) => t.to_string(),
WsMessage::Binary(b) => String::from_utf8_lossy(&b).to_string(),
WsMessage::Ping(_) => {
let _ = ws_write.send(WsMessage::Pong(vec![])).await;
let _ = ws_write.send(WsMessage::Pong(vec![].into())).await;
continue;
}
WsMessage::Pong(_) | WsMessage::Close(_) | WsMessage::Frame(_) => continue,
Expand Down Expand Up @@ -308,7 +308,9 @@ impl SockudoProvider {
});
let _ = ws_write
.send(WsMessage::Text(
serde_json::to_string(&subscribe_msg).unwrap_or_default(),
serde_json::to_string(&subscribe_msg)
.unwrap_or_default()
.into(),
))
.await;
continue;
Expand Down
10 changes: 5 additions & 5 deletions tinyharness-lib/tests/sockudo_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use std::time::{Duration, SystemTime, UNIX_EPOCH};

use futures_util::{SinkExt, StreamExt};
use hmac::{Hmac, Mac};
use hmac::{Hmac, KeyInit, Mac};
use sha2::Sha256;
use tinyharness_lib::{
SecretString,
Expand Down Expand Up @@ -501,7 +501,7 @@ async fn run_agent_worker(
WsMessage::Text(t) => t.to_string(),
WsMessage::Binary(b) => String::from_utf8_lossy(&b).to_string(),
WsMessage::Ping(_) => {
let _ = ws_write.send(WsMessage::Pong(vec![])).await;
let _ = ws_write.send(WsMessage::Pong(vec![].into())).await;
continue;
}
_ => continue,
Expand Down Expand Up @@ -532,7 +532,7 @@ async fn run_agent_worker(
});
let _ = ws_write
.send(WsMessage::Text(
serde_json::to_string(&subscribe_msg).unwrap(),
serde_json::to_string(&subscribe_msg).unwrap().into(),
))
.await;
continue;
Expand Down Expand Up @@ -708,7 +708,7 @@ async fn subscribe_and_collect_response(channel: &str, app_key: &str) -> Result<
WsMessage::Text(t) => t.to_string(),
WsMessage::Binary(b) => String::from_utf8_lossy(&b).to_string(),
WsMessage::Ping(_) => {
let _ = ws_write.send(WsMessage::Pong(vec![])).await;
let _ = ws_write.send(WsMessage::Pong(vec![].into())).await;
continue;
}
_ => continue,
Expand All @@ -731,7 +731,7 @@ async fn subscribe_and_collect_response(channel: &str, app_key: &str) -> Result<
});
let _ = ws_write
.send(WsMessage::Text(
serde_json::to_string(&subscribe_msg).unwrap(),
serde_json::to_string(&subscribe_msg).unwrap().into(),
))
.await;
continue;
Expand Down
4 changes: 2 additions & 2 deletions tinyharness-ui/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "tinyharness-ui"
version = "0.3.0"
version = "0.3.1"
license = "MIT"
description = "ui library for tinyharness"
edition = "2024"

[dependencies]
tinyharness-lib = { version = "0.3.0", path = "../tinyharness-lib" }
tinyharness-lib = { version = "0.3.1", path = "../tinyharness-lib" }
rustyline = { version = "18.0.0", features = ["derive"] }
serde_json = "1.0.149"
regex = "1.11.1"
Expand Down
Loading