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.
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.
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.
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.
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).
- 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.
- 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.
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).
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>
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>
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>
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>