Metadata-Version: 2.4
Name: actobotics
Version: 0.9.6
Summary: Robotics proof-of-execution SDK
Project-URL: Homepage, https://actobotics.net
Project-URL: Documentation, https://api.actobotics.net/dashboard
Project-URL: Repository, https://github.com/actobotics/ACTO
Project-URL: Issues, https://github.com/actobotics/ACTO/issues
Author: ACTO Contributors
License: MIT License
        
        Copyright (c) 2025 ACTO
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: proof,robotics,solana,telemetry,verification,web3
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: blake3>=0.4.1
Requires-Dist: cryptography>=42.0
Requires-Dist: httpx>=0.27
Requires-Dist: orjson>=3.10
Requires-Dist: pydantic-settings>=2.3
Requires-Dist: pydantic>=2.7
Requires-Dist: pyjwt>=2.8
Requires-Dist: pynacl>=1.5.0
Requires-Dist: python-json-logger>=2.0.7
Requires-Dist: rich>=13.7
Requires-Dist: sqlalchemy>=2.0
Requires-Dist: tenacity>=8.2
Requires-Dist: typer>=0.12
Provides-Extra: all
Requires-Dist: alembic>=1.13; extra == 'all'
Requires-Dist: bandit>=1.7; extra == 'all'
Requires-Dist: boto3>=1.34.0; extra == 'all'
Requires-Dist: build>=1.0; extra == 'all'
Requires-Dist: coverage>=7.5; extra == 'all'
Requires-Dist: fastapi>=0.112; extra == 'all'
Requires-Dist: hvac>=1.2.0; extra == 'all'
Requires-Dist: hypothesis>=6.100; extra == 'all'
Requires-Dist: locust>=2.24; extra == 'all'
Requires-Dist: mangum>=0.17.0; extra == 'all'
Requires-Dist: mypy>=1.11; extra == 'all'
Requires-Dist: pandas>=2.0.0; extra == 'all'
Requires-Dist: pre-commit>=3.6; extra == 'all'
Requires-Dist: protobuf>=5.0.0; extra == 'all'
Requires-Dist: pyarrow>=15.0.0; extra == 'all'
Requires-Dist: pytest-asyncio>=0.23; extra == 'all'
Requires-Dist: pytest-cov>=5.0; extra == 'all'
Requires-Dist: pytest-timeout>=2.2; extra == 'all'
Requires-Dist: pytest-xdist>=3.5; extra == 'all'
Requires-Dist: pytest>=8.2; extra == 'all'
Requires-Dist: rclpy>=3.3.0; extra == 'all'
Requires-Dist: redis>=5.0; extra == 'all'
Requires-Dist: rosbag2>=0.24.0; extra == 'all'
Requires-Dist: ruff>=0.6.9; extra == 'all'
Requires-Dist: safety>=3.0; extra == 'all'
Requires-Dist: solana>=0.35.1; extra == 'all'
Requires-Dist: sqlalchemy>=2.0; extra == 'all'
Requires-Dist: twine>=5.0; extra == 'all'
Requires-Dist: uvicorn[standard]>=0.30; extra == 'all'
Provides-Extra: aws
Requires-Dist: boto3>=1.34.0; extra == 'aws'
Provides-Extra: dev
Requires-Dist: alembic>=1.13; extra == 'dev'
Requires-Dist: bandit>=1.7; extra == 'dev'
Requires-Dist: build>=1.0; extra == 'dev'
Requires-Dist: coverage>=7.5; extra == 'dev'
Requires-Dist: fastapi>=0.112; extra == 'dev'
Requires-Dist: hypothesis>=6.100; extra == 'dev'
Requires-Dist: locust>=2.24; extra == 'dev'
Requires-Dist: mangum>=0.17.0; extra == 'dev'
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pre-commit>=3.6; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest-timeout>=2.2; extra == 'dev'
Requires-Dist: pytest-xdist>=3.5; extra == 'dev'
Requires-Dist: pytest>=8.2; extra == 'dev'
Requires-Dist: ruff>=0.6.9; extra == 'dev'
Requires-Dist: safety>=3.0; extra == 'dev'
Requires-Dist: sqlalchemy>=2.0; extra == 'dev'
Requires-Dist: twine>=5.0; extra == 'dev'
Requires-Dist: uvicorn[standard]>=0.30; extra == 'dev'
Provides-Extra: full
Requires-Dist: boto3>=1.34.0; extra == 'full'
Requires-Dist: hvac>=1.2.0; extra == 'full'
Requires-Dist: pandas>=2.0.0; extra == 'full'
Requires-Dist: protobuf>=5.0.0; extra == 'full'
Requires-Dist: pyarrow>=15.0.0; extra == 'full'
Requires-Dist: rclpy>=3.3.0; extra == 'full'
Requires-Dist: redis>=5.0; extra == 'full'
Requires-Dist: rosbag2>=0.24.0; extra == 'full'
Requires-Dist: solana>=0.35.1; extra == 'full'
Provides-Extra: mysql
Requires-Dist: mysqlclient>=2.2; extra == 'mysql'
Provides-Extra: parquet
Requires-Dist: pandas>=2.0.0; extra == 'parquet'
Requires-Dist: pyarrow>=15.0.0; extra == 'parquet'
Provides-Extra: protobuf
Requires-Dist: protobuf>=5.0.0; extra == 'protobuf'
Provides-Extra: psycopg2
Requires-Dist: psycopg2-binary>=2.9; extra == 'psycopg2'
Provides-Extra: redis
Requires-Dist: redis>=5.0; extra == 'redis'
Provides-Extra: ros
Requires-Dist: rclpy>=3.3.0; extra == 'ros'
Requires-Dist: rosbag2>=0.24.0; extra == 'ros'
Provides-Extra: security
Requires-Dist: boto3>=1.34.0; extra == 'security'
Requires-Dist: hvac>=1.2.0; extra == 'security'
Provides-Extra: server
Requires-Dist: alembic>=1.13; extra == 'server'
Requires-Dist: fastapi>=0.112; extra == 'server'
Requires-Dist: mangum>=0.17.0; extra == 'server'
Requires-Dist: sqlalchemy>=2.0; extra == 'server'
Requires-Dist: uvicorn[standard]>=0.30; extra == 'server'
Provides-Extra: solana
Requires-Dist: solana>=0.35.1; extra == 'solana'
Provides-Extra: vault
Requires-Dist: hvac>=1.2.0; extra == 'vault'
Description-Content-Type: text/markdown

