Commit Graph
24 Commits
Author SHA1 Message Date
Claude f81050bd16 docs: stream sessions, Chromium interop findings, open stream questions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-26 05:08:09 +00:00
Claude b7f8ea8ef2 tsctl: stream start/list/watch; smoke test streams on TS6
tsctl connect <addr> stream [--loopback|--stun X|--no-stun]
  start --synthetic [--name] [--auto-accept] [--seconds N] [--fps]
        [--frame-size] [--no-audio]
        Streams SyntheticSource frames through tsc-stream's sessions.
        Without --auto-accept, join requests are answered on stdin
        (accept/deny/kick <clid>, stop). frame_source() is the seam for
        real capture and encoders.
  list  Streams announced in our channel, plus clients whose
        client_is_streaming is set but whose stream id we were not told.
  watch [--id] [--streamer-nick] [--expect-frames N] [--timeout S]
        Joins the matching stream (or the first one); exits 0 once N video
        frames arrived.

it-smoke.sh (TS6 only): a viewer waits for a uniquely named streamer,
which then streams 10 s of synthetic VP8 + Opus over loopback; also runs
the engine's stream_live test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-26 05:07:36 +00:00
Claude 4918fca381 tsc-core: streams on TeamSpeak 6 sessions
A stream task per voice connection runs tsc-stream's Streams: the voice
task forwards stream notifications and command failures to it and sends
its requests on the connection. It starts only when the server flavor has
the streams capability; stream commands elsewhere give an Error event.

Commands: StartStream{setup, auto_accept}, StopStream, AcceptViewer,
KickViewer, SendStreamFrame, WatchStream, LeaveStream,
RequestStreamKeyframe.
Events: StreamsChanged, StreamState (Starting / Live{id, sink} /
Ended), StreamViewerRequest, StreamViewers, StreamKeyframeRequest,
WatchState (Requested / Connecting / Connected / Ended).

Encoded frames of our stream go in through the StreamSink handed out
with StreamState::Live (or SendStreamFrame); received frames of watched
streams come on their own bus, Engine::subscribe_frames, to keep the
event bus light. VoiceOptions::stream_peer sets the peer network config.

Tests: two stream tasks through a fake relay server (unit), and a
TSC_LIVE test with two engine sessions streaming synthetic frames on the
TS6 dev server plus the error on TS3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-26 05:02:00 +00:00
Claude ee57b130c6 tsc-stream: interop with Chromium's WebRTC stack, codec order fixes
tests/interop/browser-peer.cjs runs headless Chromium (Playwright) as the
remote peer; crates/tsc-stream/tests/browser_interop.rs (TSC_INTEROP=1)
exchanges SDP with it over stdin/stdout:

- our loopback streamer offer (VP8 + Opus) answered by Chromium: packets,
  bytes and decoded frames of the synthetic VP8 keyframes, Opus packets
- Chromium offers canvas video + oscillator audio with VP8, VP9, H264 and
  AV1 preferred in turn; our viewer peer receives that codec and Opus,
  with trickled browser candidates and a keyframe after a PLI
- a server-reflexive candidate (fake STUN server) trickled with the
  peer's mid is accepted by addIceCandidate

Fixes found on the way:
- the viewer's answer followed str0m's codec order, so the streamer's
  preference was ignored; the answer now keeps the offer's order
  (accept_video_codecs filters it)
- streamers offered VP8 and H264 by default while frames are sent on the
  first negotiated payload type: offer only VP8 by default
- H.264 offers include Constrained High (640c1f), reportedly the only
  profile the TeamSpeak client decodes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 19:56:58 +00:00
Claude a3969074fd tsc-stream: stream sessions and a frame-source seam
Streams drives one connection's TS6 streams without doing connection IO:
it takes stream notifications and app decisions, owns the str0m peers and
queues requests (to send as commands) and events.

