Add multiple new modules and tools to enhance the functionality and extensibility of the Maestro project (#333)
* Added a **pyproject.toml** file to define project metadata and dependencies. * Added **run\_maestro.py** and **osworld\_run\_maestro.py** to provide the main execution logic. * Introduced multiple new modules, including **Evaluator**, **Controller**, **Manager**, and **Sub-Worker**, supporting task planning, state management, and data analysis. * Added a **tools module** containing utility functions and tool configurations to improve code reusability. * Updated the **README** and documentation with usage examples and module descriptions. These changes lay the foundation for expanding the Maestro project’s functionality and improving the user experience. Co-authored-by: Hiroid <guoliangxuan@deepmatrix.com>
This commit is contained in:
22
mm_agents/maestro/store/registry.py
Normal file
22
mm_agents/maestro/store/registry.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# gui_agents/s2/store/registry.py
|
||||
|
||||
# Usage: in any file, get the object through Registry.get
|
||||
# from gui_agents.store.registry import Registry
|
||||
# GlobalStateStore = Registry.get("GlobalStateStore")
|
||||
|
||||
class Registry:
|
||||
_services: dict[str, object] = {}
|
||||
|
||||
@classmethod
|
||||
def register(cls, name: str, obj: object):
|
||||
cls._services[name] = obj
|
||||
|
||||
@classmethod
|
||||
def get(cls, name: str) -> object:
|
||||
if name not in cls._services:
|
||||
raise KeyError(f"{name!r} not registered in Registry")
|
||||
return cls._services[name]
|
||||
|
||||
@classmethod
|
||||
def clear(cls):
|
||||
cls._services.clear()
|
||||
Reference in New Issue
Block a user