a digital person for bluesky

Use Literal type for feed names instead of enum

- Replace enum class with inline Literal type annotation
- Simplifies code since enum class won't exist in sandboxed tool
- Provides same validation with cleaner implementation

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

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

Changed files
+3 -6
tools
+3 -6
tools/feed.py
··· 1 1 """Feed tool for retrieving Bluesky feeds.""" 2 2 from pydantic import BaseModel, Field 3 - from typing import Optional, Union 3 + from typing import Optional, Literal 4 4 5 5 6 6 class FeedArgs(BaseModel): 7 - feed_name: Optional[str] = Field(None, description="Named feed preset: ['home', 'discover', 'ai-for-grownups', 'atmosphere']. If not provided, returns home timeline") 7 + feed_name: Optional[Literal["home", "discover", "ai-for-grownups", "atmosphere"]] = Field(None, description="Named feed preset. If not provided, returns home timeline") 8 8 feed_uri: Optional[str] = Field(None, description="Custom feed URI (e.g., 'at://did:plc:abc/app.bsky.feed.generator/feed-name'). Overrides feed_name if provided") 9 9 max_posts: int = Field(default=25, description="Maximum number of posts to retrieve (max 100)") 10 10 ··· 44 44 feed_display_name = feed_uri.split('/')[-1] if '/' in feed_uri else feed_uri 45 45 elif feed_name: 46 46 # Look up named preset 47 - if feed_name not in feed_presets: 48 - available_feeds = list(feed_presets.keys()) 49 - raise Exception(f"Unknown feed name '{feed_name}'. Available feeds: {available_feeds}") 50 - resolved_feed_uri = feed_presets[feed_name] 47 + resolved_feed_uri = feed_presets.get(feed_name) 51 48 feed_display_name = feed_name 52 49 else: 53 50 # Default to home timeline