pub struct CapabilitiesConfig {
pub notifications: bool,
pub browser: bool,
pub terminal: bool,
pub proxy: bool,
pub process: bool,
pub autostart: bool,
pub app_use: bool,
pub computer_use: bool,
pub browser_use: bool,
pub media_capture: MediaCaptureConfig,
}Expand description
The capabilities: section, shared verbatim between the CLI (parsing
lingxia.yaml, writing app.json) and the runtime (reading app.json) —
one definition so a capability can never exist on one side only.
deny_unknown_fields gives lingxia.yaml typo errors; the runtime always
reads an app.json generated by the same CLI build, so it never sees fields
this struct lacks.
Fields§
§notifications: bool§browser: boolThe product in-app browser, with its newtab / settings / downloads pages and browser shell runtime. Opt-in and cross-platform.
terminal: bool§proxy: boolOpt-in HTTP proxy for the in-app browser (desktop). Requires browser.
process: boolAllows the trusted home lxapp to launch and manage OS processes. The
lxapp must also declare the process security privilege.
autostart: boolUnlocks lx.app.autostart (launch at system startup). macOS/Windows
only; enabling is always a runtime user decision, never automatic.
app_use: boolLets a command line or agent skill on the same machine drive this product’s own windows, and unlocks the product’s command line. Desktop only. The local socket it needs is derived, not declared: which IPC carries this is plumbing, and a capability list says what a product can do.
computer_use: boolExtends that to the whole machine: screenshots of any window, synthetic input, the accessibility tree. Named for what the user is granting, because they will be asked — macOS prompts for Accessibility and Screen Recording, and the entry they see in System Settings is this product.
browser_use: boolExtends it to the in-app browser. Requires browser.
media_capture: MediaCaptureConfigRealtime visual / system-audio / microphone capture. Independent of
computerUse. Omit the key, or leave every track false, for no
provider, services, or entitlements.
Implementations§
Source§impl CapabilitiesConfig
impl CapabilitiesConfig
Sourcepub fn needs_control_socket(&self) -> bool
pub fn needs_control_socket(&self) -> bool
Whether anything needs the local control socket. Derived rather than declared: no product should have to know the transport’s name to say what it wants.
Sourcepub fn app_use_effective(&self) -> bool
pub fn app_use_effective(&self) -> bool
Whether this product’s own windows may be driven.
computerUse implies it. Not for symmetry — because it already
contains it: an agent that may screenshot any window and post input to
any window can reach this product’s through the wider door. Requiring
both would add no protection and one failure mode, where a product
declares computerUse, forgets appUse, and myapp computer screenshot works while myapp screenshot is refused.
browserUse does not imply it: driving browser tabs reaches no native
window, and “open pages, don’t touch my chrome” is a real choice.
pub fn media_capture_enabled(&self) -> bool
Trait Implementations§
Source§impl Clone for CapabilitiesConfig
impl Clone for CapabilitiesConfig
Source§fn clone(&self) -> CapabilitiesConfig
fn clone(&self) -> CapabilitiesConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more