Expand description
KLP (Kanade Local Protocol) shared types — SPEC §2.12.
KLP is the IPC protocol between the Client App (Tauri) and the
agent. The shared types in this module are consumed by both
sides (kanade-agent::klp and the eventual kanade-client)
and, in time, exported to TypeScript for the Tauri WebView via
ts-rs.
Module layout matches SPEC §2.12.5’s method namespace:
envelope/error— JSON-RPC 2.0 framing types (envelope::RpcRequest,envelope::RpcNotification,envelope::RpcResponse) plus the error model (error::RpcError,error::ErrorKind).method— string constants for every v1 method name.handshake,system—system.*methods.state—state.snapshot/state.subscribe/state.changed.notifications—notifications.list/subscribe/ack+notifications.newpush.jobs—jobs.list/execute/subscribe/kill+jobs.progresspush.support—support.upload_diagnostics.maintenance—maintenance.list/maintenance.defer.
ts-rs export (SPEC §2.12.11) is deferred until the
kanade-client crate lands — until then there’s no TS consumer
to import the bindings, and pulling the ts-rs dependency in
without a build hook to generate the bindings/ipc/*.ts files
would be dead code.
Modules§
- envelope
- JSON-RPC 2.0 envelope types for KLP (SPEC §2.12.3).
- error
- KLP error model (SPEC §2.12.9).
- handshake
system.handshaketypes (SPEC §2.12.6).- jobs
jobs.*method types — user-invokable job catalog + execute + progress + kill.- maintenance
maintenance.*method types — scheduled-job preview + reboot defer.- method
- Method-name string constants for the KLP v1 namespace (SPEC §2.12.5).
- notifications
notifications.*method types — paginated history + ack + push for incoming notifications.- state
state.*method types — endpoint health snapshot + push notifications.- support
support.upload_diagnosticstypes — one-click “サポートに問い 合わせる” diagnostics bundle.- system
system.*(non-handshake) method types —system.ping,system.version,system.log_tail.