backbeat: add module sources
This commit is contained in:
135
contracts/tests/examples/statusclaim-valid.json
Normal file
135
contracts/tests/examples/statusclaim-valid.json
Normal file
@@ -0,0 +1,135 @@
|
||||
[
|
||||
{
|
||||
"description": "Worker executing a batch processing task",
|
||||
"message": {
|
||||
"type": "backbeat.statusclaim.v1",
|
||||
"agent_id": "search-indexer:worker-03",
|
||||
"task_id": "index-batch:20250905-120",
|
||||
"beat_index": 1337,
|
||||
"state": "executing",
|
||||
"beats_left": 3,
|
||||
"progress": 0.65,
|
||||
"notes": "processing batch 120/200",
|
||||
"hlc": "7ffd:0001:beef",
|
||||
"resources": {
|
||||
"cpu_percent": 85.0,
|
||||
"memory_mb": 2048,
|
||||
"disk_io_ops": 1250,
|
||||
"network_kb": 512
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Failed backup agent with error details",
|
||||
"message": {
|
||||
"type": "backbeat.statusclaim.v1",
|
||||
"agent_id": "agent:backup-runner",
|
||||
"beat_index": 1338,
|
||||
"state": "failed",
|
||||
"beats_left": 0,
|
||||
"progress": 0.0,
|
||||
"notes": "connection timeout to storage backend",
|
||||
"hlc": "7ffe:0002:dead",
|
||||
"metadata": {
|
||||
"agent_version": "2.1.0",
|
||||
"error_code": "STORAGE_TIMEOUT",
|
||||
"retry_count": 3
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "ML trainer helping another node",
|
||||
"message": {
|
||||
"type": "backbeat.statusclaim.v1",
|
||||
"agent_id": "ml-trainer:gpu-node-1",
|
||||
"beat_index": 1336,
|
||||
"state": "helping",
|
||||
"progress": 1.0,
|
||||
"notes": "completed own work, assisting node-2 with large model",
|
||||
"hlc": "7ffc:0005:cafe",
|
||||
"dependencies": ["ml-trainer:gpu-node-2"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Idle agent waiting for work",
|
||||
"message": {
|
||||
"type": "backbeat.statusclaim.v1",
|
||||
"agent_id": "worker:standby-01",
|
||||
"beat_index": 1339,
|
||||
"state": "idle",
|
||||
"progress": 0.0,
|
||||
"hlc": "8000:0000:1111"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Agent in planning phase",
|
||||
"message": {
|
||||
"type": "backbeat.statusclaim.v1",
|
||||
"agent_id": "coordinator:main",
|
||||
"task_id": "deploy:v2.1.0",
|
||||
"beat_index": 1340,
|
||||
"state": "planning",
|
||||
"beats_left": 5,
|
||||
"progress": 0.2,
|
||||
"notes": "analyzing dependency graph",
|
||||
"hlc": "8001:0001:2222",
|
||||
"resources": {
|
||||
"cpu_percent": 15.0,
|
||||
"memory_mb": 512
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Reviewing agent with completed task",
|
||||
"message": {
|
||||
"type": "backbeat.statusclaim.v1",
|
||||
"agent_id": "quality-checker:auto",
|
||||
"task_id": "validate:batch-45",
|
||||
"beat_index": 1341,
|
||||
"state": "reviewing",
|
||||
"beats_left": 1,
|
||||
"progress": 0.9,
|
||||
"notes": "final verification of output quality",
|
||||
"hlc": "8002:0002:3333"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Completed agent ready for next task",
|
||||
"message": {
|
||||
"type": "backbeat.statusclaim.v1",
|
||||
"agent_id": "processor:fast-01",
|
||||
"task_id": "process:item-567",
|
||||
"beat_index": 1342,
|
||||
"state": "completed",
|
||||
"beats_left": 0,
|
||||
"progress": 1.0,
|
||||
"notes": "item processed successfully",
|
||||
"hlc": "8003:0003:4444"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Blocked agent waiting for external dependency",
|
||||
"message": {
|
||||
"type": "backbeat.statusclaim.v1",
|
||||
"agent_id": "data-loader:external",
|
||||
"task_id": "load:dataset-789",
|
||||
"beat_index": 1343,
|
||||
"state": "blocked",
|
||||
"beats_left": 10,
|
||||
"progress": 0.1,
|
||||
"notes": "waiting for external API rate limit reset",
|
||||
"hlc": "8004:0004:5555",
|
||||
"dependencies": ["external-api:rate-limiter"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Minimal valid status claim (only required fields)",
|
||||
"message": {
|
||||
"type": "backbeat.statusclaim.v1",
|
||||
"agent_id": "simple:agent",
|
||||
"beat_index": 1344,
|
||||
"state": "idle",
|
||||
"hlc": "8005:0005:6666"
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user