Initial fleet-api skill
This commit is contained in:
51
SKILL.md
Normal file
51
SKILL.md
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
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`.
|
||||
Reference in New Issue
Block a user