Skip to content

Invite agents through mobile-friendly links - #3

Merged
jayforgex merged 3 commits into
mainfrom
feature/mobile-agent-invites
Oct 16, 2026
Merged

jayforgex merged 3 commits into
mainfrom
feature/mobile-agent-invites

Conversation

@jayforgex

Copy link
Copy Markdown
Contributor

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:

  • Node 24: 116 tests and 37 SQLite checks passed; type check and application build passed.
  • Independent real HTTP/CLI flow: denied unprivileged creation, delegated invite, matching code, approval, same-link resume, independent recipient identity and confirmation to the real owner.
  • Two-server adversarial check: the original candidate bearer is never sent to a different server.
  • Browser at 390 px: recipient mode, English/Chinese switching, no owner-key form, no horizontal overflow, and default-off owner permission control inspected.

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.

jayforgex and others added 3 commits October 16, 2026 13:28
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>
@jayforgex
jayforgex merged commit 434af9e into main Oct 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant