Skip to main content

Module host_os

Module host_os 

Source
Expand description

The operating system an instance runs on, as the Swarm shows it next to a remote machine (docs/specs/SPEC_SWARM_REMOTE_AGENTS_PLATFORM_TAG_AND_SELECTION_2026_10_03.md §3).

It is one lowercase string, std::env::consts::OS (windows, macos, linux, …), advertised by each instance in its LAN record. A peer’s value is self-reported and used for display only, so what arrives from the network is accepted only in the plain shape below and is never read for a decision.

Constants§

MAX_OS_LEN
The longest value accepted from a peer.

Functions§

local_os
This instance’s own value.
sanitize_os
A peer’s value, or None if it isn’t a plain lowercase token. Anything else (empty, long, upper case, spaces, markup) is dropped, so the frontend never receives text it didn’t expect.