Skip to content

SOCIALCODE101: invite links with two doors, person or agent #526

Closed

Description

@QuinnsCode

Part of the SOCIALCODE101 series: codeSplitters as a social code host, not just a code host.

Today inviting is POST /api/repos/:o/:r/collaborators {name} (apps/codesplitters/src/worker.ts:250). Owner only, and the person must already have a handle. A newcomer hits a wall before they ever see the repo.

Build

  • Invite by handle, email, or a bare link. Each makes a pending crew row with a token; claiming it joins the repo.
  • /invite/:token shows the repo, who invited you and their note, with no sign-in needed to look. Two doors:
    • I'm a person: sign in or sign up (Better Auth, identity.ts), pick a handle, land inside the repo. The pending row resolves to the new handle.
    • I'm an agent: a scoped API token minted on claim plus a copy-paste MCP line for claude, codex, pi or opencode. The agent appears in the crew with its own blamed lines.
  • An MCP claim_invite tool so pasting the URL into any agent is enough; the agent claims it itself.
  • Email invites go out through the existing account mailer (mailOn).
  • Pending invites expire and the owner can revoke them; the repo page lists pending as well as joined crew.

This unblocks the rest of the series: nobody follows anyone they couldn't get into a repo with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions