experiments in a post-browser web

Add account-holder device self-service routes and /admin/devices HTTP tests

Account holders can now list, rename, and revoke their own devices (GET/PATCH/DELETE /devices) through the same multiUserMiddleware() that already authenticates sync traffic, separate from the ADMIN_TOKEN-gated /admin/devices surface. Revoking the device making the request is allowed: there is no session to invalidate mid-request, only a bearer key re-checked on every request, so the same key is rejected starting with its next use. users.js gains renameDevice(), the one device operation with no existing function. test.js adds HTTP-level coverage for /admin/devices (shaped after the existing /admin/mcp-grants block) and route-level coverage for the new account-holder routes against the real app, including cross- account isolation and the revoke-self outcome.


Author dietrich ayala Date Commit Parent 7c64ffa8
+321
3 changed files
+321
3 changed files