sandboxy 0.0.1__py3-none-any.whl → 0.0.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.
- sandboxy/api/routes/local.py +0 -5
- sandboxy/cli/main.py +46 -0
- {sandboxy-0.0.1.dist-info → sandboxy-0.0.2.dist-info}/METADATA +1 -1
- {sandboxy-0.0.1.dist-info → sandboxy-0.0.2.dist-info}/RECORD +7 -7
- {sandboxy-0.0.1.dist-info → sandboxy-0.0.2.dist-info}/WHEEL +0 -0
- {sandboxy-0.0.1.dist-info → sandboxy-0.0.2.dist-info}/entry_points.txt +0 -0
- {sandboxy-0.0.1.dist-info → sandboxy-0.0.2.dist-info}/licenses/LICENSE +0 -0
sandboxy/api/routes/local.py
CHANGED
|
@@ -826,11 +826,6 @@ async def save_tool(request: SaveToolRequest) -> SaveToolResponse:
|
|
|
826
826
|
filepath = ctx.tools_dir / f"{request.name}.yml"
|
|
827
827
|
filepath.write_text(request.content)
|
|
828
828
|
|
|
829
|
-
# Clear tool cache so new tools are discovered
|
|
830
|
-
from sandboxy.tools.loader import discover_python_tools
|
|
831
|
-
|
|
832
|
-
discover_python_tools(refresh=True)
|
|
833
|
-
|
|
834
829
|
return SaveToolResponse(
|
|
835
830
|
name=request.name,
|
|
836
831
|
path=str(filepath),
|
sandboxy/cli/main.py
CHANGED
|
@@ -324,6 +324,52 @@ def open(port: int, host: str, no_browser: bool) -> None:
|
|
|
324
324
|
uvicorn.run(app, host=host, port=port, log_level="info")
|
|
325
325
|
|
|
326
326
|
|
|
327
|
+
@main.command()
|
|
328
|
+
@click.option("--port", "-p", type=int, default=8000, help="Port to run server on")
|
|
329
|
+
@click.option("--host", default="127.0.0.1", help="Host to bind to")
|
|
330
|
+
@click.option(
|
|
331
|
+
"--dir",
|
|
332
|
+
"-d",
|
|
333
|
+
"directory",
|
|
334
|
+
type=click.Path(exists=True, file_okay=False, path_type=Path),
|
|
335
|
+
default=None,
|
|
336
|
+
help="Working directory (default: current directory)",
|
|
337
|
+
)
|
|
338
|
+
def serve(port: int, host: str, directory: Path | None) -> None:
|
|
339
|
+
"""Serve the Sandboxy API (backend only, no UI).
|
|
340
|
+
|
|
341
|
+
Useful for running the API server while developing the frontend separately,
|
|
342
|
+
or for headless/API-only deployments.
|
|
343
|
+
|
|
344
|
+
Examples:
|
|
345
|
+
sandboxy serve
|
|
346
|
+
sandboxy serve --port 3001
|
|
347
|
+
sandboxy serve --dir /path/to/project
|
|
348
|
+
sandboxy serve --host 0.0.0.0 # Allow external connections
|
|
349
|
+
"""
|
|
350
|
+
import uvicorn
|
|
351
|
+
|
|
352
|
+
from sandboxy.api.app import create_local_app
|
|
353
|
+
|
|
354
|
+
root_dir = directory or Path.cwd()
|
|
355
|
+
|
|
356
|
+
# No UI - backend API only
|
|
357
|
+
app = create_local_app(root_dir, local_ui_path=None)
|
|
358
|
+
|
|
359
|
+
url = f"http://{host}:{port}"
|
|
360
|
+
click.echo(f"Starting Sandboxy API at {url}")
|
|
361
|
+
click.echo(f"Working directory: {root_dir}")
|
|
362
|
+
click.echo("")
|
|
363
|
+
click.echo("API endpoints:")
|
|
364
|
+
click.echo(f" {url}/api/local/status")
|
|
365
|
+
click.echo(f" {url}/api/local/scenarios")
|
|
366
|
+
click.echo(f" {url}/api/local/tools")
|
|
367
|
+
click.echo(f" {url}/docs (OpenAPI docs)")
|
|
368
|
+
click.echo("")
|
|
369
|
+
|
|
370
|
+
uvicorn.run(app, host=host, port=port, log_level="info")
|
|
371
|
+
|
|
372
|
+
|
|
327
373
|
@main.command()
|
|
328
374
|
def list_agents() -> None:
|
|
329
375
|
"""List available agents."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sandboxy
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: Open-source agent simulation and benchmarking platform
|
|
5
5
|
Project-URL: Homepage, https://github.com/sandboxy-ai/sandboxy
|
|
6
6
|
Project-URL: Repository, https://github.com/sandboxy-ai/sandboxy
|
|
@@ -10,10 +10,10 @@ sandboxy/api/__init__.py,sha256=3zw70CGbz3j8rK-8XcuGDx8KNibLfuFuvVEG02OIhek,119
|
|
|
10
10
|
sandboxy/api/app.py,sha256=Ln3iCw7d42RYZcKbPuQKGuJHZyeXXm_NI1npczL04mw,2091
|
|
11
11
|
sandboxy/api/routes/__init__.py,sha256=CZS3yxK1CtW80ER3mbPqXbGN19HahbLC0Lu4A-8dw8o,31
|
|
12
12
|
sandboxy/api/routes/agents.py,sha256=6LWJT_IAZrRRhBAzReSNsAI9eAp2oCKP7-5LvkZyeGw,2511
|
|
13
|
-
sandboxy/api/routes/local.py,sha256=
|
|
13
|
+
sandboxy/api/routes/local.py,sha256=TXVZBbFDdQ8sWErQiJX8-mUth53Mcuj0o72tBhtLViA,41820
|
|
14
14
|
sandboxy/api/routes/tools.py,sha256=TPhHBIyo7NNSHWDaaanDfAF1bzqYHT_k1NJ96w8Dw0c,3308
|
|
15
15
|
sandboxy/cli/__init__.py,sha256=WMN-u5rqs1uFuWArGP3crwz2_BXnZg_n6ShWZSSt68g,56
|
|
16
|
-
sandboxy/cli/main.py,sha256=
|
|
16
|
+
sandboxy/cli/main.py,sha256=h_xgwZk7Mlsa0eNrzUJG5ojLSIGeOi5h59cOTdFKDIk,40445
|
|
17
17
|
sandboxy/cli/type_detector.py,sha256=WH_xxtmeqeqoYH6oy3voa0_pVL4kjbuRPb3oamaIG-k,1352
|
|
18
18
|
sandboxy/core/__init__.py,sha256=OiBPYPUHF1Jw7qzYHHWqVubTijrQ9D_kazmdYnclHG0,62
|
|
19
19
|
sandboxy/core/async_runner.py,sha256=YsAg3WHnMDwyhenpEl5udLxpVcvkAvYEYH1PAMo70JI,28878
|
|
@@ -53,8 +53,8 @@ sandboxy/ui/dist/assets/index-CgAkYWrJ.css,sha256=sCfwceeJk7hUY1qmEA2oSPwbnHOsM5
|
|
|
53
53
|
sandboxy/ui/dist/assets/index-D4zoGFcr.js,sha256=xxmdveJYaGElKzkOPNVFuMJXKNGeZ3l-nhO-1Lkt5vY,387158
|
|
54
54
|
sandboxy/utils/__init__.py,sha256=lT3hC8XALceDRwUHPInw7bRGodueKQ8JHMgQebPCIxw,61
|
|
55
55
|
sandboxy/utils/time.py,sha256=9w5JEBA_t4mTdThUFBnY4gxzwSYIXcy0QWDIy8j-Xy4,511
|
|
56
|
-
sandboxy-0.0.
|
|
57
|
-
sandboxy-0.0.
|
|
58
|
-
sandboxy-0.0.
|
|
59
|
-
sandboxy-0.0.
|
|
60
|
-
sandboxy-0.0.
|
|
56
|
+
sandboxy-0.0.2.dist-info/METADATA,sha256=6M2GDa_eVILbA2VtOVmlBm-w-5ms_50R6uTUcoF2t9o,7047
|
|
57
|
+
sandboxy-0.0.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
58
|
+
sandboxy-0.0.2.dist-info/entry_points.txt,sha256=RkY2kImLhO74KTbwWB58DO_7pisdAx3GZBoY1BJ1VdE,98
|
|
59
|
+
sandboxy-0.0.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
60
|
+
sandboxy-0.0.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|