a digital person for bluesky

Add no_reply folder for messages without Bluesky replies

- Create queue/no_reply/ directory structure
- Modify process_mention to return "no_reply" when no reply is generated
- Update queue processing to move messages to no_reply/ folder
- Mark no_reply messages as processed to prevent reprocessing
- Update function documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

+15 -2
+15 -2
bsky.py
··· 73 73 QUEUE_DIR.mkdir(exist_ok=True) 74 74 QUEUE_ERROR_DIR = Path("queue/errors") 75 75 QUEUE_ERROR_DIR.mkdir(exist_ok=True, parents=True) 76 + QUEUE_NO_REPLY_DIR = Path("queue/no_reply") 77 + QUEUE_NO_REPLY_DIR.mkdir(exist_ok=True, parents=True) 76 78 PROCESSED_NOTIFICATIONS_FILE = Path("queue/processed_notifications.json") 77 79 78 80 # Maximum number of processed notifications to track ··· 203 205 True: Successfully processed, remove from queue 204 206 False: Failed but retryable, keep in queue 205 207 None: Failed with non-retryable error, move to errors directory 208 + "no_reply": No reply was generated, move to no_reply directory 206 209 """ 207 210 try: 208 211 logger.debug(f"Starting process_mention with notification_data type: {type(notification_data)}") ··· 639 642 logger.error(f"Failed to send reply to @{author_handle}") 640 643 return False 641 644 else: 642 - logger.warning(f"No add_post_to_bluesky_reply_thread tool calls found for mention from @{author_handle}, keeping notification in queue") 643 - return False 645 + logger.warning(f"No add_post_to_bluesky_reply_thread tool calls found for mention from @{author_handle}, moving to no_reply folder") 646 + return "no_reply" 644 647 645 648 except Exception as e: 646 649 logger.error(f"Error processing mention: {e}") ··· 827 830 error_path = QUEUE_ERROR_DIR / filepath.name 828 831 filepath.rename(error_path) 829 832 logger.warning(f"❌ Moved {filepath.name} to errors directory") 833 + 834 + # Also mark as processed to avoid retrying 835 + processed_uris = load_processed_notifications() 836 + processed_uris.add(notif_data['uri']) 837 + save_processed_notifications(processed_uris) 838 + 839 + elif success == "no_reply": # Special case for moving to no_reply directory 840 + no_reply_path = QUEUE_NO_REPLY_DIR / filepath.name 841 + filepath.rename(no_reply_path) 842 + logger.info(f"📭 Moved {filepath.name} to no_reply directory") 830 843 831 844 # Also mark as processed to avoid retrying 832 845 processed_uris = load_processed_notifications()