build(slice-2): workspace deps + rutster-tap-echo skeleton
- Add tokio-tungstenite 0.24, futures-util 0.3, url 2, base64 0.22 to [workspace.dependencies] (spec §8.1). - Add crates/rutster-tap-echo as 7th workspace member (spec §2). - Transition crates/rutster-tap/Cargo.toml from stub to real manifest with the deps Tasks 2-4 will need (rutster-media, tokio, tokio-tungstenite, serde, serde_json, base64, url, thiserror, tracing). - Skeleton lib.rs (compile test) + main.rs (placeholder fn main) for rutster-tap-echo; Task 5 fills in the echo logic. - Verify cargo deny check passes against the new transitive dep tree. Spec ref: docs/superpowers/specs/2026-06-28-slice-2-agent-tap-design.md §2, §8.1.
This commit is contained in:
15
crates/rutster-tap-echo/Cargo.toml
Normal file
15
crates/rutster-tap-echo/Cargo.toml
Normal file
@@ -0,0 +1,15 @@
|
||||
[package]
|
||||
name = "rutster-tap-echo"
|
||||
version = "0.1.0"
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
[dependencies]
|
||||
rutster-tap = { path = "../rutster-tap" } # protocol types — the wire-types-reusable contract test
|
||||
tokio = { workspace = true }
|
||||
tokio-tungstenite = { workspace = true }
|
||||
futures-util = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
tracing-subscriber = { workspace = true }
|
||||
23
crates/rutster-tap-echo/src/lib.rs
Normal file
23
crates/rutster-tap-echo/src/lib.rs
Normal file
@@ -0,0 +1,23 @@
|
||||
//! # rutster-tap-echo — the Rust reference echo brain + test server (spec §2.3, §8.4)
|
||||
//!
|
||||
//! Dual-purpose crate:
|
||||
//! - **Standalone binary** (`cargo run -p rutster-tap-echo`): binds
|
||||
//! `ws://127.0.0.1:8081/echo` and echoes `audio_in` → `audio_out` per the
|
||||
//! slice-2 protocol (spec §3). The dev-loop brain the core dials out to.
|
||||
//! - **In-process `EchoServer`** (Task 5 lands `EchoServer::start`): used by
|
||||
//! `rutster`'s integration tests to drive the tap end-to-end without an
|
||||
//! external process.
|
||||
//!
|
||||
//! ## Why a Rust brain at all (when the canonical brain is Python?)
|
||||
//!
|
||||
//! Reuses `rutster-tap`'s protocol types — **the contract test that the wire
|
||||
//! types are reusable from outside the core**. Any future brain written in
|
||||
//! Rust (or a step-3 OpenAI adapter in Rust) starts from this shape. The
|
||||
//! Python brain (`examples/echo_brain/`) proves language-agnosticism; this
|
||||
//! crate proves reusability + powers the in-process integration tests.
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn crate_compiles() {}
|
||||
}
|
||||
6
crates/rutster-tap-echo/src/main.rs
Normal file
6
crates/rutster-tap-echo/src/main.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
//! Standalone binary: bind `ws://127.0.0.1:8081/echo`, echo audio_in → audio_out.
|
||||
//! Real implementation lands in Task 5; this is the skeleton that compiles.
|
||||
|
||||
fn main() {
|
||||
eprintln!("rutster-tap-echo: skeleton — implementation lands in Task 5");
|
||||
}
|
||||
@@ -1,8 +1,18 @@
|
||||
# crates/rutster-tap/Cargo.toml
|
||||
[package]
|
||||
name = "rutster-tap"
|
||||
version = "0.0.0"
|
||||
version = "0.1.0"
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
repository.workspace = true
|
||||
description = "Agent audio tap — stub crate (filled in spearhead step 2)."
|
||||
|
||||
[dependencies]
|
||||
rutster-media = { path = "../rutster-media" } # PcmFrame (re-exported — spec §3.1)
|
||||
tokio = { workspace = true }
|
||||
tokio-tungstenite = { workspace = true }
|
||||
futures-util = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
base64 = { workspace = true }
|
||||
url = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
Reference in New Issue
Block a user