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
This commit is contained in:
Claude committed 2026-09-25 14:38:08 +00:00
1 parent 9b529ceff6
commit 8b274cf36f
13 files changed
+1783

No files matched your search

Generated
+20
View File
@@ -5154,6 +5154,26 @@ dependencies = [
"tsproto-packets",
]
[[package]]
name = "tsc-core"
version = "0.1.0"
dependencies = [
"anyhow",
"futures",
"serde_json",
"thiserror 2.0.21",
"tokio",
"tokio-tungstenite 0.30.0",
"tracing",
"tsc-audio",
"tsc-gateway-proto",
"tsc-model",
"tsc-observer",
"tsc-query",
"tsclientlib",
"tsproto-packets",
]
[[package]]
name = "tsc-gateway"
version = "0.1.0"