Conflux CRDT Shared State
v0.9.2Zero-dependency CRDT shared state and conflict-resolution MCP server for parallel AI agents.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
conflux_read
Read the current converged value of a shared CRDT key (PNCounter int, LWWRegister JSON value, MVRegister winning value + active conflicts, or ORSet list).
| Parameter | Type | Description |
|---|---|---|
key * | string | Shared state key (e.g. 'fleet.jobs_done' or 'arch.decision'). |
conflux_snapshot
Return a full JSON snapshot of all shared CRDT keys (optionally filtered by prefix), active MVRegister conflict count, and the canonical 64-hex SHA-256 state_hash.
| Parameter | Type | Description |
|---|---|---|
prefix | string | Optional key prefix filter (e.g. 'crew.' or 'tasks/'). |
conflux_register_set
Write any JSON value to a Last-Writer-Wins (LWW) register in shared Conflux state. Concurrent writes resolve deterministically with zero locks.
| Parameter | Type | Description |
|---|---|---|
key * | string | Register key to set. |
value * | Any JSON-serializable value (string, number, boolean, object, array). |
conflux_mv_write
Write a JSON value to a conflict-preserving Multi-Value Register (MVRegister). Sequential writes cleanly replace prior values, while un-synced concurrent writes from parallel agents are BOTH preserved in conflux_conflicts until resolved!
| Parameter | Type | Description |
|---|---|---|
key * | string | MVRegister key (e.g. 'spec.api_schema'). |
value * | JSON-serializable value proposed by this agent. | |
supersedes | array | Optional list of 'tick:agent' dots to supersede (defaults to all currently observed dots on this replica). |
conflux_conflicts
List all unresolved concurrent write conflicts across MVRegister keys, showing every competing agent's candidate value, causal dot ('tick:agent'), and current canonical winner.
| Parameter | Type | Description |
|---|---|---|
prefix | string | Optional key prefix to filter conflicts. |
conflux_resolve_conflict
Causally resolve all currently observed concurrent MVRegister candidates on 'key' into a single merged/agreed JSON value, clearing the conflict across the mesh.
| Parameter | Type | Description |
|---|---|---|
key * | string | Conflicted MVRegister key to resolve. |
resolved_value * | Merged/agreed JSON value superseding all prior candidates. |
conflux_counter_add
Atomically increment (delta > 0) or decrement (delta < 0) a lock-free shared PNCounter across concurrent agents.
| Parameter | Type | Description |
|---|---|---|
key * | string | Counter key. |
delta | integer | Non-zero integer to add (positive increments, negative decrements). |
conflux_set_add
Add an item to a conflict-free Observed-Remove Set (ORSet) in shared state.
| Parameter | Type | Description |
|---|---|---|
key * | string | Set key (e.g. 'swarm.findings'). |
value * | JSON-serializable element to add. | |
tag | string | Optional unique tag (save this tag if you plan to remove the item later). |
conflux_set_remove
Tombstone-remove an element tag from a shared Observed-Remove Set (ORSet).
| Parameter | Type | Description |
|---|---|---|
key * | string | Set key. |
tag * | string | Tag previously used in conflux_set_add. |
conflux_batch
Execute multiple CRDT mutations sequentially in one tool call (ops: register_set, mv_write, counter_add, set_add, set_remove).
| Parameter | Type | Description |
|---|---|---|
operations * | array | List of mutation specs: {op, key, value/delta/tag}. |
conflux_claim_resource
Advisory file/task claim with TTL lease so parallel coding agents (Claude Code, Cursor) avoid editing the same file simultaneously. Reports 'conflict' if another agent holds an active lease.
| Parameter | Type | Description |
|---|---|---|
resource * | string | File path or resource identifier (e.g. 'src/auth.py'). |
force | boolean | Steal the claim even if another agent's lease has not expired yet. |
intent | string | Short note describing what this agent is doing with the resource. |
ttl_seconds | number | Lease duration in seconds before automatic expiry (default 120). |
conflux_release_resource
Release an advisory resource/file lease previously claimed by this agent.
| Parameter | Type | Description |
|---|---|---|
resource * | string | File path or resource identifier. |
conflux_watch_wait
Wait up to timeout_seconds until 'key' changes from 'since_value' (or becomes non-null), enabling event-driven handoffs between parallel MCP agents.
| Parameter | Type | Description |
|---|---|---|
key * | string | Key to watch. |
since_value | Return immediately once current value differs from since_value. | |
timeout_seconds | number | Max seconds to wait (capped at 30s). |
conflux_task_update
Create or update a replicated multi-agent task record under 'tasks/<task_id>' (status: created | running | done | failed) so parallel agents coordinate work queues.
| Parameter | Type | Description |
|---|---|---|
status * | string | New lifecycle status for the task. |
task_id * | string | Unique task identifier. |
error | string | Optional error message when status='failed'. |
kind | string | Task category/type (used when creating a task). |
result | Optional JSON result payload when status='done'. | |
step | string | Optional current step label. |