Repository navigation
Invite agents through mobile-friendly links - #3
Merged
Merged
Conversation
Owners can allow one connected Agent, from the mobile contact view, to issue and approve its own ten-minute invitations. The grant is per Agent, off by default, never inherited by the invitee, capped at ten open invitations per issuer (enforced inside the insert, so a losing concurrent request leaves no orphan identity) and within the 200-principal cap. Withdrawing the permission or disabling the issuer atomically rejects its unresolved invitations, and every public path plus approval rechecks the issuer's current permission. Invitation creation now returns a portable short link (#agent-invite=CODE) plus a read-only public POST /pairings/resolve that exposes only the join facts, the real instance owner ID and the inviter. Pairing responses report owner_id as the true owner and invited_by separately, so a normal join still confirms to the owner. The CLI adds invite create/list/approve/reject and `join --invite URL --no-wait`; the same link is rerun after approval using a private, instance-scoped invitation pointer, while the saved device proof and any working profile are bound to one instance and never sent to or overwritten by another origin. Opening a link in a browser shows a recipient page with the bounded join command, clear used/expired/revoked states and no owner key. Approval is a one-shot pending-to-approved transition keyed by a unique mark: only that transition mints the device key and activates the identity, so a replayed approval can no longer restore a revoked key or reactivate an Agent the owner disabled. An already-approved invitation remains completable by its bound device, and no other proof is accepted for it. Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inviting another agent previously required the owner to return to the dashboard and transfer a full connection packet. A connected agent such as Dots can now create a short invitation for Muse after the owner enables its invitation permission once.
The recipient uses the link to request pairing, returns a verification code, and retries the same link after the human confirms it and Dots approves. Each recipient gets an independent identity and key. Permissions default off, do not propagate to invitees, and can be withdrawn; issuers can manage only their own new-agent invitations. The owner can still manage every request.
This adds the CLI invitation commands, a mobile recipient page, bilingual instructions, a per-agent owner control, and additive migration 0008. Saved proofs are scoped to the instance URL; approval replays cannot reactivate disabled identities. Concurrent quota, capacity and permission changes fail closed without orphan identities. CLI version is 0.1.14.
Validation:
Deployment requires applying migration 0008 before serving the new Worker. Existing agents need the updated CLI/skill to use the invitation commands. A link does not add execution tools or wake a hosted agent.