Commit Graph

527 Commits

Author SHA1 Message Date
0008d33792 Remove bunker (NIP-46) functionality from web UI (v0.44.7)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Delete BunkerView.svelte component and all bunker UI
- Remove bunker-service.js and bunker-worker.js implementations
- Clean up bunker stores and worker management from stores.js
- Remove getBunkerURL and getBunkerInfo API functions
- Remove bunker tab from navigation and App.svelte imports
- Simplify rollup.config.js by removing bunker-worker build
- Remove NIP46 token scope from cashu-client.js

Files modified:
- app/web/src/BunkerView.svelte: Deleted
- app/web/src/bunker-service.js: Deleted
- app/web/src/bunker-worker.js: Deleted
- app/web/src/stores.js: Removed bunker state and worker functions
- app/web/src/api.js: Removed bunker API functions
- app/web/src/App.svelte: Removed bunker tab and imports
- app/web/rollup.config.js: Simplified to single bundle
- app/web/src/cashu-client.js: Removed NIP46 scope
- pkg/version/version: Bumped to v0.44.7

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.44.7
2025-12-30 11:16:07 +02:00
woikos
ac61e56b61 Move bunker service to Web Worker for persistence (v0.44.6)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add bunker-worker.js Web Worker for NIP-46 signing
- Update rollup to build worker as separate bundle
- Move bunker state to stores.js for persistence across tab switches
- Worker maintains WebSocket connection independently of UI lifecycle

Files modified:
- app/web/src/bunker-worker.js: New Web Worker implementation
- app/web/src/stores.js: Added bunker worker state management
- app/web/src/BunkerView.svelte: Use worker instead of inline service
- app/web/rollup.config.js: Build worker bundle separately

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.44.6
2025-12-29 16:24:56 +01:00
woikos
ae024cc784 Fix bunker UI state management issues (v0.44.5)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add guard to prevent duplicate service starts
- Fix stale variable references in error handler
- Show token list even when WebSocket temporarily disconnects
- Add logging for bunker service status changes

Files modified:
- app/web/src/BunkerView.svelte: UI state fixes
- app/web/dist/bundle.js: Rebuilt web UI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.44.5
2025-12-29 15:56:40 +01:00
woikos
e6fa2f15e4 Add persistent keyset storage for Cashu tokens (v0.44.4)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add FileStore implementation for keyset persistence
- Keysets now survive server restarts
- Store keysets in JSON file at $ORLY_DATA_DIR/cashu-keysets.json
- Tokens issued before restart remain valid

Files modified:
- pkg/cashu/keyset/file_store.go: New file-based keyset store
- app/main.go: Use FileStore instead of MemoryStore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.44.4
2025-12-29 15:37:16 +01:00
woikos
e28ab948b0 Add multi-token support for bunker client connections (v0.44.3)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Each client device now gets its own CAT token
- Tokens can be individually named (editable, defaults to cute names like "jolly-jellyfish")
- Tokens can be individually revoked
- Expandable table rows show QR code and full bunker URL per token
- Separate service token for ORLY's own relay connection
- Add Token button to create additional client tokens

Files modified:
- app/web/src/BunkerView.svelte: Token list UI with expandable details

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.44.3
2025-12-29 15:02:09 +01:00
woikos
3f34eb288d Update nostr lib v1.0.12 with TLS URL scheme fix for NIP-98 2025-12-29 14:33:12 +01:00
woikos
8424f0ca44 Add debugging for NIP-98 auth in cashu mint 2025-12-29 14:17:50 +01:00
woikos
48c6739d25 Enable Cashu access tokens automatically when ACL is active (v0.44.2)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add automatic Cashu issuer/verifier initialization when ACL mode is not 'none'
- Use memory store for keyset management with proper TTL configuration
- Import cashuiface package for AllowAllChecker implementation
- ACL handles authorization; CAT provides token-based authentication

