feat: remote-editor invites by AP actor URL (#9) #64
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/v7-remote-editor-invites"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #9. Second slice of v7 (host-inbound-first), building on the #12 schema.
What it does
POST /api/projects/:id/invite-remote(owner only) — invite a researcher on another instance as a project editor, named by their ActivityPub actor URL:isSafeUrl), rejects an actor on this instance (use the local invite path), and requires the actor's host to be an enabledfederated_instance(the admin prerequisite from the issue).fetchAndCacheActor()— which also caches its public key, exactly what #10's inbox needs to verify the signature on that actor's future write activities.project_collaboratorsrow withremote_actor_urlset /collaborator_user_idnull. Owner-initiated, so auto-accepted (accepted_at = now()) — the owner is explicitly trusting a known actor; there's no second human on this instance to accept. Duplicate(project, actor)→409.GET /:id/sharesnow surfaces remote editors (cached display name,type: 'remote_editor'); revoke works through the existingDELETE.Frontend: an "Invite remote editor" input on the project collaborators panel, and remote editors render in the list (display name + actor URL + ✓ remote).
Design note
Auto-accept matches the milestone's trust posture (invited + signed writes apply automatically). An AP handshake to the remote actor's inbox is the editor-side concern, tracked in #62.
Verification (dev server)
projectInviteRemote.test.ts— 6 tests (invite + auto-accept; appears in shares; duplicate→409; non-federated→400; bad URL→400; non-owner→403; pre-seedsap_remote_actorssofetchAndCacheActorresolves from cache, no network).npm run build(tsc+vite) green.🤖 Generated with Claude Code