feat(mobile): per-user device bindings, multi-user Inbox routing, and admin-mediated authorization
- Device→user bindings persisted in config table (auth.rs), loaded at plugin start - RelayApp now routes Inbox responses per-user via UserChannelApi, never globally - New mobile_bind_device LLM tool for admin-mediated device→user assignment - Per-user event forwarders (events.rs) with per-user debounced notifiers - Config listener (auth::config_listener) refreshes bindings cache reactively - Reconcile loop catches users who unlock after boot - Hello/Logout treated as device-registry ops (no user resolution needed) - Unbound device payloads are silently dropped - RelayAgent::authorize_client → bind_device (atomic bind + authorize) - Approval rules seed mobile_bind_device/revoke_device as require
This commit is contained in:
@@ -103,7 +103,10 @@ pub fn build_inbox_update(snapshot: &InboxSnapshot) -> Value {
|
||||
})
|
||||
}
|
||||
|
||||
/// Build a generic `notification` payload (payloads.md §3.2).
|
||||
/// Build a generic `notification` payload (payloads.md §3.2). Part of the wire
|
||||
/// contract; retained for the protocol surface even though the current per-user
|
||||
/// flow pushes Inbox updates rather than free-form notifications.
|
||||
#[allow(dead_code)]
|
||||
pub fn build_notification(title: &str, body: &str) -> Value {
|
||||
serde_json::json!({
|
||||
"v": 1,
|
||||
|
||||
Reference in New Issue
Block a user