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
//! The public API every Mouser mode plugin is built on (docs/protocol.md).
//!
//! A mode is its own executable. Mouser starts it once, keeps it running and
//! talks to it over its stdin/stdout with length-prefixed frames
//! ([`codec`]), MessagePack by default or JSON with `MOUSER_MODE_WIRE=json`.
//! The first exchange is a handshake ([`protocol::Hello`] /
//! [`protocol::Welcome`]) that picks a shared protocol version
//! ([`protocol::negotiate`]) and registers the plugin's event listeners.
//! Then events flow in ([`events`]) and views, effects, emits and host calls
//! ([`host_api`]) flow out. Images travel through a shared-memory ring
//! ([`shm`]) with inline bytes as the fallback. The host restarts a crashed
//! plugin with back-off and gives up after a cap ([`supervisor`]). Plugins
//! reach host features (remote files, preferences, models, permissions,
//! fetch) through the [`services`] traits, answered over RPC.
//!
//! Commander, chat and preferences are built on this crate exactly like a
//! third-party mode.
pub use ;
pub use ;
pub use ;
pub use ;