52 lines
1.9 KiB
Markdown
52 lines
1.9 KiB
Markdown
# 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
|
|
|
|
```python
|
|
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
|
|
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.
|