Files modified:
- app/main.go: Add Cashu system initialization when ACL active
- pkg/version/version: Bump to v0.44.2

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.44.2
2025-12-29 14:01:54 +01:00
woikos
b837dcb5f0 Fix UTF-8 encoding error in compact event tag marshaling (v0.44.1)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Fix binary pubkey/event ID values not being detected by tag.Marshal
- Compact event decoder now returns 33-byte values with null terminator
- This allows tag.Marshal to detect and hex-encode binary values correctly
- Fixes "Could not decode a text frame as UTF-8" WebSocket errors

Files modified:
- pkg/database/compact_event.go: Return 33-byte binary with null terminator

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.44.1
2025-12-29 13:39:49 +01:00
woikos
7ed1aea0f1 Add NIP-46 bunker service for remote signing with CAT support (v0.44.0)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add bunker-service.js: NIP-46 signer that handles signing requests from remote clients
- Add cashu-client.js: Cashu token minting for bunker authorization
- Update BunkerView.svelte: Add Start/Stop service toggle, CAT token generation, status indicator
- Update App.svelte: Pass userPrivkey to BunkerView for signing
- Add @noble/curves and @noble/hashes dependencies
- Include CAT token in bunker URL format: bunker://<pubkey>?relay=...&secret=...&cat=...
- Improve PWA manifest with maskable icons

Files modified:
- app/web/src/bunker-service.js: NEW - NIP-46 signer implementation
- app/web/src/cashu-client.js: NEW - Cashu token minting client
- app/web/src/BunkerView.svelte: Add service controls and CAT integration
- app/web/src/App.svelte: Add userPrivkey state and prop
- app/web/package.json: Add noble crypto dependencies
- app/web/public/manifest.json: Add maskable icon variants
- pkg/version/version: Bump to v0.44.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.44.0
2025-12-29 12:57:13 +01:00
woikos
fdc4496768 Fix favicon.ico to serve favicon.png from embedded web UI
- Update handleFavicon to serve /favicon.png instead of non-existent orly-favicon.png
- Remove orly-favicon.png from rollup copy targets
- Update release command to include setcap before restart

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 11:18:35 +01:00
woikos
635457aed3 Add PWA support with offline-first caching (v0.43.1)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add web app manifest for standalone installation
- Add service worker with offline-first caching for static assets
- Add network-first caching with fallback for API calls
- Generate PWA icons (192x192, 512x512) from favicon
- Add Apple PWA meta tags for iOS support
- Update rollup config to copy PWA files to dist

Files modified:
- app/web/public/manifest.json: New PWA manifest
- app/web/public/sw.js: New service worker
- app/web/public/icon-192.png: New PWA icon
- app/web/public/icon-512.png: New PWA icon
- app/web/public/index.html: Add manifest link, meta tags, SW registration
- app/web/rollup.config.js: Add PWA files to copy targets
- pkg/version/version: Bump to v0.43.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.43.1
2025-12-29 10:50:59 +01:00
f22bf3f388 Add Neo4j memory tuning config and query result limits (v0.43.0)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add Neo4j driver config options for memory management:
  - ORLY_NEO4J_MAX_CONN_POOL (default: 25) - connection pool size
  - ORLY_NEO4J_FETCH_SIZE (default: 1000) - records per batch
  - ORLY_NEO4J_MAX_TX_RETRY_SEC (default: 30) - transaction retry timeout
  - ORLY_NEO4J_QUERY_RESULT_LIMIT (default: 10000) - max results per query
- Apply driver settings when creating Neo4j connection (pool size, fetch size, retry time)
- Enforce query result limit as safety cap on all Cypher queries
- Fix QueryForSerials and QueryForIds to preserve LIMIT clauses
- Add comprehensive memory tuning documentation with sizing guidelines
- Add NIP-46 signer-based authentication for bunker connections
- Update go.mod with new dependencies

