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§

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.
browser_setup
An interrupted wizard can resume its exact browser and sign-in without saving a profile.
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 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§

BrowserVersion
ConnectionMetadata
ConnectionWatch
A read-only startup check owned by the inbox; dropping it cancels the task.
DebuggingSetup
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.
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.
check_recipient
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.