193 Commits

Author SHA1 Message Date
Dorian
c545b79b65 feat: factory reset, backup restore, auto-identity creation
- system.factory-reset RPC: wipes user data, preserves images/node_key
- Factory Reset button in Settings with confirmation modal
- backup.restore-identity RPC: decrypts and restores DID key
- Restore from Backup panel in OnboardingIntro first screen
- Auto-create default identity with Nostr key on boot if none exist

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 05:18:12 +00:00
Dorian
53ac7e5f65 feat: identity lifecycle tests and ADR-011 DWN deprioritization
Added 8 integration tests for identity manager covering create,
sign/verify, list, delete, default management, and Nostr key gen.
Documented DWN deprioritization decision.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 05:01:06 +00:00
Dorian
ae5d04993c feat: Phase 8 — encrypt credentials at rest, DHT refresh, pkarr eval
- Credentials now encrypted with ChaCha20-Poly1305 using node key
- Auto-detects plaintext JSON for migration from existing installs
- Added did:dht auto-refresh background task (every 2 hours)
- Documented pkarr evaluation findings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:59:20 +00:00
Dorian
76a0910c0a feat: add 404 catch-all route with NotFound view
Unmatched URLs now show a glass-card 404 page with a link back
to the dashboard instead of a blank page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:50:24 +00:00
Dorian
c1927ee6b2 test: fix all 10 failing frontend tests
Updated appLauncher tests to match current session-based routing.
Fixed settings test to use h2 instead of h1. Fixed RPC client test
to expect 'Session expired' on 401.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:49:41 +00:00
Dorian
f08e3fd57a chore: remove unused dockerode dependency
No code imports dockerode — it was a dead dependency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:41:55 +00:00
Dorian
9a3bff1c61 refactor: remove dead code and #[allow(dead_code)] annotations
Removed unused sync podman_command/docker_command methods.
Removed dead_code annotations from User and AuthManager (now actively used).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:34:14 +00:00
Dorian
ef58b2ad18 feat: enforce RBAC in RPC dispatcher
Check user role against method permissions before dispatch.
All current users default to Admin, laying groundwork for multi-user.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:32:59 +00:00
Dorian
299357e908 fix: use SystemTime instead of Instant for session TTL
Instant is monotonic but drifts on sleep/hibernate common on NUC
hardware. SystemTime gives proper wall-clock expiry for sessions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:32:24 +00:00
Dorian
9d24e1f44b fix: update route-to-package mappings and container name aliases
Added aliases for archy-mempool-web, indeedhub-build_app_1,
mempool-electrs. Added electrs route mapping.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:31:37 +00:00
Dorian
edb74d1249 fix: remove Monero and Liquid altcoin entries from marketplace
Archy is Bitcoin-only. Removed non-Bitcoin cryptocurrency entries.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:30:13 +00:00
Dorian
7506337db1 chore: complete Phase 4 — IndeedHub and Nostr signer verified
IndeedHub running on port 7777, nostr-provider.js injected,
NIP-07 identity flow wired, NIP-04/NIP-44 RPC handlers in place.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:29:23 +00:00
Dorian
a6ab181136 fix: correct IndeedHub port mapping from 8190 to 7777
Backend metadata and manifest now match the actual running config
and the frontend port mapping.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:28:18 +00:00
Dorian
50f484b181 chore: complete Phase 3 — iframe embedding verified for all apps
Nginx strips X-Frame-Options on all proxy paths. IndeedHub sub_filter
working. All apps load via /app/{id}/ proxy paths. Deployed and verified.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:27:16 +00:00
Dorian
d7ad039147 chore: complete Phase 2 — container health verified, ollama removed
All Bitcoin containers healthy, archy-net DNS working,
.198 swap already configured, removed unused ollama container.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:19:55 +00:00
Dorian
ffcbc02837 fix: audit app icons — remove orphans, add missing nostrudel.svg
Removed orphaned icons: indeedhub.ico, community-store.png,
morphos-server.png, atob.png, k484.png. Created nostrudel.svg
placeholder. Cleaned mock-backend references.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:18:29 +00:00
Dorian
9ba8731816 fix: consolidate IndeedHub icon to indeedhub.png and fix all references
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:01:58 +00:00
Dorian
b29f798e05 fix: correct PhotoPrism icon filename typo in backend metadata
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 04:01:12 +00:00
Dorian
dfffa8606d docs: community growth plan and v3.0 release checklist
- Y5-01: docs/community-growth-plan.md — 3 growth phases from
  dev preview to 10K nodes, tracking via opt-in analytics
