devbox/cmd/devbox
shoemoney fd873a02c3 feat(M8a): device-facing invites with privilege attenuation ✉️🔐
Completes M8a's collaboration surface. A member mints an invite; the
invitee redeems it through the EXISTING /v1/join proof-of-possession flow
and lands enrolled + assigned the bound principal + granted the bound role.

- migration #3: invites table (token_hash → principal/share/role/+s),
  chains 0→1→2→3 — verified on a copy of the real hub DB.
- POST /v1/invite (authed) enforces ATTENUATION server-side via the pure,
  unit-tested meta.MayGrant: never grant above your own role, never touch a
  principal who outranks you, viewers can't grant, editors need +s. On a
  legacy share the inviter is seeded as owner before the explicit flip so
  they (and their same-principal devices) never self-lock-out.
- /v1/join applies a redeemed invite's binding (plain token = v1 join).
- transport.Invite + devbox invite <share> <principal> <role> [--reshare].

Tests: MayGrant attenuation matrix, invite binding round-trip, and the
end-to-end TestInviteFlow (owner invites → flip preserves owner → invitee
redeems into editor → editor-without-+s denied). 18 pkgs -race green;
linux/amd64 + windows cross-build.
2026-06-23 11:31:29 -05:00
..
control.go refactor(M8): drop go-isatty dep for stdlib ModeCharDevice (ponytail) ♻️ 2026-06-23 10:47:46 -05:00
main.go feat(M8a): device-facing invites with privilege attenuation ✉️🔐 2026-06-23 11:31:29 -05:00
main_test.go fix(M7): review fixes — pidfile O_EXCL, publish race, backoff reset 🐛 2026-06-23 01:37:58 -05:00
pidfile.go harden: domain-separate the join challenge + inline pidfile wrapper (ponytail) 🪪♻️ 2026-06-23 03:25:28 -05:00
pidfile_test.go harden: domain-separate the join challenge + inline pidfile wrapper (ponytail) 🪪♻️ 2026-06-23 03:25:28 -05:00