chore(ai): event schema validation tool + fixes

- Created `scripts/agent/validate-events.mjs` to verify event builders against schemas.
- Enhanced validation script with test cases for Relay List (object format), Hashtag Preferences (encrypted), and Video Post (additional tags).
- Updated `docs/nostr-event-schemas.md` to document the validation workflow.
- Verified runtime event construction by instrumenting tests with dev mode (reverted clean).

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-01-31 05:36:48 +00:00
1 parent 8c331f8c14
commit 05a3aa2b1f
2 files changed
+46 -3

No files matched your search

+3 -2
View File
@@ -348,5 +348,6 @@ npm run test:unit
```
When modifying schemas or builders, use `scripts/agent/validate-events.mjs` to
verify your changes locally. This tool also scans the codebase to ensure all
active event builders are covered by tests.
verify your changes locally. This tool validates that builders produce events
conforming to the defined schemas, covering standard and application-specific
usage patterns.