Skip to content

agent-2pc v1.5.0: Multi-Node Cluster Network Transport & Distributed 2PC TCP Protocol

Choose a tag to compare

@ronitgupta138 ronitgupta138 released this 15 Oct 10:20
· 22 commits to main since this release
39eafcc

🚀 agent-2pc v1.5.0 Production Release

Bring database ACID transactional finality to autonomous AI agents, tool orchestrators, and MCP execution pipelines with zero dirty state, sub-2ms transaction latency, and deterministic crash recovery.


🌟 What's New in v1.5.0

  • Multi-Node Cluster Network Transport (src/transport.rs):
    • High-performance, zero-dependency TCP network transport for cross-container and multi-host distributed 2PC agent swarms.
    • ClusterNodeServer: Non-blocking multi-threaded TCP listener handling remote 2PC coordinator requests.
    • ClusterTransportClient: Direct socket client dispatching wire packets with timeout containment.
  • Wire-Level 2PC Protocol Handshake:
    • Implements full network serialization for PrepareRequest, PrepareResponse, CommitRequest, CommitResponse, AbortRequest, and AbortResponse.
    • Integrates with ClusterCoordinator consensus evaluation across heterogeneous physical nodes.
  • Transparent Command Side-Effect Staging (agent-2pc exec):
    • Run arbitrary compilers, linters, migration scripts, or test harnesses directly against the workspace (ExecRunner::execute_and_stage).
    • Automatic directory-wide file fingerprinting (CRC32) before and after process execution.
    • Automatically identifies all newly created and modified files, creates clean .bak snapshots, and auto-stages mutations into Phase 1 2PC receipts with zero manual effort.
  • In-Memory UDS Daemon & IPC Connection Pooling (agent-2pc daemon):
    • Persistent background service managing transaction state in memory over .agent-tx/agent-2pc.sock.
    • Eliminates filesystem lock contention across concurrent multi-agent tool loops.
  • Nested Savepoints & Speculative Execution (agent-2pc savepoint / rollback-to):
    • Branch into speculative refactors and selectively unwind failed steps back to named checkpoints without aborting verified preceding stages.
  • Zero-Downtime WAL Compaction & Checkpoint Engine (agent-2pc compact):
    • Purges historical committed/aborted records into clean snapshot barriers (0x4132534E), dropping cold-boot recovery from $O(N)$ to $O(1)$.

📦 Installation & Quickstart

Direct Binary Download (Linux x86_64)

curl -fsSL https://github.com/ronitgupta138/agent-2pc/releases/download/v1.5.0/agent-2pc-v1.5.0-x86_64-unknown-linux-gnu.tar.gz | tar -xz
sudo mv agent-2pc /usr/local/bin/

Cargo Install

cargo install agent-2pc

Drop-in MCP Setup (claude_desktop_config.json)

{
  "mcpServers": {
    "agent-2pc": {
      "command": "agent-2pc",
      "args": ["mcp"]
    }
  }
}

🧪 Verification & Benchmarks

  • 39/39 Tests Passing across 9 integration test suites.
  • 114.4 tx/sec verified 2PC round throughput with physical disk fsync.
  • p50 = 1.72ms hardware-accelerated CRC32 Write-Ahead Log durability.
  • Zero clippy warnings on Rust 2024 edition (cargo clippy --all-targets -- -D warnings).