aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-common/src/meshbay_common/protocol.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-16 11:17:46 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-16 11:17:46 +0200
commitcde57423e04812fe2c939fdf983e3b45a77fd82d (patch)
tree7fe44bc9d83cf72382394ebf9b5177c207618be2 /packages/meshbay-common/src/meshbay_common/protocol.py
parent20706fb9a4ec646816b44a10842aa8f58ea0fd75 (diff)
downloadmeshbay-cde57423e04812fe2c939fdf983e3b45a77fd82d.tar.gz
mnp 3.1: per-account blobs the node cannot read
One row per playlist plus a manifest, so starring a track rewrites that playlist rather than the whole collection. blob_enc is a BLOB, not base64 TEXT: these run to hundreds of kilobytes. user_id comes from the session and never from the message; kind is validated against a pattern; every cap refuses with a stated reason rather than truncating. Additive, so MNP_MIN_SUPPORTED does not move — a 3.0 node answers "unknown message type" and the client writes to the next one it reaches. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-common/src/meshbay_common/protocol.py')
-rw-r--r--packages/meshbay-common/src/meshbay_common/protocol.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/meshbay-common/src/meshbay_common/protocol.py b/packages/meshbay-common/src/meshbay_common/protocol.py
index f4cd497..8ad36e6 100644
--- a/packages/meshbay-common/src/meshbay_common/protocol.py
+++ b/packages/meshbay-common/src/meshbay_common/protocol.py
@@ -141,6 +141,16 @@ class MNP:
KEYPAIR_BUNDLE_RESP = "keypair_bundle_resp" # node → client: encrypted keypair bundle
# carries `bundle_enc_recovery` too when the node has one stored
KEYPAIR_BUNDLE_DELETE = "keypair_bundle_delete" # client → node: withdraw own backup
+ # Per-account blobs the node holds and cannot read — playlists (MNP 3.1,
+ # docs/playlists.md §8.1). `kind` is "playlists" (the manifest) or
+ # "playlist:<uuid>" (one playlist's tracks); `blob_enc` is msgpack `bin`,
+ # not base64, because these run to hundreds of kilobytes.
+ USER_BLOB_STORE = "user_blob_store" # client → node: write one blob
+ USER_BLOB_FETCH = "user_blob_fetch" # client → node: read one blob
+ USER_BLOB_LIST = "user_blob_list" # client → node: which kinds, at what rev
+ USER_BLOB_DELETE = "user_blob_delete" # client → node: drop one blob
+ USER_BLOB_RESP = "user_blob_resp" # node → client: one blob, or null
+ USER_BLOB_LIST_RESP = "user_blob_list_resp" # node → client: kinds and revs only
JOIN_REQUEST = "join_request" # client → node: pair/recognise this identity
JOIN_RESULT = "join_result" # node → client: outcome + wrapped GEK
INVITE_CREATE = "invite_create" # operator → node: issue a pairing code