Skip to main content

running_process/broker/
mod.rs

1//! v1 broker module — schemas are FROZEN FOREVER once v1.0 ships.
2//!
3//! Phase 0 of #228: this module exposes the prost-generated wire types
4//! (envelope, manifest, service definition) for every later phase to
5//! depend on. No consumers ship yet — Phases 1+ wire them in.
6//!
7//! See `proto/broker_v1_*.proto` and the parent issue for the rationale
8//! behind every field number and `reserved` range.
9
10#[cfg(feature = "client")]
11pub mod adopt;
12#[cfg(any(feature = "client", feature = "backend-identity"))]
13pub mod backend_handle {
14    pub use crate::backend_identity::handle::*;
15}
16#[cfg(feature = "client")]
17pub mod backend_lib;
18#[cfg(any(feature = "client", feature = "backend-identity"))]
19pub mod backend_lifecycle;
20#[cfg(any(feature = "client", feature = "backend-identity"))]
21pub mod backend_sdk;
22#[cfg(feature = "client")]
23pub mod broker_http_discovery;
24#[cfg(feature = "client")]
25pub mod broker_http_port;
26#[cfg(feature = "client")]
27pub mod broker_http_server;
28#[cfg(feature = "client")]
29pub mod broker_owned_bind;
30#[cfg(feature = "client")]
31pub mod brokered_backend;
32#[cfg(feature = "client")]
33#[path = "builders_compat.rs"]
34pub mod builders;
35#[cfg(feature = "client")]
36pub mod capabilities;
37#[cfg(feature = "client")]
38pub mod client;
39#[cfg(feature = "client")]
40pub mod client_v2;
41#[cfg(feature = "client")]
42pub mod connect_watchdog;
43#[cfg(feature = "client")]
44pub mod doctor;
45#[cfg(feature = "client")]
46pub mod fs_health;
47#[cfg(feature = "client")]
48pub mod get_http_endpoint_dispatch;
49#[cfg(feature = "client")]
50pub mod get_session_token_dispatch;
51#[cfg(any(feature = "client", feature = "backend-identity"))]
52#[path = "host_identity_compat.rs"]
53pub mod host_identity;
54#[cfg(feature = "client")]
55pub mod http_endpoint_registry;
56#[cfg(feature = "client")]
57pub mod lifecycle;
58#[cfg(feature = "client")]
59#[path = "manifest_compat.rs"]
60pub mod manifest;
61#[cfg(any(feature = "client", feature = "backend-identity"))]
62pub mod protocol;
63#[cfg(feature = "client")]
64pub mod protocol_v2;
65#[cfg(feature = "client")]
66#[path = "secure_dir_compat.rs"]
67pub mod secure_dir;
68#[cfg(feature = "client")]
69pub mod server;
70#[cfg(feature = "client")]
71pub mod session_codec;
72// The dumb-terminal client rides the async `SessionFrameCodec` (defined behind
73// the `daemon` feature today); keep it there until that codec is hoisted to a
74// client-async home.
75#[cfg(feature = "daemon")]
76pub mod session_client;
77#[cfg(feature = "client")]
78pub mod session_pump;
79// The SESSION relay is a transparent byte proxy (no `SessionFrameCodec`). It
80// uses Linux splice or portable buffered I/O under `client-async`, so the
81// standalone async v2 broker can use it without the daemon runtime.
82#[cfg(feature = "client-async")]
83pub mod session_relay;
84#[cfg(feature = "client")]
85pub mod session_server;
86// The async SESSION-lane takeover handler. On `client-async` (not `daemon`) so
87// any async consumer daemon — including soldr-daemon, which enables
88// `running-process/client-async` — can serve SESSION without the full
89// running-process daemon runtime. `daemon::compile_session` re-exports it.
90#[cfg(feature = "client-async")]
91pub mod session_takeover;
92
93/// Re-exported frozen v1 outer framing byte. The canonical definition lives
94/// in [`crate::frame_v1`] so a frame-only consumer need not compile broker
95/// ownership or IPC modules.
96pub use crate::frame_v1::FRAMING_VERSION_V1;
97
98/// Re-exported frozen v1 per-frame cap.
99pub use crate::frame_v1::MAX_FRAME_SIZE_BYTES;
100
101/// Re-exported frozen v1 Hello cap.
102pub use crate::frame_v1::MAX_HELLO_SIZE_BYTES;
103
104/// Upper bound on a LifecycleEvent's prost-encoded size, set to the
105/// minimum POSIX `PIPE_BUF` so atomic-append into the event log is
106/// guaranteed on every platform. Linux raises this to 4096 in practice,
107/// but the cross-platform floor is 512.
108pub const LIFECYCLE_EVENT_PIPE_BUF_FLOOR: usize = 512;