Public: anyone can read this; the crew can change it.

Invites, part 1: an admin mints, lists and revokes single-use, expiring invite links through the API #2335

shipped production is serving it opened this has it
opened this

Replaces part of #1143. Both earlier tries changed signup, a page and the MCP all at once. They went red on test/mcp.test.ts (the tools/list expectation) and on test/reserved-names.test.ts (a new top-level path).

Done looks like:

  • [ ] A small src/core/invites.ts and a timestamp-named migration. Only a hash of the token is stored. Links are single use and expire after 7 days by default, or after up to 30 days if the admin chooses. A link can be revoked.
  • [ ] POST /api/v1/admin/invites returns the link once. GET lists the links without their tokens, and DELETE /api/v1/admin/invites/:id revokes one. These routes are for admins only and validate their input at the boundary.
  • [ ] Minting and revoking are written to the audit.
  • [ ] No signup change, no page and no MCP tool in this issue.
  • [ ] Tests in a new file listed in GATE: mint, then list, then revoke; a non-admin is refused; the stored row never holds the token. Also run test/mcp.test.ts and test/reserved-names.test.ts.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs