lybic-guiagents 0.3.0__tar.gz → 0.4.0__tar.gz
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.
Potentially problematic release.
This version of lybic-guiagents might be problematic. Click here for more details.
- {lybic_guiagents-0.3.0/lybic_guiagents.egg-info → lybic_guiagents-0.4.0}/PKG-INFO +6 -6
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/README.md +4 -4
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/__init__.py +1 -1
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/agent_s.py +28 -17
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/grounding.py +14 -4
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/manager.py +8 -1
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/worker.py +8 -2
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/cli_app.py +236 -220
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/grpc_app.py +118 -50
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/service/agent_service.py +51 -34
- lybic_guiagents-0.4.0/gui_agents/store/registry.py +130 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0/lybic_guiagents.egg-info}/PKG-INFO +6 -6
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/pyproject.toml +2 -2
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/setup.py +2 -1
- lybic_guiagents-0.3.0/gui_agents/store/registry.py +0 -22
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/LICENSE +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/actions.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/controllers/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/controllers/python.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/controllers/setup.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/desktop_env.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/getters/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/getters/calc.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/getters/chrome.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/getters/file.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/getters/general.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/getters/gimp.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/getters/impress.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/getters/info.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/getters/misc.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/getters/replay.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/getters/vlc.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/getters/vscode.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/metrics/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/metrics/basic_os.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/metrics/chrome.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/metrics/docs.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/metrics/general.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/metrics/gimp.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/metrics/libreoffice.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/metrics/others.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/metrics/pdf.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/metrics/slides.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/metrics/table.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/metrics/thunderbird.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/metrics/utils.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/metrics/vlc.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/evaluators/metrics/vscode.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/aws/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/aws/manager.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/aws/provider.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/aws/provider_with_proxy.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/aws/proxy_pool.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/azure/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/azure/manager.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/azure/provider.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/base.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/gcp/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/gcp/manager.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/gcp/provider.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/virtualbox/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/virtualbox/manager.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/virtualbox/provider.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/vmware/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/vmware/manager.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/desktop_env/providers/vmware/provider.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/Action.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/Backend/ADBBackend.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/Backend/Backend.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/Backend/LybicBackend.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/Backend/PyAutoGUIBackend.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/Backend/PyAutoGUIVMwareBackend.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/Backend/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/global_state.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/hardware_interface.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/stream_manager.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/agents/translator.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/core/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/core/engine.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/core/knowledge.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/core/mllm.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/prompts/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/prompts/prompts.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/proto/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/proto/pb/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/service/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/service/api_models.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/service/config.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/service/exceptions.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/store/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/tools/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/tools/model.md +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/tools/tools.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/tools/tools_config.json +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/tools/tools_config_cn.json +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/tools/tools_config_en.json +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/unit_test/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/unit_test/run_tests.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/unit_test/test_manager.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/unit_test/test_worker.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/utils/__init__.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/utils/analyze_display.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/utils/common_utils.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/utils/display_viewer.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/utils/embedding_manager.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/gui_agents/utils/image_axis_utils.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/lybic_guiagents.egg-info/SOURCES.txt +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/lybic_guiagents.egg-info/dependency_links.txt +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/lybic_guiagents.egg-info/entry_points.txt +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/lybic_guiagents.egg-info/requires.txt +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/lybic_guiagents.egg-info/top_level.txt +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/setup.cfg +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/tests/test_aci.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/tests/test_api_masking.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/tests/test_app_switching.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/tests/test_global_instance.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/tests/test_grpc_config.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/tests/test_hardware_interface.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/tests/test_registry.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/tests/test_streaming.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/tests/test_translator.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/tests/test_uielement_base.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/tests/test_uielement_linux.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/tests/test_uielement_macos.py +0 -0
- {lybic_guiagents-0.3.0 → lybic_guiagents-0.4.0}/tests/test_uielement_osworld.py +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lybic-guiagents
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: An open-source agentic framework that enables AI to use computers like humans and can provide a multi-agent runtime environment as an infrastructure capability
|
|
5
5
|
Author: Lybic Development Team
|
|
6
6
|
Author-email: Lybic Development Team <lybic@tingyutech.com>
|
|
7
7
|
License-Expression: Apache-2.0
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Requires-Python: >=3.12, <3.
|
|
9
|
+
Requires-Python: >=3.12, <3.15
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Requires-Dist: dotenv
|
|
@@ -281,11 +281,11 @@ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.8.5/install.ps
|
|
|
281
281
|
# testing uv installation, version should be 0.8.5
|
|
282
282
|
uv --version
|
|
283
283
|
|
|
284
|
-
# 2. Install the python 3.
|
|
285
|
-
uv python install 3.
|
|
284
|
+
# 2. Install the python 3.14
|
|
285
|
+
uv python install 3.14
|
|
286
286
|
|
|
287
287
|
# 3. Create a virtual environment
|
|
288
|
-
uv venv -p 3.
|
|
288
|
+
uv venv -p 3.14
|
|
289
289
|
|
|
290
290
|
# 4. Activate the virtual environment
|
|
291
291
|
# macOS and Linux
|
|
@@ -525,7 +525,7 @@ USE_PRECREATE_VM=Ubuntu
|
|
|
525
525
|
**Problem**: `ModuleNotFoundError` or package import errors.
|
|
526
526
|
|
|
527
527
|
**Solution**:
|
|
528
|
-
- Ensure you're using Python 3.12
|
|
528
|
+
- Ensure you're using Python >= 3.12
|
|
529
529
|
- Activate the virtual environment:
|
|
530
530
|
```bash
|
|
531
531
|
# macOS/Linux
|
|
@@ -117,11 +117,11 @@ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.8.5/install.ps
|
|
|
117
117
|
# testing uv installation, version should be 0.8.5
|
|
118
118
|
uv --version
|
|
119
119
|
|
|
120
|
-
# 2. Install the python 3.
|
|
121
|
-
uv python install 3.
|
|
120
|
+
# 2. Install the python 3.14
|
|
121
|
+
uv python install 3.14
|
|
122
122
|
|
|
123
123
|
# 3. Create a virtual environment
|
|
124
|
-
uv venv -p 3.
|
|
124
|
+
uv venv -p 3.14
|
|
125
125
|
|
|
126
126
|
# 4. Activate the virtual environment
|
|
127
127
|
# macOS and Linux
|
|
@@ -361,7 +361,7 @@ USE_PRECREATE_VM=Ubuntu
|
|
|
361
361
|
**Problem**: `ModuleNotFoundError` or package import errors.
|
|
362
362
|
|
|
363
363
|
**Solution**:
|
|
364
|
-
- Ensure you're using Python 3.12
|
|
364
|
+
- Ensure you're using Python >= 3.12
|
|
365
365
|
- Activate the virtual environment:
|
|
366
366
|
```bash
|
|
367
367
|
# macOS/Linux
|
|
@@ -37,7 +37,7 @@ from .agents.hardware_interface import HardwareInterface
|
|
|
37
37
|
from .store.registry import Registry
|
|
38
38
|
from .agents.global_state import GlobalState
|
|
39
39
|
|
|
40
|
-
__version__ = "0.
|
|
40
|
+
__version__ = "0.4.0"
|
|
41
41
|
|
|
42
42
|
# Primary exports (what users should typically use)
|
|
43
43
|
__all__ = [
|
|
@@ -172,8 +172,6 @@ class AgentS2(UIAgent):
|
|
|
172
172
|
else:
|
|
173
173
|
print(f"Found local knowledge base path: {kb_platform_path}")
|
|
174
174
|
|
|
175
|
-
self.reset()
|
|
176
|
-
|
|
177
175
|
def reset(self) -> None:
|
|
178
176
|
"""
|
|
179
177
|
Reinitialize core components and reset the agent's runtime state.
|
|
@@ -219,12 +217,18 @@ class AgentS2(UIAgent):
|
|
|
219
217
|
self.subtasks: List[Node] = []
|
|
220
218
|
self.search_query: str = ""
|
|
221
219
|
self.subtask_status: str = "Start"
|
|
222
|
-
|
|
220
|
+
# Use task-specific registry if task_id is available, otherwise fall back to global registry
|
|
221
|
+
if self.task_id:
|
|
222
|
+
self.global_state: GlobalState = Registry.get_from_context("GlobalStateStore", self.task_id) # type: ignore
|
|
223
|
+
else:
|
|
224
|
+
self.global_state: GlobalState = Registry.get("GlobalStateStore") # type: ignore
|
|
223
225
|
|
|
224
226
|
# Pass task_id to components
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
227
|
+
self.manager.set_task_id(self.task_id)
|
|
228
|
+
self.worker.set_task_id(self.task_id)
|
|
229
|
+
# Grounding doesn't have task_id in normal mode, but we set it if available
|
|
230
|
+
if hasattr(self, 'grounding') and hasattr(self.grounding, 'set_task_id'):
|
|
231
|
+
self.grounding.set_task_id(self.task_id)
|
|
228
232
|
|
|
229
233
|
def set_task_id(self, task_id: str) -> None:
|
|
230
234
|
"""
|
|
@@ -236,9 +240,9 @@ class AgentS2(UIAgent):
|
|
|
236
240
|
self.task_id = task_id
|
|
237
241
|
# Also set task_id for components if they exist
|
|
238
242
|
if hasattr(self, 'manager') and self.manager:
|
|
239
|
-
self.manager.task_id
|
|
243
|
+
self.manager.set_task_id(task_id)
|
|
240
244
|
if hasattr(self, 'worker') and self.worker:
|
|
241
|
-
self.worker.task_id
|
|
245
|
+
self.worker.set_task_id(task_id)
|
|
242
246
|
|
|
243
247
|
def reset_executor_state(self) -> None:
|
|
244
248
|
"""Reset executor and step counter"""
|
|
@@ -733,8 +737,6 @@ class AgentSFast(UIAgent):
|
|
|
733
737
|
else:
|
|
734
738
|
print(f"Found local knowledge base path: {kb_platform_path}")
|
|
735
739
|
|
|
736
|
-
self.reset()
|
|
737
|
-
|
|
738
740
|
def reset(self) -> None:
|
|
739
741
|
"""
|
|
740
742
|
Reinitialize the fast-agent components and reset internal runtime state.
|
|
@@ -816,19 +818,25 @@ class AgentSFast(UIAgent):
|
|
|
816
818
|
# Reset state variables
|
|
817
819
|
self.step_count: int = 0
|
|
818
820
|
self.turn_count: int = 0
|
|
819
|
-
|
|
821
|
+
# Use task-specific registry if task_id is available, otherwise fall back to global registry
|
|
822
|
+
if self.task_id:
|
|
823
|
+
self.global_state: GlobalState = Registry.get_from_context("GlobalStateStore", self.task_id) # type: ignore
|
|
824
|
+
else:
|
|
825
|
+
self.global_state: GlobalState = Registry.get("GlobalStateStore") # type: ignore
|
|
820
826
|
self.latest_action = None
|
|
821
827
|
|
|
822
|
-
# Pass task_id to tools if available
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
828
|
+
# Pass task_id to tools and components if available
|
|
829
|
+
self.fast_action_generator.task_id = self.task_id
|
|
830
|
+
if self.enable_reflection and hasattr(self, 'reflection_agent'):
|
|
831
|
+
self.reflection_agent.task_id = self.task_id
|
|
832
|
+
# Set task_id for grounding component
|
|
833
|
+
if hasattr(self, 'grounding') and hasattr(self.grounding, 'set_task_id'):
|
|
834
|
+
self.grounding.set_task_id(self.task_id)
|
|
827
835
|
|
|
828
836
|
def set_task_id(self, task_id: str) -> None:
|
|
829
837
|
"""
|
|
830
838
|
Store the task identifier on the agent and propagate it to subcomponents that use it.
|
|
831
|
-
|
|
839
|
+
|
|
832
840
|
Parameters:
|
|
833
841
|
task_id (str): Identifier for the active task; assigned to this agent and, if present, to
|
|
834
842
|
`fast_action_generator` and `reflection_agent`.
|
|
@@ -839,6 +847,9 @@ class AgentSFast(UIAgent):
|
|
|
839
847
|
self.fast_action_generator.task_id = task_id
|
|
840
848
|
if hasattr(self, 'reflection_agent') and self.reflection_agent:
|
|
841
849
|
self.reflection_agent.task_id = task_id
|
|
850
|
+
# Set task_id for grounding component
|
|
851
|
+
if hasattr(self, 'grounding') and hasattr(self.grounding, 'set_task_id'):
|
|
852
|
+
self.grounding.set_task_id(task_id)
|
|
842
853
|
|
|
843
854
|
def predict(self, instruction: str, observation: Dict) -> Tuple[Dict, List[str]]:
|
|
844
855
|
"""
|
|
@@ -92,8 +92,13 @@ class Grounding(ACI):
|
|
|
92
92
|
self.text_span_agent = Tools()
|
|
93
93
|
_register(self.text_span_agent, "text_span")
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
# GlobalState will be initialized when task_id is set
|
|
96
|
+
self.global_state: GlobalState = None # type: ignore
|
|
97
|
+
|
|
98
|
+
def set_task_id(self, task_id: str) -> None:
|
|
99
|
+
"""Set the task identifier and update global state reference"""
|
|
100
|
+
# Update global state reference with task-specific registry
|
|
101
|
+
self.global_state = Registry.get_from_context("GlobalStateStore", task_id) # type: ignore
|
|
97
102
|
|
|
98
103
|
def generate_coords(self, ref_expr: str, obs: Dict) -> List[int]:
|
|
99
104
|
grounding_start_time = time.time()
|
|
@@ -453,8 +458,13 @@ class FastGrounding(ACI):
|
|
|
453
458
|
self.height = height
|
|
454
459
|
self.grounding_width = grounding_width
|
|
455
460
|
self.grounding_height = grounding_height
|
|
456
|
-
|
|
457
|
-
|
|
461
|
+
# GlobalState will be initialized when task_id is set
|
|
462
|
+
self.global_state: GlobalState = None # type: ignore
|
|
463
|
+
|
|
464
|
+
def set_task_id(self, task_id: str) -> None:
|
|
465
|
+
"""Set the task identifier and update global state reference"""
|
|
466
|
+
# Update global state reference with task-specific registry
|
|
467
|
+
self.global_state = Registry.get_from_context("GlobalStateStore", task_id) # type: ignore
|
|
458
468
|
|
|
459
469
|
def reset_screen_size(self, width: int, height: int):
|
|
460
470
|
self.width = width
|
|
@@ -102,7 +102,8 @@ class Manager:
|
|
|
102
102
|
Tools_dict=KB_Tools_dict,
|
|
103
103
|
)
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
# GlobalState will be initialized in reset() method when task_id is available
|
|
106
|
+
self.global_state: GlobalState = None # type: ignore
|
|
106
107
|
|
|
107
108
|
self.planner_history = []
|
|
108
109
|
|
|
@@ -118,6 +119,12 @@ class Manager:
|
|
|
118
119
|
|
|
119
120
|
self.multi_round = multi_round
|
|
120
121
|
|
|
122
|
+
def set_task_id(self, task_id: str) -> None:
|
|
123
|
+
"""Set the task identifier and update global state reference"""
|
|
124
|
+
self.task_id = task_id
|
|
125
|
+
# Update global state reference with task-specific registry
|
|
126
|
+
self.global_state = Registry.get_from_context("GlobalStateStore", task_id) # type: ignore
|
|
127
|
+
|
|
121
128
|
def _send_stream_message(self, task_id: str, stage: str, message: str) -> None:
|
|
122
129
|
"""
|
|
123
130
|
Enqueue a stream message for the given task if a task ID is provided.
|
|
@@ -67,8 +67,8 @@ class Worker:
|
|
|
67
67
|
|
|
68
68
|
self.enable_reflection = enable_reflection
|
|
69
69
|
self.use_subtask_experience = use_subtask_experience
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
# GlobalState will be initialized in reset() method when task_id is available
|
|
71
|
+
self.global_state: GlobalState = None # type: ignore
|
|
72
72
|
self.reset()
|
|
73
73
|
|
|
74
74
|
def reset(self):
|
|
@@ -159,6 +159,12 @@ class Worker:
|
|
|
159
159
|
self.max_trajector_length = 8
|
|
160
160
|
self.task_id = None # Will be set by agent
|
|
161
161
|
|
|
162
|
+
def set_task_id(self, task_id: str) -> None:
|
|
163
|
+
"""Set the task identifier and update global state reference"""
|
|
164
|
+
self.task_id = task_id
|
|
165
|
+
# Update global state reference with task-specific registry
|
|
166
|
+
self.global_state = Registry.get_from_context("GlobalStateStore", task_id) # type: ignore
|
|
167
|
+
|
|
162
168
|
def generate_next_action(
|
|
163
169
|
self,
|
|
164
170
|
Tu: str,
|