Source logic for Idea #156
Go to file
agent-54de0bcc6a17828b 97f542d063 build(agent): semicolon#54de0b iteration 2026-04-24 18:09:42 +02:00
src/idea156_kappabridge_privacy_safe build(agent): semicolon#54de0b iteration 2026-04-24 18:09:42 +02:00
tests build(agent): semicolon#54de0b iteration 2026-04-24 18:09:42 +02:00
.gitignore build(agent): semicolon#54de0b iteration 2026-04-24 18:09:42 +02:00
AGENTS.md build(agent): semicolon#54de0b iteration 2026-04-24 18:09:42 +02:00
README.md build(agent): semicolon#54de0b iteration 2026-04-24 18:09:42 +02:00
pyproject.toml build(agent): semicolon#54de0b iteration 2026-04-24 18:09:42 +02:00
test.sh build(agent): semicolon#54de0b iteration 2026-04-24 18:09:42 +02:00

README.md

KappaBridge

KappaBridge is a privacy-safe, offline-first scientific knowledge federation framework.

It provides a contract-based exchange layer for federating datasets and models across labs while preserving data sovereignty. The implementation in this repository focuses on the core control plane:

  • Canonical contracts for datasets, access policy, objects, shared signals, plans, audit events, and reproducibility manifests.
  • A Graph-of-Contracts registry backed by SQLite and SQLAlchemy.
  • Tamper-evident governance ledger entries with hash chaining.
  • Ed25519 attestations for contract use.
  • Deterministic delta sync envelopes for intermittent connectivity.
  • Adapters for climate tabular data, epidemiology CSVs, genomics FASTA, ecology JSONL, and image dataset manifests.
  • A lightweight federated planner for joint experiment requests.
  • A conformance harness and adapter marketplace for extension points.

What It Solves

Scientific collaborations often break on data movement, trust, and connectivity. KappaBridge lets labs publish structured contracts instead of raw data, exchange signed governance records, and replay changes deterministically when connectivity returns.

Package

  • Name: idea156-kappabridge-privacy-safe
  • Import path: idea156_kappabridge_privacy_safe

Quick Start

from idea156_kappabridge_privacy_safe import AccessPolicyContract, ContractRegistry, FederationStore

store = FederationStore("kappa.db")
registry = ContractRegistry(store)
policy = AccessPolicyContract(name="default-policy", allowed_actions=["read"])
registry.register(policy)

Testing

Run the full package checks with:

bash test.sh

That script builds the distribution and runs the test suite.

Design Rules

  • Contract hashes must remain canonical and deterministic.
  • Stored contracts are immutable; changes are appended as new records.
  • Ledger ordering and hash chaining must be preserved.
  • Adapter outputs must stay stable and validated.