fix(hub): harden relationship lifecycle

Keep optional Hub authority from blocking daemon startup, revoke ambiguous enrollments durably, and close owned agents when their relationship no longer exists. Reject remote CLI connect targets before transmitting enrollment authority.
This commit is contained in:
Mohamed Boudra
2026-07-13 12:58:06 +02:00
parent 8f5685b4c4
commit 9d9797c9e2
9 changed files with 285 additions and 46 deletions
+5 -3
View File
@@ -18,7 +18,8 @@ WebSocket without pairing again. The current foundation supports one Hub relatio
Only a trusted session arriving through a server-observed local, non-browser daemon transport may
run the `hub.relationship.connect`, `hub.relationship.get_status`, and
`hub.relationship.disconnect` RPCs. Remote, relay, browser-origin, and Hub sessions cannot manage
the relationship. A hello message's `clientType` is descriptive and grants no authority.
the relationship. The CLI also rejects an explicit non-loopback connect target before sending the
one-time token. A hello message's `clientType` is descriptive and grants no authority.
## Hub session scope
@@ -57,8 +58,9 @@ scopes, and a sanitized reason for status reporting.
`paseo hub disconnect` disables socket reconnect before requesting remote revocation. If the Hub is
offline, the daemon persists `disconnecting` and retries revocation across daemon restarts without
opening a Hub socket. `--force` removes local authority immediately and warns that remote revocation
may still be pending.
opening a Hub socket. This also covers an enrollment whose request may have succeeded but whose
response was lost. `--force` removes local authority immediately and warns that remote revocation may
still be pending.
## Cross-repository dependency