amd-gaia 0.15.1__py3-none-any.whl → 0.15.2__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.
- {amd_gaia-0.15.1.dist-info → amd_gaia-0.15.2.dist-info}/METADATA +1 -2
- {amd_gaia-0.15.1.dist-info → amd_gaia-0.15.2.dist-info}/RECORD +35 -31
- {amd_gaia-0.15.1.dist-info → amd_gaia-0.15.2.dist-info}/WHEEL +1 -1
- gaia/agents/base/agent.py +45 -90
- gaia/agents/base/api_agent.py +0 -1
- gaia/agents/base/console.py +126 -0
- gaia/agents/base/tools.py +7 -2
- gaia/agents/blender/__init__.py +7 -0
- gaia/agents/blender/agent.py +7 -10
- gaia/agents/blender/core/view.py +2 -2
- gaia/agents/chat/agent.py +22 -48
- gaia/agents/chat/app.py +7 -0
- gaia/agents/chat/tools/rag_tools.py +23 -8
- gaia/agents/chat/tools/shell_tools.py +1 -0
- gaia/agents/code/prompts/code_patterns.py +2 -4
- gaia/agents/docker/agent.py +1 -0
- gaia/agents/emr/agent.py +3 -5
- gaia/agents/emr/cli.py +1 -1
- gaia/agents/emr/dashboard/server.py +2 -4
- gaia/apps/llm/app.py +14 -3
- gaia/chat/app.py +2 -4
- gaia/cli.py +511 -333
- gaia/installer/__init__.py +23 -0
- gaia/installer/init_command.py +1275 -0
- gaia/installer/lemonade_installer.py +619 -0
- gaia/llm/__init__.py +2 -1
- gaia/llm/lemonade_client.py +284 -99
- gaia/llm/providers/lemonade.py +12 -14
- gaia/rag/sdk.py +1 -1
- gaia/security.py +24 -4
- gaia/talk/app.py +2 -4
- gaia/version.py +2 -2
- {amd_gaia-0.15.1.dist-info → amd_gaia-0.15.2.dist-info}/entry_points.txt +0 -0
- {amd_gaia-0.15.1.dist-info → amd_gaia-0.15.2.dist-info}/licenses/LICENSE.md +0 -0
- {amd_gaia-0.15.1.dist-info → amd_gaia-0.15.2.dist-info}/top_level.txt +0 -0
gaia/security.py
CHANGED
|
@@ -109,14 +109,34 @@ class PathValidator:
|
|
|
109
109
|
# Resolve path using os.path.realpath to follow symlinks
|
|
110
110
|
# This prevents TOCTOU attacks by resolving at check time
|
|
111
111
|
real_path = Path(os.path.realpath(path)).resolve()
|
|
112
|
+
real_path_str = str(real_path)
|
|
113
|
+
|
|
114
|
+
# macOS /var symlink handling: normalize by removing /private prefix
|
|
115
|
+
def normalize_macos(p: str) -> str:
|
|
116
|
+
if p.startswith("/private/"):
|
|
117
|
+
return p[len("/private") :]
|
|
118
|
+
return p
|
|
119
|
+
|
|
120
|
+
norm_real_path = normalize_macos(real_path_str)
|
|
112
121
|
|
|
113
122
|
# Check if real path is within any allowed directory
|
|
114
|
-
for allowed_path in self.allowed_paths:
|
|
123
|
+
for allowed_path in list(self.allowed_paths):
|
|
115
124
|
try:
|
|
116
|
-
#
|
|
117
|
-
|
|
125
|
+
# Ensure allowed_path is also resolved to handle symlinks correctly
|
|
126
|
+
# IMPORTANT: Use str(allowed_path) as allowed_path might already be a Path object
|
|
127
|
+
allowed_path_str_raw = str(allowed_path)
|
|
128
|
+
res_allowed = Path(os.path.realpath(allowed_path_str_raw)).resolve()
|
|
129
|
+
allowed_path_str = str(res_allowed)
|
|
130
|
+
norm_allowed_path = normalize_macos(allowed_path_str)
|
|
131
|
+
|
|
132
|
+
# Robust check using string prefix on normalized paths
|
|
133
|
+
if norm_real_path.startswith(norm_allowed_path):
|
|
134
|
+
return True
|
|
135
|
+
|
|
136
|
+
# Fallback to relative_to for safety
|
|
137
|
+
real_path.relative_to(res_allowed)
|
|
118
138
|
return True
|
|
119
|
-
except ValueError:
|
|
139
|
+
except (ValueError, RuntimeError):
|
|
120
140
|
continue
|
|
121
141
|
|
|
122
142
|
# If we get here, path is not allowed. Prompt user?
|
gaia/talk/app.py
CHANGED
|
@@ -126,8 +126,7 @@ def print_integration_examples():
|
|
|
126
126
|
print("INTEGRATION EXAMPLES")
|
|
127
127
|
print("=" * 60)
|
|
128
128
|
|
|
129
|
-
print(
|
|
130
|
-
"""
|
|
129
|
+
print("""
|
|
131
130
|
Basic Integration:
|
|
132
131
|
```python
|
|
133
132
|
from gaia.talk.sdk import TalkSDK, TalkConfig
|
|
@@ -174,8 +173,7 @@ from gaia.talk.sdk import quick_chat
|
|
|
174
173
|
response = await quick_chat("Hello!")
|
|
175
174
|
print(response)
|
|
176
175
|
```
|
|
177
|
-
"""
|
|
178
|
-
)
|
|
176
|
+
""")
|
|
179
177
|
|
|
180
178
|
|
|
181
179
|
async def main():
|
gaia/version.py
CHANGED
|
@@ -6,10 +6,10 @@ import os
|
|
|
6
6
|
import subprocess
|
|
7
7
|
from importlib.metadata import version as get_package_version_metadata
|
|
8
8
|
|
|
9
|
-
__version__ = "0.15.
|
|
9
|
+
__version__ = "0.15.2"
|
|
10
10
|
|
|
11
11
|
# Lemonade version used across CI and installer
|
|
12
|
-
LEMONADE_VERSION = "9.1.
|
|
12
|
+
LEMONADE_VERSION = "9.1.4"
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
def get_package_version() -> str:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|