RB rig-bridge
v1.0.0 transport surface complete

Two rigs. One git-native bridge.

rig-bridge lets paired dev machines exchange typed YAML+markdown envelopes through a shared git repo. Eight CLI commands, schema-validated frontmatter, §4.1 body_hash drift detection, and a refuse-non-fast-forward sync that never silently merges.

Install

npm install -g @mcptoolshop/rig-bridge

Init

rig-bridge init --rig-id mac-m5max

Send

rig-bridge send HANDOFF --thread alpha --to windows-5080

Features

What v1.0.0 ships.

Typed envelopes

YAML frontmatter validated against a JSON Schema 2020-12 contract. Ten message types (REQUEST / HANDOFF / RESPONSE / ACK / RESOLUTION / STATE / RESULT / RECOVERY / VERIFY / DECISIONS), five lifecycle markers (▶ ⏸ 🎯 ✅ ❌), kebab-case rig ids.

Drift detection

Every envelope carries a SHA-256 body_hash computed over §4.1-normalized body (CRLF→LF, trim trailing whitespace, one terminal newline, BOM strip). Cross-rig drift is provable, not hopeful.

Surfacing sync

rig-bridge sync auto-resolves only the fast-forward case. Non-FF and any modified existing file refuses + surfaces the divergence at the sync boundary (Fossil-style named divergence; Horvitz 1999 mixed-initiative principles).

Human-attested relay

rig-bridge relay records DECISIONS / RESPONSE / ACK from a human-in-the-loop. Requires a -relay rig-id suffix AND a configured git signing key (Sigstore gitsign / GPG / SSH-sign). Envelope frontmatter carries attested_by + attested_at + nonce + in_reply_to.

Append-only by design

Envelopes are immutable files in per-thread directories. Stable IDs, dedupe by filename, no content-merge. Kafka / NATS-JetStream effectively-once semantics applied to a git transport.

329 tests, 8 commands

init / new / send / close / status / thread / sync / relay. Cross-rig E2E proven (Mac↔Windows, CRLF↔LF, 3-rig topology). Subprocess CLI tests on the built dist. v1.0.0 is product-ready.

Quick start

Install

npm install -g @mcptoolshop/rig-bridge
rig-bridge --version

Initialize a bridge clone

cd 
rig-bridge init --rig-id mac-m5max

Open a thread + send the first envelope

rig-bridge new bridge-onboarding-01
rig-bridge send HANDOFF \
  --thread bridge-onboarding-01 \
  --to windows-5080 \
  --tldr "first contact"

Glance at what is open

rig-bridge status
# → text table by default; pass --json for a stable schema_version: "1.0" object
rig-bridge status --json | jq '.threads[] | select(.dirty == true)'

Pull new envelopes from the peer rig

# Fast-forward only by default — refuses non-FF without --auto.
rig-bridge sync
rig-bridge sync --auto    # apply the fast-forward pull