Skip to main content

Module desktop

Module desktop 

Source
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§

connection
Explicit, recoverable debugging launches. Never restarts Teams on process exit.
helper
The WSL bridge: the Linux CLI keeps one teams.exe desktop-helper running 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). hello and its version and protocol fields never change. Protocol 2 adds sending; 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.

Structs§

BrowserVersion
ConnectionMetadata
DebuggingSetup
Commands for manual setup and the confirmed WSL TUI restart. macOS uses process-only environment; Windows/WSL preserve and restore the user’s WebView2 variable.
DesktopClient
TargetMetadata

Enums§

ProbeStatus

Constants§

MAX_BODY
Teams’ own limit for one chat message.

Functions§

check_chat
Refuses anything but a chat id as teams chats lists them.
helper_check
The WSL helper’s install state for doctor as (status, detail); None where no helper is involved. Never downloads.
local_prerequisites
messaging_unsupported
platform
serve_helper
The hidden desktop-helper command: answers the Linux CLI under WSL until stdin closes.