Files
fleet-api/SKILL.md
2026-02-03 00:46:23 +01:00

52 lines
1.1 KiB
Markdown

---
name: fleet-api
description: Machine registry API for fleet management
metadata:
version: "1.0.0"
vibestack:
main: false
requires: []
---
# Fleet API
Minimal REST API for machine registration and discovery.
## Endpoints
| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/api/machines/register` | Register/heartbeat a machine |
| GET | `/api/machines` | List all registered machines |
| DELETE | `/api/machines/:id` | Unregister a machine |
## Registration Payload
```json
{
"id": "machine-uuid",
"name": "dev-machine-1",
"url": "http://192.168.1.10:3000",
"version": "1.0.0",
"skills": ["caddy", "ttyd", "dashboard"],
"status": "running"
}
```
## Dependencies
Requires `socat` and `jq` to be installed:
```bash
apt-get install -y socat jq
```
## Configuration
- `FLEET_API_PORT` - API server port (default: 3001)
- `FLEET_DATA_DIR` - Data directory (default: /data/fleet)
## Storage
Machines stored in `machines.json` with `lastSeen` timestamps.
Machines with `lastSeen` > 60 seconds are marked as `status: unknown`.