Expand description
§Skybouncer
Sovereign, rule-driven automated moderation and bouncer service for the AT Protocol (ATProto) and Bluesky.
skybouncer continuously monitors incoming interactions (mentions, replies, quotes) targeting protected users,
evaluates candidate interactions against user-defined rule rubrics via low-latency System-1 classifiers (Jev),
and automatically mutates ATProto Moderation Lists (app.bsky.graph.listitem) to shield users from harassment,
bad-faith sea-lioning, and crypto spam.
Re-exports§
pub use crypto::SessionCipher;pub use tenant::Tenant;pub use tenant::TenantRegistry;pub use tenant::DEFAULT_HANDLE_TTL;pub use tenant::DEFAULT_REAUTH_REMINDER_INTERVAL;pub use tenant::MAX_REAUTH_NOTIFICATIONS;pub use bot::account_label;pub use bot::account_label_with_url;pub use bot::bsky_post_or_web_url;pub use bot::bsky_post_url;pub use bot::bsky_post_url_from_at_uri;pub use bot::bsky_profile_url;pub use bot::command_target;pub use bot::format_bounce_alert;pub use bot::format_reauth_alert;pub use bot::format_reauth_alert_with_count;pub use bot::run_bot_poller;pub use bot::run_bounce_alert_dispatcher;pub use bot::run_reauth_alert_dispatcher;pub use bot::BotCommandHandler;pub use bot::BSKY_WEB_ORIGIN;pub use bot::DEFAULT_BOT_POLL_INTERVAL;pub use enricher::AppViewContextEnricher;pub use enricher::AuthorContext;pub use enricher::ContextEnricher;pub use enricher::ContextImageRef;pub use enricher::EnrichedContext;pub use enricher::MockContextEnricher;pub use enricher::NoopContextEnricher;pub use enricher::ParentPostContext;pub use enricher::PostEmbedSummary;pub use enricher::QuotedAncestor;pub use enricher::ThreadPost;pub use enricher::DEFAULT_APPVIEW_ENDPOINT;pub use enricher::DEFAULT_ENRICHER_TIMEOUT_MS;pub use enricher::MAX_CONTEXT_IMAGES;pub use enricher::MAX_POST_IMAGES;pub use enricher::MAX_RENDERED_THREAD_ANCESTORS;pub use enricher::THREAD_ANCESTOR_CHAR_CAP;pub use limiter::EvaluationRateLimiter;pub use limiter::RateLimiterConfig;pub use limiter::DEFAULT_MAX_EVALUATIONS_PER_WINDOW;pub use limiter::DEFAULT_RATE_LIMIT_WINDOW;pub use stream::run_jetstream_streamer;pub use stream::StreamConfig;pub use web::create_web_router;pub use web::get_prometheus_metrics;pub use web::run_web_server;pub use web::AddAllowlistRequest;pub use web::AddAllowlistResponse;pub use web::AllowlistQuery;pub use web::ApiState;pub use web::BouncedUserWithHandle;pub use web::BouncesQuery;pub use web::EvaluationsQuery;pub use web::EvaluationsResponse;pub use web::GuestRateLimitDecision;pub use web::GuestSandboxLimiter;pub use web::GuestSimulateRequest;pub use web::GuestSimulateResponse;pub use web::LoginQuery;pub use web::OAuthState;pub use web::PardonRequest;pub use web::PardonResponse;pub use web::RemoveAllowlistResponse;pub use web::ResolveQuery;pub use web::ResolveResponse;pub use web::RulesResponse;pub use web::SimulateRequest;pub use web::SimulateResponse;pub use web::StatusResponse;pub use web::UpdateRulesRequest;pub use web::UpgradeBounceRequest;pub use web::UpgradeBounceResponse;pub use web::WebServerConfig;pub use web::DEFAULT_WEB_HOST;pub use web::DEFAULT_WEB_PORT;pub use classifier::BounceDuration;pub use classifier::Classifier;pub use classifier::DynamicModelPolicy;pub use classifier::DynamicPrimaryClassifier;pub use classifier::DynamicPrimaryStats;pub use classifier::DynamicPrimaryStatsSnapshot;pub use classifier::HeuristicClassifier;pub use classifier::HeuristicRule;pub use classifier::JevClassifier;pub use classifier::JevConfig;pub use classifier::MockClassifier;pub use classifier::OllamaChatOptions;pub use classifier::RuleRubric;pub use classifier::Sensitivity;pub use classifier::Verdict;pub use classifier::ViolationCategory;pub use classifier::DEFAULT_MULTIMODAL_PRIMARY_MODEL;pub use classifier::DEFAULT_OLLAMA_NUM_CTX;pub use classifier::DEFAULT_TEXT_ONLY_PRIMARY_MODEL;pub use engine::simulate::SimulateTierStage;pub use engine::simulate::SimulationInputs;pub use engine::simulate::SimulationResult;pub use engine::BounceNotification;pub use engine::EngineStats;pub use engine::EngineStatsSnapshot;pub use engine::InteractionOutcome;pub use engine::ProcessCommitResult;pub use engine::ProcessOutcome;pub use engine::ReauthNotification;pub use engine::SkybouncerConfig;pub use engine::SkybouncerEngine;pub use engine::SkybouncerEngineBuilder;pub use engine::SovereignConfigSyncEvent;pub use engine::DEFAULT_ENGINE_CHANNEL_CAPACITY;pub use engine::DEFAULT_EVALUATION_CACHE_TTL;pub use engine::DEFAULT_EVALUATION_CONCURRENCY;pub use engine::DEFAULT_EVALUATION_QUEUE_CAPACITY;pub use engine::DEFAULT_MAINTENANCE_INTERVAL;pub use engine::DEFAULT_SHUTDOWN_TIMEOUT;pub use error::SkybouncerError;pub use matcher::BypassReason;pub use matcher::FollowGraph;pub use matcher::FollowSyncEvent;pub use matcher::GateDecision;pub use matcher::Interaction;pub use matcher::InteractionType;pub use matcher::NonFollowedGate;pub use matcher::TargetMatcher;pub use modlist::extract_rubric_from_list_description;pub use modlist::fetch_sovereign_config;pub use modlist::format_list_description_with_rubric;pub use modlist::publish_sovereign_config;pub use modlist::AllowlistEntry;pub use modlist::ArchivedBounce;pub use modlist::BounceRequest;pub use modlist::BouncedUser;pub use modlist::DeduplicationCache;pub use modlist::ManualBounceOutcome;pub use modlist::ModListConfig;pub use modlist::ModListManager;pub use modlist::SovereignConfigRecord;pub use modlist::DEFAULT_MOD_LIST_DESCRIPTION;pub use modlist::DEFAULT_MOD_LIST_NAME;pub use modlist::SOVEREIGN_CONFIG_COLLECTION;pub use modlist::SOVEREIGN_CONFIG_RKEY;
Modules§
- app
- Operational CLI command implementations (
status,pardon,simulate). - bot
- ATProto Chat (
chat.bsky.convo.*) DM Bot Interface. - classifier
- Pluggable classifier engine, verdict data models, and rule rubric definitions.
- cli
- CLI argument parsing, configuration assembly, and report formatting.
- crypto
- Cryptographic helpers for authenticated encryption at rest.
- daemon
- Live 24/7 firehose daemon orchestration.
- engine
- Asynchronous moderation engine coordinating event ingestion, target matching, non-followed account gating, classifier evaluation, and sovereign PDS modlist mutations.
- enricher
- Context enricher querying author profile metadata and parent post conversation threads.
- env
- Environment-variable helpers with consistent dual-prefix resolution.
- error
- Strongly-typed errors for the
skybouncercrate. - limiter
- Tier-4 evaluation rate limiter protecting against Denial-of-Wallet attacks.
- matcher
- Target matching, interaction extraction, and non-followed bypass gate.
- modlist
- Sovereign ATProto moderation list management, PDS mutations, and SQLite deduplication.
- stream
- Jetstream WebSocket streaming client for live firehose ingestion.
- tenant
- Multi-tenant hosted service registry managing dynamic user enrollment and DPoP sessions.
- time
- Clock-warp-safe time helpers shared across persistence and engine layers.
- types
- ATProto Lexicon data models for
skybouncer. - util
- Small internal utilities shared across modules.
- web
- Sovereign Web Dashboard and ATProto OAuth 2.0 PKCE server.
Structs§
- Accept
Convo Request - Request body for
chat.bsky.convo.acceptConvo. - Accept
Convo Response - Response payload from
chat.bsky.convo.acceptConvo. - Byte
Slice - UTF-8 byte slice range for rich text facets (
app.bsky.richtext.facet#byteSlice). - Chat
Client - Asynchronous HTTP client for interacting with the ATProto Chat service.
- Convo
Member - Member within an ATProto Chat conversation.
- Convo
View - Conversation representation in
chat.bsky.convo.defs#convoView. - Facet
- Rich text facet annotation associating a byte slice with features (
app.bsky.richtext.facet). - Follow
Record - ATProto graph follow record model (
app.bsky.graph.follow). - GetMessages
Response - Response payload from
chat.bsky.convo.getMessages. - List
Convo Requests Response - Response payload from
chat.bsky.convo.listConvoRequests. - List
Convos Response - Response payload from
chat.bsky.convo.listConvos. - List
Item Record - ATProto list item record model (
app.bsky.graph.listitem). - List
Records Response - The response payload from
com.atproto.repo.listRecords. - Message
Sender - Sender details for an individual chat message.
- Message
View - Individual message representation in
chat.bsky.convo.defs#messageView. - ModList
Record - ATProto moderation list record model (
app.bsky.graph.list). - Post
Record - ATProto post record model (
app.bsky.feed.post). - Record
Embed - Quoted record embed reference (
app.bsky.embed.record). - Record
With Media Embed - Quoted record combined with media attachments (
app.bsky.embed.recordWithMedia). - Reply
Ref - Reply references connecting a post to its thread root and immediate parent (
app.bsky.feed.post#replyRef). - Repo
Record Item - A record item returned by
com.atproto.repo.listRecords. - Send
Message Payload - Request payload to send a message via
chat.bsky.convo.sendMessage. - Send
Message Request - Request body for
chat.bsky.convo.sendMessage. - Strong
Ref - Strong reference to an ATProto repository record (
com.atproto.repo.strongRef). - Update
Read Request - Request body for
chat.bsky.convo.updateRead.
Enums§
- Embed
- Embedded content union on a post record (
app.bsky.feed.post#embed). - Facet
Feature - Feature metadata embedded within rich text facets (
app.bsky.richtext.facet#features).
Constants§
- DEFAULT_
CHAT_ ENDPOINT - Default public Bluesky chat service endpoint.
- DEFAULT_
JETSTREAM_ ENDPOINT - Default public Jetstream endpoint.
Functions§
- extract_
did_ for_ collection - Extracts the authority DID from an AT-URI if and only if the collection matches
expected_collectionand the record key (rkey) is non-empty. - extract_
did_ from_ at_ uri - Extracts the DID portion from an AT-URI (
at://{did}/{collection}/{rkey}). - extract_
link_ facets - Extracts all HTTP and HTTPS link facets from
textwith accurate UTF-8 byte slice offsets. - format_
system_ time_ iso8601 - Formats a
std::time::SystemTimeas an ISO-8601 (RFC 3339) UTC timestamp string. - now_
iso8601 - Convenience function returning the current UTC time as an ISO-8601 string.
Type Aliases§
- Facet
Index - Alias for
ByteSliceconforming to ATProto rich text byte index terminology.