idempotency-registry
Idempotency registry: has key K already been done? Claim it, complete it, read the stored result — Shared memory for side-effecting operations across agents and retries. begin(key) answers proceed (you hold a short claim), wait (another owner is mid-flight), already_completed (returns the stored result pointer), or fingerprint_mismatch (same key, different operation). complete(key) records the result pointer; abandon(key) lets someone retry. The claim expires, so a crashed worker does not block
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"op": "<op>",
"key": "<key>"
},
"name": "idempotency-registry"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| key | Yes | Idempotency key, e.g. refund:ch_123:2026-11-04. | |
| owner | No | Worker id; required for begin, complete and abandon. | |
| result | No | complete: where the outcome lives (do not store payloads here). | |
| tenantId | No | Required for API-key callers (namespaced as key:<tenantId>; keep it unguessable). Ignored when a wallet paid: the payer address is the tenant. | |
| requestId | No | Caller-chosen id for this mutation. A retry with the same id and same input returns the stored response (24 h) instead of applying twice; the same id with different input is rejected. Send one on every mutation you may retry: without it a retry is applied again (fleet-memory record appends a duplicate; a repeated spend-ledger commit or release answers NO_HOLD because the first call already took effect). | |
| fingerprint | No | Hash of the operation's identity fields; a later begin with a different fingerprint is refused. | |
| claimSeconds | No | How long a begin claim lasts; default 300. | |
| retentionHours | No | How long a completed key is remembered; default 24. |