- StreamerSession: setupstream, join requests (auto-accept or ask the
  app), one peer per viewer with the offer in respondjoinstreamrequest,
  answers and trickled candidates, withdrawal, reconnect (new offer as
  reconnectOffer), kick, stop (also before the stream went live),
  merged keyframe requests, frame fan-out to connected viewers
- ViewerSession: joinstreamrequest, answer the offer from the response or
  an offer/reconnectOffer signal, candidates, denial, stop, removal,
  leave, reconnect after a lost connection (up to three times)
- StreamDirectory: streams in the channel from notifications and
  client_is_streaming
- FrameSource + SyntheticSource: decodable 1x1 VP8 keyframes (padded)
  and Opus silence in real time, for tests and tsctl
- Peer: poll_event for driving many peers from one task; trickled local
  candidates carry the bundle mid

Transcript unit tests and an end-to-end test through a fake relay server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 19:48:06 +00:00
Claude 81ecb53100 M7 (part 1): tsc-stream signalling and str0m peers
New crate tsc-stream for TeamSpeak 6 streams:
- proto: typed StreamNotification from the notifystream* messages and
  builders for setupstream, joinstreamrequest, respondjoinstreamrequest,
  streamsignaling, removeclientfromstream and stopstream
- signal: the JSON messages inside streamsignaling (offer, answer,
  iceCandidate, reconnect), accepting the known key spellings
- stun: minimal STUN binding client for server-reflexive candidates
- peer: a str0m peer connection driven by a tokio task, one UDP socket per
  host address; STUN lookups run in the background and found candidates are
  reported for trickling

Declarations (verified against 6.0.0-beta13.1): joinstreamrequest; stopstream
and removeclientfromstream require `reason`; is_remove/reason/return_code on
the notifications.

Tests: two peers over loopback exchange VP8 and Opus frames; with TSC_LIVE=1 a
whole stream runs through the TS6 dev server (setup, join, offer, answer,
media, kick, stop). it-smoke.sh runs it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 19:22:05 +00:00
Claude 4c5f90b66b ci: allow Slint royalty-free license in cargo-deny, fix Slint binding loop
cargo-deny rejected Slint's license expression (GPL-3.0-only OR
LicenseRef-Slint-Royalty-free-2.0 OR ...) and ksni's Unlicense. We use Slint
under the royalty-free license, whose attribution is in the About page.

