From 6f68bb6c1970e26de1f66c073ea5d7fecd21840d Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Thu, 15 Oct 2026 00:56:04 +0200 Subject: feat(cli): invitations, join, decline, leave, devices, browser access join accepts an invitation or redeems a link pasted as sent, then has the node admit a key pair made here, with the invitation's code (a link's code goes only to the node it names; one for a node that is away is kept for the next connection). decline, leave and devices revoke ask first, and refuse without --yes where there is no terminal. devices approve countersigns the one waiting request a code matches, none when several do. browser-access is the application's setting, kept per machine and never enabled from the hub's mirror: on leaves a copy sealed under M on each node, off withdraws it, unset touches nothing. A key pair made for a first contact is now kept. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-cli/src/meshbay_cli/client/paths.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'packages/meshbay-cli/src/meshbay_cli/client/paths.py') diff --git a/packages/meshbay-cli/src/meshbay_cli/client/paths.py b/packages/meshbay-cli/src/meshbay_cli/client/paths.py index 1086085..67119f9 100644 --- a/packages/meshbay-cli/src/meshbay_cli/client/paths.py +++ b/packages/meshbay-cli/src/meshbay_cli/client/paths.py @@ -50,6 +50,15 @@ def parse(text: str) -> RemotePath | None: return RemotePath(decoded[0], decoded[1:], from_link) +def group_arg(text: str) -> str: + """A group named on the command line, as `groups` prints it (`%2F` for a `/`), + or as a link to it: the name, decoded, with its `@owner` if given.""" + path = parse(text) + if path is None or path.parts: + raise CliError(USAGE, f"Name a group, not a path: {text!r}") + return path.group + + def encode_name(name: str) -> str: """A group or file name as it is typed in a path.""" return name.replace("%", "%25").replace("/", "%2F") -- cgit v1.2.3