Files
rutster/crates/rutster/Cargo.toml
Aaron D. Lee d19d772bd0 feat(trunk): TwilioCallControlClient (live REST impl behind twilio-live) + env parser (slice-5 T6)
The live Twilio call-control client. Originates outbound calls via Twilio's
Calls.json API (TwiML <Connect><Stream> instructs Twilio to fork audio back
to our /twilio/media-stream WSS endpoint); hangs up via Status=completed.
HTTP basic auth over HTTPS; auth_token is NEVER logged (ADR-0009 -- provider
credentials never reach the brain) -- tracing fields expose only caller-
controlled values (to, from) + the CallSid's last 4 chars.

Feature-gated behind `twilio-live` so the routine CI gate stays feature-
default-off: MockCallControlClient is the per-PR test surface; the maintainer
runs cargo test --features=twilio-live when validating a release. reqwest +
tracing + serde_json are optional deps (dep:foo syntax) -- pulled in only
when the feature is on, keeping the default resolve lean.

The env parser (config::twilio_credentials) follows slice-5/seams' pure-
function pattern: takes Option<String> inputs (testable without env mutation),
returns Ok(None) when all four RUTSTER_TWILIO_* vars are unset (WebRTC-only
mode), Ok(Some) when all four present + parse, Err on partial config (fail-
fast at startup) or malformed values. TwilioCredentials is imported by the
binary but never re-exported through the workspace (ADR-0009).

T6 of slice-5. Depends on T2 (TwilioCredentials + CallControlClient trait).

Signed-off-by: Aaron D. Lee <himself@adlee.work>
2026-07-05 16:02:19 +00:00

47 lines
1.8 KiB
TOML

# crates/rutster/Cargo.toml
[package]
name = "rutster"
version = "0.0.0"
license.workspace = true
edition.workspace = true
repository.workspace = true
description = "Rutster binary: axum signaling + media driver + static browser test client (slice 1)."
[dependencies]
rutster-media = { path = "../rutster-media" }
rutster-call-model = { path = "../rutster-call-model" }
rutster-tap = { path = "../rutster-tap" }
# rutster-trunk: the rented-transport crate owns `TwilioCredentials` (T2) +
# the env parser's return type. The binary's `config::twilio_credentials`
# (T6) constructs it from env vars + hands it to the live
# `TwilioCallControlClient` (when `--features=twilio-live` is enabled on the
# trunk crate). ADR-0009: `TwilioCredentials` is imported here but never
# re-exported through the workspace root / never sent over the tap WS protocol.
rutster-trunk = { path = "../rutster-trunk" }
axum = { workspace = true }
tokio = { workspace = true }
tokio-tungstenite = { workspace = true }
futures-util = { workspace = true }
url = { workspace = true }
dashmap = { workspace = true }
uuid = { workspace = true }
async-trait = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
[dev-dependencies]
tower = { workspace = true }
rutster-tap-echo = { path = "../rutster-tap-echo" }
# slice-3 §7.4: integration test spins up the in-process MockRealtimeBrain
# + drives the brain's `run_openai_pump` directly (replicating the brain
# process's accept loop in the test, no subprocess). The `mock` feature
# brings in MockRealtimeBrain without requiring OPENAI_API_KEY.
rutster-brain-realtime = { path = "../rutster-brain-realtime", features = ["mock"] }
[[bin]]
name = "rutster"
path = "src/main.rs"