A secure, bidirectional communication bridge that enables TidalShift (causal pathway analysis) and FlowTrace (market/trade analysis) to share intelligence and collaborate on cross-domain financial insights.
- Continuous Signal Sharing -- periodic exchange of market intelligence signals (pathway alerts, trade signals, market confirmations, etc.)
- Cross-Consultation Queries -- each system can query the other for on-demand analysis
- Budget Protection -- enforces daily/hourly spending limits on cross-system LLM queries
- Anti-Amplification Guards -- prevents echo chambers via evidence weighting and corroboration requirements
- Secure Pairing -- cryptographic trust establishment using a shared cluster passphrase + Ed25519 keys
- Flexible Transport -- supports local (SQLite) and remote (HTTP) communication modes with automatic routing
- Python 3.10+
# Install from source
pip install -e .
# With dev dependencies
pip install -e ".[dev]"Run interactive setup on each system to generate identity keys and configuration:
tidalflowbridge-setup [--config-dir PATH]Remote pairing (different machines):
tidalflowbridge-pair --peer-url http://<host>:<port> [--config-dir PATH]Local pairing (same machine):
tidalflowbridge-pair --local --peer-identity <path> [--sqlite-path <shared-db>] [--config-dir PATH]tidalflowbridge-status [--config-dir PATH]Implement the BaseBridgeAdapter for your system and wire up the orchestrator:
from tidalflowbridge.protocol.bridge_orchestrator import BridgeOrchestrator
adapter = YourBridgeAdapter()
bridge = BridgeOrchestrator(
adapter=adapter,
config_path="bridge_config.json",
base_dir=".",
cluster_passphrase=passphrase,
)
await bridge.start()
# ... bridge runs in background, sharing signals and handling queries
await bridge.stop()For FastAPI applications, mount the bridge router:
router = bridge.get_fastapi_router()
app.include_router(router)Copy bridge_config.example.json to bridge_config.json and adjust settings. Key sections:
| Section | Controls |
|---|---|
transport |
Communication mode, port, polling interval, retries |
continuous_sharing |
Signal publishing interval, types, confidence thresholds |
cross_consultation |
Query depth, caching |
budget |
Daily/per-query spend limits, hourly query caps |
anti_amplification |
Max cross-project influence, corroboration requirements |
evidence_weights |
Importance of each signal type in joint analysis |
The bridge is disabled by default (enabled: false) and requires a valid cluster passphrase to activate.
- Cluster Passphrase -- shared secret used to derive a cluster ID and HMAC signing key
- Node Identity -- unique Ed25519 keypair per system instance
- Message Authentication -- HMAC-SHA256 on envelope bodies + Ed25519 signatures
- Peers are registered during pairing and tracked in
bridge_peers.json
This project is licensed under the Apache License 2.0.