The main window's `narrow` flag was bound to its own width and panes bound
their width to the parent, which Slint reports as a binding loop. The flag is
now set from a change handler and panes use stretch/min/max widths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 19:21:56 +00:00
Claude baa88dc082 docs: TS6 stream join handshake and embedded schema
joinstreamrequest needs id, clid, msg and is_remove (found by probing a
live stream with parameter names from the server binary). The server
embeds the protobuf schema of the new protocol; its enums explain the
setupstream type/accessibility/mode values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 15:01:33 +00:00
Claude 3f5f376a59 M5 (part 2): Slint desktop UI (tsc-desktop)
- tsc-model: tree_rows/order_siblings (flattened channel tree in
  TeamSpeak's sibling order, collapsible).
- tsc-ui: Slint (fluent-dark) window with server list and bookmark
  editor, channel tree (talking, muted, away, streaming, password
  markers; click opens channel chat, double-click joins), chat tabs with
  unread counts, connect/observe/mute/push-to-talk toolbar, narrow
  single-pane layout for small screens, About page with the Slint
  attribution. Engine events are marshalled to the UI thread; secrets
  go to the OS keyring (memory fallback).
- Dev switches TSC_DATA_DIR, TSC_AUTOCONNECT and TSC_SCREENSHOT; the
  README screenshots were taken under Xvfb against the dev servers.
- Workspace lint unsafe_code: deny (Slint's generated code needs a
  local allow).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 14:49:40 +00:00
Claude 8b274cf36f M5 (part 1): tsc-core engine
Engine with Command/Event API for the UI. One actor per server session
merges three sources:
- voice: tsclientlib connection, book -> Presence, chat, talking
  indicators, move/mute, audio packets
- gateway: tsgw client (identity login, presence, relayed chat)
- query: own ServerQuery credentials via tsc-observer (observer + relays)
Presence authority voice > gateway > query; chat routing (voice for own
channel/server/private, else gateway, else query) and cross-source
dedup; stale source events are dropped by generation.
Audio thread keeps cpal devices off the runtime: capture -> linear
resample -> Opus (push-to-talk or VAD), incoming -> mixer -> playback.
Live test (TSC_LIVE=1, part of the smoke script) covers voice, query
presence and relay chat both ways on TS3 and TS6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 14:38:08 +00:00
Claude 9b529ceff6 M4: tsgw gateway and tsc-gateway-proto
- tsc-gateway-proto: versioned JSON envelope (tsgw.v1+json), client and
  server messages, identity-challenge auth (ECDSA P-256 over a signed
  challenge), unique ids for TS3 (SHA-1) and TS6 (SHA-256, verified on
  6.0.0-beta13.1), hash-cash level.
- tsc-gateway (tsgw): axum WebSocket server; hub with one observer, a
  relay pool and a lookup query session; login by signature or token;
  permission mirroring via permoverview (server group/client/channel
  group/channel-client levels, skip and negate); per-user filtered
  presence (snapshot + diff deltas); channel/server chat relay with
  server-known nicknames, rate limit, idle relay teardown, pinned
  channels; SQLite tokens, history and audit; Dockerfile; admin guide.
- tsctl gateway client; smoke test covers gateway presence, chat both
  ways and refusal of unknown identities on TS3 and TS6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 14:30:44 +00:00
Claude 2380c970fb deny: document RUSTSEC-2023-0071 exception for russh
TeamSpeak SSH query servers (3.13 and 6 beta13.1) use RSA host keys, so
russh needs the rsa crate to verify them; the advisory concerns RSA
private-key operations, which we never perform (password logins).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 14:16:22 +00:00
Claude 6e732d625f M3: tsc-query and tsc-observer (invisible presence, relay chat)
- tsc-query: ServerQuery codec (escaping, rows, errors, notifications,
  command builder/parser), line client for raw TCP and SSH (russh) with
  events, flood-limit token bucket and keepalive, HTTP WebQuery client.
- tsc-model: Presence (snapshot/delta/diff), ChannelInfo, ClientInfo,
  ChatMessage, relay formatting and message splitting.
- tsc-observer: Observer (snapshot, events or polling, resync,
  reconnect) and RelayPool (one query session per channel, reads channel
  chat and posts as [Nick] text, unique nicknames, polite quit).
- tsctl query/observe/relay; smoke test covers presence and relay on
  TS3 (raw) and TS6 (SSH). Dev servers enable all query interfaces with
  a fixed dev password.
- docs: query clients are hidden by clients, not the server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 14:15:29 +00:00
Claude f31d976bfc smoke: keep state in dev/.state, kill background clients on exit
The admin identity that redeemed the one-time privilege key lived in
target/, so cargo clean broke later runs. Also print how to reset the
servers when the key is already used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 13:57:50 +00:00
Claude 908e5566c4 M2: tsc-audio, tsc-store and tsctl voice
- tsc-audio: Opus voice/music encoder producing TeamSpeak voice packets,
  framer, rubato resampling, WAV I/O, tone/Goertzel helpers, cpal
  capture/playback over lock-free ring buffers; the vendored
  AudioHandler is the jitter buffer/mixer.
- tsc-store: SQLite (bundled, WAL, 0600) with migrations for identities,
  bookmarks, settings and paged chat history; Secrets trait with memory
  and OS keyring backends.
- tsctl voice send (WAV or tone, real time) / record (mix to WAV,
  --expect-tone check). The smoke test now includes a voice round-trip:
  1 kHz tone ratio ~0.95 on TS3 and TS6.
- Dev profile: no debug info for dependencies (target/ 16 GB -> 2.4 GB).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 13:56:01 +00:00
Claude 339fa32f1b tsctl: fix import order (rustfmt)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 13:42:19 +00:00
Claude 3e235f3760 M1: dalek 4, fuzzing and fixes, tsc-model with server flavor
- curve25519-dalek-ng -> curve25519-dalek 4.
- fuzz/: cargo-fuzz targets for packets, commands and the license chain,
  plus a nightly workflow. Fixes for the panics they found: empty
  license, unchecked license property bounds, wrong index in the C2S
  audio invalid-codec error.
- tsc-model: ServerVersion/ServerFlavor/Capabilities parsed from
  virtualserver_version; tsctl shows the flavor in the tree header.
- CI lints every non-vendored crate via scripts/own-crates.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 13:40:56 +00:00
Claude b1d704cf56 proto: TeamSpeak 6 fields and stream messages; tsctl shows streams
- Declarations: client_is_streaming (Client::is_streaming), initserver
  virtualserver_address/virtualserver_version_sign, stream
  notifications and commands (setupstream, stopstream, ...).
- tsctl: prints stream notifications and streaming state changes, marks
  streaming clients in the tree.
- CI: cargo-deny with default features (rug/GMP is benchmark-only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 13:20:16 +00:00
Claude c95c63761e tsproto: solve the Init1 puzzle off-thread with Montgomery squaring
TeamSpeak 6 beta13 raises the puzzle level with the server's protection
level. The solver now runs on a blocking thread, can be cancelled, is
~25% faster (crypto-bigint Montgomery form), and the level cap is
configurable (default 100M instead of a fixed 10M).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 13:13:20 +00:00
Claude c9dafa7bae ci, docs: CI workflow, cargo-deny, architecture and TS6 protocol notes
- .github/workflows/ci.yml: fmt/clippy (strict for own crates), build and
  test on ubuntu-24.04 and windows-2025, cargo-deny, TS3/TS6 smoke test
- deny.toml: permissive licenses only, advisories, sources
- README, docs/architecture.md (design + milestones),
  docs/protocol-notes/ts6-streaming.md incl. first probe results
  against 6.0.0-beta13.1 (setupstream works for guests,
  joinstreamrequest exists)
- tsctl repl: /raw command

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 13:08:34 +00:00
Claude 124ae62794 dev: docker-compose TS3/TS6 servers and tsctl smoke test
- dev/docker-compose.yml: TeamSpeak 3.13 and TeamSpeak 6 beta13.1,
  pinned by digest, REGISTRY override for the Docker Hub mirror.
- scripts/it-smoke.sh: tree, server chat and channel chat
  round-trips on both servers; redeems the one-time ServerAdmin key.
- tsctl raw: send an arbitrary command (used to relax anti-flood on
  the dev servers; later for probing TS6 stream commands).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 13:04:41 +00:00
Claude 4b3df87943 tsctl: headless CLI for connecting, channel tree and chat
- identity new/show (JSON identity files with hash-cash level)
- versions: list signed client versions from Versions.csv
- connect <addr> tree | chat server|channel|client | listen | repl
  with --client-version, --privilege-key, --server-password,
  --channel and --log-commands

Verified against local TeamSpeak 3.13 and TeamSpeak 6.0.0-beta13.1
containers: connect, subscribe-all tree, server and channel chat
round-trips between two clients.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 12:59:36 +00:00
Claude 65dbb0f1a4 build: workspace for vendored crates, replace audiopus with opus2
- Root Cargo workspace (resolver 3) with the six vendored crates.
- Path deps adjusted to the flat crates/proto layout, publish = false.
- tsclientlib: audiopus (unmaintained, RUSTSEC-2026-0150) -> opus2 0.4.
- Stable rustfmt config for new crates; vendored crates keep their own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 12:52:44 +00:00
Claude 7b6959c4cc vendor: import ReSpeak/tsclientlib@ee3bc6f
Unmodified copy of the tsclientlib workspace crates (MIT OR Apache-2.0)
with the tsdeclarations submodule (83cb8a9) flattened into plain files.
See crates/proto/UPSTREAM.md for the path mapping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 12:46:11 +00:00