//! Governance: signal scope, provenance, sharing, community membership, agent
//! capabilities, and community ranking policy.
//!
//! This module is the home of the M9 (Community Sync & Revocation) and M10
//! (Governance & Agent Rights) primitives. It parallels [`replication`] in
//! layout: pure, self-contained types here, with the wiring into the write/read
//! paths living in the subsystems they extend (`wal`, `signals`, `db`,
//! `session`, `ranking`).
//!
//! # The load-bearing invariant
//!
//! [`SignalScope::Local`] is the default and is **never** shipped to a community
//! and **never** purged by a community operation. Every governance surface
//! upholds "the local profile remains intact."
//!
//! [`replication`]: crate::replication

pub mod capability;
pub mod community_ledger;
pub mod membership;
pub mod policy;
pub mod provenance;
pub mod scope;
pub mod serde_util;
pub mod share_policy;
pub mod tombstone;

pub use capability::{
    CapabilityDenial, CapabilityRegistry, CapabilityToken, ScopeClass, ScopePermission,
};
pub use community_ledger::{CommunityLedger, ContributionProvenance};
pub use policy::{GovernancePolicy, GovernanceRegistry, PolicyRegisterError, WeightingBounds};
pub use tombstone::{AgentPurgeTombstone, PurgeReceipt, PurgeTombstone, RemoveScope};

pub use membership::{LeaveMode, Membership, MembershipRegistry, MembershipState, UserId};
pub use provenance::{SignalProvenance, WRITER_DIRECT};
pub use scope::{CommunityId, SignalScope};
pub use share_policy::{ShareIntent, ShareMode, SharePolicy};