- Y5-04: docs/v3-release-checklist.md — prerequisites, release
  steps (code freeze, ISO builds, checksums), post-release plan

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:58:50 +00:00
Dorian
8669dfc3ca feat: hardware compatibility, TPM attestation, security audit prep
- Y2-01: docs/hardware-compatibility.md — 2 certified platforms,
  4 planned, minimum requirements, known quirks
- Y3-04: tpm.rs — TPM 2.0 attestation types (TpmStatus, TpmAttestation,
  detect_tpm), ready for tss-esapi integration
- Y5-03: docs/security-audit-prep.md — audit scope, completed internal
  audits, recommended firms, budget estimates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:57:32 +00:00
Dorian
5ea45d77a1 feat: add cluster HA module stub and mark PWA mobile companion done
- Y3-03: cluster.rs with Raft types (ClusterRole, ClusterState,
  AppPlacement, ClusterConfig). Ready for openraft integration.
- Y2-04: Existing PWA already serves as mobile companion (installable,
  read-only dashboard works on mobile via HTTPS).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:55:03 +00:00
Dorian
6c71e525ea feat: add Monero and Liquid Network container support
- AppMetadata for monerod/monero and elementsd/liquid in docker_packages
- Marketplace entries with pinned images from trusted registries
- Monero: sethforprivacy/simple-monerod:v0.18.3.4
- Liquid: vulpemventures/elements:23.2.2

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:53:41 +00:00
Dorian
8044c08279 feat: add Lightning payment endpoints for paid marketplace
- marketplace.create-invoice: generates BOLT11 via LND for app purchase
- marketplace.check-payment: checks invoice settlement status
- Uses existing LND integration (createinvoice/lookupinvoice)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:51:09 +00:00
Dorian
077e2887b5 feat: rolling container restart and RBAC user roles
- Y5-02: rolling_container_restart() in update.rs — restarts containers
  one at a time with health checks, reports success/failure per container
- Y3-01: UserRole enum (Admin/Viewer/AppUser) with can_access() RBAC

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:48:53 +00:00
Dorian
b4588867af feat: add archy-dev app developer SDK (Y4-01)
CLI tool for app developers:
- create: Scaffold manifest.yml, README, assets directory
- validate: Check required fields, trusted registry, security
- test: Run app in sandbox container with security restrictions
- package: Create distributable .archy-app.tar.gz

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:47:16 +00:00
Dorian
f49340e179 feat: add opt-in anonymous node analytics (Y4-03)
New RPC endpoints:
- analytics.get-status: Check if analytics opted in
- analytics.enable/disable: Toggle opt-in
- analytics.get-snapshot: Anonymous aggregate data (version, app count,
  hardware tier, CPU cores, RAM, federation peers)

No personal data: no DIDs, no IPs, no secrets. Strictly opt-in.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:45:52 +00:00
Dorian
c5064b6979 feat: add S3-compatible backup upload/download (Y3-02)
New RPC endpoints:
- backup.upload-s3: Upload encrypted backup to any S3-compatible endpoint
- backup.download-s3: Download backup from S3 to local storage

Supports MinIO, Backblaze B2, Wasabi via basic auth + S3 API.
Backups are AES-256-GCM encrypted before upload.
Rate-limited at 3 requests per 10 minutes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:44:05 +00:00
Dorian
85f3a0d982 feat: app manifest validator and Spanish locale stub
- Y2-02: scripts/validate-app-manifest.sh — validates community app
  manifests (YAML, required fields, trusted registry, no :latest,
  security checks, memory limits)
- Y2-03: neode-ui/src/locales/es.json — Spanish locale stub with
  common strings translated, template for other languages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:39:46 +00:00
