Sync & Convergence
Endpoints for journal synchronization between mesh nodes.
GET /api/v1/sync/convergence
Check convergence status for an agent’s journal.
Query parameters
| Param | Required | Description |
|---|---|---|
agent | yes | Agent name |
Response 200 OK
{
"agent": "researcher",
"local_seq": 142,
"peers": [
{"peer_id": "node-beta", "acked_seq": 140, "lag": 2},
{"peer_id": "node-gamma", "acked_seq": 142, "lag": 0}
],
"converged": false
}
converged is true when all peers have acknowledged the local sequence.
GET /api/v1/sync/envelopes
Retrieve sync envelopes (journal entries packaged for replication).
Query parameters
| Param | Type | Default | Description |
|---|---|---|---|
agent | string | required | Agent name |
since | integer | 0 | Return envelopes after this sequence |
limit | integer | 100 | Maximum envelopes to return |
Response 200 OK
{
"envelopes": [
{
"seq": 141,
"agent": "researcher",
"payload_hash": "sha256:abc123...",
"timestamp": "2026-03-17T10:00:00Z",
"signature": "ed25519:..."
}
]
}
POST /api/v1/sync/envelopes
Push envelopes from a remote peer. Used by the mesh sync protocol.
Request body
{
"peer_id": "node-beta",
"envelopes": [
{
"seq": 143,
"agent": "researcher",
"payload": "base64-encoded-data",
"signature": "ed25519:..."
}
]
}
Response 200 OK
{"accepted": 1, "rejected": 0}
Envelopes with invalid signatures or duplicate sequences are rejected.