kanade_shared/ipc/mod.rs
1//! KLP (Kanade Local Protocol) shared types — SPEC §2.12.
2//!
3//! KLP is the IPC protocol between the Client App (Tauri) and the
4//! agent. The shared types in this module are consumed by both
5//! sides (`kanade-agent::klp` and the eventual `kanade-client`)
6//! and, in time, exported to TypeScript for the Tauri WebView via
7//! ts-rs.
8//!
9//! Module layout matches SPEC §2.12.5's method namespace:
10//!
11//! - [`envelope`] / [`error`] — JSON-RPC 2.0 framing types
12//! ([`envelope::RpcRequest`], [`envelope::RpcNotification`],
13//! [`envelope::RpcResponse`]) plus the error model
14//! ([`error::RpcError`], [`error::ErrorKind`]).
15//! - [`method`] — string constants for every v1 method name.
16//! - [`handshake`], [`system`] — `system.*` methods.
17//! - [`state`] — `state.snapshot` / `state.subscribe` /
18//! `state.changed`.
19//! - [`notifications`] — `notifications.list` / `subscribe` /
20//! `ack` + `notifications.new` push.
21//! - [`jobs`] — `jobs.list` / `execute` / `subscribe` / `kill` +
22//! `jobs.progress` push.
23//! - [`support`] — `support.upload_diagnostics`.
24//! - [`maintenance`] — `maintenance.list` / `maintenance.defer`.
25//!
26//! ts-rs export (SPEC §2.12.11) is deferred until the
27//! `kanade-client` crate lands — until then there's no TS consumer
28//! to import the bindings, and pulling the ts-rs dependency in
29//! without a build hook to generate the `bindings/ipc/*.ts` files
30//! would be dead code.
31
32pub mod envelope;
33pub mod error;
34pub mod handshake;
35pub mod jobs;
36pub mod maintenance;
37pub mod method;
38pub mod notifications;
39pub mod state;
40pub mod support;
41pub mod system;