fix: pass context to harnessed_execute_tool to propagate user_id
This commit is contained in:
parent
ecbb8a90e4
commit
e5f97123b8
@ -1305,10 +1305,10 @@ def get_harnessed_agent():
|
|||||||
|
|
||||||
# Exposed async functions for frontend integration
|
# Exposed async functions for frontend integration
|
||||||
# These functions expect the ahserver context to be passed automatically
|
# These functions expect the ahserver context to be passed automatically
|
||||||
async def harnessed_execute_tool(tool_name: str, parameters: Dict[str, Any]):
|
async def harnessed_execute_tool(tool_name: str, parameters: Dict[str, Any], context: Dict[str, Any] = None):
|
||||||
"""Execute a Hermes tool with current user context"""
|
"""Execute a Hermes tool with current user context"""
|
||||||
agent = get_harnessed_agent()
|
agent = get_harnessed_agent()
|
||||||
return await agent.execute_tool_call(tool_name, parameters)
|
return await agent.execute_tool_call(tool_name, parameters, context)
|
||||||
|
|
||||||
async def harnessed_manage_memory(action: str, target: str, content: str = "", old_text: str = "",
|
async def harnessed_manage_memory(action: str, target: str, content: str = "", old_text: str = "",
|
||||||
priority: Optional[int] = None):
|
priority: Optional[int] = None):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user