[EPIC] Sovereign Comms: Nostr Migration -- Telegram Replacement #15

Open
opened 2026-04-04 16:57:07 +00:00 by ezra · 0 comments
Owner

EPIC: Sovereign Comms -- Nostr Migration

Vision

Replace Telegram with self-hosted Nostr relay + NIP-29 groups. Alexander opens a native client on Mac/iPad/iPhone. Wizard agents speak the same protocol. No middleman, no permissions, no bot tokens.

Acceptance Criteria

  • Alexander has a sovereign, open-source Nostr client on Mac, iPad, and iPhone
  • A private NIP-29 group exists on a self-hosted relay for fleet comms
  • Wizard agents (Ezra, Bilbo, Bezalel, etc.) can send/receive in the group
  • Threaded conversations work (equivalent to Telegram topics)
  • Client is forkable -- we can hack group chat features as needed

CLIENT RECOMMENDATION: Nostur

After evaluating all NIP-29-capable Apple clients:

Client Platform NIP-29 Open Source License Hackable
Nostur iOS + macOS YES YES (github.com/nostur-com/nostur-ios-public) GPL-3.0 YES -- Swift/SwiftUI, 4284 commits, active dev
0xchat iOS + Android + macOS + Windows YES Partial (core lib only) Unknown LIMITED -- main app closed
Damus iOS No NIP-29 YES GPL-3.0 DEAD -- removed from App Store June 2025
Notedeck macOS + iOS No NIP-29 yet YES GPL-3.0 Rust/egui, early alpha
Primal iOS + Web No NIP-29 Partial Unknown LIMITED
Coracle Web only YES YES MIT? Web only, no native

Nostur wins. Native Swift/SwiftUI, NIP-29 groups already working, GPL-3.0, actively maintained, runs on all Apple platforms. Fork it, hack it, ship it.


WORK BREAKDOWN

Phase 1: Infrastructure (Relay + Keypairs)

Ticket 1.1: Deploy nostr-rs-relay on Hermes VPS

  • Install Rust toolchain (already present for Claw)
  • Build and configure nostr-rs-relay with NIP-29 support
  • SQLite storage, bind to localhost, reverse-proxy via nginx with WSS
  • Domain: relay.timmytime.nexus or similar
  • AC: relay responds to wss:// connections, NIP-29 event kinds accepted

Ticket 1.2: Generate fleet keypairs

  • Create nsec/npub for Alexander, Ezra, Bilbo, Bezalel, Allegro, and other wizards
  • Store in each wizard's home/.env as NOSTR_NSEC / NOSTR_NPUB
  • Alexander's keypair goes to his local keychain
  • AC: each identity can sign events

Ticket 1.3: Create NIP-29 group "Timmy Time"

  • Use admin events (kind 9007) to create the group on the relay
  • Add all fleet members via kind 9000
  • Set group metadata (name, description, picture)
  • AC: group visible in Nostur when connected to relay

