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:
@@ -1216,6 +1216,21 @@
|
||||
"shared_folders"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"Watched": {
|
||||
"description": "Everyone this session is watching, sorted by name.",
|
||||
"properties": {
|
||||
"users": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"users"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1875,6 +1890,58 @@
|
||||
},
|
||||
"summary": "What the server has said about a user so far."
|
||||
},
|
||||
{
|
||||
"name": "user.watch",
|
||||
"paramStructure": "by-name",
|
||||
"params": [
|
||||
{
|
||||
"name": "username",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"name": "result",
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Ack"
|
||||
}
|
||||
},
|
||||
"summary": "Watch a user, so the server keeps pushing their status."
|
||||
},
|
||||
{
|
||||
"name": "user.unwatch",
|
||||
"paramStructure": "by-name",
|
||||
"params": [
|
||||
{
|
||||
"name": "username",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"name": "result",
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Ack"
|
||||
}
|
||||
},
|
||||
"summary": "Stop watching a user."
|
||||
},
|
||||
{
|
||||
"name": "user.watched",
|
||||
"paramStructure": "by-name",
|
||||
"params": [],
|
||||
"result": {
|
||||
"name": "result",
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Watched"
|
||||
}
|
||||
},
|
||||
"summary": "Everyone this session is watching."
|
||||
},
|
||||
{
|
||||
"name": "shares.status",
|
||||
"paramStructure": "by-name",
|
||||
|
||||
Reference in New Issue
Block a user