frame_host/lib.rs
1//! The full frame server: one binary, one config, one start command.
2//!
3//! `frame-host --config frame.toml` boots the entire stack in a single process:
4//!
5//! - the **embedded liminal component** ([`embedded`]) — liminal's TCP wire
6//! listener, browser WebSocket listener, and health endpoint, running
7//! in-process on liminal's own threads (no child process, no side-by-side
8//! server); the host owns its lifecycle but not its bytes;
9//! - the **frame-core host authority** ([`runtime`]) — the host-owned
10//! capability table reached only through
11//! [`frame_core::capability::HostCapabilityFacade`], the component registry,
12//! and supervised lifecycle, around the class-(b) client-native graph view
13//! under the `frame:graph-view@v1` contract (D10);
14//! - the **console HTTP server** ([`server`]) — the static browser bundle,
15//! `GET /frame/config.json`, `GET /frame/app/status.json` (the
16//! application-truth snapshot, [`truth`]), and the same-origin
17//! `/frame/bus/*` health proxy routes ([`bus_proxy`]).
18//!
19//! Per ruling D3 the browser is a bus PARTICIPANT: the served page connects
20//! to the embedded bus directly over the WebSocket transport. This host
21//! never proxies or terminates that feed; `/frame/config.json` is DERIVED at
22//! runtime from the embedded component's real bound WebSocket address
23//! (served as `busEndpoint`), so the page's endpoint and the server's
24//! address can never drift.
25//!
26//! Console-first (D9): every component lifecycle transition and capability
27//! denial is logged to stdout as it happens.
28//!
29//! ## The embedding seam
30//!
31//! frame-host is also a library: an embedding application supplies an
32//! [`AppSpec`] (its component installs, stated runtime policy, readiness
33//! proof, and fact announcements) and [`run_application`] boots the whole
34//! stack around it — [`app`] is this binary's own composition riding the
35//! same seam. The [`announcer`] publishes the host authority's real events
36//! (lifecycle transitions, capability denials, application facts) on
37//! `[frame].channel` over its OWN native participant connection: the page
38//! server still carries zero feed bytes (D3) — the host is a node on the
39//! bus, never a proxy in front of it.
40
41pub mod announcer;
42pub mod app;
43pub mod application;
44pub mod bus_proxy;
45pub mod cli;
46pub mod config;
47pub mod dev;
48pub mod doc_binding;
49pub mod embedded;
50pub mod error;
51pub mod manifest;
52pub mod page;
53pub mod runtime;
54pub mod serve;
55pub mod server;
56pub mod spec;
57pub mod syntax_theme;
58pub mod truth;
59
60pub use announcer::Announcer;
61pub use app::run;
62pub use application::{Application, run_application, run_dev_application};
63pub use cli::Cli;
64pub use config::{DocumentSection, FrameConfig, FrameSection};
65pub use error::HostError;
66pub use page::PageServer;
67pub use spec::{AppError, AppSpec, ComponentInstall};
68pub use syntax_theme::default_syntax_theme;
69pub use truth::{AppTruth, AppTruthSnapshot};