adk-code-mode-sandbox 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.
- {adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/PKG-INFO +1 -1
- {adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/src/adk_code_mode_sandbox/__about__.py +1 -1
- {adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/src/adk_code_mode_sandbox/_http_server.py +8 -6
- {adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/.gitignore +0 -0
- {adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/README.md +0 -0
- {adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/pyproject.toml +0 -0
- {adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/src/adk_code_mode_sandbox/__init__.py +0 -0
- {adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/src/adk_code_mode_sandbox/__main__.py +0 -0
- {adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/src/adk_code_mode_sandbox/_entry.py +0 -0
- {adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/src/adk_code_mode_sandbox/_rpc_client.py +0 -0
- {adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/src/adk_code_mode_sandbox/protocol.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: adk-code-mode-sandbox
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: In-sandbox runtime shim for adk-code-mode. Installs inside the container image the host runtime launches.
|
|
5
5
|
Project-URL: Documentation, https://github.com/A2ANet/adk-code-mode#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/A2ANet/adk-code-mode/issues
|
|
@@ -44,6 +44,7 @@ import websockets
|
|
|
44
44
|
import websockets.asyncio.server
|
|
45
45
|
|
|
46
46
|
from adk_code_mode_sandbox._entry import (
|
|
47
|
+
TOOLS_DIR,
|
|
47
48
|
_make_globals,
|
|
48
49
|
_prepare_sys_path,
|
|
49
50
|
_prepare_workdir,
|
|
@@ -159,9 +160,11 @@ async def _handle_connection(ws: Any) -> None:
|
|
|
159
160
|
max_tools = int(os.environ.get(MAX_UPLOAD_TOOLS_ENV, _DEFAULT_MAX_TOOLS_BYTES))
|
|
160
161
|
max_workspace = int(os.environ.get(MAX_UPLOAD_WORKSPACE_ENV, _DEFAULT_MAX_WORKSPACE_BYTES))
|
|
161
162
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
# Extract into the documented /tools path (pre-created and owned by the
|
|
164
|
+
# sandbox user in the image) rather than a temp dir, so the overflow
|
|
165
|
+
# catalog's hard-coded /tools navigation resolves here exactly as it does
|
|
166
|
+
# under the Docker backend. The container is single-use, so no cleanup.
|
|
167
|
+
os.makedirs(TOOLS_DIR, exist_ok=True)
|
|
165
168
|
workspace_dir = tempfile.mkdtemp(prefix="adk-cm-ws-")
|
|
166
169
|
|
|
167
170
|
try:
|
|
@@ -173,11 +176,11 @@ async def _handle_connection(ws: Any) -> None:
|
|
|
173
176
|
raise ValueError(
|
|
174
177
|
f"tools archive ({len(tools_data):,} bytes) exceeds limit ({max_tools:,} bytes)"
|
|
175
178
|
)
|
|
176
|
-
_extract_tar(tools_data,
|
|
179
|
+
_extract_tar(tools_data, TOOLS_DIR)
|
|
177
180
|
|
|
178
181
|
# 2. Sanitize environment, then prepare sys.path + a persistent /workspace.
|
|
179
182
|
_sanitize_environ()
|
|
180
|
-
_prepare_sys_path(
|
|
183
|
+
_prepare_sys_path(TOOLS_DIR)
|
|
181
184
|
_prepare_workdir(workspace_dir)
|
|
182
185
|
|
|
183
186
|
# 3. One persistent globals dict for the connection, so variables set in
|
|
@@ -192,7 +195,6 @@ async def _handle_connection(ws: Any) -> None:
|
|
|
192
195
|
while await _run_one_block(ws, loop, globs, workspace_dir, max_workspace):
|
|
193
196
|
pass
|
|
194
197
|
finally:
|
|
195
|
-
shutil.rmtree(tools_base, ignore_errors=True)
|
|
196
198
|
shutil.rmtree(workspace_dir, ignore_errors=True)
|
|
197
199
|
|
|
198
200
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/src/adk_code_mode_sandbox/__init__.py
RENAMED
|
File without changes
|
{adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/src/adk_code_mode_sandbox/__main__.py
RENAMED
|
File without changes
|
{adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/src/adk_code_mode_sandbox/_entry.py
RENAMED
|
File without changes
|
{adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/src/adk_code_mode_sandbox/_rpc_client.py
RENAMED
|
File without changes
|
{adk_code_mode_sandbox-0.3.0 → adk_code_mode_sandbox-0.4.0}/src/adk_code_mode_sandbox/protocol.py
RENAMED
|
File without changes
|