refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
use super::RpcHandler;
|
|
|
|
|
use anyhow::Result;
|
2026-04-23 06:57:50 -04:00
|
|
|
use std::sync::Arc;
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
|
|
|
|
|
impl RpcHandler {
|
|
|
|
|
/// Route an RPC method name to its handler, returning the result value.
|
|
|
|
|
pub(super) async fn dispatch(
|
2026-04-23 06:57:50 -04:00
|
|
|
self: &Arc<Self>,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
method: &str,
|
|
|
|
|
params: Option<serde_json::Value>,
|
|
|
|
|
session_token: &Option<String>,
|
|
|
|
|
) -> Result<serde_json::Value> {
|
|
|
|
|
match method {
|
|
|
|
|
"echo" => self.handle_echo(params).await,
|
|
|
|
|
"server.echo" => self.handle_echo(params).await,
|
2026-05-05 11:29:18 -04:00
|
|
|
"server.get-state" => self.handle_server_get_state().await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"health" => self.handle_health().await,
|
|
|
|
|
"auth.login" => self.handle_auth_login(params).await,
|
|
|
|
|
"auth.logout" => self.handle_auth_logout().await,
|
chore(ci): rustfmt + clippy clean-up to unblock the Rust CI job
The .github/workflows/ci.yml Rust job runs cargo fmt --check, clippy
with -D warnings, and tests. All three were failing. This commit:
- Applies rustfmt across the tree (the bulk of the diff — untouched
since the last toolchain bump, so a wide sweep was unavoidable).
- Fixes the correctness-level clippy errors:
container/bitcoin_simulator.rs wildcard-in-or-pattern
container/manifest.rs from_str rename to parse (reserved name)
container/podman_client.rs .get(0) -> .first()
container/runtime.rs manual += collapse
archipelago/src/constants.rs doc-comment → module-doc
api/rpc/package/install.rs stray /// comment above a non-item
container/docker_packages.rs redundant field init
streaming/advertisement.rs missing Metric import in tests
tests/orchestration_tests.rs `vec!` in non-Vec contexts
mesh/listener/dispatch.rs unused store_plain_message import
api/rpc/tor/mod.rs and mesh/steganography.rs: push-after-new → vec!
- Quiets wide legacy surfaces with crate-level allows in main.rs for
stylistic lints (too_many_arguments, type_complexity, doc indent,
enum variant prefix, wildcard-in-or, assertions-on-constants,
drop_non_drop, unused_io_amount, ptr_arg) — these fired in dozens
of places with no correctness payoff and have been churning every
toolchain bump.
- Tags intentional-dead-code helpers: wallet/ and streaming/ modules
are WIP, mesh::send_chunked_payload and DM_V1_MARKER are kept for
rollback compatibility, vpn::get_nostr_vpn_status is surface-area
for a not-yet-landed RPC.
cargo fmt --check, cargo clippy --all-targets --all-features
-- -D warnings, and cargo test --all-features now all pass locally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 17:23:46 -04:00
|
|
|
"auth.changePassword" => {
|
|
|
|
|
self.handle_auth_change_password(params, session_token)
|
|
|
|
|
.await
|
|
|
|
|
}
|
2026-03-26 09:12:16 +00:00
|
|
|
"auth.isSetup" => self.handle_auth_is_setup().await,
|
|
|
|
|
"auth.setup" => self.handle_auth_setup(params).await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"auth.onboardingComplete" => self.handle_auth_onboarding_complete().await,
|
|
|
|
|
"auth.isOnboardingComplete" => self.handle_auth_is_onboarding_complete().await,
|
|
|
|
|
"auth.resetOnboarding" => self.handle_auth_reset_onboarding(params).await,
|
|
|
|
|
|
2026-03-31 01:41:24 +01:00
|
|
|
// Seed management (BIP-39 mnemonic)
|
|
|
|
|
"seed.generate" => self.handle_seed_generate().await,
|
|
|
|
|
"seed.verify" => self.handle_seed_verify(params).await,
|
|
|
|
|
"seed.restore" => self.handle_seed_restore(params).await,
|
|
|
|
|
"seed.save-encrypted" => self.handle_seed_save_encrypted(params).await,
|
|
|
|
|
"seed.status" => self.handle_seed_status().await,
|
|
|
|
|
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
// Container orchestration (for Archipelago-managed containers)
|
|
|
|
|
"container-install" => self.handle_container_install(params).await,
|
|
|
|
|
"container-start" => self.handle_container_start(params).await,
|
|
|
|
|
"container-stop" => self.handle_container_stop(params).await,
|
fix(rpc): async container stop/start/restart; widen state mapping
RPC handlers no longer block on podman operations. container-stop on
bitcoin-core used to hold the connection for up to 600s while the UI
showed a frozen spinner; it now returns in under a second with
{status: stopping} after flipping the package state to Stopping and
broadcasting over WebSocket. Same treatment for container-start and
the new container-restart route.
Widens container-list state mapping to emit the transitional variants
(stopping, starting, restarting, installing, updating, removing,
installed, and the backup states) instead of collapsing them to
"unknown". Keeps the mapping in sync with the UI ContainerStatus.state
union so the dashboard can render the right transitional label.
Mirrors the treatment in package/runtime.rs for package.start,
package.stop, and package.restart. The body of each handler is lifted
into pure do_package_* helpers that the background task runs; state
flipping is bracketed around the spawn with revert on error. The
pre-existing post-start exit-check verification and restart stop+start
fallback run inside the spawned task, not the RPC body.
Adds container-restart route to the dispatcher. mark_user_stopped
continues to run BEFORE the spawn, preserving the ordering contract
with the crash recovery layer at runtime.rs:145-148.
2026-04-23 04:59:27 -04:00
|
|
|
"container-restart" => self.handle_container_restart(params).await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"container-remove" => self.handle_container_remove(params).await,
|
|
|
|
|
"container-list" => self.handle_container_list().await,
|
|
|
|
|
"container-status" => self.handle_container_status(params).await,
|
|
|
|
|
"container-logs" => self.handle_container_logs(params).await,
|
|
|
|
|
"container-health" => self.handle_container_health(params).await,
|
|
|
|
|
|
2026-04-23 06:57:50 -04:00
|
|
|
// Package management (for docker-compose apps).
|
|
|
|
|
// install/uninstall/update return immediately with a
|
|
|
|
|
// transitional status; the actual work runs in a background
|
|
|
|
|
// tokio::spawn so the HTTP request doesn't block for minutes.
|
|
|
|
|
"package.install" => self.clone().spawn_package_install(params).await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"package.start" => self.handle_package_start(params).await,
|
|
|
|
|
"package.stop" => self.handle_package_stop(params).await,
|
|
|
|
|
"package.restart" => self.handle_package_restart(params).await,
|
2026-04-23 06:57:50 -04:00
|
|
|
"package.uninstall" => self.clone().spawn_package_uninstall(params).await,
|
|
|
|
|
"package.update" => self.clone().spawn_package_update(params).await,
|
2026-05-20 00:28:30 -04:00
|
|
|
"package.credentials" => self.handle_package_credentials(params).await,
|
fix: container install flow, filebrowser auth, AppCard enrichment
- Fix .198-style fresh installs: systemd service ExecStartPre creates
/run/user/1000, enable podman.socket, chmod 644 /etc/hosts
- Filebrowser: add /data volume for database (fixes read-only crash),
secure auth with random password via backend RPC (no more admin/admin)
- AppCard: enrich installing state with marketplace metadata (icon,
title, description, tier badge, author, version)
- Registry: btcpayserver 1.13.5 → 1.13.7, images mirrored
- ReadWritePaths: add home container paths for rootless podman
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 13:32:54 +00:00
|
|
|
"app.filebrowser-token" => self.handle_filebrowser_token().await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
|
|
|
|
|
// Bundled app management (for pre-loaded container images)
|
|
|
|
|
"bundled-app-start" => self.handle_bundled_app_start(params).await,
|
|
|
|
|
"bundled-app-stop" => self.handle_bundled_app_stop(params).await,
|
|
|
|
|
|
|
|
|
|
// Node identity and P2P peers
|
|
|
|
|
"node-add-peer" => self.handle_node_add_peer(params).await,
|
|
|
|
|
"node-list-peers" => self.handle_node_list_peers().await,
|
|
|
|
|
"node-remove-peer" => self.handle_node_remove_peer(params).await,
|
|
|
|
|
"node-send-message" => self.handle_node_send_message(params).await,
|
|
|
|
|
"node-check-peer" => self.handle_node_check_peer(params).await,
|
|
|
|
|
"node-messages-received" => self.handle_node_messages_received().await,
|
|
|
|
|
"node-store-sent" => self.handle_node_store_sent(params).await,
|
|
|
|
|
"node-nostr-discover" => self.handle_node_nostr_discover().await,
|
|
|
|
|
"node.did" => self.handle_node_did().await,
|
|
|
|
|
"node.signChallenge" => self.handle_node_sign_challenge(params).await,
|
|
|
|
|
"node.createBackup" => self.handle_node_create_backup(params).await,
|
|
|
|
|
"node.tor-address" => self.handle_node_tor_address().await,
|
|
|
|
|
"node.nostr-publish" => self.handle_node_nostr_publish().await,
|
|
|
|
|
"node.nostr-pubkey" => self.handle_node_nostr_pubkey().await,
|
|
|
|
|
"node.nostr-sign" => self.handle_node_nostr_sign(params).await,
|
|
|
|
|
"node-nostr-verify-revoked" => self.handle_node_nostr_verify_revoked().await,
|
|
|
|
|
"node.rotate-did" => self.handle_node_rotate_did(params).await,
|
|
|
|
|
|
|
|
|
|
// Encrypted peer handshake (NIP-44)
|
|
|
|
|
"handshake.discover" => self.handle_handshake_discover().await,
|
|
|
|
|
"handshake.connect" => self.handle_handshake_connect(params).await,
|
|
|
|
|
"handshake.poll" => self.handle_handshake_poll().await,
|
2026-04-18 11:07:08 -04:00
|
|
|
"nostr.discovery-status" => self.handle_nostr_discovery_status().await,
|
|
|
|
|
"nostr.set-discovery" => self.handle_nostr_set_discovery(params).await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
|
|
|
|
|
// TOTP 2FA
|
|
|
|
|
"auth.totp.setup.begin" => self.handle_totp_setup_begin(params).await,
|
|
|
|
|
"auth.totp.setup.confirm" => self.handle_totp_setup_confirm(params).await,
|
|
|
|
|
"auth.totp.disable" => self.handle_totp_disable(params).await,
|
|
|
|
|
"auth.totp.status" => self.handle_totp_status().await,
|
|
|
|
|
"auth.login.totp" => self.handle_login_totp(params, session_token).await,
|
|
|
|
|
"auth.login.backup" => self.handle_login_backup(params, session_token).await,
|
|
|
|
|
|
|
|
|
|
// Bitcoin & Lightning deep data
|
|
|
|
|
"bitcoin.getinfo" => self.handle_bitcoin_getinfo().await,
|
chore(ci): rustfmt + clippy clean-up to unblock the Rust CI job
The .github/workflows/ci.yml Rust job runs cargo fmt --check, clippy
with -D warnings, and tests. All three were failing. This commit:
- Applies rustfmt across the tree (the bulk of the diff — untouched
since the last toolchain bump, so a wide sweep was unavoidable).
- Fixes the correctness-level clippy errors:
container/bitcoin_simulator.rs wildcard-in-or-pattern
container/manifest.rs from_str rename to parse (reserved name)
container/podman_client.rs .get(0) -> .first()
container/runtime.rs manual += collapse
archipelago/src/constants.rs doc-comment → module-doc
api/rpc/package/install.rs stray /// comment above a non-item
container/docker_packages.rs redundant field init
streaming/advertisement.rs missing Metric import in tests
tests/orchestration_tests.rs `vec!` in non-Vec contexts
mesh/listener/dispatch.rs unused store_plain_message import
api/rpc/tor/mod.rs and mesh/steganography.rs: push-after-new → vec!
- Quiets wide legacy surfaces with crate-level allows in main.rs for
stylistic lints (too_many_arguments, type_complexity, doc indent,
enum variant prefix, wildcard-in-or, assertions-on-constants,
drop_non_drop, unused_io_amount, ptr_arg) — these fired in dozens
of places with no correctness payoff and have been churning every
toolchain bump.
- Tags intentional-dead-code helpers: wallet/ and streaming/ modules
are WIP, mesh::send_chunked_payload and DM_V1_MARKER are kept for
rollback compatibility, vpn::get_nostr_vpn_status is surface-area
for a not-yet-landed RPC.
cargo fmt --check, cargo clippy --all-targets --all-features
-- -D warnings, and cargo test --all-features now all pass locally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 17:23:46 -04:00
|
|
|
"bitcoin.init-wallet-from-seed" => {
|
|
|
|
|
self.handle_bitcoin_init_wallet_from_seed(params).await
|
|
|
|
|
}
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"lnd.getinfo" => self.handle_lnd_getinfo().await,
|
|
|
|
|
"lnd.listchannels" => self.handle_lnd_listchannels().await,
|
|
|
|
|
"lnd.openchannel" => self.handle_lnd_openchannel(params).await,
|
|
|
|
|
"lnd.closechannel" => self.handle_lnd_closechannel(params).await,
|
|
|
|
|
"lnd.newaddress" => self.handle_lnd_newaddress().await,
|
|
|
|
|
"lnd.sendcoins" => self.handle_lnd_sendcoins(params).await,
|
|
|
|
|
"lnd.createinvoice" => self.handle_lnd_createinvoice(params).await,
|
|
|
|
|
"lnd.payinvoice" => self.handle_lnd_payinvoice(params).await,
|
|
|
|
|
"lnd.create-psbt" => self.handle_lnd_create_psbt(params).await,
|
|
|
|
|
"lnd.finalize-psbt" => self.handle_lnd_finalize_psbt(params).await,
|
|
|
|
|
"lnd.create-raw-tx" => self.handle_lnd_create_raw_tx(params).await,
|
|
|
|
|
"lnd.gettransactions" => self.handle_lnd_gettransactions().await,
|
|
|
|
|
"lnd.connect-info" => self.handle_lnd_connect_info().await,
|
|
|
|
|
"lnd.export-channel-backup" => self.handle_lnd_export_channel_backup().await,
|
2026-03-31 01:41:24 +01:00
|
|
|
"lnd.init-wallet-from-seed" => self.handle_lnd_init_wallet_from_seed(params).await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
|
|
|
|
|
// Multi-identity management
|
|
|
|
|
"identity.list" => self.handle_identity_list(params).await,
|
|
|
|
|
"identity.create" => self.handle_identity_create(params).await,
|
|
|
|
|
"identity.get" => self.handle_identity_get(params).await,
|
|
|
|
|
"identity.delete" => self.handle_identity_delete(params).await,
|
|
|
|
|
"identity.set-default" => self.handle_identity_set_default(params).await,
|
|
|
|
|
"identity.sign" => self.handle_identity_sign(params).await,
|
|
|
|
|
"identity.verify" => self.handle_identity_verify(params).await,
|
|
|
|
|
"identity.resolve-did" => self.handle_identity_resolve_did(params).await,
|
|
|
|
|
"identity.resolve-remote-did" => self.handle_identity_resolve_remote_did(params).await,
|
chore(ci): rustfmt + clippy clean-up to unblock the Rust CI job
The .github/workflows/ci.yml Rust job runs cargo fmt --check, clippy
with -D warnings, and tests. All three were failing. This commit:
- Applies rustfmt across the tree (the bulk of the diff — untouched
since the last toolchain bump, so a wide sweep was unavoidable).
- Fixes the correctness-level clippy errors:
container/bitcoin_simulator.rs wildcard-in-or-pattern
container/manifest.rs from_str rename to parse (reserved name)
container/podman_client.rs .get(0) -> .first()
container/runtime.rs manual += collapse
archipelago/src/constants.rs doc-comment → module-doc
api/rpc/package/install.rs stray /// comment above a non-item
container/docker_packages.rs redundant field init
streaming/advertisement.rs missing Metric import in tests
tests/orchestration_tests.rs `vec!` in non-Vec contexts
mesh/listener/dispatch.rs unused store_plain_message import
api/rpc/tor/mod.rs and mesh/steganography.rs: push-after-new → vec!
- Quiets wide legacy surfaces with crate-level allows in main.rs for
stylistic lints (too_many_arguments, type_complexity, doc indent,
enum variant prefix, wildcard-in-or, assertions-on-constants,
drop_non_drop, unused_io_amount, ptr_arg) — these fired in dozens
of places with no correctness payoff and have been churning every
toolchain bump.
- Tags intentional-dead-code helpers: wallet/ and streaming/ modules
are WIP, mesh::send_chunked_payload and DM_V1_MARKER are kept for
rollback compatibility, vpn::get_nostr_vpn_status is surface-area
for a not-yet-landed RPC.
cargo fmt --check, cargo clippy --all-targets --all-features
-- -D warnings, and cargo test --all-features now all pass locally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 17:23:46 -04:00
|
|
|
"identity.verify-did-document" => {
|
|
|
|
|
self.handle_identity_verify_did_document(params).await
|
|
|
|
|
}
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"identity.create-dht-did" => self.handle_identity_create_dht_did(params).await,
|
|
|
|
|
"identity.resolve-dht-did" => self.handle_identity_resolve_dht_did(params).await,
|
|
|
|
|
"identity.refresh-dht-did" => self.handle_identity_refresh_dht_did(params).await,
|
|
|
|
|
"identity.dht-status" => self.handle_identity_dht_status(params).await,
|
|
|
|
|
"identity.update-profile" => self.handle_identity_update_profile(params).await,
|
|
|
|
|
"identity.publish-profile" => self.handle_identity_publish_profile(params).await,
|
|
|
|
|
"identity.export-keys" => self.handle_identity_export_keys(params).await,
|
|
|
|
|
"identity.create-nostr-key" => self.handle_identity_create_nostr_key(params).await,
|
|
|
|
|
"identity.nostr-sign" => self.handle_identity_nostr_sign(params).await,
|
chore(ci): rustfmt + clippy clean-up to unblock the Rust CI job
The .github/workflows/ci.yml Rust job runs cargo fmt --check, clippy
with -D warnings, and tests. All three were failing. This commit:
- Applies rustfmt across the tree (the bulk of the diff — untouched
since the last toolchain bump, so a wide sweep was unavoidable).
- Fixes the correctness-level clippy errors:
container/bitcoin_simulator.rs wildcard-in-or-pattern
container/manifest.rs from_str rename to parse (reserved name)
container/podman_client.rs .get(0) -> .first()
container/runtime.rs manual += collapse
archipelago/src/constants.rs doc-comment → module-doc
api/rpc/package/install.rs stray /// comment above a non-item
container/docker_packages.rs redundant field init
streaming/advertisement.rs missing Metric import in tests
tests/orchestration_tests.rs `vec!` in non-Vec contexts
mesh/listener/dispatch.rs unused store_plain_message import
api/rpc/tor/mod.rs and mesh/steganography.rs: push-after-new → vec!
- Quiets wide legacy surfaces with crate-level allows in main.rs for
stylistic lints (too_many_arguments, type_complexity, doc indent,
enum variant prefix, wildcard-in-or, assertions-on-constants,
drop_non_drop, unused_io_amount, ptr_arg) — these fired in dozens
of places with no correctness payoff and have been churning every
toolchain bump.
- Tags intentional-dead-code helpers: wallet/ and streaming/ modules
are WIP, mesh::send_chunked_payload and DM_V1_MARKER are kept for
rollback compatibility, vpn::get_nostr_vpn_status is surface-area
for a not-yet-landed RPC.
cargo fmt --check, cargo clippy --all-targets --all-features
-- -D warnings, and cargo test --all-features now all pass locally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 17:23:46 -04:00
|
|
|
"identity.nostr-encrypt-nip04" => {
|
|
|
|
|
self.handle_identity_nostr_encrypt_nip04(params).await
|
|
|
|
|
}
|
|
|
|
|
"identity.nostr-decrypt-nip04" => {
|
|
|
|
|
self.handle_identity_nostr_decrypt_nip04(params).await
|
|
|
|
|
}
|
|
|
|
|
"identity.nostr-encrypt-nip44" => {
|
|
|
|
|
self.handle_identity_nostr_encrypt_nip44(params).await
|
|
|
|
|
}
|
|
|
|
|
"identity.nostr-decrypt-nip44" => {
|
|
|
|
|
self.handle_identity_nostr_decrypt_nip44(params).await
|
|
|
|
|
}
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
|
|
|
|
|
// Bitcoin domain names (NIP-05)
|
|
|
|
|
"identity.register-name" => self.handle_identity_register_name(params).await,
|
|
|
|
|
"identity.remove-name" => self.handle_identity_remove_name(params).await,
|
|
|
|
|
"identity.resolve-name" => self.handle_identity_resolve_name(params).await,
|
|
|
|
|
"identity.list-names" => self.handle_identity_list_names(params).await,
|
|
|
|
|
"identity.link-name" => self.handle_identity_link_name(params).await,
|
|
|
|
|
|
|
|
|
|
// Verifiable Credentials
|
|
|
|
|
"identity.issue-credential" => self.handle_identity_issue_credential(params).await,
|
|
|
|
|
"identity.verify-credential" => self.handle_identity_verify_credential(params).await,
|
|
|
|
|
"identity.list-credentials" => self.handle_identity_list_credentials(params).await,
|
|
|
|
|
"identity.revoke-credential" => self.handle_identity_revoke_credential(params).await,
|
chore(ci): rustfmt + clippy clean-up to unblock the Rust CI job
The .github/workflows/ci.yml Rust job runs cargo fmt --check, clippy
with -D warnings, and tests. All three were failing. This commit:
- Applies rustfmt across the tree (the bulk of the diff — untouched
since the last toolchain bump, so a wide sweep was unavoidable).
- Fixes the correctness-level clippy errors:
container/bitcoin_simulator.rs wildcard-in-or-pattern
container/manifest.rs from_str rename to parse (reserved name)
container/podman_client.rs .get(0) -> .first()
container/runtime.rs manual += collapse
archipelago/src/constants.rs doc-comment → module-doc
api/rpc/package/install.rs stray /// comment above a non-item
container/docker_packages.rs redundant field init
streaming/advertisement.rs missing Metric import in tests
tests/orchestration_tests.rs `vec!` in non-Vec contexts
mesh/listener/dispatch.rs unused store_plain_message import
api/rpc/tor/mod.rs and mesh/steganography.rs: push-after-new → vec!
- Quiets wide legacy surfaces with crate-level allows in main.rs for
stylistic lints (too_many_arguments, type_complexity, doc indent,
enum variant prefix, wildcard-in-or, assertions-on-constants,
drop_non_drop, unused_io_amount, ptr_arg) — these fired in dozens
of places with no correctness payoff and have been churning every
toolchain bump.
- Tags intentional-dead-code helpers: wallet/ and streaming/ modules
are WIP, mesh::send_chunked_payload and DM_V1_MARKER are kept for
rollback compatibility, vpn::get_nostr_vpn_status is surface-area
for a not-yet-landed RPC.
cargo fmt --check, cargo clippy --all-targets --all-features
-- -D warnings, and cargo test --all-features now all pass locally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 17:23:46 -04:00
|
|
|
"identity.create-presentation" => {
|
|
|
|
|
self.handle_identity_create_presentation(params).await
|
|
|
|
|
}
|
|
|
|
|
"identity.verify-presentation" => {
|
|
|
|
|
self.handle_identity_verify_presentation(params).await
|
|
|
|
|
}
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
|
|
|
|
|
// Network overlay
|
|
|
|
|
"network.get-visibility" => self.handle_network_get_visibility().await,
|
|
|
|
|
"network.set-visibility" => self.handle_network_set_visibility(params).await,
|
|
|
|
|
"network.request-connection" => self.handle_network_request_connection(params).await,
|
|
|
|
|
"network.list-requests" => self.handle_network_list_requests().await,
|
|
|
|
|
"network.accept-request" => self.handle_network_accept_request(params).await,
|
|
|
|
|
"network.reject-request" => self.handle_network_reject_request(params).await,
|
|
|
|
|
|
|
|
|
|
// Tor hidden services
|
|
|
|
|
"tor.list-services" => self.handle_tor_list_services().await,
|
|
|
|
|
"tor.create-service" => self.handle_tor_create_service(params).await,
|
|
|
|
|
"tor.delete-service" => self.handle_tor_delete_service(params).await,
|
|
|
|
|
"tor.get-onion-address" => self.handle_tor_get_onion_address(params).await,
|
|
|
|
|
"tor.rotate-service" => self.handle_tor_rotate_service(params).await,
|
|
|
|
|
"tor.cleanup-rotated" => self.handle_tor_cleanup_rotated().await,
|
|
|
|
|
"tor.toggle-app" => self.handle_tor_toggle_app(params).await,
|
|
|
|
|
"tor.restart" => self.handle_tor_restart().await,
|
|
|
|
|
|
|
|
|
|
// Nostr relay management
|
|
|
|
|
"nostr.list-relays" => self.handle_nostr_list_relays().await,
|
|
|
|
|
"nostr.add-relay" => self.handle_nostr_add_relay(params).await,
|
|
|
|
|
"nostr.remove-relay" => self.handle_nostr_remove_relay(params).await,
|
|
|
|
|
"nostr.toggle-relay" => self.handle_nostr_toggle_relay(params).await,
|
|
|
|
|
"nostr.get-stats" => self.handle_nostr_get_stats().await,
|
|
|
|
|
|
|
|
|
|
// Router / UPnP
|
|
|
|
|
"router.discover" => self.handle_router_discover().await,
|
|
|
|
|
"router.list-forwards" => self.handle_router_list_forwards().await,
|
|
|
|
|
"router.add-forward" => self.handle_router_add_forward(params).await,
|
|
|
|
|
"router.remove-forward" => self.handle_router_remove_forward(params).await,
|
|
|
|
|
"network.diagnostics" => self.handle_network_diagnostics().await,
|
|
|
|
|
"network.list-interfaces" => self.handle_network_list_interfaces().await,
|
|
|
|
|
"network.scan-wifi" => self.handle_network_scan_wifi().await,
|
|
|
|
|
"network.configure-wifi" => self.handle_network_configure_wifi(params).await,
|
|
|
|
|
"network.configure-ethernet" => self.handle_network_configure_ethernet(params).await,
|
|
|
|
|
"network.dns-status" => self.handle_network_dns_status().await,
|
|
|
|
|
"network.configure-dns" => self.handle_network_configure_dns(params).await,
|
|
|
|
|
"router.detect" => self.handle_router_detect(params).await,
|
|
|
|
|
"router.info" => self.handle_router_info().await,
|
|
|
|
|
"router.configure" => self.handle_router_configure(params).await,
|
|
|
|
|
|
|
|
|
|
// Ecash wallet
|
|
|
|
|
"wallet.ecash-balance" => self.handle_wallet_ecash_balance().await,
|
|
|
|
|
"wallet.ecash-mint" => self.handle_wallet_ecash_mint(params).await,
|
feat: streaming ecash payments + media playback overhaul
Cashu ecash protocol (BDHKE blind signatures, cashuA token format,
mint HTTP client) replacing the stub wallet. TollGate-inspired streaming
data payment system with step-based pricing (bytes/time/requests),
session management with incremental top-ups, usage metering, and
Nostr kind 10021 service advertisements.
13 new streaming.* RPC endpoints. Content server now verifies real
Cashu tokens. Profits tracking includes streaming revenue.
Frontend: GlobalAudioPlayer (persistent bottom bar across all pages),
video lightbox with full controls, audio in MediaLightbox, free file
previews (no blur), paid 10% audio/video previews, separated play
vs download buttons in PeerFiles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 22:31:28 -04:00
|
|
|
"wallet.ecash-mint-claim" => self.handle_wallet_ecash_mint_claim(params).await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"wallet.ecash-melt" => self.handle_wallet_ecash_melt(params).await,
|
feat: streaming ecash payments + media playback overhaul
Cashu ecash protocol (BDHKE blind signatures, cashuA token format,
mint HTTP client) replacing the stub wallet. TollGate-inspired streaming
data payment system with step-based pricing (bytes/time/requests),
session management with incremental top-ups, usage metering, and
Nostr kind 10021 service advertisements.
13 new streaming.* RPC endpoints. Content server now verifies real
Cashu tokens. Profits tracking includes streaming revenue.
Frontend: GlobalAudioPlayer (persistent bottom bar across all pages),
video lightbox with full controls, audio in MediaLightbox, free file
previews (no blur), paid 10% audio/video previews, separated play
vs download buttons in PeerFiles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 22:31:28 -04:00
|
|
|
"wallet.ecash-melt-confirm" => self.handle_wallet_ecash_melt_confirm(params).await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"wallet.ecash-send" => self.handle_wallet_ecash_send(params).await,
|
|
|
|
|
"wallet.ecash-receive" => self.handle_wallet_ecash_receive(params).await,
|
|
|
|
|
"wallet.ecash-history" => self.handle_wallet_ecash_history().await,
|
|
|
|
|
"wallet.networking-profits" => self.handle_wallet_networking_profits().await,
|
|
|
|
|
|
2026-04-12 08:09:14 -04:00
|
|
|
// Container registries
|
|
|
|
|
"registry.list" => self.handle_registry_list().await,
|
|
|
|
|
"registry.add" => self.handle_registry_add(params).await,
|
|
|
|
|
"registry.remove" => self.handle_registry_remove(params).await,
|
release(v1.7.29-alpha): VPS as default app registry + settings UI
- New Settings → App registries page (/dashboard/settings/registries)
that mirrors the update-mirrors experience: list of configured
registries, test reachability, set primary, add/remove. New
registry.set-primary RPC; existing registry.{list,add,remove,test}
reused.
- Default RegistryConfig flipped: VPS (23.182.128.160:3000/lfg2025) is
now Server 1 (primary), tx1138 is Server 2 (fallback).
- Install pipeline now rewrites the first pull to the primary registry
URL before attempting it. Before this, installs always hit whichever
registry the image was hardcoded to, so changing the primary didn't
actually affect where images came from. On failure, the existing
fallback walk skips the primary (already tried) and walks the rest.
- App catalog proxy UPSTREAMS order flipped so the catalog follows the
same VPS-first rule.
- Reboot overlay: animated "a" logo now sits in the center of the ring
(matches the screensaver composition). Extracted the logo-wrapper
pattern inline.
7/7 registry tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 15:54:07 -04:00
|
|
|
"registry.set-primary" => self.handle_registry_set_primary(params).await,
|
2026-04-12 08:09:14 -04:00
|
|
|
"registry.test" => self.handle_registry_test(params).await,
|
|
|
|
|
|
feat: streaming ecash payments + media playback overhaul
Cashu ecash protocol (BDHKE blind signatures, cashuA token format,
mint HTTP client) replacing the stub wallet. TollGate-inspired streaming
data payment system with step-based pricing (bytes/time/requests),
session management with incremental top-ups, usage metering, and
Nostr kind 10021 service advertisements.
13 new streaming.* RPC endpoints. Content server now verifies real
Cashu tokens. Profits tracking includes streaming revenue.
Frontend: GlobalAudioPlayer (persistent bottom bar across all pages),
video lightbox with full controls, audio in MediaLightbox, free file
previews (no blur), paid 10% audio/video previews, separated play
vs download buttons in PeerFiles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 22:31:28 -04:00
|
|
|
// Streaming ecash payments
|
|
|
|
|
"streaming.list-services" => self.handle_streaming_list_services().await,
|
|
|
|
|
"streaming.configure-service" => self.handle_streaming_configure_service(params).await,
|
|
|
|
|
"streaming.toggle-service" => self.handle_streaming_toggle_service(params).await,
|
|
|
|
|
"streaming.pay" => self.handle_streaming_pay(params).await,
|
|
|
|
|
"streaming.discover" => self.handle_streaming_discover().await,
|
|
|
|
|
"streaming.usage" => self.handle_streaming_usage(params).await,
|
|
|
|
|
"streaming.session" => self.handle_streaming_session(params).await,
|
|
|
|
|
"streaming.list-sessions" => self.handle_streaming_list_sessions().await,
|
|
|
|
|
"streaming.close-session" => self.handle_streaming_close_session(params).await,
|
|
|
|
|
"streaming.advertise" => self.handle_streaming_advertise().await,
|
|
|
|
|
"streaming.list-mints" => self.handle_streaming_list_mints().await,
|
|
|
|
|
"streaming.configure-mints" => self.handle_streaming_configure_mints(params).await,
|
|
|
|
|
"streaming.maintenance" => self.handle_streaming_maintenance().await,
|
|
|
|
|
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
// Content catalog management
|
|
|
|
|
"content.list-mine" => self.handle_content_list_mine().await,
|
|
|
|
|
"content.add" => self.handle_content_add(params).await,
|
|
|
|
|
"content.remove" => self.handle_content_remove(params).await,
|
|
|
|
|
"content.set-pricing" => self.handle_content_set_pricing(params).await,
|
|
|
|
|
"content.set-availability" => self.handle_content_set_availability(params).await,
|
|
|
|
|
"content.browse-peer" => self.handle_content_browse_peer(params).await,
|
|
|
|
|
"content.download-peer" => self.handle_content_download_peer(params).await,
|
feat: streaming ecash payments + media playback overhaul
Cashu ecash protocol (BDHKE blind signatures, cashuA token format,
mint HTTP client) replacing the stub wallet. TollGate-inspired streaming
data payment system with step-based pricing (bytes/time/requests),
session management with incremental top-ups, usage metering, and
Nostr kind 10021 service advertisements.
13 new streaming.* RPC endpoints. Content server now verifies real
Cashu tokens. Profits tracking includes streaming revenue.
Frontend: GlobalAudioPlayer (persistent bottom bar across all pages),
video lightbox with full controls, audio in MediaLightbox, free file
previews (no blur), paid 10% audio/video previews, separated play
vs download buttons in PeerFiles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 22:31:28 -04:00
|
|
|
"content.download-peer-paid" => self.handle_content_download_peer_paid(params).await,
|
|
|
|
|
"content.preview-peer" => self.handle_content_preview_peer(params).await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
|
|
|
|
|
// DWN (Decentralized Web Node)
|
|
|
|
|
"dwn.status" => self.handle_dwn_status().await,
|
|
|
|
|
"dwn.sync" => self.handle_dwn_sync().await,
|
|
|
|
|
"dwn.register-protocol" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_dwn_register_protocol(&p).await
|
|
|
|
|
}
|
|
|
|
|
"dwn.list-protocols" => self.handle_dwn_list_protocols().await,
|
|
|
|
|
"dwn.remove-protocol" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_dwn_remove_protocol(&p).await
|
|
|
|
|
}
|
|
|
|
|
"dwn.query-messages" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_dwn_query_messages(&p).await
|
|
|
|
|
}
|
|
|
|
|
"dwn.write-message" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_dwn_write_message(&p).await
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Federation
|
|
|
|
|
"federation.invite" => self.handle_federation_invite().await,
|
|
|
|
|
"federation.join" => self.handle_federation_join(params).await,
|
|
|
|
|
"federation.list-nodes" => self.handle_federation_list_nodes().await,
|
|
|
|
|
"federation.remove-node" => self.handle_federation_remove_node(params).await,
|
|
|
|
|
"federation.set-trust" => self.handle_federation_set_trust(params).await,
|
|
|
|
|
"federation.sync-state" => self.handle_federation_sync_state().await,
|
|
|
|
|
"federation.get-state" => self.handle_federation_get_state().await,
|
|
|
|
|
"federation.peer-joined" => self.handle_federation_peer_joined(params).await,
|
|
|
|
|
"federation.deploy-app" => self.handle_federation_deploy_app(params).await,
|
chore(ci): rustfmt + clippy clean-up to unblock the Rust CI job
The .github/workflows/ci.yml Rust job runs cargo fmt --check, clippy
with -D warnings, and tests. All three were failing. This commit:
- Applies rustfmt across the tree (the bulk of the diff — untouched
since the last toolchain bump, so a wide sweep was unavoidable).
- Fixes the correctness-level clippy errors:
container/bitcoin_simulator.rs wildcard-in-or-pattern
container/manifest.rs from_str rename to parse (reserved name)
container/podman_client.rs .get(0) -> .first()
container/runtime.rs manual += collapse
archipelago/src/constants.rs doc-comment → module-doc
api/rpc/package/install.rs stray /// comment above a non-item
container/docker_packages.rs redundant field init
streaming/advertisement.rs missing Metric import in tests
tests/orchestration_tests.rs `vec!` in non-Vec contexts
mesh/listener/dispatch.rs unused store_plain_message import
api/rpc/tor/mod.rs and mesh/steganography.rs: push-after-new → vec!
- Quiets wide legacy surfaces with crate-level allows in main.rs for
stylistic lints (too_many_arguments, type_complexity, doc indent,
enum variant prefix, wildcard-in-or, assertions-on-constants,
drop_non_drop, unused_io_amount, ptr_arg) — these fired in dozens
of places with no correctness payoff and have been churning every
toolchain bump.
- Tags intentional-dead-code helpers: wallet/ and streaming/ modules
are WIP, mesh::send_chunked_payload and DM_V1_MARKER are kept for
rollback compatibility, vpn::get_nostr_vpn_status is surface-area
for a not-yet-landed RPC.
cargo fmt --check, cargo clippy --all-targets --all-features
-- -D warnings, and cargo test --all-features now all pass locally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 17:23:46 -04:00
|
|
|
"federation.peer-address-changed" => {
|
|
|
|
|
self.handle_federation_peer_address_changed(params).await
|
|
|
|
|
}
|
|
|
|
|
"federation.notify-did-change" => {
|
|
|
|
|
self.handle_federation_notify_did_change(params).await
|
|
|
|
|
}
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"federation.peer-did-changed" => self.handle_federation_peer_did_changed(params).await,
|
chore(ci): rustfmt + clippy clean-up to unblock the Rust CI job
The .github/workflows/ci.yml Rust job runs cargo fmt --check, clippy
with -D warnings, and tests. All three were failing. This commit:
- Applies rustfmt across the tree (the bulk of the diff — untouched
since the last toolchain bump, so a wide sweep was unavoidable).
- Fixes the correctness-level clippy errors:
container/bitcoin_simulator.rs wildcard-in-or-pattern
container/manifest.rs from_str rename to parse (reserved name)
container/podman_client.rs .get(0) -> .first()
container/runtime.rs manual += collapse
archipelago/src/constants.rs doc-comment → module-doc
api/rpc/package/install.rs stray /// comment above a non-item
container/docker_packages.rs redundant field init
streaming/advertisement.rs missing Metric import in tests
tests/orchestration_tests.rs `vec!` in non-Vec contexts
mesh/listener/dispatch.rs unused store_plain_message import
api/rpc/tor/mod.rs and mesh/steganography.rs: push-after-new → vec!
- Quiets wide legacy surfaces with crate-level allows in main.rs for
stylistic lints (too_many_arguments, type_complexity, doc indent,
enum variant prefix, wildcard-in-or, assertions-on-constants,
drop_non_drop, unused_io_amount, ptr_arg) — these fired in dozens
of places with no correctness payoff and have been churning every
toolchain bump.
- Tags intentional-dead-code helpers: wallet/ and streaming/ modules
are WIP, mesh::send_chunked_payload and DM_V1_MARKER are kept for
rollback compatibility, vpn::get_nostr_vpn_status is surface-area
for a not-yet-landed RPC.
cargo fmt --check, cargo clippy --all-targets --all-features
-- -D warnings, and cargo test --all-features now all pass locally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 17:23:46 -04:00
|
|
|
"federation.list-pending-requests" => {
|
|
|
|
|
self.handle_federation_list_pending_requests().await
|
|
|
|
|
}
|
feat(mesh): Telegram primitives pass + attachment transport router
Bundles the Phase 2b/3/4/5 work that accumulated across prior sessions
and the new attachment chunking router from this session. Everything
ships in one shot so the full mesh surface stays coherent on-wire.
Telegram primitives (variants 13–18, 20–22):
- Reply / Reaction / ReadReceipt / Forward / Edit / Delete
- Presence heartbeat + last-seen tracking
- ChannelInvite + ContactCard payload types
- MessageKey (sender_pubkey, sender_seq) as cross-transport identity
- Action menu, reply banner, edit banner, tombstones, (edited) marker
- Debounced auto-read-receipts on scroll + message arrival
Activated prototypes (Phase 4):
- PsbtHash send RPC
- Contacts CRUD (in-memory alias/notes/pinned/blocked)
- Outbox 📤 badge, rotate-prekeys button
- Chunked send fallback (MCIIXXTT framing) as auto-failover inside
send_typed_wire when a typed wire exceeds the LoRa per-frame budget
Unified inbox (Phase 1):
- conversations.list + conversations.messages RPCs (UI collapse deferred)
Attachment transport router (new this session):
- ContentInline variant 23 + ContentInlinePayload carrying file bytes
directly in the envelope for small files with no Tor path
- mesh.send-content-inline RPC — mirrors to local BlobStore, rides
send_typed_wire which auto-chunks over MCIIXXTT framing (~2.3 KB cap)
- mesh.transport-advice RPC as single source of truth for tier
decisions: auto-mesh / choose / tor-only / impossible
- Receive arm writes inline bytes to local BlobStore so the existing
content_ref card renderer handles both transports uniformly
- MeshState.blob_store field + order-independent propagation from
RpcHandler::set_blob_store / set_mesh_service
- Frontend handleAttachFile calls advice first, branches into silent
auto-send, transport-chooser modal, Tor-only path, or red error
- Transport modal with 📡 mesh / 🧅 Tor options + ETA + disabled
state when peer has no Tor reachability
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 20:40:19 -04:00
|
|
|
"federation.approve-request" => self.handle_federation_approve_request(params).await,
|
|
|
|
|
"federation.reject-request" => self.handle_federation_reject_request(params).await,
|
2026-04-19 02:28:16 -04:00
|
|
|
"federation.cancel-request" => self.handle_federation_cancel_request(params).await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
|
|
|
|
|
// VPN & Remote Access
|
|
|
|
|
"vpn.status" => self.handle_vpn_status().await,
|
|
|
|
|
"vpn.configure" => self.handle_vpn_configure(params).await,
|
|
|
|
|
"vpn.disconnect" => self.handle_vpn_disconnect().await,
|
2026-04-08 19:04:53 +02:00
|
|
|
"vpn.invite" => self.handle_vpn_invite(params).await,
|
2026-04-08 15:00:00 +02:00
|
|
|
"vpn.add-participant" => self.handle_vpn_add_participant(params).await,
|
2026-04-07 19:44:00 +01:00
|
|
|
"vpn.create-peer" => self.handle_vpn_create_peer(params).await,
|
|
|
|
|
"vpn.list-peers" => self.handle_vpn_list_peers().await,
|
2026-04-08 15:00:00 +02:00
|
|
|
"vpn.peer-config" => self.handle_vpn_peer_config(params).await,
|
2026-04-07 19:44:00 +01:00
|
|
|
"vpn.remove-peer" => self.handle_vpn_remove_peer(params).await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"remote.setup" => self.handle_remote_setup(params).await,
|
|
|
|
|
|
|
|
|
|
// Marketplace
|
|
|
|
|
"marketplace.discover" => self.handle_marketplace_discover().await,
|
|
|
|
|
"marketplace.publish" => self.handle_marketplace_publish(params).await,
|
|
|
|
|
"marketplace.get-manifest" => self.handle_marketplace_get_manifest(params).await,
|
|
|
|
|
"marketplace.list-published" => self.handle_marketplace_list_published().await,
|
|
|
|
|
"marketplace.verify" => self.handle_marketplace_verify(params).await,
|
|
|
|
|
"marketplace.create-invoice" => self.handle_marketplace_create_invoice(params).await,
|
|
|
|
|
"marketplace.check-payment" => self.handle_marketplace_check_payment(params).await,
|
|
|
|
|
|
|
|
|
|
// Mesh networking (Meshcore LoRa)
|
|
|
|
|
"mesh.status" => self.handle_mesh_status().await,
|
|
|
|
|
"mesh.peers" => self.handle_mesh_peers().await,
|
|
|
|
|
"mesh.messages" => self.handle_mesh_messages(params).await,
|
feat(mesh): MessageKey foundation and debug-dump RPC
Adds sender_pubkey + sender_seq fields to MeshMessage so received
messages carry a stable cross-transport identity: (sender_pubkey,
sender_seq) pair. This is the foundation for the upcoming reply,
reaction, edit, and read-receipt variants — they need to target a
message by an ID that is meaningful on every node, not just locally.
Receive-side population lives in dispatch.rs::store_typed_message,
which now looks up the peer's pubkey_hex and copies envelope.seq from
the decoded TypedEnvelope. Sent-side population will land when we
plumb a per-node monotonic seq counter through the RPC layer.
Also adds mesh.debug-dump: a full in-memory state snapshot returning
peers, messages, status, shared-secret peer ids, encrypt_relay flag,
and stego mode — intended for smoke tests and bug investigation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 08:18:01 -04:00
|
|
|
"mesh.debug-dump" => self.handle_mesh_debug_dump().await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"mesh.send" => self.handle_mesh_send(params).await,
|
2026-04-12 12:11:00 -04:00
|
|
|
"mesh.send-channel" => self.handle_mesh_send_channel(params).await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"mesh.broadcast" => self.handle_mesh_broadcast().await,
|
|
|
|
|
"mesh.configure" => self.handle_mesh_configure(params).await,
|
|
|
|
|
"mesh.send-invoice" => self.handle_mesh_send_invoice(params).await,
|
|
|
|
|
"mesh.send-coordinate" => self.handle_mesh_send_coordinate(params).await,
|
|
|
|
|
"mesh.send-alert" => self.handle_mesh_send_alert(params).await,
|
2026-04-13 11:10:49 -04:00
|
|
|
"mesh.send-content" => self.handle_mesh_send_content(params).await,
|
feat(mesh): Telegram primitives pass + attachment transport router
Bundles the Phase 2b/3/4/5 work that accumulated across prior sessions
and the new attachment chunking router from this session. Everything
ships in one shot so the full mesh surface stays coherent on-wire.
Telegram primitives (variants 13–18, 20–22):
- Reply / Reaction / ReadReceipt / Forward / Edit / Delete
- Presence heartbeat + last-seen tracking
- ChannelInvite + ContactCard payload types
- MessageKey (sender_pubkey, sender_seq) as cross-transport identity
- Action menu, reply banner, edit banner, tombstones, (edited) marker
- Debounced auto-read-receipts on scroll + message arrival
Activated prototypes (Phase 4):
- PsbtHash send RPC
- Contacts CRUD (in-memory alias/notes/pinned/blocked)
- Outbox 📤 badge, rotate-prekeys button
- Chunked send fallback (MCIIXXTT framing) as auto-failover inside
send_typed_wire when a typed wire exceeds the LoRa per-frame budget
Unified inbox (Phase 1):
- conversations.list + conversations.messages RPCs (UI collapse deferred)
Attachment transport router (new this session):
- ContentInline variant 23 + ContentInlinePayload carrying file bytes
directly in the envelope for small files with no Tor path
- mesh.send-content-inline RPC — mirrors to local BlobStore, rides
send_typed_wire which auto-chunks over MCIIXXTT framing (~2.3 KB cap)
- mesh.transport-advice RPC as single source of truth for tier
decisions: auto-mesh / choose / tor-only / impossible
- Receive arm writes inline bytes to local BlobStore so the existing
content_ref card renderer handles both transports uniformly
- MeshState.blob_store field + order-independent propagation from
RpcHandler::set_blob_store / set_mesh_service
- Frontend handleAttachFile calls advice first, branches into silent
auto-send, transport-chooser modal, Tor-only path, or red error
- Transport modal with 📡 mesh / 🧅 Tor options + ETA + disabled
state when peer has no Tor reachability
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 20:40:19 -04:00
|
|
|
"mesh.send-content-inline" => self.handle_mesh_send_content_inline(params).await,
|
|
|
|
|
"mesh.transport-advice" => self.handle_mesh_transport_advice(params).await,
|
2026-04-13 11:10:49 -04:00
|
|
|
"mesh.fetch-content" => self.handle_mesh_fetch_content(params).await,
|
2026-04-13 13:19:30 -04:00
|
|
|
"mesh.send-reply" => self.handle_mesh_send_reply(params).await,
|
|
|
|
|
"mesh.send-reaction" => self.handle_mesh_send_reaction(params).await,
|
feat(mesh): Phase 1/2b/4/5 primitives — ReadReceipt/Forward/Edit/Delete/Presence/Contacts/ChannelInvite + chunked send + unified inbox RPCs
Adds every remaining wire variant and RPC needed to finish the Telegram-quality
mesh plan in a single pass:
* Variants 15 ReadReceipt, 16 Forward, 17 Edit, 18 Delete, 20 Presence,
21 ChannelInvite; plus MeshMessageType::ContactCard(22) cleanup (was
enum-only, now wired through from_u8/label/from_label).
* MessageType::from_label() as the inverse of label() — used by the Forward
path to re-encode a stored typed body back through its original variant.
* RPCs: mesh.send-psbt (variant 3 was previously enum-only),
mesh.send-read-receipt, mesh.forward-message, mesh.edit-message,
mesh.delete-message, mesh.broadcast-presence, mesh.presence-list,
mesh.contacts-list, mesh.contacts-save, mesh.contacts-block,
mesh.send-channel-invite, conversations.list, conversations.messages.
* MeshState gains presence (pubkey → status+timestamps) and contacts
(pubkey → ContactEntry{alias,notes,pinned,blocked}) in-memory stores.
* MeshService gains find_message_by_id (Forward lookup), apply_local_edit /
apply_local_delete (optimistic local echo), and send_chunked_payload — an
MC-framed base64 splitter that fires as a fallback inside send_typed_wire
when wire > MAX_MESSAGE_LEN and no federation path is known. Reuses the
existing receive-side reassembly in listener/decode.rs.
* Receive dispatch arms for PsbtHash, Presence, ChannelInvite, ReadReceipt
(rolls forward `delivered` flag on own-Sent ≤ seq for that peer), Forward,
Edit, Delete. Edit/Delete guard against cross-peer tampering by matching
the target MessageKey pubkey against the sender's advertised pubkey_hex.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:24:05 -04:00
|
|
|
"mesh.send-read-receipt" => self.handle_mesh_send_read_receipt(params).await,
|
|
|
|
|
"mesh.forward-message" => self.handle_mesh_forward_message(params).await,
|
|
|
|
|
"mesh.edit-message" => self.handle_mesh_edit_message(params).await,
|
|
|
|
|
"mesh.delete-message" => self.handle_mesh_delete_message(params).await,
|
|
|
|
|
"mesh.send-psbt" => self.handle_mesh_send_psbt(params).await,
|
|
|
|
|
"mesh.broadcast-presence" => self.handle_mesh_broadcast_presence(params).await,
|
|
|
|
|
"mesh.presence-list" => self.handle_mesh_presence_list(params).await,
|
|
|
|
|
"mesh.contacts-list" => self.handle_mesh_contacts_list(params).await,
|
|
|
|
|
"mesh.contacts-save" => self.handle_mesh_contacts_save(params).await,
|
|
|
|
|
"mesh.contacts-block" => self.handle_mesh_contacts_block(params).await,
|
|
|
|
|
"mesh.send-channel-invite" => self.handle_mesh_send_channel_invite(params).await,
|
|
|
|
|
"conversations.list" => self.handle_conversations_list(params).await,
|
|
|
|
|
"conversations.messages" => self.handle_conversations_messages(params).await,
|
2026-04-18 11:53:06 -04:00
|
|
|
"mesh.clear-all" => self.handle_mesh_clear_all().await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"mesh.outbox" => self.handle_mesh_outbox(params).await,
|
|
|
|
|
"mesh.session-status" => self.handle_mesh_session_status(params).await,
|
|
|
|
|
"mesh.rotate-prekeys" => self.handle_mesh_rotate_prekeys().await,
|
|
|
|
|
// Phase 4: Off-grid Bitcoin operations
|
|
|
|
|
"mesh.relay-tx" => self.handle_mesh_relay_tx(params).await,
|
|
|
|
|
"mesh.relay-status" => self.handle_mesh_relay_status(params).await,
|
|
|
|
|
"mesh.block-headers" => self.handle_mesh_block_headers(params).await,
|
|
|
|
|
"mesh.relay-lightning" => self.handle_mesh_relay_lightning(params).await,
|
|
|
|
|
"mesh.deadman-status" => self.handle_mesh_deadman_status().await,
|
|
|
|
|
"mesh.deadman-configure" => self.handle_mesh_deadman_configure(params).await,
|
|
|
|
|
"mesh.deadman-checkin" => self.handle_mesh_deadman_checkin().await,
|
|
|
|
|
"mesh.test-send" => self.handle_mesh_test_send(params).await,
|
|
|
|
|
|
|
|
|
|
// Transport layer (unified routing)
|
|
|
|
|
"transport.status" => self.handle_transport_status().await,
|
|
|
|
|
"transport.peers" => self.handle_transport_peers().await,
|
|
|
|
|
"transport.send" => self.handle_transport_send(params).await,
|
|
|
|
|
"transport.set-mode" => self.handle_transport_set_mode(params).await,
|
2026-04-19 01:44:41 -04:00
|
|
|
"transport.preferences" => self.handle_transport_preferences().await,
|
|
|
|
|
"transport.set-preference" => self.handle_transport_set_preference(params).await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
|
|
|
|
|
// Server settings
|
|
|
|
|
"server.set-name" => self.handle_server_set_name(params).await,
|
|
|
|
|
|
|
|
|
|
// System monitoring
|
|
|
|
|
"system.stats" => self.handle_system_stats().await,
|
|
|
|
|
"system.processes" => self.handle_system_processes().await,
|
|
|
|
|
"system.temperature" => self.handle_system_temperature().await,
|
|
|
|
|
"system.detect-usb-devices" => self.handle_system_detect_usb_devices().await,
|
|
|
|
|
"system.disk-status" => self.handle_system_disk_status().await,
|
|
|
|
|
"system.disk-cleanup" => self.handle_system_disk_cleanup().await,
|
|
|
|
|
"system.reboot" => self.handle_system_reboot(params).await,
|
|
|
|
|
"system.factory-reset" => self.handle_system_factory_reset(params).await,
|
2026-04-07 15:18:35 +01:00
|
|
|
"system.settings.get" => self.handle_system_settings_get(params).await,
|
|
|
|
|
"system.settings.set" => self.handle_system_settings_set(params).await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
|
|
|
|
|
// Opt-in anonymous analytics
|
|
|
|
|
"analytics.get-status" => self.handle_analytics_get_status().await,
|
|
|
|
|
"analytics.enable" => self.handle_analytics_enable().await,
|
|
|
|
|
"analytics.disable" => self.handle_analytics_disable().await,
|
|
|
|
|
"analytics.get-snapshot" => self.handle_analytics_get_snapshot().await,
|
|
|
|
|
"telemetry.report" => self.handle_telemetry_report().await,
|
|
|
|
|
"telemetry.ingest" => self.handle_telemetry_ingest(params).await,
|
|
|
|
|
"telemetry.fleet-status" => self.handle_telemetry_fleet_status().await,
|
chore(ci): rustfmt + clippy clean-up to unblock the Rust CI job
The .github/workflows/ci.yml Rust job runs cargo fmt --check, clippy
with -D warnings, and tests. All three were failing. This commit:
- Applies rustfmt across the tree (the bulk of the diff — untouched
since the last toolchain bump, so a wide sweep was unavoidable).
- Fixes the correctness-level clippy errors:
container/bitcoin_simulator.rs wildcard-in-or-pattern
container/manifest.rs from_str rename to parse (reserved name)
container/podman_client.rs .get(0) -> .first()
container/runtime.rs manual += collapse
archipelago/src/constants.rs doc-comment → module-doc
api/rpc/package/install.rs stray /// comment above a non-item
container/docker_packages.rs redundant field init
streaming/advertisement.rs missing Metric import in tests
tests/orchestration_tests.rs `vec!` in non-Vec contexts
mesh/listener/dispatch.rs unused store_plain_message import
api/rpc/tor/mod.rs and mesh/steganography.rs: push-after-new → vec!
- Quiets wide legacy surfaces with crate-level allows in main.rs for
stylistic lints (too_many_arguments, type_complexity, doc indent,
enum variant prefix, wildcard-in-or, assertions-on-constants,
drop_non_drop, unused_io_amount, ptr_arg) — these fired in dozens
of places with no correctness payoff and have been churning every
toolchain bump.
- Tags intentional-dead-code helpers: wallet/ and streaming/ modules
are WIP, mesh::send_chunked_payload and DM_V1_MARKER are kept for
rollback compatibility, vpn::get_nostr_vpn_status is surface-area
for a not-yet-landed RPC.
cargo fmt --check, cargo clippy --all-targets --all-features
-- -D warnings, and cargo test --all-features now all pass locally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 17:23:46 -04:00
|
|
|
"telemetry.fleet-node-history" => {
|
|
|
|
|
self.handle_telemetry_fleet_node_history(params).await
|
|
|
|
|
}
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"telemetry.fleet-alerts" => self.handle_telemetry_fleet_alerts().await,
|
|
|
|
|
|
|
|
|
|
// Real-time metrics monitoring
|
|
|
|
|
"monitoring.current" => self.handle_monitoring_current().await,
|
|
|
|
|
"monitoring.history" => self.handle_monitoring_history(params).await,
|
|
|
|
|
"monitoring.containers" => self.handle_monitoring_containers().await,
|
|
|
|
|
"monitoring.alerts" => self.handle_monitoring_alerts(params).await,
|
|
|
|
|
"monitoring.alert-rules" => self.handle_monitoring_alert_rules().await,
|
|
|
|
|
"monitoring.configure-alert" => self.handle_monitoring_configure_alert(params).await,
|
chore(ci): rustfmt + clippy clean-up to unblock the Rust CI job
The .github/workflows/ci.yml Rust job runs cargo fmt --check, clippy
with -D warnings, and tests. All three were failing. This commit:
- Applies rustfmt across the tree (the bulk of the diff — untouched
since the last toolchain bump, so a wide sweep was unavoidable).
- Fixes the correctness-level clippy errors:
container/bitcoin_simulator.rs wildcard-in-or-pattern
container/manifest.rs from_str rename to parse (reserved name)
container/podman_client.rs .get(0) -> .first()
container/runtime.rs manual += collapse
archipelago/src/constants.rs doc-comment → module-doc
api/rpc/package/install.rs stray /// comment above a non-item
container/docker_packages.rs redundant field init
streaming/advertisement.rs missing Metric import in tests
tests/orchestration_tests.rs `vec!` in non-Vec contexts
mesh/listener/dispatch.rs unused store_plain_message import
api/rpc/tor/mod.rs and mesh/steganography.rs: push-after-new → vec!
- Quiets wide legacy surfaces with crate-level allows in main.rs for
stylistic lints (too_many_arguments, type_complexity, doc indent,
enum variant prefix, wildcard-in-or, assertions-on-constants,
drop_non_drop, unused_io_amount, ptr_arg) — these fired in dozens
of places with no correctness payoff and have been churning every
toolchain bump.
- Tags intentional-dead-code helpers: wallet/ and streaming/ modules
are WIP, mesh::send_chunked_payload and DM_V1_MARKER are kept for
rollback compatibility, vpn::get_nostr_vpn_status is surface-area
for a not-yet-landed RPC.
cargo fmt --check, cargo clippy --all-targets --all-features
-- -D warnings, and cargo test --all-features now all pass locally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 17:23:46 -04:00
|
|
|
"monitoring.acknowledge-alert" => {
|
|
|
|
|
self.handle_monitoring_acknowledge_alert(params).await
|
|
|
|
|
}
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"monitoring.export" => self.handle_monitoring_export(params).await,
|
|
|
|
|
|
feat(fips): integrate jmcorgan/fips as preferred non-Tor transport + v1.4.0
Bakes the FIPS (Free Internetworking Peering System) mesh daemon into
the node stack, supervised by archipelago alongside Tor. Runs as a
system service, identity derives from the same BIP-39 master seed, and
user-triggered updates track upstream main.
Identity
seed.rs: new HKDF label archipelago/fips/secp256k1/v1 → dedicated
secp256k1 key, distinct from the Nostr-node key for crypto isolation
but still seed-recoverable
identity.rs: writes fips_key[.pub] to /data/identity on onboarding,
chmod 0600; fips_key_exists / load_fips_keys / fips_npub accessors
Transport
TransportKind::Fips=3 inserted between LAN and Tor (Tor bumps to 4)
→ router prefers FIPS over Tor for all peer traffic
PeerRecord gains fips_npub + last_fips fields (serde(default) for
backward-compat with older nodes)
transport/fips.rs: NodeTransport stub, reports unavailable until the
daemon is live so router falls through to Tor cleanly
Federation invites
FederatedNode and FederationInvite carry optional fips_npub
create_invite / accept_invite / peer-joined callback thread it end
to end; signature domain deliberately unchanged — FIPS Noise does
its own session auth, so the unsigned hint only affects path
selection
crate::fips
config.rs: renders /etc/fips/fips.yaml and sudo-installs key material
service.rs: systemctl status/activate/restart/mask wrappers
update.rs: GitHub API check against upstream main; apply stubbed
until per-commit .deb artefact source is decided
RPC + dashboard
fips.status / fips.check-update / fips.apply-update / fips.install /
fips.restart registered in dispatcher
HomeNetworkCard.vue shipped standalone (unmounted — place in Home.vue
when ready); shows state pill, version, FIPS npub, update button,
activate button when key is present but service is down
ISO + systemd
archipelago-fips.service: conditional on key presence, masked by
default — backend unmasks after onboarding writes the key
build-auto-installer-iso.sh: multi-stage Dockerfile builds the FIPS
.deb from jmcorgan/fips main (fail-loud), COPYs it into rootfs, apt
installs it so trixie resolves deps; unit copied + masked
Version bump: 1.3.5 → 1.4.0
Tests: 33 new/updated passing (seed, identity, transport, federation,
fips module, transport::fips).
Known gaps: fips.apply-update returns a clear stub error until
upstream publishes per-commit .deb artefacts; HomeNetworkCard is not
mounted in Home.vue by default.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 22:57:51 -04:00
|
|
|
// FIPS mesh transport
|
|
|
|
|
"fips.status" => self.handle_fips_status().await,
|
|
|
|
|
"fips.check-update" => self.handle_fips_check_update().await,
|
|
|
|
|
"fips.apply-update" => self.handle_fips_apply_update().await,
|
|
|
|
|
"fips.install" => self.handle_fips_install().await,
|
|
|
|
|
"fips.restart" => self.handle_fips_restart().await,
|
2026-04-20 16:40:25 -04:00
|
|
|
"fips.reconnect" => self.handle_fips_reconnect().await,
|
2026-04-21 06:21:37 -04:00
|
|
|
"fips.list-seed-anchors" => self.handle_fips_list_seed_anchors().await,
|
|
|
|
|
"fips.add-seed-anchor" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_fips_add_seed_anchor(&p).await
|
|
|
|
|
}
|
|
|
|
|
"fips.remove-seed-anchor" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_fips_remove_seed_anchor(&p).await
|
|
|
|
|
}
|
|
|
|
|
"fips.apply-seed-anchors" => self.handle_fips_apply_seed_anchors().await,
|
feat(fips): integrate jmcorgan/fips as preferred non-Tor transport + v1.4.0
Bakes the FIPS (Free Internetworking Peering System) mesh daemon into
the node stack, supervised by archipelago alongside Tor. Runs as a
system service, identity derives from the same BIP-39 master seed, and
user-triggered updates track upstream main.
Identity
seed.rs: new HKDF label archipelago/fips/secp256k1/v1 → dedicated
secp256k1 key, distinct from the Nostr-node key for crypto isolation
but still seed-recoverable
identity.rs: writes fips_key[.pub] to /data/identity on onboarding,
chmod 0600; fips_key_exists / load_fips_keys / fips_npub accessors
Transport
TransportKind::Fips=3 inserted between LAN and Tor (Tor bumps to 4)
→ router prefers FIPS over Tor for all peer traffic
PeerRecord gains fips_npub + last_fips fields (serde(default) for
backward-compat with older nodes)
transport/fips.rs: NodeTransport stub, reports unavailable until the
daemon is live so router falls through to Tor cleanly
Federation invites
FederatedNode and FederationInvite carry optional fips_npub
create_invite / accept_invite / peer-joined callback thread it end
to end; signature domain deliberately unchanged — FIPS Noise does
its own session auth, so the unsigned hint only affects path
selection
crate::fips
config.rs: renders /etc/fips/fips.yaml and sudo-installs key material
service.rs: systemctl status/activate/restart/mask wrappers
update.rs: GitHub API check against upstream main; apply stubbed
until per-commit .deb artefact source is decided
RPC + dashboard
fips.status / fips.check-update / fips.apply-update / fips.install /
fips.restart registered in dispatcher
HomeNetworkCard.vue shipped standalone (unmounted — place in Home.vue
when ready); shows state pill, version, FIPS npub, update button,
activate button when key is present but service is down
ISO + systemd
archipelago-fips.service: conditional on key presence, masked by
default — backend unmasks after onboarding writes the key
build-auto-installer-iso.sh: multi-stage Dockerfile builds the FIPS
.deb from jmcorgan/fips main (fail-loud), COPYs it into rootfs, apt
installs it so trixie resolves deps; unit copied + masked
Version bump: 1.3.5 → 1.4.0
Tests: 33 new/updated passing (seed, identity, transport, federation,
fips module, transport::fips).
Known gaps: fips.apply-update returns a clear stub error until
upstream publishes per-commit .deb artefacts; HomeNetworkCard is not
mounted in Home.vue by default.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 22:57:51 -04:00
|
|
|
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
// System updates
|
|
|
|
|
"update.check" => self.handle_update_check().await,
|
|
|
|
|
"update.status" => self.handle_update_status().await,
|
|
|
|
|
"update.dismiss" => self.handle_update_dismiss().await,
|
|
|
|
|
"update.download" => self.handle_update_download().await,
|
2026-04-20 19:10:34 -04:00
|
|
|
"update.cancel-download" => self.handle_update_cancel_download().await,
|
2026-04-21 10:09:28 -04:00
|
|
|
"update.list-mirrors" => self.handle_update_list_mirrors().await,
|
|
|
|
|
"update.add-mirror" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_update_add_mirror(&p).await
|
|
|
|
|
}
|
|
|
|
|
"update.remove-mirror" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_update_remove_mirror(&p).await
|
|
|
|
|
}
|
|
|
|
|
"update.set-primary-mirror" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_update_set_primary_mirror(&p).await
|
|
|
|
|
}
|
2026-04-21 13:05:42 -04:00
|
|
|
"update.test-mirror" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_update_test_mirror(&p).await
|
|
|
|
|
}
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"update.apply" => self.handle_update_apply().await,
|
2026-03-25 15:52:26 +00:00
|
|
|
"update.git-apply" => self.handle_update_git_apply().await,
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
"update.rollback" => self.handle_update_rollback().await,
|
|
|
|
|
"update.get-schedule" => self.handle_update_get_schedule().await,
|
|
|
|
|
"update.set-schedule" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_update_set_schedule(&p).await
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Backup & Restore
|
|
|
|
|
"backup.create" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_backup_create(&p).await
|
|
|
|
|
}
|
|
|
|
|
"backup.list" => self.handle_backup_list().await,
|
|
|
|
|
"backup.verify" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_backup_verify(&p).await
|
|
|
|
|
}
|
|
|
|
|
"backup.restore" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_backup_restore(&p).await
|
|
|
|
|
}
|
|
|
|
|
"backup.restore-identity" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_backup_restore_identity(&p).await
|
|
|
|
|
}
|
|
|
|
|
"backup.delete" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_backup_delete(&p).await
|
|
|
|
|
}
|
|
|
|
|
"backup.list-drives" => self.handle_backup_list_drives().await,
|
|
|
|
|
"backup.to-usb" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_backup_to_usb(&p).await
|
|
|
|
|
}
|
|
|
|
|
"backup.upload-s3" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_backup_upload_s3(&p).await
|
|
|
|
|
}
|
|
|
|
|
"backup.download-s3" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_backup_download_s3(&p).await
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Security / secrets
|
|
|
|
|
"security.rotate-secrets" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_security_rotate_secrets(&p).await
|
|
|
|
|
}
|
|
|
|
|
"security.list-expiring" => {
|
|
|
|
|
let p = params.unwrap_or(serde_json::json!({}));
|
|
|
|
|
self.handle_security_list_expiring(&p).await
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Webhooks
|
|
|
|
|
"webhook.get-config" => self.handle_webhook_get_config().await,
|
|
|
|
|
"webhook.configure" => self.handle_webhook_configure(params).await,
|
|
|
|
|
"webhook.test" => self.handle_webhook_test().await,
|
|
|
|
|
|
chore(ci): rustfmt + clippy clean-up to unblock the Rust CI job
The .github/workflows/ci.yml Rust job runs cargo fmt --check, clippy
with -D warnings, and tests. All three were failing. This commit:
- Applies rustfmt across the tree (the bulk of the diff — untouched
since the last toolchain bump, so a wide sweep was unavoidable).
- Fixes the correctness-level clippy errors:
container/bitcoin_simulator.rs wildcard-in-or-pattern
container/manifest.rs from_str rename to parse (reserved name)
container/podman_client.rs .get(0) -> .first()
container/runtime.rs manual += collapse
archipelago/src/constants.rs doc-comment → module-doc
api/rpc/package/install.rs stray /// comment above a non-item
container/docker_packages.rs redundant field init
streaming/advertisement.rs missing Metric import in tests
tests/orchestration_tests.rs `vec!` in non-Vec contexts
mesh/listener/dispatch.rs unused store_plain_message import
api/rpc/tor/mod.rs and mesh/steganography.rs: push-after-new → vec!
- Quiets wide legacy surfaces with crate-level allows in main.rs for
stylistic lints (too_many_arguments, type_complexity, doc indent,
enum variant prefix, wildcard-in-or, assertions-on-constants,
drop_non_drop, unused_io_amount, ptr_arg) — these fired in dozens
of places with no correctness payoff and have been churning every
toolchain bump.
- Tags intentional-dead-code helpers: wallet/ and streaming/ modules
are WIP, mesh::send_chunked_payload and DM_V1_MARKER are kept for
rollback compatibility, vpn::get_nostr_vpn_status is surface-area
for a not-yet-landed RPC.
cargo fmt --check, cargo clippy --all-targets --all-features
-- -D warnings, and cargo test --all-features now all pass locally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 17:23:46 -04:00
|
|
|
_ => Err(anyhow::anyhow!("Unknown method: {}", method)),
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
chore(ci): rustfmt + clippy clean-up to unblock the Rust CI job
The .github/workflows/ci.yml Rust job runs cargo fmt --check, clippy
with -D warnings, and tests. All three were failing. This commit:
- Applies rustfmt across the tree (the bulk of the diff — untouched
since the last toolchain bump, so a wide sweep was unavoidable).
- Fixes the correctness-level clippy errors:
container/bitcoin_simulator.rs wildcard-in-or-pattern
container/manifest.rs from_str rename to parse (reserved name)
container/podman_client.rs .get(0) -> .first()
container/runtime.rs manual += collapse
archipelago/src/constants.rs doc-comment → module-doc
api/rpc/package/install.rs stray /// comment above a non-item
container/docker_packages.rs redundant field init
streaming/advertisement.rs missing Metric import in tests
tests/orchestration_tests.rs `vec!` in non-Vec contexts
mesh/listener/dispatch.rs unused store_plain_message import
api/rpc/tor/mod.rs and mesh/steganography.rs: push-after-new → vec!
- Quiets wide legacy surfaces with crate-level allows in main.rs for
stylistic lints (too_many_arguments, type_complexity, doc indent,
enum variant prefix, wildcard-in-or, assertions-on-constants,
drop_non_drop, unused_io_amount, ptr_arg) — these fired in dozens
of places with no correctness payoff and have been churning every
toolchain bump.
- Tags intentional-dead-code helpers: wallet/ and streaming/ modules
are WIP, mesh::send_chunked_payload and DM_V1_MARKER are kept for
rollback compatibility, vpn::get_nostr_vpn_status is surface-area
for a not-yet-landed RPC.
cargo fmt --check, cargo clippy --all-targets --all-features
-- -D warnings, and cargo test --all-features now all pass locally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 17:23:46 -04:00
|
|
|
pub(super) async fn handle_echo(
|
|
|
|
|
&self,
|
|
|
|
|
params: Option<serde_json::Value>,
|
|
|
|
|
) -> Result<serde_json::Value> {
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
if let Some(p) = params {
|
|
|
|
|
if let Some(msg) = p.get("message").and_then(|v| v.as_str()) {
|
|
|
|
|
return Ok(serde_json::json!({ "message": msg }));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Ok(serde_json::json!({ "message": "Hello from Archipelago!" }))
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-05 11:29:18 -04:00
|
|
|
async fn handle_server_get_state(&self) -> Result<serde_json::Value> {
|
|
|
|
|
let (data, rev) = self.state_manager.get_snapshot().await;
|
|
|
|
|
Ok(serde_json::json!({ "data": data, "rev": rev }))
|
|
|
|
|
}
|
|
|
|
|
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
pub(super) async fn handle_health(&self) -> Result<serde_json::Value> {
|
|
|
|
|
let recovery_complete = crate::crash_recovery::is_recovery_complete();
|
|
|
|
|
let uptime = crate::crash_recovery::uptime_seconds();
|
|
|
|
|
let status = if recovery_complete { "ok" } else { "degraded" };
|
|
|
|
|
Ok(serde_json::json!({
|
|
|
|
|
"status": status,
|
|
|
|
|
"crash_recovery_complete": recovery_complete,
|
|
|
|
|
"uptime_seconds": uptime,
|
2026-03-29 21:56:38 +01:00
|
|
|
"version": format!("{}-{}", env!("CARGO_PKG_VERSION"), option_env!("GIT_HASH").unwrap_or("dev")),
|
refactor: split package.rs, mod.rs, listener.rs, and lnd.rs into focused submodules
- R35: Split package.rs (1794 lines) into package/{mod,config,validation,lifecycle}.rs
- R36: Split mesh/listener.rs (1799 lines) into listener/{mod,session,frames,decode,dispatch,bitcoin}.rs
- R37: Split rpc/mod.rs into mod.rs + dispatcher.rs, middleware.rs, response.rs (54% reduction)
- R38: Split lnd.rs (1064 lines) into lnd/{mod,info,channels,wallet,payments}.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 02:26:28 +00:00
|
|
|
}))
|
|
|
|
|
}
|
|
|
|
|
}
|