Commit graph

16 commits

Author SHA1 Message Date
SkateSpots
6efd6b8deb feat(relay): retire the legacy hosted relay from the app + servers
Verified the legacy relay held the same 115 events as the new one (0 diff) before removing it, so no data is lost. Drops wss://goskatespots.nostr1.com from the default pools, the DM/CVM/zap relay arrays, and the cvm-server + push-service defaults.
2026-10-12 13:06:02 +07:00
SkateSpots
6407310213 feat(relay): cut over community relay to self-hosted Newlay
Point SKATE_RELAY, the default relay pools, the DM/CVM/zap relay arrays, the cvm-server + push-service defaults, and the archive default at wss://relay.skate-spots.org, keeping the legacy hosted relay as a fallback during the client-update window. Restored 115/115 archived events; the relay runs behind Caddy with TLS. Docs + AGENTS.md updated.
2026-10-12 12:38:13 +07:00
SkateSpots
a8dc1b1ffb chore(relays): drop the dead wotr.relatr.xyz from default relay lists
Removed from App.tsx defaultConfig, NostrSync NEW_USER_RELAYS, NostrProvider
DEFAULT_RELAYS, TestApp, and the CVM DEPLOY.md example. It has been failing for
a while and just adds a dead socket + latency to every default relay set.

