a digital person for bluesky

Update bsky.py to use new reply tool with required parameters

- Change tool name from bluesky_reply to reply_to_bluesky_post
- Extract CID from notification data
- Update prompt to provide required URI and CID parameters
- Fix parameter extraction to use 'text' instead of 'message'

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

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

+8 -3
+8 -3
bsky.py
··· 91 91 # Handle both dict and object inputs for backwards compatibility 92 92 if isinstance(notification_data, dict): 93 93 uri = notification_data['uri'] 94 + cid = notification_data['cid'] 94 95 mention_text = notification_data.get('record', {}).get('text', '') 95 96 author_handle = notification_data['author']['handle'] 96 97 author_name = notification_data['author'].get('display_name') or author_handle 97 98 else: 98 99 # Legacy object access 99 100 uri = notification_data.uri 101 + cid = notification_data.cid 100 102 mention_text = notification_data.record.text if hasattr(notification_data.record, 'text') else "" 101 103 author_handle = notification_data.author.handle 102 104 author_name = notification_data.author.display_name or author_handle ··· 137 139 138 140 The YAML above shows the complete conversation thread. The most recent post is the one mentioned above that you should respond to, but use the full thread context to understand the conversation flow. 139 141 140 - Use the bluesky_reply tool to send a response less than 300 characters.""" 142 + Use the reply_to_bluesky_post tool to send a response less than 300 characters. The required parameters are: 143 + - text: Your reply message (max 300 chars) 144 + - reply_to_uri: {uri} 145 + - reply_to_cid: {cid}""" 141 146 142 147 # Get response from Letta agent 143 148 logger.info(f"Generating reply for mention from @{author_handle}") ··· 177 182 178 183 # Check if this is a ToolCallMessage with bluesky_reply tool 179 184 if hasattr(message, 'tool_call') and message.tool_call: 180 - if message.tool_call.name == 'bluesky_reply': 185 + if message.tool_call.name == 'reply_to_bluesky_post': 181 186 # Parse the JSON arguments to get the message 182 187 try: 183 188 args = json.loads(message.tool_call.arguments) 184 - reply_text = args.get('message', '') 189 + reply_text = args.get('text', '') 185 190 logger.info(f"Extracted reply from tool call: {reply_text[:50]}...") 186 191 break 187 192 except json.JSONDecodeError as e: