oliver-zehentleitner / maity
hub + web: invite a person by handle (contract §3.4), email field labelled as such
tsk-8xsrzjv7f0yr Done An agent
Oliver (seq 94628, his decision): "Members → invite a person: the field says 'Adresse'; it should say email address. Better still would be the handle: people know the handle, and you may not want to give everyone your email address."
Scope:
- Contract §3.4 (docs/api.md), sentence in this PR (Oliver's message is the decision): the POST body takes an optional
handleas the alternative toaddress(both at once → 400 validation). Withhandle, only the account with that handle may accept (forbidden, reason analogous toinvitation_address_mismatch); the hub tells that human in Maity (inbox / notification §18) instead of mail, with inviter, project, trust, role and note. An unknown handle must not reveal whether an account exists beyond what public profiles already show — decide and state it in the plan. The GET list shows the handle like it shows the address today (still human-only). - Hub: implement, tests incl. accept by the right/wrong account, unknown handle, both fields.
- Web Members → invite: handle field first (default), the address field optional and labelled "Email address" / "E-Mail-Adresse" in all languages.
Boundary: invitations only; no change to registration, join links or agent joins; no new roles/trust. Plan note on the card first (contract wording + the unknown-handle answer), I forward the wording to Oliver if it needs his OK. Order: after #1516/#1517.
Notes
An agent · Nov 8, 2026, 18:37 UTC
Plan for an invitation by handle, part 1/2 (maity-coder-claude-005#zwhq). Read against docs/api.md §3.4 and §6.27 on main.
Contract §3.4, the POST body. It gains an optional
handle, the alternative toaddress.- Both at once:
invalid,details.fields.handle: "with_address". - A malformed handle:
details.fields.handle: "format".
The new sentence:
handleis optional and excludesaddress. With it, only the account that has that handle when the invitation is issued may accept (forbidden,invitation_handle_mismatch). The hub binds the invitation to that account, not to the name, so a later rename keeps it and a later holder of the name gets nothing. The hub tells that human in Maity instead of by mail: aninboxiteminvitation_received(§18.1) with the inviter's display name, the project's name, the trust and role and thenote, linking to the invitation. Whether the item also goes out by mail is the human's own notification settings (§18.4).An unknown handle: no oracle.
GET /people/{handle}(§6.27) already answers onenot_foundfor an unknown name and for a person who shows the caller nothing. The invitation keeps exactly that line:- Always `201`, whatever the handle names: a person, an alias (resolved to the current handle), an unknown name, an agent, an organisation, or a suspended, pending or deleted account.
- The answer carries
invitee: {handle, display_name}only whereGET /people/{handle}would answer the caller, andinvitee: nulleverywhere else. So the inviter learns nothing that the people page does not already show them, and the dashboard can say "Invitation for Anna (anna)" or "We can't show this person: if the handle belongs to an account, they are told in Maity". - Where the handle names no human account at the moment of issue, the invitation is stored bound to nobody. It tells nobody, nobody can accept it, and it expires like any other. That prevents a squat: registering the name later does not inherit the invitation.
Accepting. The holder of the link accepts as before (
POST /invitations/{token}/accept), and only the bound account succeeds.- New, because the inbox item cannot carry the token (the hub keeps only its hash):
GET /me/invitations: the open invitations bound to the caller;POST /me/invitations/{id}/accept: the same transaction and checks as the token accept (project open, issuer's authority, already_member, good standing).- An id bound to someone else, or unknown, is
not_found.
Registration: a handle-bound invitation admits nobody to register, because the account already exists (as an invitation without an address, §3.4).
- Both at once:
An agent · Nov 8, 2026, 18:37 UTC
Plan for an invitation by handle, part 2/2.
The list and the page.
GET …/invitations(human-only, unchanged) showshandlebesideaddress: the bound account's current handle, or the name as typed for an invitation bound to nobody, so the inviter sees their own typo.- The invitation object gains
handleandinvitee. GET /invitations/{token}gainshandle_bound: true|falsebesideaddress_bound, never the handle.- Events (
invitation_*) gainhandle_boundbesideaddress_boundand carry neither the handle nor the address.
Limits. The 20 per project per hour stay. New: at most 10
invitation_receiveditems per invitee per day across the instance. Past that the invitation is still made, but the item is not sent, and the answer stays identical, so a project cannot fill a stranger's inbox, and the limit is no oracle either.Hub. The handle resolves like the people page (live aliases, §6.24). The bound human id is stored on the invitation; a migration adds the nullable
invitee_idandhandlecolumns.Tests:
- accept by the right account, by the wrong account (
invitation_handle_mismatch), and through/me/invitations; - an unknown handle, a private person, an agent and an organisation all answer the same
201withinvitee: null, and no item is sent; - a visible person gets
inviteeand the item; handletogether withaddressisinvalid;- a rename after issue still accepts, and the new holder of the old name does not;
- the per-invitee cap;
- the list, page and events carry the new fields.
Web: Members → invite has the handle field first (the default), and the address field optional, labelled "Email address" / "E-Mail-Adresse" and the equivalent in every catalogue language. The
inviteeconfirmation or the "can't show" hint appears after sending. The inbox item links to the invitation with Accept.Boundary: invitations only. Registration, join links, agent joins, roles and trust are unchanged.
For Oliver, if needed: the
201-for-every-handle rule (no existence oracle) and the per-invitee daily cap.An agent · Nov 8, 2026, 18:41 UTC
Plan for an invitation by handle, part 3: Oliver's answer (seq 94667, via lotse 94680). This replaces the "notification" paragraph of part 1.
Its own kind in the notification settings (§18.4).
invitationis added tokinds,browser.kindsandemail.kinds.- Defaults: on in the bell, and on by mail with
mode: "immediate". - The human may set mail to
dailyoroff("only on the platform"); then the item stays in the notifications. - The item is the account record
invitation_received{invitation, project, invited_by, trust, role, note}: aninvitationnotification (§18.1) linking to the invitation. - The mail is a notification mail of §18.5 with the same content, the link to the invitation page and the unsubscribe line for its kind. It counts against the notification budget, not the security budget.
- An invitation by address keeps its mail as today: it goes to an address, not to an account.
The §3.4 sentence becomes:
The hub tells that human in Maity, by the notification kind
invitation(§18.1, §18.4), and by mail unless they turned that kind's mail off.The chat part: a gap in the contract. Oliver also asked for a chat message. But the contract has no chat between two humans:
- §9.1 direct conversations are a human with an agent they own, inside a project;
- §9.2 group chats belong to a project the invitee is not yet a member of;
- §9.5 cross-project chats are a room for one human's own agents.
So "a direct message from the inviter" has nowhere to go without a new conversation type: who may write to whom, blocking, abuse reports (§16.8). That is outside this card's boundary ("invitations only").
My proposal: this card ships the notification and the mail. A separate card designs the human-to-human direct message, and that card can then send the invitation there too. I'll ask lotse.
- Defaults: on in the bell, and on by mail with
An agent · Nov 8, 2026, 18:44 UTC
Plan for an invitation by handle, part 4: decided in the inbox (Oliver, seq 94714). Where parts 1–3 differ, this part replaces them. It follows the organisation invitation of §6.26, which already works exactly this way.
Which inbox. A handle-bound invitation files a personal `consent` request (§7, "Personal requests").
- It goes
to: "human:<hum-id>", with the project asprojectand the repliesgo/no. The title names the project, the trust and the role; the body carries the inviter's display name and thenote. - It is in the invitee's cross-project inbox (
GET /requests,personal: true), which lists personal requests whether or not the human is a member of the project. The project's request list never shows it (§7). - Accept and Decline happen right there:
POST /requests/{id}/answer{reply_id: "go" | "no"}. There is no detour to a page. - With this, the
/me/invitationsroutes of part 1 are dropped.
`go` accepts, in the one transaction and with the checks of §3.4's accept:
- the invitation still open (not used, revoked, voided, declined or expired);
- the project not
archived; already_member;- the issuer's authority (else
invitation_void); - a session in good standing.
A refusal leaves the request open where the invitation still is, and closes it with the invitation otherwise.
`no` declines: a new end state of the invitation,
declined_at.- The request closes, nobody can use the invitation any more, and
invitation_declinedgoes to the project's humanmembers:adminholders with the otherinvitation_*events. - The invitee withdrawing their own request counts as
no(§6.26). The inviter learns that the person said no, and nothing more.
What else ends the request. The hub withdraws it when:
- the invitation is revoked, expires or is voided;
- the account is deleted;
- the person becomes a member by another way.
The answer to the inviter: the same as §6.26.
- Always
201with the item.handlestays the value the inviter typed, never resolved and never updated by a rename. - The item carries no request id, no
inviteeand nourl: a handle-bound invitation is used in the inbox, not by link. - For a handle that names no approved, active human (nobody, an agent, an organisation, a pending, suspended or deleted account), no request is filed and the invitation stays open until it expires. So the call tells nobody who has an account. The part 1 idea of returning
inviteewhereGET /peoplewould answer is dropped in favour of the existing precedent. - A handle that is already a member, or the very value of an open invitation of this project, is
invalid(details.fields.handle:member,invited), as §6.26 does: the inviter reads both lists anyway.
Notification. The request reaches the human as every personal request does (§18.1). Per Oliver (part 3), its bell and mail go under its own kind
invitation(§18.4), with mailimmediateby default and switchable to "platform only". Organisation invitations could join that kind later; that is not this card.Unchanged from part 1:
handleexcludesaddress;- bound to the account at issue;
- 20 per project per hour, plus 10 requests per invitee per day, silently;
- a handle-bound invitation admits nobody to register;
- the web form: the handle field first, and "Email address" / "E-Mail-Adresse".
- It goes
An agent · Nov 8, 2026, 18:54 UTC
Plan for an invitation by handle, part 5: Oliver on req-7bxe2c6g4g9q (via lotse 94792). Handles are public, so saying whether one exists is no issue. This replaces the "answer to the inviter" paragraph of part 4. Everything else in part 4 stays: the personal
consentrequest inGET /requests,go/no,declined_at, and the kindinvitation.The answer to the inviter: plain.
- A handle (or a live alias, §6.24) of an approved, active human:
201with the item andinvitee: {handle, display_name}, the current handle. The request is filed. - Every other value gives
invalidwithdetails.fields.handleand the reason, and nothing is created: unknown: no human has this handle (nobody, or a deleted, pending or suspended account, asGET /peopleanswersnot_foundfor those, §6.27);not_a_person: the handle of an agent or an organisation;member: already a member of the project;invited: an open invitation of this project already names this person;with_address:handleandaddresstogether;format: not a valid handle.- So the invitation bound to nobody, from parts 1 and 4, is gone: an invitation by handle always has its person.
- The item's
handleis the invitee's handle at issue. The list shows the current handle, read from the bound account, so a rename shows up.
The §3.4 sentence:
handleis optional and excludesaddress: a person's handle or one of its live aliases. Only an approved, active human qualifies; anything else isinvalidwithdetails.fields.handle(unknown,not_a_person,member,invited). Handles are public, so this answer reveals nothing a profile does not. The invitation is bound to that account, and a rename keeps it. The hub files a personalconsentrequest to that person (§7), answered in their inbox:goaccepts as below,nodeclines (declined_at). It is notified by the kindinvitation(§18.4), by mail unless they switched that kind's mail off. Such an invitation has nourl.The cap is one constant,
INVITATIONS_PER_INVITEE_PER_DAY = 10, counted across the instance per invited person.- Past it, the call is
rate_limitedwithRetry-After. That is now plain too, since existence is no secret. - It sits beside the 20 per project per hour.
Tests, changed:
unknown,not_a_person,member,invited,with_addressandformateach refuse, and nothing is stored;- a known handle returns
invitee; - an alias resolves to the current handle;
- the cap answers
rate_limitedat the 11th invitation in a day.
Organisation invitations (§6.26) keep their own rule (
202for every handle); this card doesn't touch them.- A handle (or a live alias, §6.24) of an approved, active human:
Lotse · Nov 9, 2026, 21:09 UTC
Lead ruling 2026-11-09 ~21:40Z (lotse#wtwy, seq 100083): invitation by handle follows §6.29. Any active, approved person can be invited by handle; an agent handle or a deleted org answers unknown; a live org answers not_a_person. Reason: the maintainer's confirmed contact design (docs/api.md:10759-10763, context/members.md entry 9012bf86) says handles are public. The card sentence 'must not reveal whether an account exists beyond what public profiles already show' is read in that §6.29 sense: telling an active person from every other name is no secret. This applies an existing maintainer decision; reopening 'handles are public' is the maintainer's call.