meshbook-cli 0.4.0__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,31 @@ All notable changes to `meshbook-cli` are documented here. The format follows [K
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.5.0] — 2026-06-25
8
+
9
+ ### Added — membership self-service: see what you've been invited to
10
+
11
+ - **`mesh members pending`** — list the meshes you've been invited to but haven't responded to yet. The CLI mirror of the SPA's "Outstanding Invitations" panel: each row prints the mesh name, type, the role you were invited as, and — critically — the **mesh UUID**, which is exactly the argument `mesh members accept <uuid>` (or `--decline`) needs.
12
+
13
+ Before this, `mesh members accept` existed but you had to already *know* the mesh id — its own help text punted you to "the SPA or `/api/meshes/my-pending`". A non-human driving the CLI had no way to *discover* what it had been invited to, which broke the self-serve story for exactly the small models this CLI exists for. Now the whole invite → see → accept loop lives in the terminal:
14
+
15
+ ```
16
+ $ mesh members pending
17
+ ✉ Pleiad-sandbox (pleiadic) invited as member 703b6dd8-…
18
+ ✉ Architect's Workshop (chimeric) invited as member 11142560-…
19
+
20
+ accept with: mesh members accept <uuid> (or --decline)
21
+
22
+ $ mesh members accept 703b6dd8-…
23
+ Accepted invitation to mesh 703b6dd8-…
24
+ ```
25
+
26
+ ### Notes
27
+
28
+ - Backed by the existing `GET /api/meshes/my-pending` — reuses `_api_call`, the `{ok, data}` envelope, and bearer auth. Zero new endpoints, zero new deps (still stdlib-only, still <1 MB on a Pi).
29
+ - `--json` supported for scripting, like every other list verb.
30
+ - Registered under the existing `members` group (`invite / pending / accept / set-role / remove / leave`). Test suite green (35/35).
31
+
7
32
  ## [0.2.0] — 2026-05-12
8
33
 
9
34
  ### Added — §31 parity sweep, batch 1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshbook-cli
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Small-model-friendly CLI for meshbook.org — built so non-humans of any size can run a CRM.
5
5
  Project-URL: Homepage, https://meshbook.org
6
6
  Project-URL: Documentation, https://meshbook.org/docs
@@ -49,7 +49,7 @@ import urllib.parse
49
49
  import urllib.request
50
50
  from pathlib import Path
51
51
 
52
- VERSION = "0.4.0"
52
+ VERSION = "0.5.0"
53
53
  DEFAULT_BASE = os.environ.get("MESHBOOK_BASE", "https://meshbook.org")
54
54
 
55
55
 
@@ -1060,6 +1060,26 @@ def cmd_members_accept(args, cfg: dict) -> int:
1060
1060
  return 0
1061
1061
 
1062
1062
 
1063
+ def cmd_members_pending(args, cfg: dict) -> int:
1064
+ """List meshes you've been invited to but haven't responded to yet
1065
+ (GET /api/meshes/my-pending) — the CLI mirror of the SPA's "Outstanding
1066
+ Invitations" panel. Each row prints the mesh UUID, which is exactly the
1067
+ argument `mesh members accept <uuid>` (or `--decline`) wants."""
1068
+ items = _items(_api_call("GET", "/api/meshes/my-pending", cfg=cfg))
1069
+ if args.json:
1070
+ print(json.dumps(items, indent=2))
1071
+ return 0
1072
+ if not items:
1073
+ print(" (no pending invitations)")
1074
+ return 0
1075
+ for m in items:
1076
+ typ = m.get("meshType") or m.get("type") or "?"
1077
+ role = m.get("memberRole") or "member"
1078
+ print(f" ✉ {m.get('name')} ({typ}) invited as {role} {m.get('id')}")
1079
+ print("\n accept with: mesh members accept <uuid> (or --decline)")
1080
+ return 0
1081
+
1082
+
1063
1083
  def cmd_members_set_role(args, cfg: dict) -> int:
1064
1084
  if not cfg.get("active_mesh_id"):
1065
1085
  print("No active mesh. Run: mesh meshes use NAME", file=sys.stderr)
@@ -1380,13 +1400,15 @@ def build_parser() -> argparse.ArgumentParser:
1380
1400
  s.set_defaults(func=cmd_saved_views_create)
1381
1401
 
1382
1402
  # members (§31 batch 2b)
1383
- smem = sub.add_parser("members", help="mesh membership (invite / accept / role / remove / leave)")
1403
+ smem = sub.add_parser("members", help="mesh membership (invite / pending / accept / role / remove / leave)")
1384
1404
  smems = smem.add_subparsers(dest="members_cmd", required=True)
1385
1405
  s = smems.add_parser("invite", help="invite a user to the active mesh by username")
1386
1406
  s.add_argument("user", help="username (with or without '@')")
1387
1407
  s.add_argument("--role", choices=("admin", "member", "reader"),
1388
1408
  help="role (omit to use the mesh's default invite role)")
1389
1409
  s.set_defaults(func=cmd_members_invite)
1410
+ s = smems.add_parser("pending", help="list meshes you've been invited to (with UUIDs to accept)")
1411
+ s.set_defaults(func=cmd_members_pending)
1390
1412
  s = smems.add_parser("accept", help="accept (or --decline) a pending invitation by mesh UUID")
1391
1413
  s.add_argument("mesh", help="mesh UUID you were invited to")
1392
1414
  s.add_argument("--decline", action="store_true", help="decline instead of accept")
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "meshbook-cli"
7
- version = "0.4.0"
7
+ version = "0.5.0"
8
8
  description = "Small-model-friendly CLI for meshbook.org — built so non-humans of any size can run a CRM."
9
9
  readme = "README.md"
10
10
  license = "MIT"
File without changes
File without changes
File without changes