Commit graph

5 commits

Author SHA1 Message Date
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
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
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
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