Expand description
Existing-endpoint diagnostics, chat reading through the Teams client’s own cache, and
sending plain-text chat messages through the Teams window’s own client. The WSL TUI
can restart Teams with explicit confirmation; evaluates only the fixed scripts in desktop.js and desktop_send.js.
On Windows the CLI verifies the endpoint and reads in-process. Under WSL it drives the
Windows build of itself as a long-lived helper (teams.exe desktop-helper).
Modules§
- browser
- A dedicated Chromium profile. Verification precedes every page connection; closing uses the verified browser’s DevTools socket, never a signal to an arbitrary PID. Only the verified browser is signalled, when it does not exit after closing its endpoint.
- connection
- Explicit, recoverable debugging launches. Never restarts Teams on process exit.
- helper
- The WSL bridge: the Linux CLI keeps one
teams.exe desktop-helperrunning and talks newline-delimited JSON over its stdin and stdout. The helper exits when stdin closes. The protocol number is the whole contract: a helper is accepted when it speaks this CLI’s protocol, whatever its version or build, which are only reported. Bump it when either side would misread the other (desktop::tests::the_protocol_is_pinned).helloand itsversionandprotocolfields never change. Protocol 2 adds sending; protocol 4 adds recipient search and once-only chat creation. protocol 3 adds explicit account-type selection to reads, sends and send checks. - install
- Locates the Windows build that serves as the WSL helper, downloading the matching release on first use and verifying it against the release’s SHA256SUMS.
- session
- A verified page connection kept for the life of the process, so only the first read pays for verification and the socket handshake. Sends never reuse it: each one verifies afresh and evaluates exactly once.
Structs§
- Browser
Version - Connection
Metadata - Debugging
Setup - Commands for manual setup and the confirmed WSL TUI restart. macOS uses process-only environment; Windows/WSL set the flags only for the Teams launch.
- Desktop
Client - Target
Metadata
Enums§
Constants§
- MAX_
BODY - Teams’ own limit for one chat message.
Functions§
- check_
chat - Refuses anything but a chat id as
teams chatslists them. - check_
recipient - helper_
check - The WSL helper’s install state for
doctoras (status, detail);Nonewhere no helper is involved. Never downloads. - local_
prerequisites - messaging_
unsupported - platform
- serve_
helper - The hidden
desktop-helpercommand: answers the Linux CLI under WSL until stdin closes.