Files modified:
- app/config/config.go: Add Neo4j driver tuning config vars
- main.go: Pass new config values to database factory
- pkg/database/factory.go: Add Neo4j tuning fields to DatabaseConfig
- pkg/database/factory_wasm.go: Mirror factory.go changes for WASM
- pkg/neo4j/neo4j.go: Apply driver config, add getter methods
- pkg/neo4j/query-events.go: Enforce query result limit, fix LIMIT preservation
- docs/NEO4J_BACKEND.md: Add Memory Tuning section, update Docker example
- CLAUDE.md: Add Neo4j memory tuning quick reference
- app/handle-req.go: NIP-46 signer authentication
- app/publisher.go: HasActiveNIP46Signer check
- pkg/protocol/publish/publisher.go: NIP46SignerChecker interface
- go.mod: Add dependencies

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.43.0
2025-12-29 02:18:05 +02:00
aef9e24e40 Require CAT for NIP-46 bunker connections (v0.42.0)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Enforce Cashu access token for kind 24133 events when Cashu is enabled and ACL is active
- Reject NIP-46 events without valid token with "restricted: NIP-46 requires Cashu access token"
- Verify token scope is NIP-46 or RELAY

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.42.0 v4.1.0
2025-12-28 19:31:39 +02:00
1b17acb50c Add simplified NIP-46 bunker page with click-to-copy QR codes (v0.41.0)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add BunkerView with two QR codes: client (bunker://) and signer (nostr+connect://)
- Add click-to-copy functionality on QR codes with visual "Copied!" feedback
- Add CAT requirement warning (only shows when ACL mode is active)
- Remove WireGuard dependencies from bunker page
- Add /api/bunker/info public endpoint for relay URL, ACL mode, CAT status
- Add Cashu token verification for WebSocket connections
- Add kind permission checking for Cashu token scopes
- Add cashuToken field to Listener for connection-level token tracking

Files modified:
- app/handle-bunker.go: New bunker info endpoint (without WireGuard)
- app/handle-event.go: Add Cashu token kind permission check
- app/handle-websocket.go: Extract and verify Cashu token on WS upgrade
- app/listener.go: Add cashuToken field
- app/server.go: Register bunker info endpoint
- app/web/src/BunkerView.svelte: Complete rewrite with QR codes
- app/web/src/api.js: Add getBunkerInfo() function
- pkg/version/version: Bump to v0.41.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.41.0
2025-12-28 18:36:04 +02:00
ea4a54c5e7 Add Cashu blind signature access tokens (NIP-XX draft)
Implements privacy-preserving bearer tokens for relay access control using
Cashu-style blind signatures. Tokens prove whitelist membership without
linking issuance to usage.

Features:
- BDHKE crypto primitives (HashToCurve, Blind, Sign, Unblind, Verify)
- Keyset management with weekly rotation
- Token format with kind permissions and scope isolation
- Generic issuer/verifier with pluggable authorization
- HTTP endpoints: POST /cashu/mint, GET /cashu/keysets, GET /cashu/info
- ACL adapter bridging ORLY's access control to Cashu AuthzChecker
- Stateless revocation via ACL re-check on each token use
- Two-token rotation for seamless renewal (max 2 weeks after blacklist)

Configuration:
- ORLY_CASHU_ENABLED: Enable Cashu tokens
- ORLY_CASHU_TOKEN_TTL: Token validity (default: 1 week)
- ORLY_CASHU_SCOPES: Allowed scopes (relay, nip46, blossom, api)
- ORLY_CASHU_REAUTHORIZE: Re-check ACL on each verification

Files:
- pkg/cashu/bdhke/: Core blind signature cryptography
- pkg/cashu/keyset/: Keyset management and rotation
- pkg/cashu/token/: Token format with kind permissions
- pkg/cashu/issuer/: Token issuance with authorization
- pkg/cashu/verifier/: Token verification with middleware
- pkg/interfaces/cashu/: AuthzChecker, KeysetStore interfaces
- pkg/bunker/acl_adapter.go: ORLY ACL integration
- app/handle-cashu.go: HTTP endpoints
- docs/NIP-XX-CASHU-ACCESS-TOKENS.md: Full specification

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 11:30:11 +02:00
2eb523c161 Add git.mleku.dev remote push to release process (v0.40.1)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Update release command to push to git.mleku.dev using gitmlekudev SSH key
- Add release process documentation to README.md

Files modified:
- .claude/commands/release.md: Add GIT_SSH_COMMAND push to git.mleku.dev
- README.md: Document release process and SSH key configuration
- pkg/version/version: Bump to v0.40.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.40.1
2025-12-27 18:07:15 +02:00
e84949140b Add WireGuard VPN with random /31 subnet isolation (v0.40.0)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add embedded WireGuard VPN server using wireguard-go + netstack
- Implement deterministic /31 subnet allocation from seed + sequence
- Use Badger's built-in Sequence for atomic counter allocation
- Add NIP-46 bunker server for remote signing over VPN
- Add revoked key tracking and access audit logging for users
- Add Bunker tab to web UI with WireGuard/bunker QR codes
- Support key regeneration with old keypair archiving

New environment variables:
- ORLY_WG_ENABLED: Enable WireGuard VPN server
- ORLY_WG_PORT: UDP port for WireGuard (default 51820)
- ORLY_WG_ENDPOINT: Public endpoint for WireGuard
- ORLY_WG_NETWORK: Base network for subnet pool (default 10.0.0.0/8)
- ORLY_BUNKER_ENABLED: Enable NIP-46 bunker
- ORLY_BUNKER_PORT: WebSocket port for bunker (default 3335)

Files added:
- pkg/wireguard/: WireGuard server, keygen, subnet pool, errors
- pkg/bunker/: NIP-46 bunker server and session handling
- pkg/database/wireguard.go: Peer storage with audit logging
- app/handle-wireguard.go: API endpoints for config/regenerate/audit
- app/wireguard-helpers.go: Key derivation helpers
- app/web/src/BunkerView.svelte: Bunker UI with QR codes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.40.0
2025-12-27 16:32:48 +02:00
2aa5c16311 Fix base64 encoding to keep padding for Go URLEncoding (v0.39.3)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Remove padding stripping from URL-safe base64 conversion
- Go's base64.URLEncoding expects padding characters
- Fix applied to LogView.svelte, BlossomView.svelte, and api.js

Files modified:
- app/web/src/LogView.svelte: Keep padding in auth header
- app/web/src/BlossomView.svelte: Keep padding in auth header
- app/web/src/api.js: Keep padding in auth header
- pkg/version/version: Bump to v0.39.3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.39.3
2025-12-25 16:10:47 +01:00
ce54a6886a Use URL-safe base64 for NIP-98 auth encoding (v0.39.2)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Fix base64 encoding to use URL-safe format (- instead of +, _ instead of /)
- Remove padding characters (=) from base64 output
- Apply fix to LogView, BlossomView, and api.js

Files modified:
- app/web/src/LogView.svelte: URL-safe base64 for NIP-98 auth
- app/web/src/BlossomView.svelte: URL-safe base64 for Blossom auth
- app/web/src/api.js: URL-safe base64 for NIP-98 auth
- pkg/version/version: Bump to v0.39.2

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.39.2
2025-12-25 16:03:46 +01:00
05170db4f7 Fix NIP-98 URL mismatch in log viewer (v0.39.1)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Include query parameters in signed NIP-98 auth URL
- Auth event URL must match actual request URL including ?offset=&limit=

Files modified:
- app/web/src/LogView.svelte: Fix auth URL to include query params
- pkg/version/version: Bump to v0.39.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.39.1
2025-12-25 15:54:30 +01:00
d2122801cd Add nurl and vainstr CLI tools (v0.39.0)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add nurl: NIP-98 authenticated HTTP client for testing owner APIs
- Add vainstr: vanity npub generator using fast secp256k1 library
- Update CLAUDE.md with documentation for both tools
- Properly handle secp256k1 library loading via p8k.New()

Files modified:
- cmd/nurl/main.go: New NIP-98 HTTP client tool
- cmd/vainstr/main.go: New vanity npub generator
- CLAUDE.md: Added usage documentation for nurl and vainstr
- go.mod/go.sum: Added go-arg dependency for vainstr
- pkg/version/version: Bump to v0.39.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.39.0
2025-12-25 14:45:21 +01:00
678a228fb8 Fix log parser to match lol library format (v0.38.1)
Some checks failed
Go / build-and-release (push) Has been cancelled
The lol library outputs logs in format:
  1703500000000000ℹ️ message /path/to/file.go:123

Where:
- Timestamp is Unix microseconds
- Level is emoji (☠️🚨⚠️ℹ️🔎👻)
- Message text
- File:line location

Updated parser to correctly parse this format.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.38.1
2025-12-25 14:11:29 +01:00
02db40de59 Fix log viewer to properly capture logs (v0.38.0)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Reinitialize lol loggers after wrapping Writer with BufferedWriter
- The lol.Main logger was initialized in init() with os.Stderr directly,
  bypassing the Writer variable, so we now recreate it with the wrapped Writer
- Log level changes now properly affect both the buffer and syslog output

Files modified:
- app/config/config.go: Reinitialize loggers after BufferedWriter setup
- pkg/logbuffer/writer.go: Remove unused stub function

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.38.0
2025-12-25 14:01:36 +01:00
8e5754e799 Add log viewer for relay owners (v0.37.3)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add in-memory ring buffer for log storage (configurable via ORLY_LOG_BUFFER_SIZE)
- Add owner-only log viewer in web UI with infinite scroll
- Add log level selector with runtime level changes
- Add clear logs functionality
- Update Blossom refresh button to use 🔄 emoji style

Files modified:
- pkg/logbuffer/buffer.go: Ring buffer implementation
- pkg/logbuffer/writer.go: Buffered writer hook for log capture
- app/config/config.go: Add ORLY_LOG_BUFFER_SIZE env var
- app/handle-logs.go: Log API handlers
- app/server.go: Register log routes
- app/web/src/LogView.svelte: Log viewer component
- app/web/src/App.svelte: Add logs tab (owner-only)
- app/web/src/BlossomView.svelte: Update refresh button style

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.37.3
2025-12-25 13:49:43 +01:00
e4468d305e Improve Blossom UI responsiveness and layout (v0.37.2)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Show full npub on screens > 720px, truncated on smaller screens
- Make admin users list extend to full width

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.37.2
2025-12-25 13:20:49 +01:00
d3f2ea0f08 Fix Blossom view layout overflow (v0.37.1)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Use box-sizing instead of explicit width to fix right edge overflow

Files modified:
- pkg/version/version: Bump to v0.37.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.37.1
2025-12-25 13:15:13 +01:00
3f07e47ffb Fix Blossom view right edge overflow 2025-12-25 13:10:44 +01:00
aea8fd31e7 Improve Blossom UI with thumbnails and full-width layout (v0.37.0)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Make Blossom view use full available width
- Add "Upload new files" label with Select Files button on right
- Show image/video thumbnails in file list (48x48px)
- Add emoji icons for audio (🎵) and documents (📄)
- Show full hash on screens > 720px, truncated on smaller

Files modified:
- app/web/src/BlossomView.svelte: UI layout and thumbnail changes
- app/web/dist/*: Rebuilt bundle

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.37.0
2025-12-25 13:07:25 +01:00
0de4137a10 Fix embedded web UI deployment by tracking dist assets (v0.36.23)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Track bundle.js, bundle.css, and all dist assets in git
- Previously only index.html was tracked, breaking VPS deployments
- Remove debug logging from BlossomView

Files modified:
- app/web/dist/*: Add all build assets to git tracking
- app/web/src/BlossomView.svelte: Remove debug code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.23
2025-12-25 12:44:14 +01:00
042acd9ed2 Track all dist assets and remove debug logging 2025-12-25 12:38:54 +01:00
dddf1ac568 Add bundle.js to git tracking for embedded web UI 2025-12-25 12:34:48 +01:00
d6f2a0f7cf Add visible debug bar for role detection 2025-12-25 12:32:40 +01:00
7c60b63df6 Add debug logging for Blossom admin role detection (v0.36.22)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add console.log to trace currentEffectiveRole value in BlossomView
- Add HTML comment showing role and isAdmin values for debugging

Files modified:
- app/web/src/BlossomView.svelte: Add debug logging for role detection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.22
2025-12-25 12:30:15 +01:00
ab2ac1bf4c Add Blossom admin UI for viewing all users' storage (v0.36.21)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add ListAllUserStats() storage method to aggregate user blob stats
- Add handleAdminListUsers() handler for admin endpoint
- Add /blossom/admin/users route requiring admin ACL
- Add Admin button to Blossom UI for admin/owner roles
- Add admin view showing all users with file counts and sizes
- Add user detail view to browse individual user's files
- Fetch user profiles (avatar, name) for admin list display

Files modified:
- pkg/blossom/storage.go: Add UserBlobStats struct and ListAllUserStats()
- pkg/blossom/handlers.go: Add handleAdminListUsers() handler
- pkg/blossom/server.go: Add admin/users route
- app/web/src/BlossomView.svelte: Add admin view state, UI, and styles

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.21
2025-12-25 12:04:35 +01:00
96209bd8a5 Fix release deploy to use correct binary path (v0.36.20)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Update deploy command to build to ~/.local/bin/next.orly.dev
- Service uses this path, not ./orly in project directory

Files modified:
- .claude/commands/release.md: Fixed binary output path for VPS deploy

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.20
2025-12-25 11:34:20 +01:00
da6008a00e Improve version link visibility and styling in sidebar (v0.36.19)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Change version link color from muted to readable text color
- Add background color hover effect matching tab styling
- Replace Gitea icon with mug-and-leaf icon
- Rename CSS class from gitea-icon to version-icon

Files modified:
- app/web/src/Sidebar.svelte: Updated version link styling and icon

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.19
2025-12-25 11:19:52 +01:00
b6b31cb93f Add version display to web UI sidebar (v0.36.18)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add version footer to sidebar bottom-left with Gitea icon link
- Fetch relay version from NIP-11 relay info document
- Link opens https://next.orly.dev in new tab
- Responsive design hides version text on medium screens

Files modified:
- app/web/src/api.js: Add fetchRelayInfo() function
- app/web/src/Sidebar.svelte: Add version display with Gitea SVG icon
- app/web/src/App.svelte: Add relayVersion state and fetch on init
- pkg/version/version: Bump to v0.36.18

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.18
2025-12-25 10:08:50 +01:00
77d153a9c7 Add LRU cache for serial lookups with dynamic scaling (v0.36.17)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add generic LRUCache[K, V] implementation using container/list for O(1) ops
- Replace random 50% eviction with proper LRU eviction in SerialCache
- Cache now starts empty and grows on demand up to configured limits
- Use [32]byte keys instead of string([]byte) to avoid allocation overhead
- Single-entry eviction at capacity instead of 50% bulk clearing
- Add comprehensive unit tests and benchmarks for LRUCache
- Benchmarks show ~32-34 ns/op with 0 allocations for Get/Put

Files modified:
- pkg/database/lrucache.go: New generic LRU cache implementation
- pkg/database/lrucache_test.go: Unit tests and benchmarks
- pkg/database/serial_cache.go: Refactored to use LRUCache

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.17
2025-12-25 06:25:21 +01:00
eddd05eabf Add memory optimization improvements for reduced GC pressure (v0.36.16)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add buffer pool (pkg/database/bufpool) with SmallPool (64B) and MediumPool (1KB)
  for reusing bytes.Buffer instances on hot paths
- Fix escape analysis in index types (uint40, letter, word) by using fixed-size
  arrays instead of make() calls that escape to heap
- Add handler concurrency limiter (ORLY_MAX_HANDLERS_PER_CONN, default 100) to
  prevent unbounded goroutine growth under WebSocket load
- Add pre-allocation hints to Uint40s.Union/Intersection/Difference methods
- Update compact_event.go, save-event.go, serial_cache.go, and
  get-indexes-for-event.go to use pooled buffers

Files modified:
- app/config/config.go: Add MaxHandlersPerConnection config
- app/handle-websocket.go: Initialize handler semaphore
- app/listener.go: Add semaphore acquire/release in messageProcessor
- pkg/database/bufpool/pool.go: New buffer pool package
- pkg/database/compact_event.go: Use buffer pool, fix escape analysis
- pkg/database/get-indexes-for-event.go: Reuse single buffer for all indexes
- pkg/database/indexes/types/letter.go: Fixed array in UnmarshalRead
- pkg/database/indexes/types/uint40.go: Fixed arrays, pre-allocation hints
- pkg/database/indexes/types/word.go: Fixed array in UnmarshalRead
- pkg/database/save-event.go: Use buffer pool for key encoding
- pkg/database/serial_cache.go: Use buffer pool for lookups

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.16
2025-12-25 06:03:53 +01:00
24383ef1f4 Decompose handle-event.go into DDD domain services (v0.36.15)
Some checks failed
Go / build-and-release (push) Has been cancelled
Major refactoring of event handling into clean, testable domain services:

- Add pkg/event/validation: JSON hex validation, signature verification,
  timestamp bounds, NIP-70 protected tag validation
- Add pkg/event/authorization: Policy and ACL authorization decisions,
  auth challenge handling, access level determination
- Add pkg/event/routing: Event router registry with ephemeral and delete
  handlers, kind-based dispatch
- Add pkg/event/processing: Event persistence, delivery to subscribers,
  and post-save hooks (ACL reconfig, sync, relay groups)
- Reduce handle-event.go from 783 to 296 lines (62% reduction)
- Add comprehensive unit tests for all new domain services
- Refactor database tests to use shared TestMain setup
- Fix blossom URL test expectations (missing "/" separator)
- Add go-memory-optimization skill and analysis documentation
- Update DDD_ANALYSIS.md to reflect completed decomposition

Files modified:
- app/handle-event.go: Slim orchestrator using domain services
- app/server.go: Service initialization and interface wrappers
- app/handle-event-types.go: Shared types (OkHelper, result types)
- pkg/event/validation/*: New validation service package
- pkg/event/authorization/*: New authorization service package
- pkg/event/routing/*: New routing service package
- pkg/event/processing/*: New processing service package
- pkg/database/*_test.go: Refactored to shared TestMain
- pkg/blossom/http_test.go: Fixed URL format expectations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.15
2025-12-25 05:30:07 +01:00
3e0a94a053 Use Gitea API directly for release creation (v0.36.14)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Replace tea CLI with direct Gitea API calls
- Add release ID extraction and validation
- Upload assets via API with proper error handling
- Add release verification step

Files modified:
- .gitea/workflows/go.yml: Direct API release creation
- pkg/version/version: Bump to v0.36.14

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.14
2025-12-24 14:32:26 +01:00
b61cb114a2 Add error handling to all workflow steps (v0.36.13)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add set -e to all steps to fail fast on errors
- Add debug output for environment variables in checkout step
- Log more context to help diagnose CI failures

Files modified:
- .gitea/workflows/go.yml: Comprehensive error handling
- pkg/version/version: Bump to v0.36.13

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.13
2025-12-24 14:28:16 +01:00
8b280b5574 Fix release workflow error handling
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add set -e to exit on any error
- Validate GITEA_TOKEN secret is set before proceeding
- Verify release binaries exist before upload attempt
- Remove error-suppressing || echo patterns
- Add login verification step

Files modified:
- .gitea/workflows/go.yml: Proper error handling for release creation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.12
2025-12-24 14:23:04 +01:00
c9a03db395 Fix Blossom CORS headers and add root-level upload routes (v0.36.12)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add proper CORS headers for Blossom endpoints including X-SHA-256,
  X-Content-Length, X-Content-Type headers required by blossom-client-sdk
- Add root-level Blossom routes (/upload, /media, /mirror, /report, /list/)
  for clients like Jumble that expect Blossom at root
- Export BaseURLKey from pkg/blossom for use by app handlers
- Make blossomRootHandler return URLs with /blossom prefix so blob
  downloads work via the registered /blossom/ route
- Remove Access-Control-Allow-Credentials header (not needed for * origin)
- Add Access-Control-Expose-Headers for X-Reason and other response headers

Files modified:
- app/blossom.go: Add blossomRootHandler, use exported BaseURLKey
- app/server.go: Add CORS handling for blossom paths, register root routes
- pkg/blossom/server.go: Fix CORS headers, export BaseURLKey
- pkg/blossom/utils.go: Minor formatting
- pkg/version/version: Bump to v0.36.12

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 11:32:52 +01:00
f326ff0307 Bump version to v0.36.11
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add fixed-size cryptographic types (EventID, Pubkey, Signature)
- Add EventRef type for stack-allocated event references
- Add IDFixed(), PubFixed(), IDHex(), PubHex() methods to IdPkTs
- Update nostr library to v1.0.11

Files modified:
- pkg/version/version: v0.36.10 -> v0.36.11

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.11
2025-12-23 14:49:47 +01:00
06063750e7 Add fixed-size type support for IdPkTs and EventRef
- Update nostr dependency to v1.0.11 with new types package
- Add IDFixed(), PubFixed(), IDHex(), PubHex() methods to IdPkTs
- Add EventRef type: 80-byte stack-allocated event reference
- Add ToEventRef()/ToIdPkTs() conversion methods
- Update tests to use IDHex() instead of hex.Enc(r.Id)

EventRef provides:
- Copy-on-assignment semantics (arrays vs slices)
- Zero heap allocations for event reference passing
- Type-safe fixed-size fields (EventID, Pubkey)

Files modified:
- go.mod, go.sum: Update nostr to v1.0.11
- pkg/interfaces/store/store_interface.go: Add methods and EventRef type
- pkg/interfaces/store/store_interface_test.go: New test file
- pkg/database/binary_tag_filter_test.go: Use IDHex()
- pkg/neo4j/fetch-event_test.go: Use IDHex(), PubHex()

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 14:47:50 +01:00
0addc61549 Add unicode normalization for word indexing (v0.36.10)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add unicode_normalize.go with mappings for small caps and fraktur
- Map 77 decorative unicode characters to ASCII equivalents:
  - Small caps (25 chars): ᴅᴇᴀᴛʜ → death
  - Fraktur lowercase (26 chars): 𝔡𝔢𝔞𝔱𝔥 → death
  - Fraktur uppercase (26 chars): 𝔇𝔈𝔄𝔗ℌ → death
- Fix broken utf8DecodeRuneInString() that failed on multi-byte UTF-8
- Add migration v7 to rebuild word indexes with normalization
- Add comprehensive unit tests for all character mappings

Files modified:
- pkg/database/unicode_normalize.go: New - character mapping tables
- pkg/database/unicode_normalize_test.go: New - unit tests
- pkg/database/tokenize.go: Integrate normalizeRune(), fix UTF-8 decoder
- pkg/database/migrations.go: Add version 7 migration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.10
2025-12-22 18:53:30 +01:00
11d1b6bfd1 Fix fetch-kinds script for Node.js compatibility (v0.36.9)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Replace import.meta.dirname with fileURLToPath/dirname for Node < 20.11
- Use static imports instead of dynamic imports for fs/path

Files modified:
- app/web/scripts/fetch-kinds.js: Node.js compatibility fix
- pkg/version/version: v0.36.8 -> v0.36.9

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.9
2025-12-21 05:17:48 +01:00
636b55e70b Clean up local Claude Code settings (v0.36.8)
Some checks failed
Go / build-and-release (push) Has been cancelled
- Remove redundant permission entries from .claude/settings.local.json
- Bump version to v0.36.8

Files modified:
- .claude/settings.local.json: Cleanup old permissions
- pkg/version/version: v0.36.7 -> v0.36.8

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.36.8
2025-12-21 05:13:56 +01:00