[taskboard] add heartbeat task pickup

This commit is contained in:
2026-03-07 14:41:29 -08:00
parent 01c9a206ab
commit 0a312dc733
5 changed files with 244 additions and 1 deletions

View File

@@ -39,6 +39,7 @@ It tracks and visualizes:
- direct SSH dispatch for `pve`, `truenas`, and `panda`
- task callback API for remote completion/result sync
- OpenClaw registry sync API for swarm task state reconciliation
- heartbeat pickup API at `/api/heartbeat/{agent}` for queue inspection and self-dispatch
- failure queue and dispatch history views
- family-specific runtime views for OpenClaw and ZeroClaw plus unified direct-host visibility
- architecture documentation rendered directly from tracked config
@@ -99,6 +100,24 @@ It tracks and visualizes:
- `DIRECT_SSH_KEY_PATH`
- `DIRECT_SSH_TIMEOUT_MS`
## Heartbeat Pickup
Configured OpenClaw and ZeroClaw runtimes can hit:
```bash
curl -s http://127.0.0.1:8395/api/heartbeat/<agent>
```
The heartbeat endpoint will:
- sync OpenClaw swarm state before scheduling
- inspect the agent's assigned tasks
- skip tasks blocked by `depends-on:<task-id>` or `dependency:<task-id>` tags
- auto-dispatch the next runnable task when the agent does not already have an active unblocked task
- return queue state, blocked items, and any task that was dispatched during the heartbeat
This is the canonical path for agent-driven task pickup. Assignment alone does not start work; heartbeat pickup or an explicit dispatch does.
## Development
```bash