neuro-simulator 0.4.2__py3-none-any.whl → 0.4.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -80,7 +80,7 @@ class ToolManager:
80
80
  def _load_allocations(self):
81
81
  """Loads tool allocations from JSON files, creating defaults if they don't exist."""
82
82
  default_allocations = {
83
- "neuro_agent": ["speak", "get_core_memory_blocks", "get_core_memory_block", "model_spin"],
83
+ "neuro_agent": ["speak", "get_core_memory_blocks", "get_core_memory_block", "model_spin", "model_zoom"],
84
84
  "memory_agent": ["add_temp_memory", "create_core_memory_block", "update_core_memory_block", "delete_core_memory_block", "add_to_core_memory_block", "remove_from_core_memory_block", "get_core_memory_blocks", "get_core_memory_block"]
85
85
  }
86
86
 
@@ -20,7 +20,7 @@ class ModelSpinTool(BaseTool):
20
20
 
21
21
  @property
22
22
  def description(self) -> str:
23
- return "Makes the avatar on the client side spin once counter-clockwise."
23
+ return "Makes model spin once, dont got too dizzy when spining lol."
24
24
 
25
25
  @property
26
26
  def parameters(self) -> List[Dict[str, Any]]:
@@ -38,4 +38,4 @@ class ModelSpinTool(BaseTool):
38
38
  return {"status": "success", "message": "Spin command sent."}
39
39
  except Exception as e:
40
40
  logger.error(f"Error in {self.name} tool: {e}", exc_info=True)
41
- return {"status": "error", "message": str(e)}
41
+ return {"status": "error", "message": str(e)}
@@ -0,0 +1,41 @@
1
+ # neuro_simulator/agent/tools/model_zoom.py
2
+ import logging
3
+ from typing import Dict, Any, List
4
+
5
+ from neuro_simulator.agent.tools.base import BaseTool
6
+ from neuro_simulator.services.stream import live_stream_manager
7
+
8
+ logger = logging.getLogger(__name__.replace("neuro_simulator", "server", 1))
9
+
10
+ class ModelZoomTool(BaseTool):
11
+ """A tool to make the client-side avatar zoom in."""
12
+
13
+ def __init__(self, **kwargs):
14
+ # The base class might pass memory_manager, so we accept it but don't use it.
15
+ pass
16
+
17
+ @property
18
+ def name(self) -> str:
19
+ return "model_zoom"
20
+
21
+ @property
22
+ def description(self) -> str:
23
+ return "Makes model zoom in, just like got closer to fans."
24
+
25
+ @property
26
+ def parameters(self) -> List[Dict[str, Any]]:
27
+ return []
28
+
29
+ async def execute(self, **kwargs: Any) -> Dict[str, Any]:
30
+ """
31
+ Sends a WebSocket command to the client to trigger the avatar zoom animation.
32
+ """
33
+ logger.info(f"Executing {self.name} tool.")
34
+ try:
35
+ await live_stream_manager.event_queue.put({
36
+ "type": "model_zoom"
37
+ })
38
+ return {"status": "success", "message": "Zoom command sent."}
39
+ except Exception as e:
40
+ logger.error(f"Error in {self.name} tool: {e}", exc_info=True)
41
+ return {"status": "error", "message": str(e)}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: neuro_simulator
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: Neuro Simulator Server
5
5
  Author-email: Moha-Master <hongkongreporter@outlook.com>
6
6
  License-Expression: MIT
@@ -16,8 +16,9 @@ neuro_simulator/agent/tools/create_core_memory_block.py,sha256=uM2vF71Ai3NH2-Qbr
16
16
  neuro_simulator/agent/tools/delete_core_memory_block.py,sha256=_t2NZWZaxuWJsm9Uof3Zscvucyz-xJfyC0KrssSXPGI,1379
17
17
  neuro_simulator/agent/tools/get_core_memory_block.py,sha256=vFK6lrbOqdxWVpYa7yF96wkXKMcpQAn4E68GCZlu0Ow,1432