# ACTO

**Robotics-first proof-of-execution toolkit.**

Generate deterministic, signed execution proofs from robot telemetry and logs. Verify proofs via the ACTO API. Fast, gas-free verification.

[![PyPI version](https://img.shields.io/pypi/v/actobotics.svg)](https://pypi.org/project/actobotics/)
[![Python versions](https://img.shields.io/pypi/pyversions/actobotics.svg)](https://pypi.org/project/actobotics/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

---

## 🌐 Links

| | |
|---|---|
| 🌍 **Website** | [actobotics.net](https://actobotics.net) |
| 📊 **Dashboard** | [api.actobotics.net/dashboard](https://api.actobotics.net/dashboard) |
| 🐦 **X (Twitter)** | [@actoboticsnet](https://x.com/actoboticsnet) |
| 📖 **API Docs** | [docs/API.md](docs/API.md) |
| 📦 **PyPI** | [pypi.org/project/actobotics](https://pypi.org/project/actobotics/) |

---

## ✨ Features

- **Python SDK** - Create execution proofs locally
- **API Verification** - Verify proofs via the hosted ACTO API
- **REST API** - FastAPI verification service at api.actobotics.net
- **Multi-Wallet Dashboard** - Phantom, Solflare, Backpack, Glow, Coinbase
- **Fleet Management** - Monitor and organize your robot fleet
- **Token Gating** - SPL token balance checks (off-chain)
- **Async Support** - Full async/await API
- **CLI Tools** - Interactive mode, shell completion

---

## 🚀 Quick Start

### Install the SDK

```bash
pip install actobotics
```

That's it! The SDK connects to the hosted API at `api.actobotics.net`.

### Optional Dependencies

```bash
# With Solana integration
pip install actobotics[solana]

# With all optional features (Solana, Redis, ROS, etc.)
pip install actobotics[full]
```

### Basic Usage

```bash
# Generate keypair
acto keys generate

# Create proof from telemetry
acto proof create \
  --task-id "task-001" \
  --source examples/telemetry/sample_telemetry.jsonl
```

---

## 📦 SDK Usage

### Create Proofs Locally

```python
from acto.proof import create_proof
from acto.telemetry.models import TelemetryBundle, TelemetryEvent
from acto.crypto import KeyPair

# Generate keypair
keypair = KeyPair.generate()

# Create telemetry bundle
bundle = TelemetryBundle(
    task_id="task-001",
    robot_id="robot-001",
    events=[TelemetryEvent(ts="2025-01-01T00:00:00Z", topic="sensor", data={"value": 42})]
)

# Create proof locally
envelope = create_proof(bundle, keypair.private_key_b64, keypair.public_key_b64)
```

### Verify & Submit via API

All proof verification must be done through the ACTO API. This ensures integrity, compliance, and enables fleet tracking.

```python
from acto.client import ACTOClient

# Connect to hosted API
client = ACTOClient(
    api_key="acto_xxx...",           # From dashboard
    wallet_address="ABC123..."        # Your Solana wallet
)

# Verify proof via API (required)
result = client.verify(envelope)
print(f"Proof valid: {result.valid}")

# Submit proof to registry
proof_id = client.submit_proof(envelope)
print(f"Submitted: {proof_id}")

# Search proofs
results = client.search_proofs(robot_id="robot-001", limit=10)
for proof in results.items:
    print(f"  - {proof.task_id}")

# Fleet management
fleet = client.fleet.get_overview()
print(f"Total devices: {fleet.summary.total_devices}")

# Report robot health
client.fleet.report_health(
    "robot-001",
    cpu_percent=45.2,
    battery_percent=85.0
)
```

---

## 🌐 API Access

Use the hosted API at `https://api.actobotics.net`:

1. **Get an API Key** at [api.actobotics.net/dashboard](https://api.actobotics.net/dashboard)
2. **Connect your Solana wallet** (requires 50,000 ACTO tokens)
3. **Use the SDK client** (recommended) or make direct API calls:

```python
# Recommended: Use the SDK client
from acto.client import ACTOClient
client = ACTOClient(api_key="...", wallet_address="...")
```

Or with curl:

```bash
curl -X POST https://api.actobotics.net/v1/proofs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Wallet-Address: YOUR_WALLET" \
  -H "Content-Type: application/json" \
  -d '{"envelope": {...}}'
```

### API Endpoints

| Endpoint | Description |
|----------|-------------|
| `POST /v1/proofs` | Submit a proof |
| `GET /v1/proofs` | List proofs |
| `POST /v1/proofs/search` | Search & filter proofs |
| `POST /v1/verify` | Verify a proof |
| `POST /v1/verify/batch` | Batch verify proofs |
| `GET /v1/stats/wallet/{addr}` | Wallet statistics |
| `POST /v1/access/check` | Check token balance |
| `GET /v1/fleet` | Fleet overview |
| `GET /v1/fleet/devices/{id}` | Device details |
| `GET /v1/fleet/groups` | List device groups |

📖 **Full API documentation:** [docs/API.md](docs/API.md)

---

## 🤖 Fleet Management

Monitor and manage your robot fleet from the dashboard:

- **Device Overview** - See all devices with status and activity
- **Custom Names** - Rename devices for easy identification
- **Device Groups** - Organize robots (e.g., "Warehouse A", "Production Line")
- **Health Monitoring** - CPU, RAM, battery status (optional)
- **Activity Logs** - View complete proof history per device

```python
# Report device health (all fields optional)
import httpx

httpx.post(
    "https://api.actobotics.net/v1/fleet/devices/robot-001/health",
    headers={"Authorization": f"Bearer {JWT_TOKEN}"},
    json={
        "cpu_percent": 45.2,
        "memory_percent": 68.0,
        "battery_percent": 85.0
    }
)
```

---

## 🔐 Token Gating

API requests automatically verify your wallet holds sufficient tokens (via Helius RPC).

For manual balance checks via CLI:

```bash
acto access check \
  --owner WALLET_ADDRESS \
  --mint TOKEN_MINT \
  --minimum 50000
```

> **Note:** The `--rpc` flag is optional. If omitted, defaults to the configured RPC.

---

## 📚 Documentation

| Document | Description |
|----------|-------------|
| [API.md](docs/API.md) | REST API reference |
| [ARCHITECTURE.md](docs/ARCHITECTURE.md) | System architecture |
| [PROTOCOL.md](docs/PROTOCOL.md) | Proof protocol specification |
| [SECURITY.md](docs/SECURITY.md) | Security features & configuration |
| [THREAT_MODEL.md](docs/THREAT_MODEL.md) | Security threat model |
| [CHANGELOG.md](CHANGELOG.md) | Version history & release notes |
| [CONTRIBUTING.md](CONTRIBUTING.md) | Contribution guidelines |

---

## 🛠️ Self-Hosted Setup (Contributors)

<details>
<summary>Click to expand self-hosted installation instructions</summary>

If you want to run your own ACTO server or contribute to development:

### Clone & Install

```bash
git clone https://github.com/actobotics/ACTO.git
cd ACTO

# Install with all dependencies including server
pip install -e ".[dev]"
```

### Run the Server

```bash
# Start API server
acto server run

# Or with uvicorn directly
uvicorn acto_server.app:app --reload --port 8080
```

### Run Tests

```bash
# Run tests
pytest

# Run with coverage
pytest --cov=acto --cov-report=html

# Load tests
locust -f tests/load/locustfile.py
```

### Docker

```bash
# Run with docker-compose
docker-compose up -d

# Or build manually
docker build -t acto .
docker run -p 8080:8080 acto
```

### Project Structure

```
ACTO/
├── acto/              # SDK (published to PyPI)
│   ├── proof/         # Proof creation & verification
│   ├── crypto/        # Keys, signing, hashing
│   ├── telemetry/     # Telemetry parsing & normalization
│   ├── registry/      # Local proof storage
│   └── ...
├── acto_cli/          # CLI tools (published to PyPI)
├── acto_server/       # FastAPI server (NOT published)
├── api/               # Vercel serverless functions
├── tests/             # Test suite
└── docs/              # Documentation
```

</details>

---

## 📄 License

MIT. See [LICENSE](LICENSE).

---

<p align="center">
  <a href="https://actobotics.net">Website</a> •
  <a href="https://api.actobotics.net/dashboard">Dashboard</a> •
  <a href="https://x.com/actoboticsnet">X (Twitter)</a> •
  <a href="https://pypi.org/project/actobotics/">PyPI</a>
</p>