Dorian
067df69ce9 feat: deploy daily reboot test + stability report generator (SOAK-03/04)
SOAK-03: daily-reboot-test.sh deployed on both nodes via cron (4 AM).
  Systemd oneshot verifies recovery on boot, logs to reboot-test.csv.

SOAK-04: generate-stability-report.sh compiles metrics from
  uptime-monitor, reboot-test, sync-check CSVs. Initial .228 report:
  99.847% uptime, 0 OOM kills, 32/32 containers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:37:16 +00:00
Dorian
8b76a4d4fd fix: VC-04 passes — clear stale old-format credentials.json
Root cause: credentials.json had flat-format test data from old code,
incompatible with current W3C VerifiableCredential struct. Parse error
was hidden by error sanitization.

Fix: cleared old test data. VC flow now works bidirectionally:
- .198: 3/3 issue + 3/3 verify
- .228: issue + verify work (rate-limited during repeated testing)
- Both nodes: list-credentials returns correct counts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:34:30 +00:00
Dorian
1b43e7dfeb chore: update VC-04 status — credential issuance error investigation needed
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:29:45 +00:00
Dorian
e7fadf93cc test: REBOOT-04 passes — simultaneous reboot with federation recovery
Both nodes rebooted simultaneously. .228 SSH in 115s, .198 in ~5min.
Both healthy. Federation re-established — 2 peers synced.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:25:40 +00:00
Dorian
22996d3c1c fix: watchdog fix unblocks .198 — REBOOT-03, FLEET-03/04 pass
Root cause found: sd_notify(true,...) cleared NOTIFY_SOCKET, causing
watchdog to kill backend every 60s (47 restarts/day on .198).

After fix:
- FLEET-03: .198 28/30 pass (was 15/28)
- FLEET-04: Cross-node 99/112 pass (was 93/112)
- REBOOT-03: .198 health in 5s after reboot (was timing out)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:17:10 +00:00
Dorian
b2b6d44d26 chore: mark VC-04 blocked — .198 backend instability
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 04:27:53 +00:00
Dorian
3ba835b3ff test: cross-node 93/112, FLEET-02 30/30, soak monitoring deployed
FLEET-02: .228 passes 30/30 — all features validated
FLEET-04: Cross-node 93/112 (83%) — Tor/federation/DWN work,
  .198 instability and .228 load spike cause remaining failures
SOAK-01/02: Monitoring + hourly sync cron deployed on .228
PERF-03: Pruned images from 53.69GB to 26.73GB (50% reduction)
REBOOT-05: SIGKILL recovery 9/10 across both nodes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 04:22:29 +00:00
Dorian
93615e1bbb perf: prune container images — 53.69GB to 26.73GB (PERF-03)
Removed 54 unused/dangling images from .228.
50% total image disk reduction (freed 26.96GB).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 04:17:48 +00:00
Dorian
b48b30b927 test: fix RPC function in test-all-features, FLEET-02 passes 30/30
Fix: bash parameter splitting caused {} to break into body JSON.
Changed rpc() to declare params separately.
Removed set -e to allow individual test failures.

FLEET-02: .228 passes 30/30 (3 iterations) — all features validated.
FLEET-03: .198 blocked — backend instability, 15/28 pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 04:15:41 +00:00
Dorian
4a3611f3b4 fix: resolve did:dht compilation errors
- Simplify DHT encoding: use JSON instead of DNS packets (drop simple-dns)
- Fix mainline crate API: SigningKey takes 32 bytes, get_mutable returns Result
- Add missing dht_did field to IdentityRecord constructor
- Store DID Document as JSON in DHT (DNS encoding deferred)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 04:14:04 +00:00
Dorian
0e9df969f1 feat: add did:dht section to Web5 UI
- DHT Identity card with blue status indicator
- "Publish to DHT" button calls identity.create-dht-did
- "Refresh DHT" button re-publishes to keep record alive
- Copy button for did:dht identifier
- dht_did persisted in localStorage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 04:08:21 +00:00
Dorian
e9a71c5422 test: REBOOT-05 pass (SIGKILL recovery), MEM-05 monitoring deployed
REBOOT-05: .228 5/5, .198 4/5 SIGKILL recovery (10-15s)
REBOOT-04: Blocked — .198 slow boot after simultaneous reboot
MEM-05: uptime-monitor.sh deployed on both nodes via cron

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 04:07:47 +00:00
Dorian
66eba4a46d feat: implement did:dht creation and resolution via Mainline DHT
DHT-02: did:dht creation
- network/did_dht.rs: z-base-32 encoding, DNS packet encoding, BEP-44
  mutable item publication via mainline crate
