1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! Workspace-checked CLI wrapper for the shared
//! [`astrid_uplink::AdminClient`](::astrid_uplink::admin_client::AdminClient).
//!
//! The CLI binds the admin client to the process-wide principal
//! (resolved once at startup from `--principal` / `ASTRID_PRINCIPAL` /
//! `default`) — a fresh client per call, all stamping one identity.
pub use into_result;
use Result;
use ;
use AdminClient as UplinkAdminClient;
/// Admin request surface available to CLI commands.
///
/// Construction stays private to this module so command code cannot bypass
/// the selected-workspace checks in [`connect_for_workspace_as`].
pub ;
/// Connect to the daemon as the process principal.
///
/// Single seam used by every `astrid agent / caps / quota / group /
/// invite` verb to construct a request-bound admin client without each
/// verb resolving the principal itself. The bound principal is the
/// one resolved at startup (`crate::principal::current`), so every
/// admin request this process sends attributes to one identity — the
/// uplink proxy pins the first principal per connection and drops
/// mismatches.
///
/// # Errors
/// Returns an error if the socket file is missing (no daemon),
/// connection fails, or the handshake is rejected.
pub async
/// Connect an admin client as an explicit caller after verifying the selected
/// workspace on both sides of the daemon handshake.
///
/// Invite redemption uses the default principal because the invite token is
/// the authentication credential; the workspace boundary still applies.
pub async