Skip to content

Commit bb787dc

Browse files
committed
feat: add Rings Network Python SDK + Blackboard Adapter
Phase 1 of Rings Network integration — foundation layer. New module: src/asi_build/rings/ (4 files, ~1,300 LOC) - client.py: Async RingsClient — DHT ops, Chord ring, Sub-Rings, sessions, connection lifecycle, VID computation. InMemoryTransport for testing. - did.py: RingsDID — DID creation (secp256k1/ed25519), W3C DID Documents, proof generation/verification, VID addressing, service registration. - reputation.py: ReputationClient — Ranking Protocol local scoring (3-factor with exponential decay), trust tiers, trustworthiness checks, slash reports, median game reward, network statistics. - __init__.py: Clean public API with all 18 exported symbols. New adapter: integration/adapters/rings_adapter.py (~500 LOC) - RingsNetworkAdapter: BlackboardParticipant + Producer + Consumer + Transformer - Posts: peer discovery, DID auth, reputation updates, slash reports, Sub-Ring events, network status - Consumes: reasoning/KG/consciousness entries for P2P replication - Transforms: enriches entries with reputation scores - Event emission: threshold crossing detection, connection state - Graceful degradation: all components optional (None → skip) Tests: tests/test_rings.py (108 tests, all passing) - RingsClient: connection, DHT, ring, sub-ring, session, DID resolution (36) - RingsDID: creation, proof gen/verify, resolution, VIDs, documents (19) - ReputationClient: scoring, trust tiers, slash, median game, stats (18) - RingsNetworkAdapter: registration, events, produce, consume, transform (32) - End-to-end integration flow (1) - Graceful degradation (3) Full suite: 3152 passed, 25 skipped, 0 failures (no regressions).
1 parent ba16d0b commit bb787dc

7 files changed

Lines changed: 3759 additions & 0 deletions

File tree

src/asi_build/integration/adapters/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
- ``KnowledgeGraphAdapter`` — TemporalKG, KGPathfinder
3838
- ``CognitiveSynergyAdapter`` — CognitiveSynergyEngine, SynergyMetrics
3939
- ``ReasoningAdapter`` — HybridReasoningEngine
40+
- ``RingsNetworkAdapter`` — Rings P2P Network, DID, Reputation
4041
4142
Utilities
4243
~~~~~~~~~
@@ -54,6 +55,7 @@
5455
from .consciousness_adapter import ConsciousnessAdapter
5556
from .knowledge_graph_adapter import KnowledgeGraphAdapter
5657
from .reasoning_adapter import ReasoningAdapter
58+
from .rings_adapter import RingsNetworkAdapter
5759

5860
logger = logging.getLogger(__name__)
5961

@@ -62,6 +64,7 @@
6264
"KnowledgeGraphAdapter",
6365
"CognitiveSynergyAdapter",
6466
"ReasoningAdapter",
67+
"RingsNetworkAdapter",
6568
"wire_all",
6669
"production_sweep",
6770
]

0 commit comments

Comments
 (0)