Phase 2: Human Client (Alexander's Apple Devices)

Ticket 2.1: Fork Nostur

  • Fork nostur-ios-public to Timmy Foundation Gitea (or GitHub)
  • Build locally on Alexander's Mac with Xcode
  • Verify NIP-29 group chat works against our relay
  • AC: Alexander can send/receive in "Timmy Time" group from Mac

Ticket 2.2: Install on iPad + iPhone via TestFlight or direct build

  • Same Xcode project targets iOS and macOS
  • Build for Alexander's devices (direct install or TestFlight)
  • AC: same group chat works on all three Apple devices

Ticket 2.3: Client customization (stretch)

  • Brand the fork (Timmy Time theme)
  • Add any missing group features we need
  • Pin relay to our self-hosted instance by default
  • AC: custom build feels like our app

Phase 3: Agent Gateway Adapter

Ticket 3.1: Build gateway/platforms/nostr.py

  • New Hermes gateway adapter using nostr-sdk Python (pip install nostr-sdk)
  • Implement the platform adapter interface (connect, disconnect, send, receive)
  • Subscribe to NIP-29 group events (kind 9 for chat, kind 11/12 for threads)
  • Publish responses as signed events from the wizard's keypair
  • AC: Ezra can receive a message in the Nostr group and respond

Ticket 3.2: Wire up all wizard houses

  • Add NOSTR_NSEC, NOSTR_RELAY_URL to each wizard's config
  • Enable nostr platform in each gateway config
  • Test: Alexander sends in Nostur, wizard responds in same thread
  • AC: all active wizards (Ezra, Bilbo, Bezalel) respond in Nostr group

Ticket 3.3: Thread mapping

  • Map NIP-29 Kind 11 (thread root) to Hermes thread context
  • Map Kind 12 (reply) to thread_id routing
  • Preserve per-topic conversations like Telegram topics
  • AC: wizard responses land in correct thread

Phase 4: Cutover

Ticket 4.1: Parallel run

  • Both Telegram and Nostr active simultaneously
  • Wizards bridge messages or dual-post during transition
  • Alexander validates parity
  • AC: 1 week of parallel operation with no message loss

Ticket 4.2: Telegram sunset

  • Disable Telegram gateway adapters
  • Archive Telegram history
  • Nostr becomes primary
  • AC: all comms flow through Nostr, Telegram is off

Dependencies

  • Rust toolchain on VPS (already present)
  • Domain + TLS cert for relay WSS endpoint
  • Alexander's Apple Developer account for device builds
  • nostr-sdk Python package (pip install nostr-sdk)

Risks & Mitigations

Risk Mitigation
NIP-29 is draft spec Nostur already implements it; relay + client pair tested together
Nostur maintenance We fork it -- GPL-3.0 means we own our copy
nostr-sdk Python gaps Rust FFI bindings are mature (v0.38); fallback to raw WebSocket
Apple App Store Sideload via Xcode or TestFlight -- no store dependency

References

  • Research: Issue #14 in this repo
  • NIP-29 spec: github.com/nostr-protocol/nips/blob/master/29.md
  • Nostur repo: github.com/nostur-com/nostur-ios-public
  • nostr-rs-relay: github.com/scsibug/nostr-rs-relay
  • nostr-sdk Python: pypi.org/project/nostr-sdk/
  • NIP-29 client index: nip29.com
## EPIC: Sovereign Comms -- Nostr Migration ### Vision Replace Telegram with self-hosted Nostr relay + NIP-29 groups. Alexander opens a native client on Mac/iPad/iPhone. Wizard agents speak the same protocol. No middleman, no permissions, no bot tokens. ### Acceptance Criteria - [ ] Alexander has a sovereign, open-source Nostr client on Mac, iPad, and iPhone - [ ] A private NIP-29 group exists on a self-hosted relay for fleet comms - [ ] Wizard agents (Ezra, Bilbo, Bezalel, etc.) can send/receive in the group - [ ] Threaded conversations work (equivalent to Telegram topics) - [ ] Client is forkable -- we can hack group chat features as needed --- ## CLIENT RECOMMENDATION: Nostur After evaluating all NIP-29-capable Apple clients: | Client | Platform | NIP-29 | Open Source | License | Hackable | |--------|----------|--------|-------------|---------|----------| | **Nostur** | iOS + macOS | YES | YES (github.com/nostur-com/nostur-ios-public) | GPL-3.0 | YES -- Swift/SwiftUI, 4284 commits, active dev | | 0xchat | iOS + Android + macOS + Windows | YES | Partial (core lib only) | Unknown | LIMITED -- main app closed | | Damus | iOS | No NIP-29 | YES | GPL-3.0 | DEAD -- removed from App Store June 2025 | | Notedeck | macOS + iOS | No NIP-29 yet | YES | GPL-3.0 | Rust/egui, early alpha | | Primal | iOS + Web | No NIP-29 | Partial | Unknown | LIMITED | | Coracle | Web only | YES | YES | MIT? | Web only, no native | **Nostur wins.** Native Swift/SwiftUI, NIP-29 groups already working, GPL-3.0, actively maintained, runs on all Apple platforms. Fork it, hack it, ship it. --- ## WORK BREAKDOWN ### Phase 1: Infrastructure (Relay + Keypairs) **Ticket 1.1: Deploy nostr-rs-relay on Hermes VPS** - Install Rust toolchain (already present for Claw) - Build and configure nostr-rs-relay with NIP-29 support - SQLite storage, bind to localhost, reverse-proxy via nginx with WSS - Domain: relay.timmytime.nexus or similar - AC: relay responds to wss:// connections, NIP-29 event kinds accepted **Ticket 1.2: Generate fleet keypairs** - Create nsec/npub for Alexander, Ezra, Bilbo, Bezalel, Allegro, and other wizards - Store in each wizard's home/.env as NOSTR_NSEC / NOSTR_NPUB - Alexander's keypair goes to his local keychain - AC: each identity can sign events **Ticket 1.3: Create NIP-29 group "Timmy Time"** - Use admin events (kind 9007) to create the group on the relay - Add all fleet members via kind 9000 - Set group metadata (name, description, picture) - AC: group visible in Nostur when connected to relay ### Phase 2: Human Client (Alexander's Apple Devices) **Ticket 2.1: Fork Nostur** - Fork nostur-ios-public to Timmy Foundation Gitea (or GitHub) - Build locally on Alexander's Mac with Xcode - Verify NIP-29 group chat works against our relay - AC: Alexander can send/receive in "Timmy Time" group from Mac **Ticket 2.2: Install on iPad + iPhone via TestFlight or direct build** - Same Xcode project targets iOS and macOS - Build for Alexander's devices (direct install or TestFlight) - AC: same group chat works on all three Apple devices **Ticket 2.3: Client customization (stretch)** - Brand the fork (Timmy Time theme) - Add any missing group features we need - Pin relay to our self-hosted instance by default - AC: custom build feels like our app ### Phase 3: Agent Gateway Adapter **Ticket 3.1: Build gateway/platforms/nostr.py** - New Hermes gateway adapter using nostr-sdk Python (pip install nostr-sdk) - Implement the platform adapter interface (connect, disconnect, send, receive) - Subscribe to NIP-29 group events (kind 9 for chat, kind 11/12 for threads) - Publish responses as signed events from the wizard's keypair - AC: Ezra can receive a message in the Nostr group and respond **Ticket 3.2: Wire up all wizard houses** - Add NOSTR_NSEC, NOSTR_RELAY_URL to each wizard's config - Enable nostr platform in each gateway config - Test: Alexander sends in Nostur, wizard responds in same thread - AC: all active wizards (Ezra, Bilbo, Bezalel) respond in Nostr group **Ticket 3.3: Thread mapping** - Map NIP-29 Kind 11 (thread root) to Hermes thread context - Map Kind 12 (reply) to thread_id routing - Preserve per-topic conversations like Telegram topics - AC: wizard responses land in correct thread ### Phase 4: Cutover **Ticket 4.1: Parallel run** - Both Telegram and Nostr active simultaneously - Wizards bridge messages or dual-post during transition - Alexander validates parity - AC: 1 week of parallel operation with no message loss **Ticket 4.2: Telegram sunset** - Disable Telegram gateway adapters - Archive Telegram history - Nostr becomes primary - AC: all comms flow through Nostr, Telegram is off --- ## Dependencies - Rust toolchain on VPS (already present) - Domain + TLS cert for relay WSS endpoint - Alexander's Apple Developer account for device builds - nostr-sdk Python package (pip install nostr-sdk) ## Risks & Mitigations | Risk | Mitigation | |------|-----------| | NIP-29 is draft spec | Nostur already implements it; relay + client pair tested together | | Nostur maintenance | We fork it -- GPL-3.0 means we own our copy | | nostr-sdk Python gaps | Rust FFI bindings are mature (v0.38); fallback to raw WebSocket | | Apple App Store | Sideload via Xcode or TestFlight -- no store dependency | ## References - Research: Issue #14 in this repo - NIP-29 spec: github.com/nostr-protocol/nips/blob/master/29.md - Nostur repo: github.com/nostur-com/nostur-ios-public - nostr-rs-relay: github.com/scsibug/nostr-rs-relay - nostr-sdk Python: pypi.org/project/nostr-sdk/ - NIP-29 client index: nip29.com
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ezra/wizard-checkpoints#15