18
18
  neuro_simulator/agent/tools/get_core_memory_blocks.py,sha256=UbK-GkPgha35n703bCKzdnoIKgXR4U4YxqsSYWimW6c,1059
19
- neuro_simulator/agent/tools/manager.py,sha256=NP3fMbl3P6M1EuRI2FEQYzaa3rM530RfdqXakoFMspg,7138
20
- neuro_simulator/agent/tools/model_spin.py,sha256=3nyckuJ3c-wVOuUhOZa3oQMqEjK-CsFnndCfV-hw7ek,1378
19
+ neuro_simulator/agent/tools/manager.py,sha256=VIOjgcWUiIzZaQw2yMT6W5kxlEpcnlGZwjGwQJ721Sg,7152
20
+ neuro_simulator/agent/tools/model_spin.py,sha256=MFRUOKumx-vPMq7f9fteW-KJhL_TBmKUEWQg3ezLunU,1374
21
+ neuro_simulator/agent/tools/model_zoom.py,sha256=12Mnd8Y-487Klxgz2Nf1Xno-yF0b4t26O5UpFp_RKmE,1368
21
22
  neuro_simulator/agent/tools/remove_from_core_memory_block.py,sha256=uiY69y2iIJYp3Zh8EdtP2_G5Zqfs4YKSmTBd9zcIp_c,2372
22
23
  neuro_simulator/agent/tools/speak.py,sha256=7vPbfWjllxSz39HmOUbKRPwPx64q2vsYrqDu-JsfZJk,1870
23
24
  neuro_simulator/agent/tools/update_core_memory_block.py,sha256=CQgimyPNLmOuK_pDAiAxV9qEf3Tx6u7OKludlIR08BA,2272
@@ -42,8 +43,8 @@ neuro_simulator/utils/process.py,sha256=9OYWx8fzaJZqmFUcjQX37AnBhl7YWvrLxDWBa30v
42
43
  neuro_simulator/utils/queue.py,sha256=bg-mIFF8ycClwmmfcKSPjAXtvjImzTKf6z7xZc2VX20,2196
43
44
  neuro_simulator/utils/state.py,sha256=DdBqSAYfjOFtJfB1hEGhYPh32r1ZvFuVlN_-29_-luA,664
44
45
  neuro_simulator/utils/websocket.py,sha256=fjC-qipzjgM_e7XImP12DFmLhvxkMOSr2GnUWws7esE,2058
45
- neuro_simulator-0.4.2.dist-info/METADATA,sha256=TXHVhhks3Pva5AaapxUPM3idivVIhZ9iVX7-HSOSoos,7675
46
- neuro_simulator-0.4.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
47
- neuro_simulator-0.4.2.dist-info/entry_points.txt,sha256=qVd5ypnRRgU8Cw7rWfZ7o0OXyS9P9hgY-cRoN_mgz9g,51
48
- neuro_simulator-0.4.2.dist-info/top_level.txt,sha256=V8awSKpcrFnjJDiJxSfy7jtOrnuE2BgAR9hLmfMDWK8,16
49
- neuro_simulator-0.4.2.dist-info/RECORD,,
46
+ neuro_simulator-0.4.3.dist-info/METADATA,sha256=2cAnGJWSywTFI4vjaTyogCXdh6n6T681-Bk4PBSg-hs,7675
47
+ neuro_simulator-0.4.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
+ neuro_simulator-0.4.3.dist-info/entry_points.txt,sha256=qVd5ypnRRgU8Cw7rWfZ7o0OXyS9P9hgY-cRoN_mgz9g,51
49
+ neuro_simulator-0.4.3.dist-info/top_level.txt,sha256=V8awSKpcrFnjJDiJxSfy7jtOrnuE2BgAR9hLmfMDWK8,16
50
+ neuro_simulator-0.4.3.dist-info/RECORD,,