From d657d79bc95062a8fc5e128e795e23bcefd0bf04 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 6 Oct 2026 11:22:06 -0700 Subject: Cordn group chats: MLS groups delivered through a coordinator (Amethyst 1.17 interop) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/contextvm.js speaks ContextVM (kind 25910 inside ephemeral gift wraps) to a coordinator; src/cordn.js is the protocol (KeyPackages with hex-text identities, the 0xC04D metadata extension, exporter-keyed ChaCha20 sealing, unsigned nostr-shaped envelopes with the sender as MLS AAD, cordn1 group refs, a record engine like marmot.js); src/cordn-client.js mirrors marmot-client.js with the same interface, so the Messages group screens drive both — New group gains a White Noise / Cordn toggle. Verified against @cordn/cli (ts-mls) on the public coordinator both ways, from the engine (tools/cordn-interop-test.js) and from the real app (tools/cordn-ui-test.js). mls.js: the OpenMLS required_capabilities rule for GroupContextExtensions now applies only to groups that carry one. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01YRC6aKhwAud231ot9FPmhi --- src/mls.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/mls.js') diff --git a/src/mls.js b/src/mls.js index 449036b..5a273b6 100644 --- a/src/mls.js +++ b/src/mls.js @@ -1578,9 +1578,13 @@ const applyProposals = (s, list, committer, { appData, psks, now, own } = {}) => let extensions = gce.length ? gce[0].proposal.extensions : s.extensions; if (gce.length) { uniqueTypes(extensions, "group context"); - // an OpenMLS rule, not an RFC one: whatever the context carries must be required of every member - let required = requiredCapabilities(extensions)?.extensions || []; - if (!extensions.every((e) => supportsExtension({ extensions: required }, e.type))) + // An OpenMLS rule, not an RFC one: whatever the context carries must be + // required of every member. Applied where the group plays by it (a + // required_capabilities extension in the context, as White Noise groups + // have); a ts-mls group (Cordn) carries none and changes its metadata + // extension freely, as the RFC allows. + let required = requiredCapabilities(extensions)?.extensions; + if (required && !extensions.every((e) => supportsExtension({ extensions: required }, e.type))) fail("group context extension type missing from required_capabilities"); // with app_data_update required, the dictionary only changes through app_data_update if (requiresAppDataUpdate(s.extensions) || requiresAppDataUpdate(extensions)) { -- cgit v1.2.3