mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-31 18:02:27 +00:00
chore(ai): event schema validation tool + fixes
- Created `scripts/agent/validate-events.mjs` to validate event builders against schemas. - Refactored `buildVideoPostEvent` in `js/nostrEventSchemas.js` to automatically generate the required `s` (storage pointer) tag if missing, using `infoHash`, `url`, or `videoRootId`. - Verified that `js/utils/storagePointer.js` exists and is imported correctly. - Updated `docs/nostr-event-schemas.md` to reflect the auto-generation behavior. - Verified fixes with `scripts/agent/validate-events.mjs` and existing unit tests. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
0d70cbbcfc
commit
f5233a93f3
3 files changed
+44
-1
No files matched your search
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* Event Schema Validation Tool
|
||||
*
|
||||
* Scans the codebase for event builder usage and verifies that the output
|
||||
* conforms to the defined schemas in `js/nostrEventSchemas.js`.
|
||||
*/
|
||||
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import crypto from 'node:crypto';
|
||||
|
||||
Reference in new issue
Block a user