File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import platform
88from datetime import UTC , datetime , timedelta
99from pathlib import Path
10- from typing import TYPE_CHECKING
10+ from typing import TYPE_CHECKING , Any
1111from uuid import uuid4
1212
1313from hive .tools .base import Toolkit , tool
@@ -83,12 +83,14 @@ def instructions(self) -> str:
8383 "Specify hours, minutes, and/or seconds from now."
8484 )
8585
86- async def query_pending_alarms (self ) -> list [dict [str , str ]]:
86+ async def query_pending_alarms (self ) -> list [dict [str , Any ]]:
8787 """Query pending alarms for the bound agent. For host application use."""
88+ if not self ._agent_id :
89+ raise RuntimeError ("AlarmToolkit is not bound to an agent yet." )
8890 await self ._ensure_init ()
8991 return await self ._store .list_pending_alarms (self ._agent_id )
9092
91- async def query_all_pending_alarms (self ) -> list [dict [str , str ]]:
93+ async def query_all_pending_alarms (self ) -> list [dict [str , Any ]]:
9294 """Query pending alarms across all agents. For host application use."""
9395 await self ._ensure_init ()
9496 import aiosqlite
Original file line number Diff line number Diff line change 33from __future__ import annotations
44
55from pathlib import Path
6- from typing import TYPE_CHECKING
6+ from typing import TYPE_CHECKING , Any
77from uuid import uuid4
88
99from hive .tools .base import Toolkit , tool
@@ -51,12 +51,14 @@ def instructions(self) -> str:
5151 "tasks, mark tasks as done, or delete them."
5252 )
5353
54- async def query_tasks (self , status : str = "pending" ) -> list [dict [str , str ]]:
54+ async def query_tasks (self , status : str = "pending" ) -> list [dict [str , Any ]]:
5555 """Query tasks for the bound agent. For host application use, not an agent tool."""
56+ if not self ._agent_id :
57+ raise RuntimeError ("TaskToolkit is not bound to an agent yet." )
5658 await self ._ensure_init ()
5759 return await self ._store .list_tasks (self ._agent_id , status )
5860
59- async def query_all_tasks (self , status : str = "pending" ) -> list [dict [str , str ]]:
61+ async def query_all_tasks (self , status : str = "pending" ) -> list [dict [str , Any ]]:
6062 """Query tasks across all agents. For host application use, not an agent tool."""
6163 await self ._ensure_init ()
6264 import aiosqlite
You can’t perform that action at this time.
0 commit comments