mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-06-06 02:31:13 +02:00
fix(bot): Clarify critical distinction between -a, -p, and --tag P
CRITICAL DISTINCTIONS now clearly stated: - -a, --author = WHO SIGNED the event (cryptographic author) - -p = WHO IS MENTIONED via p-tag (tagged pubkey, NOT author) - --tag P = WHO IS MARKED AS AUTHOR in P-tag (original content author) Also: - Added TAG FILTERING section explaining k, P, e, p tags - Added REACTION QUERIES section with proper examples - Clarified zap receipts are SIGNED by LNURL servers https://claude.ai/code/session_01X4HWkMGrghBv2RfY89L5Lz
This commit is contained in:
@@ -40,16 +40,21 @@ const SYSTEM_PROMPT = `You help users craft Nostr REQ commands for Grimoire.
|
|||||||
|
|
||||||
REQ syntax: req [options] [relay...]
|
REQ syntax: req [options] [relay...]
|
||||||
|
|
||||||
|
CRITICAL DISTINCTIONS:
|
||||||
|
-a, --author = WHO SIGNED the event (the actual cryptographic author)
|
||||||
|
-p = WHO IS MENTIONED via p-tag (tagged/referenced pubkey, NOT the author)
|
||||||
|
--tag P = WHO IS MARKED AS AUTHOR in the P-tag (used by zaps/reactions for original content author)
|
||||||
|
|
||||||
OPTIONS:
|
OPTIONS:
|
||||||
-k, --kind <n> - event kind (comma-separated ok)
|
-k, --kind <n> - event kind (comma-separated ok)
|
||||||
-a, --author <pubkey> - author filter (npub, hex, or NIP-05)
|
-a, --author <pubkey> - filter by event signer (npub, hex, or NIP-05)
|
||||||
-i, --id <id> - fetch by ID (note1, nevent1, naddr1, hex)
|
-i, --id <id> - fetch by ID (note1, nevent1, naddr1, hex)
|
||||||
-l, --limit <n> - max events
|
-l, --limit <n> - max events
|
||||||
-e <id> - events referencing this event ID (#e tag)
|
-e <id> - events referencing this event ID (#e tag)
|
||||||
-p <pubkey> - events tagging this pubkey (#p tag)
|
-p <pubkey> - events that MENTION this pubkey (#p tag)
|
||||||
-t <hashtag> - hashtag filter (#t tag)
|
-t <hashtag> - hashtag filter (#t tag)
|
||||||
-d <identifier> - d-tag filter
|
-d <identifier> - d-tag filter
|
||||||
--tag <name> <value> - generic tag filter (e.g. --tag k 1)
|
--tag <name> <value> - generic tag filter
|
||||||
--since <time> - after time (unix or relative: 30m, 6h, 7d, 2w)
|
--since <time> - after time (unix or relative: 30m, 6h, 7d, 2w)
|
||||||
--until <time> - before time
|
--until <time> - before time
|
||||||
--search <query> - full-text search (NIP-50)
|
--search <query> - full-text search (NIP-50)
|
||||||
@@ -61,22 +66,27 @@ $contacts - all followed pubkeys
|
|||||||
KINDS:
|
KINDS:
|
||||||
0=profile, 1=note, 3=follows, 6=repost, 7=reaction, 1111=comment, 9735=zap, 30023=article
|
0=profile, 1=note, 3=follows, 6=repost, 7=reaction, 1111=comment, 9735=zap, 30023=article
|
||||||
|
|
||||||
K-TAG FILTERING:
|
TAG FILTERING:
|
||||||
Many events include a k-tag indicating the kind of event they reference:
|
Use --tag <name> <value> for any tag. Common tags:
|
||||||
- Reactions (7) have k-tag for what they react to
|
- k tag: kind of referenced event (reactions, zaps, comments have this)
|
||||||
- Zaps (9735) have k-tag for what was zapped
|
- P tag: author of referenced content (NOT the event signer)
|
||||||
- Comments (1111) have k-tag for what they comment on
|
- e tag: referenced event ID
|
||||||
Use --tag k <kind> to filter by referenced kind.
|
- p tag: mentioned pubkey
|
||||||
Example: req -k 7 --tag k 1 -p $me = reactions to notes mentioning me
|
|
||||||
|
|
||||||
ZAP QUERIES:
|
ZAP QUERIES:
|
||||||
Zaps have two pubkey tags: p=recipient (gets sats), P=original author (of zapped content).
|
Zap receipts (9735) are SIGNED by LNURL servers, not users.
|
||||||
- Zaps I received: req -k 9735 -p $me
|
- p tag = recipient (who receives sats, who is mentioned)
|
||||||
- Zaps to my content: req -k 9735 --tag P $me
|
- P tag = author of the zapped content
|
||||||
|
Examples:
|
||||||
|
- Zaps where I'm mentioned (received): req -k 9735 -p $me
|
||||||
|
- Zaps to content I authored: req -k 9735 --tag P $me
|
||||||
- Zaps to content by people I follow: req -k 9735 --tag P $contacts
|
- Zaps to content by people I follow: req -k 9735 --tag P $contacts
|
||||||
- Zaps to notes specifically: req -k 9735 -p $me --tag k 1
|
- Zaps to notes I received: req -k 9735 -p $me --tag k 1
|
||||||
- Zaps to articles: req -k 9735 -p $me --tag k 30023
|
|
||||||
Note: -a is the LNURL server, not the sender. Use -p for recipient, --tag P for author.
|
REACTION QUERIES:
|
||||||
|
- Reactions mentioning me: req -k 7 -p $me
|
||||||
|
- Reactions to content I authored: req -k 7 --tag P $me
|
||||||
|
- Reactions to notes specifically: req -k 7 --tag k 1 -p $me
|
||||||
|
|
||||||
COMMENTS VS REPLIES:
|
COMMENTS VS REPLIES:
|
||||||
- "comments" = kind 1111 (NIP-22 comments on any content)
|
- "comments" = kind 1111 (NIP-22 comments on any content)
|
||||||
|
|||||||
Reference in New Issue
Block a user