Commit Graph

7 Commits

Author SHA1 Message Date
Claude
ad6566d2a5 feat(bot): Add NIP-42 AUTH and NIP-29 join request support
- Handle AUTH challenges from group relay using onauth callback
- Send kind 9021 join request when connecting to group
- Use direct Relay connection instead of SimplePool for group relay
- Properly close relay connection on shutdown

https://claude.ai/code/session_01X4HWkMGrghBv2RfY89L5Lz
2026-02-03 12:48:42 +00:00
Claude
4da0de89a0 feat(bot): Simplify system prompt for concise plain-text responses
- Remove markdown formatting instructions
- Remove relay recommendations
- Remove follow-up question suggestions
- Remove non-existent @kind syntax reference
- Focus on short, direct answers with just the command and explanation
- Plain text output suitable for posting directly to group chat

https://claude.ai/code/session_01X4HWkMGrghBv2RfY89L5Lz
2026-02-03 12:44:57 +00:00
Claude
749dfc6233 feat(bot): Enhance system prompt with comprehensive REQ documentation
- Reorganize filter flags into logical sections (event selection, tags, time, display)
- Add filter limitations section explaining what REQ cannot do
- Add common query patterns with practical examples
- Include NIP-05 resolution alias (@nip05)
- Add guidance on when to use the lookup tools
- Better structure for response guidelines

https://claude.ai/code/session_01X4HWkMGrghBv2RfY89L5Lz
2026-02-03 12:39:30 +00:00
Claude
0584d669b8 feat(bot): Add test-assistant script for testing LLM in isolation
Adds npm run assistant "question" command to test the LLM processing
without needing the Nostr connection.

Also:
- Add proper API key validation with clear error message
- Add debug logging (DEBUG=1) for troubleshooting

Usage:
  export ANTHROPIC_API_KEY=sk-ant-...
  npm run assistant "how do I see what my contacts are zapping"

https://claude.ai/code/session_01X4HWkMGrghBv2RfY89L5Lz
2026-02-03 12:33:19 +00:00
Claude
5e806d08e8 feat(bot): Publish profile to discovery relays on startup
Bot now publishes a kind 0 profile event with name "sancho" and about
"a grimoire assistant" to discovery relays when starting up.

Discovery relays:
- relay.damus.io
- nos.lol
- relay.nostr.band
- purplepag.es
- The group relay

https://claude.ai/code/session_01X4HWkMGrghBv2RfY89L5Lz
2026-02-03 12:29:52 +00:00
Claude
5d5d7e3cb6 chore(bot): Add package-lock.json
https://claude.ai/code/session_01X4HWkMGrghBv2RfY89L5Lz
2026-02-03 12:27:02 +00:00
Claude
93d9157b40 feat(bot): Add Grimoire REQ Assistant bot
Adds a Nostr bot that listens for mentions in NIP-29 group chats and
helps users craft REQ queries for the Nostr protocol.

Features:
- Listens for @mentions in groups.0xchat.com'NkeVhXuWHGKKJCpn
- Uses Claude (via pi-ai SDK) to understand user questions
- Provides REQ command suggestions with explanations
- Tools to look up event kinds, NIPs, and their relationships

Stack: TypeScript, nostr-tools, @mariozechner/pi-ai

https://claude.ai/code/session_01X4HWkMGrghBv2RfY89L5Lz
2026-02-03 12:26:21 +00:00