Skip to main content

Crate mycelix_bridge_common

Crate mycelix_bridge_common 

Source

Re-exports§

pub use consciousness_thresholds as phi_thresholds;
pub use consciousness_thresholds::ConsciousnessThresholds;
pub use consciousness_thresholds::PhiThresholds;
pub use consciousness_profile::bootstrap_credential;
pub use consciousness_profile::decay_reputation;
pub use consciousness_profile::evaluate_bootstrap_governance;
pub use consciousness_profile::evaluate_governance;
pub use consciousness_profile::evaluate_governance_with_reputation;
pub use consciousness_profile::is_bootstrap_eligible;
pub use consciousness_profile::needs_refresh;
pub use consciousness_profile::requirement_for_basic;
pub use consciousness_profile::requirement_for_constitutional;
pub use consciousness_profile::requirement_for_guardian;
pub use consciousness_profile::requirement_for_proposal;
pub use consciousness_profile::requirement_for_voting;
pub use consciousness_profile::ConsciousnessCredential;Deprecated
pub use consciousness_profile::ConsciousnessProfile;
pub use consciousness_profile::ConsciousnessTier;Deprecated
pub use consciousness_profile::ExtensionKey;
pub use consciousness_profile::GateAuditInput;
pub use consciousness_profile::GovernanceAuditFilter;
pub use consciousness_profile::GovernanceAuditResult;
pub use consciousness_profile::GovernanceEligibility;
pub use consciousness_profile::GovernanceRequirement;Deprecated
pub use consciousness_profile::ReputationState;
pub use consciousness_profile::GRACE_PERIOD_US;
pub use consciousness_profile::REFRESH_WINDOW_US;
pub use consciousness_profile::REPUTATION_BLACKLIST_THRESHOLD;
pub use consciousness_profile::REPUTATION_DECAY_PER_DAY;
pub use consciousness_profile::REPUTATION_MAX_SLASHES;
pub use consciousness_profile::REPUTATION_RESTORATION_INTERACTIONS;
pub use consciousness_profile::REPUTATION_SLASH_FACTOR;
pub use collective_phi::AgentConsciousnessVector;
pub use collective_phi::CollectivePhiEngine;
pub use collective_phi::CollectivePhiResult;
pub use collective_phi::COLLECTIVE_PHI_MAX_SYNC;
pub use routing::resolve_civic_zome;
pub use routing::resolve_commons_zome;
pub use routing::BridgeDomain;
pub use routing::CivicZome;
pub use routing::CommonsZome;
pub use routing::CrossClusterRole;
pub use routing::CIVIC_DOMAINS;
pub use routing::COMMONS_DOMAINS;

Modules§

collective_phi
Collective Phi — Group Consciousness Measurement
consciousness_profile
Multi-dimensional consciousness profile for governance gating.
consciousness_thresholds
Canonical consciousness threshold configuration — single source of truth.
consciousness_zkp
Zero-knowledge consciousness tier attestation.
constitutional_envelope
Constitutional Envelope — Immutable Governance Invariants
membership_zkp
Privacy-preserving membership verification for cross-cluster bridges.
metrics
Lightweight in-memory bridge metrics collection.
notifications
Shared notification helpers for bridge coordinator zomes.
offline_credential
Offline-resilient credential extensions for Mycelix identity.
routing
Type-safe bridge dispatch routing.
routing_registry
Centralized routing registry for cross-cluster bridge dispatch.
sovereign_gate
Sovereign civic gating — 8D replacement for consciousness gating.
sub_passport
Sub-Passport – Morally-constrained AI agent delegation.

Structs§

