IdentityKind.RecoveryCode and StoredIdentity.RecoveryCode: a phrase
profile whose words a stored code derives. merge attaches codes last and
drops one that disagrees with the words beside it. writeRecoveryCode
writes the key, the 24 words and the code, in that order, and attaches
a code to the phrase profile its words already made. An unreadable
codes file lists those profiles as their phrases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The braces are drawn, never stored. MarmotGroupName gets bare() for what is
stored and display() for what is drawn; ConfederationName draws {{name}}, and
its bare() runs only where a name is typed, never on one already signed.
ChatRoom.title draws a Marmot room's subject in braces and leaves a NIP-17
room's alone, and every screen that names a group or a confederation reads
through it. display() strips any stored mark first, so today's &name rooms
already draw as {name}; the writers still store &name until Phase 2.
Both name fields are framed in braces. The invite title moves into
strings.xml.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each group's signed acceptance already names the admins it puts forward, and
every admin must join for the ceremony to finish, so the tap could only say yes
or stall everyone. Once every group has accepted, each admin's device now joins
attempt 1 by itself, and follows a retry another person in the roster started,
but never starts one. Join holds a mutex so a tap and the device's own join
cannot send two different host-key messages. The accept and propose screens say
what accepting now commits each admin to.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A key ceremony's started, finished and failed lines, in each of a person's seat groups' rooms,
open the ceremony by its proposal. The banner that led from the ceremony's NIP-17 room goes,
with the composer gate on a finished one, proposalOfRoom and four strings.
The ceremony's screen says, under a step, when this device's own group holds a message of it
that no admin has yet carried to the others: "Sent; waiting for an admin of Agora to pass it on".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Posts and the charter now take the path profile changes already took
(docs/confederation-proposals.md): one group proposes a 9435 carrying the
unsigned kind:1 or 9434, the others endorse or object by their own quorum,
and the confederation signs once T groups have vouched, with nobody asked.
- ConfederationChangeStatements (was ...ProfileStatements) carries any
signable kind; a base only on a kind:0. The wire's "profile" tag keeps
its name so vouchers stay readable across builds.
- Refusals by kind: a blank post, an untrue or second charter.
- ConfederationSigningManager refuses anything without T groups'
vouchers; approve, decline and the per-person ask are gone.
- A charter supersedes a later charter; a post is never superseded.
- ConfederationScreen: "Profile changes" becomes "Proposals" for every
kind; Add post and Propose the charter start the group's session; the
Signing section, screen, view model and route are removed. Signing
lines open the proposal, an older line's attempt id resolved to it.
- Profile* types that now hold any kind renamed to Change*.
jvmTest 2,014, all passing; m3, brand and wallet audits at budget;
compileDebugKotlinAndroid builds. No device run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ConfederationScreen gains Posts (with Add post for someone who holds a
seat), Charter (signed, or Propose the charter for a seat-holder) and
Signing (their attempts, the ones waiting on them first), and loses Open
the confederation's room. The composer posts for a confederation through
AddGroupPostRoute's new confederationId.
A post or charter a role holder must answer is its own line,
TYPE_CONFEDERATION_SIGNING_ASKED, written into each of their groups'
rooms as theirs and classed as needing them. A signed post is owed to
relays by every device that signed it.
The room screens lose the confederation's card, its members' group
labels, ConfederationRoomInfo, confederationOfRoom, the room's charter
proposal and the confederation branches of the posts and profile view
models; four strings go, and the ceremony room's banner stops saying the
confederation works in its own room.
Full jvmTest 2,001, all passing; m3, brand, wallet and Marmot audits pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A person seated in several of a confederation's groups sends a nonce,
confirmation and partial only for the seats the selection chose, but
record() dropped any per-person message that did not name every seat its
sender holds. Every such message was discarded on arrival and the
attempt waited at NONCES for good -- on the emulators, all three of the
confederation's attempts, its charter and two profiles. Only the
availability has to cover every seat now; the later rounds may name any
of the sender's own, and perRole still waits for each chosen one.
The signing screen folded each person's answers into one, so a yes for
two groups and a no for the third read as "Declined". It now answers
group by group, and on a profile says a no is a group that had not
endorsed it when the signing began, which is what it is: the third
group's voucher reached the devices two minutes after the attempt.
ConfederationSharedSeatsSigningJvmTest lays the seats out as the
emulators do and fails on the old check; the existing tests gave each
person one seat. Full jvmTest 1,982, all passing; m3Audit at budget;
compileDebugKotlinAndroid builds. No device run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A formed confederation's profile, decided by its groups
(docs/confederation-profile.md, Phases 0 to 8). Disappearing messages
had taken schema 50 first, so the confederation's column is v51,
AutoMigration(50, 51). In GroupInboxManager a profile statement goes to
the confederation before the inbox's NIP-40 expiry check, as the
formation's statements do. Full jvmTest 1,978, all passing; audits at
budget; compileDebugKotlinAndroid builds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The confederation's own room names its groups, each with the people who
hold its roles, labels each member with the groups they hold roles for,
says that admins who joined later are not in it, and opens the
confederation's screen from a member group this device is in.
The key ceremony's NIP-17 room, once the ceremony has made the
confederation, says so and leads to the confederation, and its composer
is hidden: anything typed there would reach the founding people as
people.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A formed confederation opens its own screen, from its row on each member
group's screen and from its card among the group's confederations: its
signed profile, its groups with who holds their roles, the changes to its
profile and the way to propose one. A member who is not an admin sees the
public part and is told why the changes are missing.
Editing the profile asks the member's group to propose the change (or
the group they pick, when they are an admin of more than one); a change
opens on its own screen with what it would change field by field, every
group's answer, and Endorse, Object or Withdraw. The lines in each
group's room open the change, or the confederation once it is published.
The five profile fields move to a shared NostrProfileFields, used by the
group's form too, with decorative icons beside their labels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ceremony screen's last step said 'The group has a shared key.' while
every transcript line about the same ceremony named the group. Seen on
the emulators beside a second group from the same people, it named
neither. It now reads 'Agora has a shared key.', and a ceremony with no
name keeps the old words.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A screen for the profile's default and a NIP-17 conversation's override:
presets from Off to four weeks and a custom length from five minutes to
a year, with what the setting does and does not do. The conversation
shows its timer in the app bar, a one-time notice, and an hourglass
beside each line that will disappear.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing is made on a device until its owner joins a confederation's key
ceremony, but the room is: the first ceremony message to arrive makes it.
So a member who had not joined found a room with nothing in it, and the
ceremony screen said it held no ceremony. The join was only on the
proposal screen, inside each group. On a run of three groups across four
emulators, one person never pressed it, and the others waited at host
keys.
- The room shows a banner that opens the ceremony, read from the
ceremony messages filed there (ConfederationRitualManager.proposalOfRoom).
Until its owner joins, it says the ceremony cannot go on without them.
- The ceremony screen offers the join on a device that holds no ceremony
yet, when the checks the join makes would pass
(ConfederationRitualManager.joinable), rather than saying it holds none.
ConfederationCeremonyJvmTest and ConfederationScreensJvmTest each gain a
test. Full jvmTest 1,847, all passing; m3Audit, brand and wallet audits
at budget.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The room's details showed one admin-room card, for the newest group. They
now have a Groups section listing every group the room's members made there,
each with where it stands: key ceremony in progress, waiting for its room,
or its room, which the row opens. The section says so when there are none.
The Shared key button reads 'New group with these members' once the room
has a group. shared-key-ceremony.md and CeremonyEntryPointsJvmTest describe
the creation screen as making a new group from a room's members.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the same people able to run several ceremonies in one room, the
transcript, the waiting notice and the join screen each said 'the shared
key ceremony', which names none of them.
- Transcript lines name the group: started, joined, completed, abandoned
and the join request. Notifications are built from those lines, so they
name it too. A ceremony with no name keeps the words it had.
- The waiting notice names a single ceremony's group, and lists the names
under the count when there are several.
- The join screen names the group being made rather than the room, and
says when these people already share another group in it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Six reads took a room's newest ceremony to mean the room's group. With the
same people able to make several groups in one room, each was ambiguous or
wrong:
- The shared-key screen handed over to any ceremony that had not failed. It
now offers another group, which has to be named once the room has one, and
lists what the members already have.
- A retry of a failed group's ceremony now starts from that ceremony's name
and quorum (CreateSharedKeyRoute.retrying), not the room's.
- adminRoomOf became adminRoomsOf: the details screen and the member-action
explanation offer every group's admin room, by name.
- completedKey's last fallback answers only when the room holds exactly one
key of its own. Nothing asks it of a NIP-17 room today (Phase 0, P5).
- The repository's two newest-ceremony reads, and the DAO queries only they
used, are gone. CeremonyLookupsJvmTest now expects none.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The creation screen passed no name to the ceremony, so a second group over
the same members was named after the room it landed in: the first group's
room, under the first group's name. It now names the ceremony after what was
typed.
Before anything is made, the screen reads the groups the same people already
share, from the room they would land in without making it, and lists them in
a card. It flags a group that would share a name with one of them. Nothing is
refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Notifications took schema 48 first, so the confederation's statements
between inboxes are schema 49, AutoMigration(48, 49).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The form asks for each group's profile, inbox key and inbox relays, shows a
group with no inbox as out of reach, waits on this group's own inbox, and
stops at twelve groups. A device that hears a proposal asks about every named
group's inbox, and a failed ceremony offers Try again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A proposal and every answer are rumors a group seals to every group's
announced inbox key, its quorum signing the seals; every admin of every group
files them, computes the state and reads every admin list. The key ceremony
is joined by each admin from the statements their device holds: its room is
derived from its people, its seed from everyone's contribution, and every
device computes the broadcast. Schema 48 drops version 1's public statements.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The group's direct messages took schema 47 first, so notifications' read
marks and ledger move to 47 -> 48. GizaRuntime builds the new group DM
repository and hands it to the sync engine. TYPE_GROUP_DM_FORGOTTEN is
placed with the classifier's silent types.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Message notifications carry Mark as read and Reply on Android (a broadcast
receiver, RemoteInput) and iOS (a category with a text input action). A
reply runs as the default profile through BackgroundSyncPass.withProfile,
under the pass's own lock, and is refused rather than sent as a profile
other than the one the notification was for. No Approve action, on purpose.
The iOS half is not compiled.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A specialUse foreground service keeps AppLifecycle.holdConnections true and
activates the default profile when no screen has, so the app's own live
subscriptions deliver within seconds while closed. Off by default, a switch
on the notification settings, started only from the foreground.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A WorkManager worker runs the full pass with a nine-minute deadline,
scheduled from the application behind ExperimentalFeatures.backgroundSync.
The settings screen says what each platform does while closed, and when it
last did it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The group inbox (NIP-4E) and confederation Part C landed on giza meanwhile.
Where threshold ECDH meets the inbox:
- schema: the inbox has 45 and 46, so the group's direct messages are v47,
AutoMigration(46, 47);
- the group's 10050 is one event: InboxRefusal declines a bad relay list and
InboxAnnouncements publishes it; GroupDmRelayRefusal and the second
publisher are gone, and the inbox's line and label are the ones shown;
- kind 13 batches split on the seal's n tag, by InboxSeal's own reading:
inbox replies to InboxRefusal and InboxReplies, every other seal to
GroupDmRefusal and GroupDmSender;
- a wrap to the group tries the inbox keys first, and opens a round only for
what they cannot; the inbox's unopened count leaves out what was opened.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One dispatcher in common code reads lines above the identity's cursor,
decides, groups per room and category and posts through a platform
notifier: Android channels and MessagingStyle, UNUserNotificationCenter on
iOS (not compiled here), and a desktop sink the tray fills in Phase 12.
A tapped notification opens its room.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GroupDmSender drafts one rumor and a seal per recipient under the kept
conversation key, carries a manifest sealed to the current admins, and
proposes the seals as one batch; a recipient without a key has a round opened
and the composer waits. On completion the proposer wraps each seal for its
recipient and owes it to their 10050; any admin can send again.
GroupDmRefusal runs D13 in the four places: a manifest this device can open,
bare kind 13s by the group, evidence signed by each recipient, the same rumor
in every seal naming exactly the manifest's recipients, words in it, and
NIP-59's dates. A proposal waiting on a key is held and retried when the key
combines. A non-admin signer declines; a room-signed seal draws no line.
Phase 1's kind 13 pin flips: nothing is signed blind.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GroupDmListScreen: conversations with names, the last line and what is unread,
and what is still being opened, naming the admins it waits on and how many are
queued. GroupDmConversationScreen: messages in and out, outgoing ones with
where they have got to. The group's Messages row opens the list; only a
current admin sees anything of the group's mail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A kind 10050 the group signs is its decision to receive: proposed from a setup
screen, named on the signing screen, a transcript line when signed, owed to
relays by the proposer's device through GroupDmPublisher with backoff, and
broadcastable again by anyone. GroupDmRelayRefusal declines a list with a
relay that is not public wss:// in the four places. The group's screen gains
its messages row. Phase 1's 10050 pin flips.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The group's inbox (docs/group-inbox.md) and the confederation's signing both took
schema 45. The confederation landed first, so it keeps 45 and the inbox moves to
46 with its own AutoMigration(45, 46); ShippedProfileUpgradeJvmTest's current is 46.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
InboxRotation reads what every admin's device already holds: the key
was made over one set of admins and the room's policy now names
another. That covers a removal, a demotion, a step-down and a promotion
alike, and a change that landed while the app was closed. The admin
whose key sorts first starts the new ceremony, asking nobody, after any
share rotation the same change owes; the rotated key's announcement is
vouched for and signed unasked; the removed admin's device has already
let go. Run by the governance follow-through and the sweep, and offered
by hand in the settings, which say when the admins have changed since
the key was made.
Two admins who start a rotation at once end in one ceremony on every
device: each keeps the one whose session id sorts first and ends the
other out loud. A proposal for a generation a device already has is
dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
InboxReplies builds a reply as one rumor authored by the group, sealed
from the announced inbox key to each recipient's announced key (or
their identity) and once to the group itself, per nostr-protocol/nips#2361,
and proposes the seals as one batch with the manifest beside them,
sealed to the inbox key, so a member who is not an admin learns how
many seals there are and nothing else. Every signer reads the reply
before signing it: InboxRefusal opens the manifest and every seal, and
declines out loud a copy that says something else, a seal to a key its
recipient did not announce, a forged 10044, a recipient the reply does
not name, a blank reply, a seal dated outside two days, or anything it
cannot read -- including on a device that holds no inbox key. The
manifest rides a resend, and the signing screen says the reply's words,
its recipients, and who has announced no key.
Once signed, the proposer's device wraps each seal for its recipient's
relays and the group's copy for the group's, owed through
GroupInboxPublisher, and files the copy at once; other admins file it
when it arrives. A reply not yet on a relay offers Send again. The
conversation screen gets the composer, which warns about a recipient
whose app may not open a message from a group. A seal draws nothing in
the room's transcript.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three screens, each with a way back, readableContent, the four states
and the transition between them: the inbox (its conversations, newest
first, with who they are with and what is unread; mail this device
cannot open, counted with why; an inbox the group has not yet announced
saying nobody can write to it; and for an admin promoted after the
first key, why earlier mail is missing), a conversation (theirs on the
leading edge, the group's replies marked as the group's), and the
inbox's settings (setting one up with where mail should arrive, the
key generation by generation, the ceremony with who it waits on and
Abandon, and Rotate the inbox key).
The group's screen gets an Inbox row with the unread count on a device
that holds the key, the ceremony while it runs, or Set up an inbox for
an admin who could start one. A member who is not an admin sees no row.
The ceremony's own screen planned for Phase 4 is the settings screen's
ceremony card. m3Audit at its budgets; compileDebugKotlinAndroid builds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The profile and post editors work in a confederation's room, proposing
through the confederation instead of a FROST key, and the signed event
lands where the existing screens read it. A charter names exactly the
confederation's groups under its name; once signed it goes to relays,
and every member group's room hears of it, which is how members who
are not admins learn the confederation exists. A request to sign opens
from its line in the room for each member to approve or decline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Once the key exists, the coordinator's device makes a Marmot room whose
id the confederation's key derives, with every role holder a member and
an admin, born governed. It waits on missing key packages and retries
when one arrives; a record that does not verify, or a device with no
role, makes no room. The room's screen says it is the confederation's
and that its members are fixed until the confederation can sign.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every device that took part files the confederation under the room id
its key derives, as upstream's canonical roster, key state and genesis,
with its own shares kept as recovery packages. The genesis is verified
against the key state before anything is written, and each of the
device's own member groups gets a line saying it is part of it now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The coordinator opens a NIP-17 room over every admin of every group and
discloses the key that opens each acceptance. Each device rebuilds the
roster from what the groups signed and checks its own groups' admins
before it will join; joining is the only thing a member is asked, and
every DKG step after it runs from stored inputs over ConfederationDkg.
Each device derives the key state and assembles the certified genesis
itself, and keeps its share as a recovery package.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Once every group has accepted, the coordinator's own key opens each
acceptance: each group's admins and threshold, the roles they add up
to, admins who sit in more than one group, and any group with no
public profile here, which stands in the way. The plan is marked as
Part A built, with what the build chose differently.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A proposal opens on its own screen with every group's answer; an invited
group's member proposes accepting or declining, the proposing group's
can withdraw, and a pending answer stands in for both. The approval
screen lists the groups, the coordinator, what an acceptance discloses
and each group with no public profile here. Three groups signing real
answers end to end found answers filed before their proposal losing
their line; the proposal now writes them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Confederations row on a keyed group's screen opens every proposal
naming the group, watched as answers arrive. An admin holding a share
proposes from a form that looks every group up on the relays, this one
included, and hands over to the group's signing session. Each proposal
and answer writes one system line in every room it names.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ProposeGroupEventScreen and GroupEventProposal come back from Curare,
accepting kinds 0 and 1 only: a relay list is refused like any kind with
no section on the group's screen (D1, D9). Its profile and post checks are
GroupStatementRefusal's, so the member proposing and the member signing
refuse the same pastes. A "Propose event" button sits under the posts
row for a member who can propose and an identity that can sign.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The broadcast screen comes back from Curare: the event named as the
signing screen names it, a relay list the member edits, the raw JSON to
copy, and each relay's answer under its row with the sum above. It sends
through EventPublishTransport, reinstated and implemented by
RelaysSocketManager, and never writes a NostrEvent, Profile or queue row
for the group's event (D7, pinned in BroadcastLeavesNoRowJvmTest).
With no group relay lists (D1), defaultRelaysFor seeds the app's publish
set; it stays a function of the event so the lists can return. The one
piece of Curare's GroupRelaySet it needed is RelayUrlInput. A Broadcast
button sits under the profile card and under each post, open to every
member, since the signature is already the group's (D4).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Posts row under the profile row counts the group's kind:1s; behind it,
the posts screen and the composer from Curare, newest first and under the
group's byline. The composer refuses a blank note through the same
predicate every member's device declines on (GroupStatementRefusal), and
says above the button that a signed post cannot be taken back. Proposing
is gated as for the profile (D4); a device holding no posts says so (D8).
The broadcast under each post comes with Phase 7.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The group's screen gets a Nostr profile row in Marmot rooms, under the
description: what the group is called and its nostr address, or that it
is not described yet. Behind it, the profile screen and the editor, ported
from Curare. The editor proposes a kind:0 through proposeSigning and hands
over to the signing session in its place.
Who may propose is the room's half (a Marmot room, not left, not
disbanded) and the device's (a share of the key), as GroupStatementCapability
and canProposeAsGroup; an npub-only identity is offered no editor (D4).
The editor offers no lightning address and the profile shows none, while
an edit keeps one already there (D6). A device holding no profile says so
rather than that the group never described itself (D8). The broadcast
button under the profile comes with Phase 7.
The detail screen's absence test for these rows moves into
GroupSignedWorkRowsJvmTest, which now checks the row is there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
compose-multiplatform.xml, the mark in the middle of every QR code, is generated from the
master: the same shape as before -- a background square, then the mark -- with the old
#FF3A1A and black swapped for black and sand. AppLogoDrawableJvmTest samples it where the
master is unambiguous, and fails against the drawable it replaces.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>