Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,42 @@ $(MATURIN):
@python3 -m venv .venv || true
@.venv/bin/pip install --quiet maturin
@echo "Maturin installed successfully"

.PHONY: build-wheels build-wheels-local build-wheels-linux publish-pypi

# Build wheel for current platform only
build-wheels-local: $(MATURIN)
@echo "Building wheel for current platform..."
$(MATURIN) build --release -m server/Cargo.toml

# Build Linux wheels using Docker
build-wheels-linux:
@echo "Building Linux wheels using Docker..."
@command -v docker >/dev/null 2>&1 || { echo "Error: Docker not found"; exit 1; }
@echo "Building for Linux x86_64..."
docker run --rm --platform linux/amd64 -v $$(pwd):/io ghcr.io/pyo3/maturin build --release -m /io/server/Cargo.toml
@echo "Building for Linux aarch64..."
docker run --rm --platform linux/arm64 -v $$(pwd):/io ghcr.io/pyo3/maturin build --release -m /io/server/Cargo.toml

# Build all wheels (local + Linux if Docker available)
build-wheels: build-wheels-local build-wheels-linux

# Upload wheels to PyPI
publish-pypi: $(MATURIN) build-wheels
@if [ -z "$(INFTYAI_PYPI_TOKEN)" ]; then \
echo "Error: INFTYAI_PYPI_TOKEN environment variable not set"; \
exit 1; \
fi
@if [ ! -d "target/wheels" ] || [ -z "$$(ls -A target/wheels/*.whl 2>/dev/null)" ]; then \
echo "Error: No wheels found. Run 'make build-wheels' first"; \
exit 1; \
fi
@echo "Uploading wheels to PyPI..."
@ls target/wheels/*.whl
$(MATURIN) upload target/wheels/*.whl --skip-existing --username __token__ --password $(INFTYAI_PYPI_TOKEN)

.PHONY: publish-crate
# Publish daemon binary to crates.io
publish-crate:
@echo "Publishing sandd daemon to crates.io..."
cargo publish --package sandd
37 changes: 30 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,39 @@ Rust-powered WebSocket server with Python API for remote command execution and i

**Key Design**: Daemons connect **TO** the agent (not the other way around), so no ports need to be exposed on the execution plane.

## Quick Start
## Installation

### Python Package (Controller)

Install from PyPI:
```bash
pip install sandd
```

Or build from source:
```bash
git clone https://github.com/InftyAI/SandD
cd SandD
make install
```

### Daemon Binary (Worker)

Install from crates.io:
```bash
# Build
make install # Python package
make daemon-release # Worker binary
cargo install sandd
```

Or build from source:
```bash
git clone https://github.com/InftyAI/SandD
cd SandD
make daemon-release
# Binary at: ./target/release/sandd
```

## Quick Start

**Start controller:**

```python
Expand All @@ -82,9 +107,7 @@ print(result.stdout)
**Start worker:**

```bash
./target/release/sandd \
--server-url ws://controller:8765/ws \
--daemon-id worker-1
sandd --server-url ws://controller-ip:8765/ws --daemon-id worker-1
```

## Documentation
Expand Down
28 changes: 22 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@ build-backend = "maturin"

[project]
name = "sandd"
version = "0.1.0"
description = "SandD - A lightweight sandbox daemon that provides secure, isolated execution environments for agents."
version = "0.0.0"
description = "A lightweight sandbox daemon for secure agent execution in isolated environments."
readme = {file = "README.md", content-type = "text/markdown"}
requires-python = ">=3.8"
license = {text = "MIT"}
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"License :: OSI Approved :: MIT License",
authors = [
{name = "InftyAI", email = "contact@inftyai.com"}
]
keywords = ["agent", "daemon", "sandbox"]
dependencies = []

[project.urls]
Homepage = "https://github.com/InftyAI/SandD"
Repository = "https://github.com/InftyAI/SandD"

[project.optional-dependencies]
dev = [
"pytest>=7.0",
Expand All @@ -27,6 +31,18 @@ dev = [
module-name = "sandd._core"
python-source = "python"
features = ["pyo3/extension-module"]
include = [
"server/**/*",
"python/**/*",
"README.md",
"LICENSE",
]
exclude = [
"Cargo.toml",
"sandd/**/*",
"target/**/*",
".git/**/*",
]

[tool.pytest.ini_options]
asyncio_mode = "auto"
9 changes: 8 additions & 1 deletion sandd/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
[package]
name = "sandd"
version = "0.1.0"
version = "0.0.0"
edition = "2021"
license = "MIT"
description = "A lightweight sandbox daemon for secure agent execution in isolated environments."
repository = "https://github.com/InftyAI/SandD"
homepage = "https://github.com/InftyAI/SandD"
documentation = "https://github.com/InftyAI/SandD/tree/main/docs"
readme = "../README.md"
keywords = ["agent", "daemon", "sandbox"]
categories = ["command-line-utilities"]

[[bin]]
name = "sandd"
Expand Down
5 changes: 4 additions & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[package]
name = "sandbox-server"
version = "0.1.0"
version = "0.0.0"
edition = "2021"
license = "MIT"
description = "A lightweight sandbox daemon for secure agent execution in isolated environments."
repository = "https://github.com/InftyAI/SandD"
homepage = "https://github.com/InftyAI/SandD"

[lib]
name = "sandbox_server"
Expand Down
Loading