feat(calendar): NIP-52 semantics, educational attributes, calendars/RSVPs, author info, hidden sources #1
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/calendar-nip52-semantics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
search_calendar_eventsaligned with NIP-52 and the updated edufeed calendar wiki / edufeed-app v0.14.Semantics the model no longer has to know:
effectiveEnd(NIP-52 end rules, same as the relay index),allDay,lastDay,endTzidinheritance,days(Dtags), explicit inclusive/strict bounds on the time-range parameters.Educational attributes (
registrationRequired,price/free,attendanceMode,educationalLevelwith labels),namedParticipants,communities,calendarRefs— read with exactly the rules of edufeed-app'scalendar-attributes.js(first valid tag wins, plain-decimal price grammar, attendance mode by last path segment, concept label de → en → first → URI tail). New filtersfree,registrationRequired,attendanceMode,educationalLevel,references(#a),participants(#p); these need the relay branch for the facets.All four kinds: 31924 calendars (
calendars) and 31925 RSVPs (rsvps, invalid status ignored,fbdropped when declined,amust reference an event) instead of being silently dropped;kindsrestricted to NIP-52 kinds;limitcaps the whole result;totalcounts all items.Authors and hidden sources: every event carries
author {pubkey, name, bot}from the relay's kind-0 index (cached, short negative TTL);CALENDAR_HIDDEN_PUBKEYS(same entry forms as the app) hides bulk mirrors by default,includeHiddenSources: truereturns them, the response reports the count. Abotflag alone hides nothing.Bug fixed: the client re-applied
#glocally as an exact match while the relay answers it as a prefix, so geohash queries discarded nearly every result.Depends on nope-relay
feat/calendar-nip52-end-and-attributesfor the attribute/reference facets; works against today's relay otherwise.🤖 Generated with Claude Code
search_calendar_events returned raw `start`/`end` tags and nothing else, so a model had to know NIP-52 to read them: `end` is exclusive and omitted for one-day and instantaneous events, a legacy `end == start` is a one-day event, `end_tzid` inherits `start_tzid`. Every event now carries `effectiveEnd` (Unix seconds when it is over, the same rule nope-relay indexes), `allDay` and, for 31922, the inclusive `lastDay`; the tool description spells the rules out. The NIP-52-Edufeed attributes from the "Calendar events in edufeed" wiki article are read with its rules (first tag wins, literal true/false, numeric price with decimal comma, tolerant attendance-mode URIs, concept triples with German labels) into `attributes`, plus `namedParticipants` (`participant` tags) and `communities` (`h` tags). New filter parameters `free`, `registrationRequired`, `attendanceMode` and `educationalLevel` map to the relay's calendar facets (#price, #registrationRequired, #eventAttendanceMode, #educationalLevel:id); an untagged event matches none of them, since absence is "no statement". Every event gets `author` {pubkey, name, bot} from the calendar relay's kind-0 index, cached per author (misses included) for 10 minutes, so a model can tell an event mirror from an organisation. On the production relay 226 of the 250 newest calendar events come from the Bildungsserver mirror; CALENDAR_HIDDEN_PUBKEYS (hex, npub or kind-30000 naddr entries, as in edufeed-app) hides such bulk sources by default — results are over-fetched to the relay page size and cut back to `limit` — and `includeHiddenSources: true` brings them back. The response reports `hiddenSources: {hidden, included, note}`. A `bot` flag alone hides nothing: which sources flood a calendar is the operator's call. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>