a digital person for bluesky

Refactor user block argument classes for consistency

- Renamed AttachUserBlockArgs and DetachUserBlockArgs to AttachUserBlocksArgs and DetachUserBlocksArgs for uniformity.
- Updated corresponding tool classes to reflect the new naming conventions.

This change enhances clarity and maintains consistency across the codebase.

+9 -9
+3 -3
tools/__init__.py
··· 12 from .search import SearchArgs 13 from .post import PostArgs 14 from .feed import FeedArgs 15 - from .blocks import AttachUserBlockArgs, DetachUserBlockArgs, UpdateUserBlockArgs 16 17 __all__ = [ 18 # Functions ··· 26 "SearchArgs", 27 "PostArgs", 28 "FeedArgs", 29 - "AttachUserBlockArgs", 30 - "DetachUserBlockArgs", 31 "UpdateUserBlockArgs", 32 ]
··· 12 from .search import SearchArgs 13 from .post import PostArgs 14 from .feed import FeedArgs 15 + from .blocks import AttachUserBlocksArgs, DetachUserBlocksArgs, UpdateUserBlockArgs 16 17 __all__ = [ 18 # Functions ··· 26 "SearchArgs", 27 "PostArgs", 28 "FeedArgs", 29 + "AttachUserBlocksArgs", 30 + "DetachUserBlocksArgs", 31 "UpdateUserBlockArgs", 32 ]
+6 -6
tools/blocks.py
··· 9 logger = logging.getLogger(__name__) 10 11 12 - class AttachUserBlockArgs(BaseModel): 13 handles: List[str] = Field(..., description="List of user Bluesky handles (e.g., ['user1.bsky.social', 'user2.bsky.social'])") 14 15 16 - class AttachUserBlockTool(BaseTool): 17 name: str = "attach_user_blocks" 18 - args_schema: Type[BaseModel] = AttachUserBlockArgs 19 description: str = "Attach user-specific memory blocks to the agent. Creates blocks if they don't exist." 20 tags: List[str] = ["memory", "blocks", "user"] 21 ··· 77 raise e 78 79 80 - class DetachUserBlockArgs(BaseModel): 81 handles: List[str] = Field(..., description="List of user Bluesky handles (e.g., ['user1.bsky.social', 'user2.bsky.social'])") 82 83 84 - class DetachUserBlockTool(BaseTool): 85 name: str = "detach_user_blocks" 86 - args_schema: Type[BaseModel] = DetachUserBlockArgs 87 description: str = "Detach user-specific memory blocks from the agent. Blocks are preserved for later use." 88 tags: List[str] = ["memory", "blocks", "user"] 89
··· 9 logger = logging.getLogger(__name__) 10 11 12 + class AttachUserBlocksArgs(BaseModel): 13 handles: List[str] = Field(..., description="List of user Bluesky handles (e.g., ['user1.bsky.social', 'user2.bsky.social'])") 14 15 16 + class AttachUserBlocksTool(BaseTool): 17 name: str = "attach_user_blocks" 18 + args_schema: Type[BaseModel] = AttachUserBlocksArgs 19 description: str = "Attach user-specific memory blocks to the agent. Creates blocks if they don't exist." 20 tags: List[str] = ["memory", "blocks", "user"] 21 ··· 77 raise e 78 79 80 + class DetachUserBlocksArgs(BaseModel): 81 handles: List[str] = Field(..., description="List of user Bluesky handles (e.g., ['user1.bsky.social', 'user2.bsky.social'])") 82 83 84 + class DetachUserBlocksTool(BaseTool): 85 name: str = "detach_user_blocks" 86 + args_schema: Type[BaseModel] = DetachUserBlocksArgs 87 description: str = "Detach user-specific memory blocks from the agent. Blocks are preserved for later use." 88 tags: List[str] = ["memory", "blocks", "user"] 89