AuditTrailEntry
Summary of a single audit trail entry (lightweight, no full record).
AuditTrailQuery
Input for querying events within a time range, optionally filtered by domain and type.
AuditTrailResult
Result of an audit trail query.
BridgeHealth
Health status for a cluster bridge.
BudgetProposalQuery
Query: Check budget proposal status (Finance ↔ Governance)
BudgetProposalResult
Result: Budget proposal status
CarbonCreditQuery
Input for querying carbon credits (commons: property → transport)
CarbonCreditResult
Result of a carbon credit query
CarbonOffsetQuery
Query: Carbon offset from transport (Climate → Transport/Commons)
CarbonOffsetResult
Result: Carbon offset calculation
CareAvailabilityQuery
Input for querying care provider availability (commons: mutualaid → care)
CareAvailabilityResult
Result of a care availability query
CivicRequirement
A governance requirement specifying minimum tier and optional per-dimension minimums.
ClaimVerificationQuery
Query: Verify knowledge claim (Knowledge → Media)
ClaimVerificationResult
Result: Claim verification
CollateralPropertyQuery
Query: Verify property as collateral (Finance → Commons)
CollateralPropertyResult
Result: Collateral property status
ConsentedRecordQuery
Query: Consented health record access (Health → Personal)
ConsentedRecordResult
Result: Consented record access
CorrelatedDispatch
Wrapper for cross-cluster dispatch with audit correlation.
CrossClusterDispatchInput
Input for dispatching a call to a zome in another DNA within the same hApp.
DimensionWeights
Weights for the 8 sovereign dimensions. Must sum to 1.0 (±0.01).
DispatchInput
Input for dispatching a call to any domain zome within a cluster DNA.
DispatchResult
Result of a dispatched cross-domain call.
EmergencyCareQuery
Input for querying available care providers during an emergency (emergency → care)
EmergencyCareResult
Result of an emergency care provider query
EmergencyFoodQuery
Input for querying food availability during an emergency (emergency → food)
EmergencyFoodResult
Result of an emergency food availability query
EventTypeQuery
Query for events by type within a domain.
FactcheckStatusQuery
Input for checking factcheck status (civic: justice → media)
FactcheckStatusResult
Result of a factcheck status query
FoodAvailabilityQuery
Input for querying food availability (commons: emergency → food, mutualaid → food)
FoodAvailabilityResult
Result of a food availability query
HearthCareResult
Result of a hearth care query
HearthEmergencyResult
Result of a hearth emergency status query
HearthMemberResult
Result of a hearth membership query
JusticeAreaQuery
Input for checking active cases in an area (civic: emergency → justice)
JusticeAreaResult
Result of an area case query
ProjectProposalQuery
Query: Energy project governance approval (Energy → Governance)
ProjectProposalResult
Result: Project governance approval
PropertyOwnershipQuery
Input for verifying property ownership (commons: housing → property)
PropertyOwnershipResult
Result of a property ownership verification
RestitutionQuery
Query: Check restitution ability (Civic → Finance)
RestitutionResult
Result: Restitution check
RevocationAck
Acknowledgment: Revocation received
RevocationNotice
Notice: Credential revocation push (Identity → *)
ShelterCapacityQuery
Input for querying shelter capacity during an emergency (emergency → housing)
ShelterCapacityResult
Result of a shelter capacity query
SovereignCredential
A time-limited, cryptographically-bound civic credential.
SovereignProfile
8-dimensional sovereign civic profile.
TransportRouteQuery
Input for querying transport routes (commons: mutualaid → transport, care → transport)
TransportRouteResult
Result of a transport route query
WaterSafetyQuery
Input for querying water safety in a disaster zone (emergency → water)
WaterSafetyResult
Result of a water safety query

Enums§

BridgeErrorCode
Structured error codes for bridge dispatch failures.
CivicTier
Progressive civic tier derived from the combined 8D score.
ConstellationTarget
Target for a constellation dispatch. Can be internal (OtherRole) or external (RemoteAgent).
NotificationPriority
Priority levels for cross-cluster notifications.
SovereignDimension
The 8 axes of civic identity.

Constants§

MAX_DISPATCH_IDENTIFIER_BYTES
Maximum dispatch zome/fn_name identifier length (256 bytes).
MAX_DISPATCH_PAYLOAD_BYTES
Maximum dispatch payload size (1 MB). Prevents memory exhaustion from oversized payloads being cloned into ExternIO.
RATE_LIMIT_MAX_DISPATCH
Maximum dispatch calls per agent within the rate limit window.
RATE_LIMIT_WINDOW_SECS
Rate limit window in seconds.

Functions§

check_rate_limit_count
Check whether the number of recent dispatches exceeds the rate limit.
civic_requirement_basic
Requirement for basic civic participation (viewing proposals, commenting).
civic_requirement_constitutional
Requirement for constitutional changes (amendments, budget).
civic_requirement_guardian
Requirement for guardian-level operations (emergency powers).
civic_requirement_proposal
Requirement for submitting proposals.
civic_requirement_voting
Requirement for casting votes.

Type Aliases§

AgentPubKey
CapSecret