Files
client/core/vendor/README.md
T

4.5 KiB
Raw Blame History

Vendored third-party code

tsclientlib/

  • Upstream: https://github.com/ReSpeak/tsclientlib, crate tsclientlib/ at revision ee3bc6f45a7137db7793ba5593a321df400d53e5 (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-MIT and tsclientlib/LICENSE-APACHE (copied verbatim from the upstream repository root).
  • tsclientlib, tsproto and tsproto-packets are vendored from that revision. ts-bookkeeping and tsproto-types remain pinned git dependencies. The root workspace patches select the local tsproto and tsproto-packets for 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.

  1. Cargo.toml: the workspace path dependencies are replaced by git dependencies pinned to the same revision.

  2. src/lib.rs: new StreamItem::UnknownCommand(InCommandBuf). Upstream parses every incoming command into InMessage and 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.

  3. src/lib.rs: opt-in ConnectOptions::raw_command_tap(fn(&[u8]) -> bool) and StreamItem::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 6 client_is_streaming). Off by default. initserver is 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 selects initserver (needed for virtualserver_capability_extensions, which the book drops).

  4. src/sync.rs: SyncStreamItem mirrors the two new variants so the crate keeps compiling.

  5. src/lib.rs: ConnectOptions::automatic_identity_level(bool), enabled by default to retain upstream behaviour. TeamsPeach disables it so a server-requested level returns IdentityLevel instead of spawning upstream's unbounded proof-of-work thread. The explicit identity CLI owns bounded, cancellable work and durable checkpoints.

  6. src/lib.rs: AudioSendMetadata, AudioSendGuard and send_audio_guarded forward original capture time, connection generation and privacy epoch to the transport. Ordinary send_audio remains for non-capture end markers and existing third-party callers.

  7. src/audio.rs: AudioQueue::has_pending_whisper identifies 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