[taskboard] migrate fleet console to nextjs

This commit is contained in:
2026-03-06 14:44:27 -08:00
parent 94e54dc144
commit a765b3d22f
48 changed files with 5483 additions and 790 deletions

200
README.md
View File

@@ -1,138 +1,92 @@
# OpenClaw Agent Fleet Dashboard
# Claw Fleet Console
A real-time task coordination board for the OpenClaw agent fleet.
`openclaw-taskboard` is now a `Next.js + React + Tailwind + shadcn-style` dashboard for the deployed Claw fleet.
## Features
It tracks and visualizes:
- **Kanban Board**: Backlog → Todo → In Progress → Review → Done
- **Agent Assignment**: Assign tasks to specific OpenClaw agents
- **Priority Levels**: High, Medium, Low
- **Tags**: Categorize tasks with tags
- **Wiki Auto-Generation**: Completed tasks generate wiki documentation
- **Real-time Updates**: WebSocket-powered live updates
- **REST API**: For agent heartbeat integration
- OpenClaw swarm agents on `ubuntu`
- ZeroClaw host runtimes on `grizzley` and `ice`
- shared task assignment across both families
- wiki pages and architecture documentation rendered in the UI
## Quick Start
## Stack
- Next.js App Router
- React 19
- Tailwind CSS
- shadcn-style UI components under `components/ui`
- SQLite task storage
## Key Pages
- `/tasks` - unified Kanban board
- `/agents` - configured OpenClaw and ZeroClaw runtimes
- `/architecture` - deployed architecture documentation with ASCII topology
- `/wiki` - markdown-backed runbooks and generated docs
- `/usage` - usage aggregates from the local tracking table
## Fleet Model
### OpenClaw
- Host: `ubuntu`
- Service: `openclaw.service`
- Runtime: `/srv/state/openclaw/current`
- Config: `~/.openclaw/openclaw.json`
- Channels:
- Telegram DM allowlist
- Homelab HQ forum topics
- local gateway on `:18789`
### ZeroClaw
- Primary runtime: `grizzley`
- Control-plane runtime: `ice`
- Runtime roots:
- `/srv/state/zeroclaw/current`
- `/home/bear/.zeroclaw-admin`
- Channels:
- paired HTTP gateway access
- Homelab-Ice forum topics
- remote gateway routing from `ice`
## Important Environment Variables
- `DB_PATH`
- `WIKI_DIR`
- `AGENTS_DIR`
- `SESSIONS_DIR`
- `OPENCLAW_CONFIG`
- `ZEROCLAW_PRIMARY_DIR`
- `ZEROCLAW_CONTROL_DIR`
## Development
```bash
cd /home/bear/homelab/ubuntu/taskboard
docker compose up -d --build
npm install
npm run dev
```
Access at: https://agentdash.local.tophermayor.com
## API Endpoints
### Tasks
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/api/tasks` | List all tasks (filter: `?assignee=ubuntu&status=todo`) |
| GET | `/api/tasks/:id` | Get single task |
| POST | `/api/tasks` | Create task |
| PATCH | `/api/tasks/:id` | Update task |
| POST | `/api/tasks/:id/complete` | Complete task (creates wiki) |
| DELETE | `/api/tasks/:id` | Delete task |
### Wiki
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/api/wiki` | List wiki pages |
| GET | `/api/wiki/:filename` | Get wiki page content |
### Agent Heartbeat
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/api/heartbeat/:agent` | Get pending tasks for agent |
## Agent Integration
Add to agent's HEARTBEAT.md:
## Production Build
```bash
# Check for assigned tasks
TASKS=$(curl -s http://192.168.50.61:8395/api/heartbeat/ubuntu)
# If tasks pending, process them
if echo "$TASKS" | jq -e '.pending_tasks > 0' > /dev/null; then
echo "Processing assigned tasks..."
# Process tasks...
fi
npm run build
npm start
```
## Example: Create Task via API
## Deployment Shape On Ubuntu
```bash
curl -X POST http://localhost:8395/api/tasks \
-H "Content-Type: application/json" \
-d '{
"title": "Restart PostgreSQL container",
"description": "The postgres-shared container needs a restart for config changes",
"assignee": "ubuntu",
"priority": "high",
"tags": ["docker", "database"]
}'
```
- app source checkout: `/srv/apps/openclaw-taskboard/current`
- taskboard data: `/srv/state/openclaw-taskboard/data`
- OpenClaw mounts:
- `/home/bear/.openclaw/agents`
- `/home/bear/.openclaw/openclaw.json`
- `/home/bear/.openclaw/workspace/wiki`
- ZeroClaw mounts:
- `/srv/state/zeroclaw/current`
- `/home/bear/.zeroclaw-admin`
## Example: Complete Task with Wiki
## Notes
```bash
curl -X POST http://localhost:8395/api/tasks/TASK_ID/complete \
-H "Content-Type: application/json" \
-d '{
"implementation_details": "Restarted the container using docker restart postgres-shared. Verified connections working.",
"files_changed": ["/home/bear/homelab/ubuntu/postgres/docker-compose.yml"]
}'
```
## Task Schema
```json
{
"id": "uuid",
"title": "string",
"description": "string",
"assignee": "ubuntu|pve|truenas|grizzley|ice|panda|zeroclaw|docs",
"status": "backlog|todo|in_progress|review|done",
"priority": "high|medium|low",
"tags": ["array", "of", "tags"],
"created_at": "ISO timestamp",
"updated_at": "ISO timestamp",
"completed_at": "ISO timestamp or null",
"wiki_path": "filename.md or null"
}
```
## Directory Structure
```
taskboard/
├── docker-compose.yml
├── Dockerfile
├── README.md
├── package.json
├── server.js
├── client/
│ └── index.html
├── public/
│ ├── index.html
│ └── app.js
├── data/
│ └── tasks.db (SQLite)
└── wiki/
└── (auto-generated wiki pages)
```
## Deployment
The taskboard is deployed on the ubuntu host at:
- **URL**: https://agentdash.local.tophermayor.com
- **Port**: 8395
- **Container**: openclaw-taskboard
- **Traefik Route**: /home/bear/homelab/ubuntu/traefik/config/dynamic/taskboard.yml
## License
MIT
- The UI intentionally treats OpenClaw and ZeroClaw as separate families with different runtime and channel models.
- `ice` ZeroClaw remains tied to host-local secret/encryption state; the dashboard reads that runtime but does not attempt to rewrite it.