aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-common
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-common')
-rw-r--r--packages/meshbay-common/src/meshbay_common/__init__.py25
-rw-r--r--packages/meshbay-common/src/meshbay_common/adminop.py4
-rw-r--r--packages/meshbay-common/src/meshbay_common/chatbox.py2
-rw-r--r--packages/meshbay-common/src/meshbay_common/device.py2
-rw-r--r--packages/meshbay-common/src/meshbay_common/join.py2
-rw-r--r--packages/meshbay-common/src/meshbay_common/protocol.py16
6 files changed, 26 insertions, 25 deletions
diff --git a/packages/meshbay-common/src/meshbay_common/__init__.py b/packages/meshbay-common/src/meshbay_common/__init__.py
index c5b0279..1d857fd 100644
--- a/packages/meshbay-common/src/meshbay_common/__init__.py
+++ b/packages/meshbay-common/src/meshbay_common/__init__.py
@@ -26,7 +26,8 @@ __version__ = "0.14.0"
# older client simply never sends/handles the new pair.
# 0.8: added `artist`/`album`/`track_no` to `IndexEntry`, and
# `musicbrainz_config`/`_ack`, `musicbrainz_enabled`/`_ack`,
-# `music_meta_req`/`_resp`, for the Music group app (docs/musicbay.md).
+# `music_meta_req`/`_resp`, for the Music group app
+# (docs/MESHBAY_DESIGN.md §9.8).
# Same shape as 0.5-0.7's Videos additions, and reuses `duration`/
# `thumb_hash`/`display_title` rather than declaring new ones. Additive:
# an older client simply doesn't render the new fields or send the new
@@ -38,29 +39,29 @@ __version__ = "0.14.0"
# client never sends the request, and simply can't play those two formats,
# same as before this existed.
# 0.10: added `audio_root`/`_ack` — the Music app's own entry point, same
-# shape as `video_root`/`_ack`. Reverses musicbay.md's original "no root,
-# whole shared tree" call: a real messy library showed that call was
-# wrong, and Music now requires one before showing/enriching anything,
-# exactly like Videos. Additive at the protocol level: an older client
-# never sends the op and never expects the field.
+# shape as `video_root`/`_ack`. Reverses the original "no root, whole
+# shared tree" call: a real messy library showed that call was wrong, and
+# Music now requires one before showing/enriching anything, exactly like
+# Videos (docs/MESHBAY_DESIGN.md §9.8). Additive at the protocol level: an
+# older client never sends the op and never expects the field.
# 0.11: added `taken_at`/`camera` to `IndexEntry` (best-effort, from a photo's
# own EXIF block) and `photo_roots`/`photo_roots_ack`, for the Photos group
-# app (docs/photos.md). Unlike `video_root`/`audio_root`, `photo_roots` is a
-# *set*, replaced whole in one signed op — a photo library is routinely
-# scattered across several folders, not one. Additive: an older client
+# app (docs/MESHBAY_DESIGN.md §9.9). Unlike `video_root`/`audio_root`,
+# `photo_roots` is a *set*, replaced whole in one signed op — a photo library
+# is routinely scattered across several folders, not one. Additive: an older client
# never sends the op and never expects either field.
# 0.12: added `link_preview_req`/`link_preview_resp` — the node unfurls a URL
# pasted in chat into an OpenGraph card. Additive: an older node logs "unknown
# type" and the client just shows the bare link, as it always did.
# 0.13: added `tmdb_rematch`/`tmdb_rematch_ack` — an operator dropping one
# file's cached TMDB match so it re-resolves with the current matcher
-# (§10.1/V13). Additive: an older node logs "unknown type", the client's
+# (V13). Additive: an older node logs "unknown type", the client's
# button just does nothing.
# 0.14: added an optional `bundle_enc_recovery` field on `keypair_bundle_store`
# and `keypair_bundle_resp` — a second copy of the identity bundle wrapped
# under the account's recovery key, so a forgotten passphrase does not strand
-# the identity (docs/auth-confirm.md §4.3). Additive: an older node ignores the
-# field on store and never returns one; an older client never sends it.
+# the identity (docs/MESHBAY_DESIGN.md §3.6). Additive: an older node ignores
+# the field on store and never returns one; an older client never sends it.
# 0.15: `file_chunk` and `index_sync` had forked between the transports — WebRTC
# sent binary, unsigned chunks and plain index entries, QUIC sent base64 chunks
# with a per-chunk Ed25519 signature and a `GroupIndex.serialize()` envelope. One
diff --git a/packages/meshbay-common/src/meshbay_common/adminop.py b/packages/meshbay-common/src/meshbay_common/adminop.py
index 3e9fe11..20b5080 100644
--- a/packages/meshbay-common/src/meshbay_common/adminop.py
+++ b/packages/meshbay-common/src/meshbay_common/adminop.py
@@ -63,7 +63,7 @@ OP_SET_SCAN_SETTINGS = "set_scan_settings"
# shown before signing names the outcome and not the operation.
OP_TRANSFER_LIMITS = "transfer_limits"
# Whether the node uses the operator's own API token/language instead of the
-# shipped default — node-wide (docs/mediacenter.md §5.5), one credential
+# shipped default — node-wide (docs/MESHBAY_DESIGN.md §9.7), one credential
# shared by every group. Signed like the rest: it turns on outbound
# third-party network traffic that did not exist before the Videos app
# (§8) — an unsigned change would let any member alter egress the operator
@@ -119,7 +119,7 @@ OP_GROUP_ATTACH = "group_attach"
OP_GROUP_DETACH = "group_detach"
# OP_GEK_BUNDLE_STORE is gone. Members no longer hand the node key material at
# all: the node holds the GEK and wraps it itself, for a key the recipient proved
-# they hold (see `join.py` and docs/invite-pairing-v1.md). The operation existed
+# they hold (see `join.py` and docs/MESHBAY_DESIGN.md §3.4). The operation existed
# only to make member-supplied bundles safe, and deleting the message is a
# stronger guarantee than authorizing it.
diff --git a/packages/meshbay-common/src/meshbay_common/chatbox.py b/packages/meshbay-common/src/meshbay_common/chatbox.py
index 740e829..f0534fa 100644
--- a/packages/meshbay-common/src/meshbay_common/chatbox.py
+++ b/packages/meshbay-common/src/meshbay_common/chatbox.py
@@ -1,7 +1,7 @@
"""
Chat message encryption and sender authentication.
-Design A of `docs/chat-sender-keys.md`, decided 2026-09-07. What it is, and what
+Design A of `docs/MESHBAY_DESIGN.md` §4.5, decided 2026-09-07. What it is, and what
it deliberately is not, in the order the decisions were made:
**Not a ratchet, and not sender keys.** With per-sender chains distributed under
diff --git a/packages/meshbay-common/src/meshbay_common/device.py b/packages/meshbay-common/src/meshbay_common/device.py
index cfa8dd6..3a598d0 100644
--- a/packages/meshbay-common/src/meshbay_common/device.py
+++ b/packages/meshbay-common/src/meshbay_common/device.py
@@ -27,7 +27,7 @@ Fields are length-prefixed and domain-separated, per L4 — the same rule as
of the connection carrying the message, so neither signature can be lifted onto
another connection, and `node_pk` binds an authorization to one node.
-See `docs/desktop-client-v1.md` §4.
+See `docs/MESHBAY_DESIGN.md` §3.3.
"""
from __future__ import annotations
diff --git a/packages/meshbay-common/src/meshbay_common/join.py b/packages/meshbay-common/src/meshbay_common/join.py
index 6ee543f..84ea18a 100644
--- a/packages/meshbay-common/src/meshbay_common/join.py
+++ b/packages/meshbay-common/src/meshbay_common/join.py
@@ -11,7 +11,7 @@ from the hub and wrap the group key for whatever came back. The hub is the key
directory, so a hub answering with its own key was handed the GEK by an honest
inviter following the protocol exactly. The key now comes from the peer over an
authenticated channel and is bound to an identity by a one-time pairing code the
-hub never sees. See `docs/invite-pairing-v1.md`.
+hub never sees. See `docs/MESHBAY_DESIGN.md` §3.4.
Fields are length-prefixed and domain-separated, per L4 — the same rule as
`handshake.py` and `adminop.py`. `nonce_node` is the handshake nonce the node just
diff --git a/packages/meshbay-common/src/meshbay_common/protocol.py b/packages/meshbay-common/src/meshbay_common/protocol.py
index c3cb099..c444711 100644
--- a/packages/meshbay-common/src/meshbay_common/protocol.py
+++ b/packages/meshbay-common/src/meshbay_common/protocol.py
@@ -69,11 +69,11 @@ class MNP:
# never once invoked. A live handler on both transports, plaintext media,
# and no client: removed rather than repaired.
#
- # Not a Double Ratchet message, and never was — `first-review.md` C1
- # rejected exactly that for groups. Since MNP 2.0 it is AES-256-GCM under a
+ # Not a Double Ratchet message, and never was — finding C1
+ # (`docs/MESHBAY_DESIGN.md` §13.1) rejected exactly that for groups. Since MNP 2.0 it is AES-256-GCM under a
# per-device subkey of the group's chat epoch key, signed over the
# ciphertext with the sending device's pinned Ed25519 key. There is no
- # plaintext form on the wire (`chatbox.py`, docs/chat-sender-keys.md);
+ # plaintext form on the wire (`chatbox.py`, docs/MESHBAY_DESIGN.md §4.5);
# `format` distinguishes a *stored* pre-2.0 row, which is still served.
CHAT_MESSAGE = "chat_msg" # one chat message, sealed and signed
CHAT_ATTACHMENT = "chat_attach" # attachment metadata
@@ -136,7 +136,7 @@ class MNP:
GEK_BUNDLE_RESP = "gek_bundle_resp" # node → client: wrapped GEK bundle
KEYPAIR_BUNDLE_STORE = "keypair_bundle_store" # client → node: store encrypted keypair bundle
# optional `bundle_enc_recovery` (MNP 0.14): a second copy wrapped under the
- # account's recovery key (docs/auth-confirm.md §4.3)
+ # account's recovery key (docs/MESHBAY_DESIGN.md §3.6)
KEYPAIR_BUNDLE_FETCH = "keypair_bundle_fetch" # client → node: request own keypair bundle
KEYPAIR_BUNDLE_RESP = "keypair_bundle_resp" # node → client: encrypted keypair bundle
# carries `bundle_enc_recovery` too when the node has one stored
@@ -178,9 +178,9 @@ class MNP:
TMDB_OVERRIDE_ACK = "tmdb_override_ack"
TMDB_REMATCH = "tmdb_rematch" # operator → node: drop one file's match
TMDB_REMATCH_ACK = "tmdb_rematch_ack"
- # Music app (docs/musicbay.md). Contact is derived from the owner's hub
- # email at login — no config/ack pair needed. Only the per-group toggle
- # remains.
+ # Music app (docs/MESHBAY_DESIGN.md §9.8). Contact is derived from the
+ # owner's hub email at login — no config/ack pair needed. Only the
+ # per-group toggle remains.
MUSICBRAINZ_ENABLED = "musicbrainz_enabled" # operator → node: enable/disable
MUSICBRAINZ_ENABLED_ACK = "musicbrainz_enabled_ack" # node → this group: new enabled state
MUSIC_META_REQ = "music_meta_req" # client → node: metadata for a path
@@ -268,7 +268,7 @@ class MNP:
# below, which is the operator's view of the whole node: this is scoped to
# one group and answers any member of it, because the point is that a member
# verifies another member's device *for themselves* rather than trusting the
- # node's `sender_id` (Tier 2, docs/desktop-client-v1.md §4.8).
+ # node's `sender_id` (Tier 2, docs/MESHBAY_DESIGN.md §3.3).
GROUP_ROSTER_REQ = "group_roster_req"
GROUP_ROSTER_RESP = "group_roster_resp"
ROSTER_READ = "roster_read" # operator → node: list pinned identities + members