Existing accounts keep it in their stored config until they remove it in
Settings -> Relays (no migration applied). APK rebuilt (1.5.5 / 10505) so the
release matches.
2026-09-28 18:13:19 +07:00
SkateSpots
c487d9d1d2 chore(cvm): use only the community relay for data queries
Policy: the CVM server queries a single community relay
(wss://goskatespots.nostr1.com). Align .env.example (and the local .env) to it.
The local duplicate unit has been retired; the server runs on one host only.
2026-09-27 12:07:58 +07:00
SkateSpots
3a32dc2334 feat(cvm-server): load protection + type-check it in the gate
Load protection (public read-only endpoint — protects relays + this box):
- Per-pubkey sliding-window throttle and in-flight cap via inbound middleware.
  The transport can't return a JSON-RPC error, so over-budget callers are dropped
  and time out (logged).
- Global semaphore caps concurrent upstream relay queries.
- Short-TTL cache keyed by filter set, so repeated identical queries (e.g. a
  burst of get_community_stats) don't re-hit the relays.
- All tunable via CVM_RATE_* / CVM_MAX_* / CVM_QUERY_CACHE_MS (documented in
  .env.example); maps pruned by a janitor.

CI:
- cvm-server/tsconfig.json type-checks the standalone server; new
  typecheck:cvm / check:cvm scripts, with typecheck:cvm wired into npm test so
  the server can't rot unnoticed (it was excluded from tsc + eslint).
2026-09-27 11:36:20 +07:00
SkateSpots
b24c734a4d feat(cvm-server): parity with the app — all Lab roles + crews/shops/tours
- find_coaches now covers every Lab kind (35001-35014, minus 35006 crews), with
  a real role enum and label map, and matches skills against t/skill tags.
- New tools: find_crews (35006), find_shops (30017/t=skateshop), find_tours
  (30823).
- get_community_stats widened to every craft + shops/crews/tours, with lab_total.
2026-09-27 11:12:14 +07:00
SkateSpots
2bc903d128 feat(cvm-server): heartbeat re-announce, wire LOG_LEVEL, fix from_date
- Heartbeat: re-publish discovery announcements every CVM_HEARTBEAT_MS (15 min)
  via the SDK's announcement manager (defensively reached), so recency-based
  health checks stay green for a long-running process.
- LOG_LEVEL is now actually passed to the transport (was documented but unused).
- find_events: from_date was a no-op (filter(() => true)); now filters by the
  kind-31923 start tag.
- .env.example: fix CVM_RELAY (.org), drop the dead wotr relay, document
  CVM_HEARTBEAT_MS.
2026-09-27 10:32:07 +07:00
SkateSpots
4d00d0991b chore: untrack accidentally-committed local files (.gitignore)
git add -A from the repo root swept in assets/, resources/, bun.lock and
cvm-server locks/.bak. Untrack them + .gitignore; correct AGENTS.md junk list
(cvm-server *source* is tracked). No secrets were involved (only placeholders).
2026-09-26 23:39:48 +07:00
SkateSpots
020fc11163 feat(settings,map,docs): polish Relays UI, drop desktop Near Me, remove NoGood Radio
- Settings -> Relays: rewritten with sectioned cards (NIP-65 / DM inbox / Local /
  Blocked), inline clickable Read/Write chips (no more Edit popover), tone-coded
  sections with icons + counts + help text, cleaner add rows and empty state.
- Map: removed the desktop 'Near Me' button (mobile floating control remains).
- Removed NoGood Radio everywhere: deleted NOGOOD_RADIO_PROPOSAL.md and
  RADIO_PLAYER_GUIDE.md, dropped the README feature line, scrubbed 'DJ NoGood'
  examples from LIVE_MUSIC_PROPOSAL.md.

Gate: 101 tests, 0 errors/warnings, boot smoke green.
2026-09-26 23:37:32 +07:00
SkateSpots
2e4930af2c fix(cvm-server): add WebSocket polyfill from ws for non-Bun runtimes 2026-09-26 15:24:09 +07:00
shakespeare.diy
0b83749aa1 cvm-server: only serve signature-verified events to agents (audit F2)
queryNostr() previously returned every event the community data relays
sent back, unverified. A malicious or buggy relay could inject forged
coach profiles / listings that would flow straight into agents as
trusted ground truth. Now each event is signature-verified with
nostr-tools verifyEvent() before being returned; anything that fails
(or throws) is dropped. Mirrors the client-side onlyVerified discipline
already applied in the trust-score hooks.

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-09-24 19:36:24 +07:00
shakespeare.diy
d844e151bd Fix CVM relay URL: relay.contextvm.net → relay.contextvm.org
Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-06-18 11:13:51 +07:00
shakespeare.diy
c772330e74 fix: remove debug logging from queryNostr, keep clean production server
Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-06-17 12:02:09 +07:00
shakespeare.diy
4c263e729a fix: replace subscribeMany with querySync for nostr-tools v2 compatibility
The server was using the nostr-tools v1 API (subscribeMany with onevent/oneose
callbacks) but the installed version is v2.23.5 which changed the internal
subscription handling. querySync() is the correct v2 API for one-shot queries
and handles EOSE cleanly without needing manual timeout management.

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-06-17 11:43:51 +07:00
shakespeare.diy
84aa009b33 fix: CVM server tag mapping + add city/country geocoding to spots
CVM server fixes (cvm-server/server.ts):
- Use 'title' tag instead of 'name' to read spot names (app publishes 'title')
- Search now checks 'title' tag (not just 'name') for keyword matches
- City filter now also checks 'title' tag and event content
- Country filter also checks event content
- Features filter now checks 't' tags (app uses 't' not 'feature')
- Validate spots with 't: skatespot' tag (same rule as the app)
- Return 'location' field and proper features list in results
- Image parsing now supports both 'image' (legacy) and 'imeta' (NIP-92)

CreateSpotPage fix (src/pages/CreateSpotPage.tsx):
- Add reverse geocoding via Nominatim on spot submit
- Emit structured 'city' and 'country' tags so CVM can filter by them
- Auto-fill location field from geocoding if user left it blank

SasquatchGuide improvement (src/components/SasquatchGuide.tsx):
- Add data model notes to system prompt explaining tag structure
- Instruct AI to handle 0-result responses gracefully (encourage adding spots)
- Use limit:20+ for city/country searches

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-06-17 11:14:50 +07:00
shakespeare.diy
2db0c6f7e2 feat: add SkateSpots CVM server — MCP tools over Nostr
Adds cvm-server/ directory with complete ContextVM server implementation:

- server.ts: Full MCP server with 5 tools (find_spots, find_events,
  find_coaches, find_gear, get_community_stats) using @contextvm/sdk
- bootstrap.sh: One-command VPS setup script (Bun, PM2, firewall, keygen)
- skatespots-cvm.service: systemd unit for production deployment
- .env.example: Environment variable template
- DEPLOY.md: Step-by-step deploy guide for LNVPS VPS
- package.cvm.json: Dependencies manifest

The server aggregates data from goskatespots.nostr1.com and other relays,
deduplicates addressable events, and exposes structured JSON tools that
AI agents can discover and call via the ContextVM/Nostr protocol (CEP-6).

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-06-16 17:45:04 +07:00