From 3a1ffd36887ac10cefda60a7a9590f64299cbf5d Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 05:20:43 +0000 Subject: [PATCH] chore(ai): event schema validation tool + fixes - Added `scripts/agent/validate-events.mjs` to validate event builders. - Added `GENERIC_REPOST` (kind 16) to `js/nostrEventSchemas.js` and `docs/nostr-event-schemas.md`. - Updated `buildRepostEvent` to validate against `GENERIC_REPOST` when producing kind 16 events. --- docs/nostr-event-schemas.md | 1 + js/nostrEventSchemas.js | 13 +- scripts/agent/validate-events.mjs | 479 ++++++++++++------------------ 3 files changed, 203 insertions(+), 290 deletions(-) diff --git a/docs/nostr-event-schemas.md b/docs/nostr-event-schemas.md index 9b9b20c4..cd521229 100644 --- a/docs/nostr-event-schemas.md +++ b/docs/nostr-event-schemas.md @@ -148,6 +148,7 @@ import { updateWatchHistoryListWithDefaultClient } from "./nostrWatchHistoryFaca | Video post (`NOTE_TYPES.VIDEO_POST`) | `30078` | `['t','video']`, `['d', ]` plus optional schema append tags | JSON payload using Content Schema v3 (`version`, `title`, optional `url`, `magnet`, `thumbnail`, `description`, `mode`, `videoRootId`, `deleted`, `isPrivate`, `isNsfw`, `isForKids`, `enableComments`, `ws`, `xs`) | | NIP-94 mirror (`NOTE_TYPES.VIDEO_MIRROR`) | `1063` | Tags forwarded from `publishVideo` (URL, mime type, thumbnail, alt text, magnet) | Plain text alt description | | Repost (`NOTE_TYPES.REPOST`) | `6` | `['e', , ]` with optional address pointer `['a', , ]`, and `['p', ]` when the origin author is known; inherits schema append tags | JSON-serialized event being reposted (or empty if unavailable) | +| Generic Repost (`NOTE_TYPES.GENERIC_REPOST`) | `16` | Same as Repost; specific for non-text kinds (e.g. videos). | Same as Repost. | | Share note (`NOTE_TYPES.SHARE`) | `1` | `['e',