Skip to main content

AppManifest

Struct AppManifest 

Source
pub struct AppManifest {
Show 31 fields pub manifest_version: u8, pub name: String, pub version: String, pub app_type: AppType, pub description: String, pub abi: Option<AbiVersion>, pub entrypoint: Option<String>, pub hot_reload: Option<HotReloadKind>, pub critical: bool, pub auto_start: bool, pub has_ui: bool, pub ui_path: String, pub permissions: Vec<String>, pub requires: Vec<String>, pub optional_permissions: Vec<String>, pub provides_scopes: Vec<ProvidedScope>, pub endpoint_policies: Vec<EndpointPolicy>, pub capability_scopes: HashMap<String, String>, pub provides: HashMap<String, ProvidedCapability>, pub capabilities: ManifestCapabilities, pub ui: Option<AppUiManifest>, pub author: Option<String>, pub homepage: Option<String>, pub depends_on: Option<Vec<String>>, pub boot_priority: Option<u32>, pub governor: Option<GovernorManifest>, pub subscribes: Vec<String>, pub standalone: Option<StandaloneConfig>, pub tcp: Option<TcpManifest>, pub resources: Option<ResourcesManifest>, pub schedules: Vec<AppScheduleManifest>,
}
Expand description

Canonical manifest entity — unified v1/v2 format.

Deserializes both old (v1, no manifest_version) and new (v2) manifests. All v2-only fields use #[serde(default)] so that v1 manifests parse correctly without any field changes.

Fields§

§manifest_version: u8

Schema version. Absent or 1 = legacy v1; 2 = extended v2.

§name: String§version: String§app_type: AppType§description: String§abi: Option<AbiVersion>

Host ABI compatibility version. Required when manifest_version == 2.

§entrypoint: Option<String>

Payload entry point relative to the app directory. Default: app.so for Native, dist/index.js for Bun.

§hot_reload: Option<HotReloadKind>

Hot-reload behaviour classification. Default: experimental for Native, supported for Bun.

§critical: bool§auto_start: bool§has_ui: bool§ui_path: String§permissions: Vec<String>§requires: Vec<String>

Capability requirements in the v2 top-level vocabulary. This is an alias for capabilities.requires, not a second permission system.

§optional_permissions: Vec<String>§provides_scopes: Vec<ProvidedScope>§endpoint_policies: Vec<EndpointPolicy>§capability_scopes: HashMap<String, String>§provides: HashMap<String, ProvidedCapability>§capabilities: ManifestCapabilities§ui: Option<AppUiManifest>

App-delivered browser UI metadata. Legacy has_ui/ui_path remains readable but does not synthesize this block.

§author: Option<String>§homepage: Option<String>§depends_on: Option<Vec<String>>§boot_priority: Option<u32>§governor: Option<GovernorManifest>

App-governor idle-termination policy (issue #811 SP1). Absent means the app is subject to the default eligibility rules with no explicit opt-out and no minimum-idle override.

§subscribes: Vec<String>

Event-bus topics this app listens for while lazily started. Only meaningful for apps holding the EVENT_LISTENER capability — a listener with no declared subscribes topics is exempt from idle termination because the governor cannot know what would need to wake it back up (see node-app-host::governor_eligibility).

§standalone: Option<StandaloneConfig>

Required when app_type == "standalone" and the manifest declares any provides / capabilities.provides entries. Carries the Unix domain socket path the daemon dispatches capability calls to.

§tcp: Option<TcpManifest>

Optional TCP-binding block — feature 470 (port registry). Absence means the app does not bind a TCP port the registry manages.

§resources: Option<ResourcesManifest>

Runtime resource requests (Burger Plan 02, Contracts C2/C7). Absence means runtime defaults (Burger: 32 MB QuickJS memory limit, 5000 ms callback deadline).

§schedules: Vec<AppScheduleManifest>

Recurring jobs this app needs on the node, declared so the host can put the cron rows there without the app ever having run (econ-v1/node#3185).

Empty — the default — is exactly the behaviour that shipped before: the app owns its own registration and nothing happens until it starts. See AppScheduleManifest for why declaring one does not pin the isolate.

Implementations§

Source§

impl AppManifest

Source

pub fn resolved_requires(&self) -> Result<Vec<String>, String>

Resolve top-level requires and capabilities.requires into one canonical declaration list. Equal aliases are accepted regardless of order or duplicates; differing aliases are rejected.

Source

pub fn effective_hot_reload(&self) -> HotReloadKind

Returns the effective HotReloadKind — explicit field or the default for the app type.

Source

pub fn effective_entrypoint(&self) -> &str

Returns the effective entrypoint — explicit field or the type-specific default.

Standalone and UI-only apps have no daemon-managed entrypoint (systemd owns a standalone’s lifecycle; a UI-only stage has no process); the empty string signals “not applicable”.

Source

pub fn has_capability_providers(&self) -> bool

True iff this manifest declares at least one capability provider (via either the v1 provides map or the v2 capabilities.provides list).

Source

pub fn resolved_capability_provides( &self, ) -> HashMap<String, ProvidedCapability>

Merges the v1 provides map and the v2 capabilities.provides name list into a single capability→declaration map (composition-root cleanup Round 4 T28 — extracted from control_ipc::handlers::handle_app_register_standalone, which uses this to shape a standalone app’s declared providers for capability registration).

  • v1 entries (the provides map) carry their real description/schema and always win on a name conflict.
  • v2-only names (declared only via capabilities.provides, format "name" or "name:extra" — only the part before the first : is used) get a blank declaration, inserted only if the name is not already present from v1. Blank/whitespace-only names are skipped.
Source

pub fn validate(&self) -> Result<(), String>

Validate the manifest for structural correctness.

Returns Ok(()) on success, or a human-readable error string. Called by the manifest parser after deserialization.

Source

pub fn validate_with_socket_path_policy( &self, allow_non_run: bool, ) -> Result<(), String>

Validate this manifest with an explicit standalone socket-path policy.

Runtime adapters may opt into non-/run paths for development without making the domain model read process configuration.

Source

pub fn from_json(json: &str) -> Result<Self, String>

Parse from a JSON string, validate, and return the manifest.

Source

pub fn from_json_with_socket_path_policy( json: &str, allow_non_run: bool, ) -> Result<Self, String>

Parse and validate with an explicit standalone socket-path policy.

Trait Implementations§

Source§

impl Clone for AppManifest

Source§

fn clone(&self) -> Self

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 AppManifest

Source§

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

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

impl<'de> Deserialize<'de> for AppManifest

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 Serialize for AppManifest

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

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.