feat(daemon): expose watching over the RPC surface and the CLI
The watch subscription was reachable only from the library. It is most useful against a daemon -- that is the session that stays connected long enough to receive the server's status pushes -- so it needs the wire. - proto: user.watch / user.unwatch / user.watched, with a Watched response - SessionApi gains watch_user / unwatch_user / watched_users, so a local and a remote session are still interchangeable above the seam - CLI: `watch add`, `watch remove`, `watch list`, documented in SKILL.md including the caveat that a one-shot run's watch ends with the run - docs/openrpc.json regenerated from the wire types
This commit is contained in:
@@ -139,6 +139,13 @@ pub struct Members {
|
||||
pub users: Vec<String>,
|
||||
}
|
||||
|
||||
/// Everyone this session is watching, sorted by name.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)]
|
||||
#[cfg_attr(test, derive(schemars::JsonSchema))]
|
||||
pub struct Watched {
|
||||
pub users: Vec<String>,
|
||||
}
|
||||
|
||||
/// One line of chat history. Unlike a live [`UserMessageDto`] this carries a
|
||||
/// direction, because a conversation the daemon collected includes what this
|
||||
/// account sent as well as what it received.
|
||||
|
||||
@@ -106,6 +106,9 @@ wire_vocabulary! {
|
||||
BrowseUser => "browse.user",
|
||||
UserRequest => "user.request",
|
||||
UserInfoOf => "user.info",
|
||||
UserWatch => "user.watch",
|
||||
UserUnwatch => "user.unwatch",
|
||||
UserWatched => "user.watched",
|
||||
SharesStatusOf => "shares.status",
|
||||
SharesSet => "shares.set",
|
||||
SharesReindex => "shares.reindex",
|
||||
|
||||
Reference in New Issue
Block a user