Vendored third-party code
tsclientlib/
- Upstream: https://github.com/ReSpeak/tsclientlib, crate
tsclientlib/at revisionee3bc6f45a7137db7793ba5593a321df400d53e5(2026-07-22, "Fix pulling partial packets from AudioQueue"). - Authors: Flakebi and the ReSpeak contributors.
- License: dual MIT OR Apache-2.0 — see
tsclientlib/LICENSE-MITandtsclientlib/LICENSE-APACHE(copied verbatim from the upstream repository root). tsclientlib,tsprotoandtsproto-packetsare vendored from that revision.ts-bookkeepingandtsproto-typesremain pinned git dependencies. The root workspace patches select the localtsprotoandtsproto-packetsfor every consumer.
Local modifications
tsclientlib.patch records the original protocol-discovery modifications (items 1–5 below).
The native capture-send extension in item 6 and tsproto/ is maintained directly in the vendored tree;
the historical patch alone no longer reproduces the complete tree.
-
Cargo.toml: the workspacepathdependencies are replaced by git dependencies pinned to the same revision. -
src/lib.rs: newStreamItem::UnknownCommand(InCommandBuf). Upstream parses every incoming command intoInMessageand drops (with a warning) commands it has no declaration for. The TeamSpeak 6 screen-share signalling (notifystream*,notifyjoinstreamrequest,notifyrespondjoinstreamrequest,notifysfuaccessinfo) is such a family, so the patch hands those packets to the application unparsed instead of dropping them. -
src/lib.rs: opt-inConnectOptions::raw_command_tap(fn(&[u8]) -> bool)andStreamItem::RawCommandCopy(Vec<u8>): a copy of each incoming command whose name the predicate selects, emitted before normal processing. Used to read arguments the book does not store (channel banners, TeamSpeak 6client_is_streaming). Off by default.initserveris consumed while connecting, before that processing runs; the connect future therefore also returns its raw content (type Established), which is copied once the connection is established if the predicate selectsinitserver(needed forvirtualserver_capability_extensions, which the book drops). -
src/sync.rs:SyncStreamItemmirrors the two new variants so the crate keeps compiling. -
src/lib.rs:ConnectOptions::automatic_identity_level(bool), enabled by default to retain upstream behaviour. TeamsPeach disables it so a server-requested level returnsIdentityLevelinstead of spawning upstream's unbounded proof-of-work thread. The explicit identity CLI owns bounded, cancellable work and durable checkpoints. -
src/lib.rs:AudioSendMetadata,AudioSendGuardandsend_audio_guardedforward original capture time, connection generation and privacy epoch to the transport. Ordinarysend_audioremains for non-capture end markers and existing third-party callers. -
src/audio.rs:AudioQueue::has_pending_whisperidentifies decoder and jitter-buffer state that must be discarded when the receiver switches to Deny All, even after a whisper end marker arrived.
tsproto/
Same upstream revision and dual MIT OR Apache-2.0 license; license texts accompany the crate. Sibling workspace dependencies are pinned to the revision above. Guarded voice packets retain metadata plus a shared authorization guard through the deferred UDP queue. Before each actual socket send attempt, including a retry after backpressure, the guard synchronizes against capture invalidation and refuses expired or revoked packets. Guarded media is bounded separately from unmodified acknowledgement/control/end-marker traffic. This prevents muted or previous-session audio from escaping merely because it was encoded before a privacy boundary.
tsproto-packets/
The six package files come from upstream utils/tsproto-packets/ at the revision above;
LICENSE-MIT and LICENSE-APACHE are copied verbatim from the upstream root. This crate
has no sibling dependencies to re-pin. A local [workspace] lets the regression tests
run independently of the application workspace.
src/commands.rs now accepts _ alongside ASCII alphanumerics in command names, so
TeamSpeak 6 commands such as notify_s3ft_file_list retain their wire names. A name still
ends at an ASCII space or at the end of the input. Argument-only input, multipart
separators and escaping are unchanged.
Run the public API regression tests from the repository root:
cargo test --manifest-path core/vendor/tsproto-packets/Cargo.toml --test command_grammar