1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! Talk to a running [mcpmesh](https://github.com/counterpunchtech/mcpmesh) daemon from Rust.
//!
//! This crate is the `mcpmesh-local/1` control seam: the typed wire vocabulary of the daemon's
//! local control endpoint (requests, results, and the live-stream frames), the platform rule for
//! finding that endpoint ([`paths`]), and — behind the `client` feature — an async client that
//! speaks it. It links **no networking stack**: embedders (UIs, plugins, scripts) drive the
//! daemon without pulling the mesh transport.
//!
//! The full protocol (framing, method-by-method semantics, the identity contract) is documented in
//! [`docs/local-protocol.md`](https://github.com/counterpunchtech/mcpmesh/blob/main/docs/local-protocol.md).
//!
//! # Quickstart (feature `client`)
//!
//! # async fn quickstart() -> Result<(), mcpmesh_local_api::client::ClientError> {
//! let mut daemon = mcpmesh_local_api::connect_control_default().await?;
//! let status = daemon.status().await?;
//! for peer in &status.peers {
//! println!("{} shares: {}", peer.name, peer.services.join(", "));
//! }
//! # Ok(())
//! # }
//! ```
//!
//! [`connect_control_default`] dials the platform default endpoint (a unix socket, or a named
//! pipe on Windows — the one rule in [`paths::default_endpoint`]); [`ControlClient`] then offers
//! a typed helper per control method (`status`, `invite`, `pair`, `subscribe`, …), with
//! [`ControlClient::request`] as the raw escape hatch for forward compatibility.
//!
//! # Features
//!
//! | Feature | Adds | Dependencies |
//! |-----------|-------------------------------------------------------------------------|--------------|
//! | *(none)* | The wire vocabulary ([`protocol`]) + endpoint resolution ([`paths`]) | serde only |
//! | `client` | [`ControlClient`]: connect, typed request helpers, the typed [`client::StreamSubscription`] live stream | + tokio |
//! | `service` | The plugin seam ([`service`]): local endpoint bind + same-user gate, `[services.*]` self-registration | + rustix, tracing |
/// Platform paths + endpoint resolution — featureless/std-only, so any consumer
/// resolves the daemon endpoint from the ONE rule.
pub use principal_set;
pub use ;
/// The platform local-endpoint seam: connect/bind/accept/authorize.
pub use ;
/// The shared plugin-platform seam (kb, loc, …): local endpoint faces, THE audience-authz
/// expansion, `[services.*]` self-registration, and the `*-local/1` JSON-RPC conventions.