Skip to main content

CapabilitiesConfig

Struct CapabilitiesConfig 

Source
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: bool

The product in-app browser, with its newtab / settings / downloads pages and browser shell runtime. Opt-in and cross-platform.

§terminal: bool§proxy: bool

Opt-in HTTP proxy for the in-app browser (desktop). Requires browser.

§process: bool

Allows the trusted home lxapp to launch and manage OS processes. The lxapp must also declare the process security privilege.

§autostart: bool

Unlocks lx.app.autostart (launch at system startup). macOS/Windows only; enabling is always a runtime user decision, never automatic.

§app_use: bool

Lets 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: bool

Extends 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: bool

Extends it to the in-app browser. Requires browser.

§media_capture: MediaCaptureConfig

Realtime 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

Source

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.

Source

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.

Source

pub fn media_capture_enabled(&self) -> bool

Trait Implementations§

Source§

impl Clone for CapabilitiesConfig

Source§

fn clone(&self) -> CapabilitiesConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CapabilitiesConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CapabilitiesConfig

Source§

fn default() -> CapabilitiesConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for CapabilitiesConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for CapabilitiesConfig

Source§

impl PartialEq for CapabilitiesConfig

Source§

fn eq(&self, other: &CapabilitiesConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for CapabilitiesConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for CapabilitiesConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.