Skip to main content

Module config

Module config 

Source
Expand description

Canonical configuration lives in the reusable SDK; existing public paths remain valid.

Structs§

ConfigInput
Input for the config MCP tool (no parameters; reads the default path).
ConfigReport
Structured output of omni config / the config MCP tool.
Loaded
The result of loading a config: the resolved path, whether it existed, and the (possibly empty/default) config.
OmniConfig
The whole declarative connection config.
ResolvedEndpoint
A leaf endpoint produced by resolving a target (a single transport with the name of the concrete target it came from).
Target
A named connection target: exactly one of a single transport endpoint (unicast) or a group of other target names (multicast fan-out).
TargetSummary
A one-line summary of a configured target for the omni config report.

Enums§

Transport
How omni reaches a single endpoint. Serialized with an internal type tag, e.g. { type: adb-broadcast, serial: ABC123 }.

Constants§

CONFIG_ENV
Environment variable that overrides the config file path outright.
CONFIG_REL_PATH
Config path relative to the XDG / ~/.config config directory.
DEFAULT_SENDER_PACKAGE
Default sender_package extra for the Android/adb path, within the receiver allowlist (com.harryaskham.*). The Android transport bead (bd-17026f) owns the final lock; config may override per target.
EXAMPLE_CONFIG
A commented, ready-to-edit starter config emitted by omni config --example. It exercises every transport (adb-broadcast, tcp, relay) plus a fan-out group, so a new user can copy it to ~/.config/omni/config.yaml and edit. MUST stay a valid OmniConfig (a test parses it).

Functions§

default_config_path
The default config path, from $OMNI_CONFIG, else $XDG_CONFIG_HOME/omni/config.yaml, else $HOME/.config/omni/config.yaml, else a relative .config/omni/config.yaml fallback.
load
Load (and validate) the config from the resolved path. A missing file is not an error — it yields an empty config so fresh machines work.
report
Load the default config and build its report (used by the MCP config tool).
resolve_config_path
Resolve the config path: explicit --config wins, else default_config_path.