aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/transport.js
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-29 11:15:54 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-29 11:15:54 +0200
commitb7733e812fadd6007976d262bd1d793572a36ba7 (patch)
tree52e2ac07c9ba4929fa50b6ba8d19f94f86e8b304 /packages/meshbay-hub/src/meshbay_hub/static/transport.js
parent09a007937f03fad04a390323f3817f1ae7d7c2a9 (diff)
downloadmeshbay-b7733e812fadd6007976d262bd1d793572a36ba7.tar.gz
feat: node workflow redesign — wizard auto-config, reset, MusicBrainz contact
Wizard (Electron): - Auto-provisions node config (hub URL + username) from logged-in user - node:start handles both cold start and restart of misconfigured daemon - Waits for daemon to reach 'running', auto-links node key on hub - probeNode accepts intermediate states for wizard progress feedback Reset (meshbay-node reset): - Unlinks node key from hub (DELETE /me/node_key, best-effort) - Stops and disables daemon (systemctl --user disable --now) - Erases ~/.config/meshbay, ~/.local/share/meshbay, ~/.local/state/meshbay MusicBrainz contact: - Resolved from owner's hub email instead of per-node roster config - Removed musicbrainz_contact UI and WebRTC handshake field - Removed set_musicbrainz_contact/musicbrainz_contact from roster Node pairing: - Added operator pairing banner on NodePage - Added operator_paired flag to list_groups Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/transport.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/transport.js34
1 files changed, 1 insertions, 33 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/transport.js b/packages/meshbay-hub/src/meshbay_hub/static/transport.js
index 120c7d7..d6a28d9 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/transport.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/transport.js
@@ -75,7 +75,7 @@ function _aborted() {
const ADMIN_OP_TYPES = new Set([
'tmdb_override', 'tmdb_config', 'tmdb_enabled', 'video_root', 'audio_root',
'photo_roots',
- 'musicbrainz_config', 'musicbrainz_enabled', 'file_delete', 'dir_delete',
+ 'musicbrainz_enabled', 'file_delete', 'dir_delete',
'member_upload', 'apps_enabled', 'set_scan_settings', 'member_revoke',
'root_add', 'root_remove', 'member_unpin', 'gek_rotate', 'group_attach',
'group_detach', 'invite_create',
@@ -276,7 +276,6 @@ class MeshBayTransport {
set onVideoRoot(fn) { this._onVideoRoot = fn; }
set onAudioRoot(fn) { this._onAudioRoot = fn; }
set onPhotoRoots(fn) { this._onPhotoRoots = fn; }
- set onMusicbrainzConfig(fn) { this._onMusicbrainzConfig = fn; }
set onMusicbrainzEnabled(fn) { this._onMusicbrainzEnabled = fn; }
set onIndexProgress(fn) { this._onIndexProgress = fn; }
// Fired once an automatic reconnect (see _reconnectLoop) lands a fresh
@@ -1055,31 +1054,6 @@ class MeshBayTransport {
}
/**
- * Set/clear the node-wide MusicBrainz contact string — the User-Agent
- * identity MusicBrainz's usage policy asks for, not a credential (there
- * is none, docs/musicbay.md §3.1). Signed like setTmdbConfig: this turns
- * on outbound third-party network traffic the operator has to agree to.
- * `contact: ''` explicitly clears it (reverting to "no calls at all");
- * omit it (undefined/null) to leave whatever is stored unchanged.
- */
- async setMusicbrainzConfig(contact, signFn) {
- const msg = await this._sendAndWait({
- type: 'musicbrainz_config', v: '0.8',
- contact: contact === undefined ? null : contact,
- });
- if (msg.type === 'error') throw new Error(msg.detail);
- if (msg.type === 'admin_challenge') {
- // Must match the node's subject byte-for-byte (webrtc_server.py
- // _do_musicbrainz_config) — not a secret like tmdb_config's token,
- // but still kept out of the audit log as free text: only whether one
- // was supplied travels in the subject.
- const subject = `contact_configured=${contact ? 'yes' : 'no'}`;
- return this._authorizeAdminOp(msg, 'musicbrainz_config', subject, signFn);
- }
- return msg;
- }
-
- /**
* Whether MusicBrainz lookups run for this group at all — per-group from
* the start (docs/musicbay.md §3.2/§6). Signed like setTmdbEnabled.
*/
@@ -2077,12 +2051,6 @@ class MeshBayTransport {
this._onPhotoRoots(msg.roots || []);
}
- // Node-wide, like tmdb_config_ack above — no token equivalent to hide,
- // only whether a contact string is configured (docs/musicbay.md §3.2).
- if (msg.type === 'musicbrainz_config_ack' && this._onMusicbrainzConfig) {
- this._onMusicbrainzConfig({ contactConfigured: Boolean(msg.contact_configured) });
- }
-
// Per-group, like tmdb_enabled_ack above.
if (msg.type === 'musicbrainz_enabled_ack' && this._onMusicbrainzEnabled) {
this._onMusicbrainzEnabled(Boolean(msg.enabled));