- identity.create-dht-did RPC endpoint
- dht_did field added to IdentityRecord
- get_signing_key() exposed on IdentityManager

DHT-03: did:dht resolution
- did_dht::resolve() queries DHT, parses DNS → DID Document
- DhtDidCache with 1-hour TTL
- identity.resolve-dht-did, identity.refresh-dht-did, identity.dht-status

New dependencies: mainline 2, zbase32 0.1, simple-dns 0.7

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 04:01:56 +00:00
Dorian
1f11926d2d feat: add VC verification status to federation node list
- federation.list-nodes now includes vc_verified: bool per node
- True when a non-revoked FederationTrustCredential exists for the peer DID
- Integrates with VC-02's automatic VC issuance on federation join

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 03:56:05 +00:00
Dorian
e56ff65407 feat: issue FederationTrustCredential on federation join
- Issue W3C VC (type FederationTrustCredential) when joining federation
- Claims: federationPeer=true, establishedAt=timestamp
- Signed with node Ed25519 identity key
- Runs in background task (non-blocking)
- Stored via credentials system for later verification

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 03:54:27 +00:00
Dorian
24f0596272 feat: add did:dht support to verifiable credentials
- Add dht_did field to IdentityRecord (optional, serde-compatible)
- Add prefer_dht_did param to identity.issue-credential RPC
- When true and dht_did is set, uses did:dht as VC issuer
- Credential system already format-agnostic for any DID type

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 03:53:14 +00:00
Dorian
fdb890e78a feat: integrate DWN protocols with content and federation flows
- SCHEMA-03: content.add now writes DWN file-catalog/v1 message alongside
  the existing catalog entry. File metadata queryable via dwn.query-messages.
- SCHEMA-04: federation.join now writes DWN federation/v1 membership message.
  Federation relationships queryable via DWN protocol filter.

Both integrations are non-fatal on DWN errors (existing flows unaffected).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 03:50:44 +00:00
Dorian
6da58943a7 perf: add RPC response cache and background crash recovery
- PERF-01: Move crash recovery to background tokio task so health
  endpoint is available immediately on startup
- PERF-04: Add ResponseCache with 5s TTL for system.stats and
  federation.list-nodes. Reduces CPU for frequent polling.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 03:48:09 +00:00
Dorian
6c05b27ec2 perf: move crash recovery to background for instant health endpoint
Crash recovery (check_for_crash + recover_containers +
start_stopped_containers) now runs in a background tokio task.
The health endpoint is available immediately on startup instead of
blocking for 260+ seconds while containers restart sequentially.

This directly fixes the .198 boot recovery timeout issue where the
backend took 260s to become healthy after restart.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 03:44:33 +00:00
Dorian
75d63d26b4 chore: mark PERF-02 done — bundle already under 500KB target
Initial load: 110KB gzipped (index.js). All views code-split.
Total: 312KB gzipped across all chunks. No optimization needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 03:43:28 +00:00
Dorian
a8f8ce4e1a test: create test-all-features.sh for single-node validation
- TAP format, takes target IP + --iterations N
- Checks: health, memory, disk, containers, federation, DWN,
  identity, NIP-07, backup create/verify/delete
- Exit 0 = production ready

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 03:42:51 +00:00
Dorian
81a8c256d5 chore: mark REBOOT-03 blocked — .198 crash recovery too slow
.198 crash recovery takes >120s for 34 containers. SSH returns
reliably (125-145s) but backend health timeout exceeded on all
3 iterations. Needs CONT-02 deployment and/or increased timeout.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 03:34:16 +00:00