Skip to main content

Module plexus

Module plexus 

Source

Re-exports§

pub use test_validator::TestSessionValidator;
pub use bidirectional::BidirChannel;
pub use bidirectional::BidirError;
pub use bidirectional::SelectOption;
pub use bidirectional::StandardBidirChannel;
pub use bidirectional::StandardRequest;
pub use bidirectional::StandardResponse;
pub use context::PlexusContext;
pub use in_process::InProcessTransport;
pub use hub_transport::HubTransport;
pub use remote_child::Backoff;
pub use remote_child::ChildError;
pub use remote_child::ChildMethods;
pub use remote_child::ChildOptions;
pub use remote_child::ChildSpec;
pub use remote_child::ChildStats;
pub use remote_child::MountTimings;
pub use remote_child::RemoteChild;
pub use errors::GuidedError;
pub use errors::GuidedErrorData;
pub use errors::TryRequest;
pub use forward_registry::ForwardPolicyRegistry;
pub use forward_registry::SameService;
pub use forward_registry::SAME_SERVICE_NAME;
pub use grant_gate::current_reach;
pub use grant_gate::with_reach;
pub use grant_gate::ForbiddenItem;
pub use view::View;
pub use auth_activation::Auth;
pub use auth_activation::AuthActivation;
pub use auth_activation::AuthBackend;
pub use auth_activation::AuthClient;
pub use auth_activation::AuthEvent;
pub use auth_activation::AuthFailure;
pub use auth_activation::AuthSetup;
pub use auth_activation::LoginAnswer;
pub use auth_activation::LoginFlow;
pub use auth_activation::MembershipEntry;
pub use auth_activation::MembershipStore;
pub use auth_activation::Provider;
pub use auth_activation::ProviderKind;
pub use auth_activation::Requirement;
pub use auth_activation::RoleStore;
pub use auth_activation::Session;
pub use auth_activation::SignupAnswer;
pub use auth_activation::StoreError;
pub use auth_activation::Waiting;
pub use auth_activation::SIGNED_IN_GRANTS;
pub use auth_memory::MemoryAuthBackend;
pub use auth_memory::MemoryMemberships;
pub use auth_memory::MemoryRoles;
pub use middleware::ActivationRegistry;
pub use middleware::GuidedErrorMiddleware;
pub use path::Provenance;
pub use plexus::error_item;
pub use plexus::Activation;
pub use plexus::ActivationInfo;
pub use plexus::AuthzDenyReason;
pub use plexus::ChildCapabilities;Deprecated
pub use plexus::ChildRouter;
pub use plexus::DynamicHub;
pub use plexus::PlexusError;
pub use plexus::TransportErrorKind;
pub use plexus::route_to_child;
pub use plexus::PLEXUS_NOTIF_METHOD;
pub use crate::types::Handle;
pub use schema::AuthPosture;
pub use schema::ChildHashes;
pub use schema::ChildSummary;
pub use schema::DeprecationInfo;
pub use schema::MethodExample;
pub use schema::MethodRole;
pub use schema::MethodSchema;
pub use schema::ParamSchema;
pub use schema::PluginHashes;
pub use schema::PluginSchema;
pub use schema::RequiredCredential;
pub use schema::ReturnShape;
pub use schema::Schema;
pub use schema::SchemaParams;
pub use schema::SchemaProperty;
pub use schema::SchemaResult;
pub use schema::SchemaType;
pub use schema::ViewKind;
pub use schema::JSON_TYPES;
pub use schema::X_PLEXUS_VALUES;
pub use types::PlexusStreamItem;
pub use types::StreamMetadata;
pub use wire::Shared;
pub use method_enum::MethodEnumSchema;
pub use streaming::PlexusStream;
pub use streaming::wrap_stream;
pub use streaming::wrap_stream_with_bidir;
pub use streaming::create_bidir_stream;
pub use streaming::error_stream;
pub use streaming::done_stream;
pub use streaming::progress_stream;
pub use dispatch::HubDispatch;
pub use dispatch::StreamItem;
pub use dispatch::from_dispatch_stream;
pub use crate::request::PlexusRequestField;
pub use hub_context::HubContext;
pub use hub_context::ParentAware;
pub use hub_context::NoParent;

Modules§

auth
Authentication primitives — relocated to plexus-auth-core.
auth_activation
AUTH-5: the auth activation and what a service supplies it. AUTH-5 — the auth activation: one auth surface in every gated Plexus hub. Sign in, sign up, who am I, what does this need, and the admin’s roles and memberships.
auth_memory
AUTH-5: a reference in-memory backend and stores for the auth activation. AUTH-5 — a reference, in-memory implementation of what a service supplies the auth activation: MemoryRoles (RoleStore), MemoryMemberships (MembershipStore) and MemoryAuthBackend (AuthBackend, and a SessionValidator for the tokens it mints).
auth_params
MACRO-12 — the auth activation’s parameters, as types.
bidirectional
Bidirectional streaming support for Plexus RPC
children
MACRO-20: a hub sees through its activations’ static children. MACRO-20 — a hub sees through its activations’ static children.
context
Global Plexus RPC context for sharing state with activations
credential_envelope
Dispatch-time credential interception (AUTHZ-CRED-CORE-2).
dispatch
HubDispatch trait for method delegation
duplex_gate
BIDIR-8 (BIDIR-5’s rule): the gate over a duplex call — open, admit, re-verify on the gate’s grants generation, answer, audit. BIDIR-8 (BIDIR-5’s rule, made a library) — the gate over a duplex call.
errors
DEPRECATED: Stream-based guidance replaces error data structures
forward_registry
ForwardPolicyRegistry — per-hub map from callee namespace to the ForwardPolicy that the framework consults when dispatching across the boundary into that callee.
grant_gate
AUTH-2: the grant gate in dispatch, and the task-local reach. AUTH-2 — the grant gate in dispatch: default deny, every method.
hub_context
HubContext - generic parent context injection for hub-aware plugins
hub_transport
LOCAL-6: a whole hub, called in memory. LOCAL-6 · a whole hub, called in memory.
in_process
MACRO-2.B3 · the in-process transport.
method_enum
Method enum schema trait for activations
middleware
DEPRECATED: Stream-based guidance replaces middleware
path
plexus
DynamicHub - the central routing layer for activations
remote_child
POLYGLOT-5 — the child seam opened: an activation in another process, mounted under a name.
schema
streaming
Streaming helpers for the caller-wraps architecture
test_validator
Test SessionValidator for E2E testing without Keycloak
types
Plexus RPC streaming types
view
AUTH-4: the caller’s view of a gated hub. AUTH-4 — the caller’s view: what a caller can discover of a gated service is exactly what it can use.
wire
PERF-7: the item path — each item encoded once, straight into the frame its socket writes. PERF-7: the item path — an item encoded once, by its method’s own event type, straight into a buffer its socket writes from.

Structs§

Anonymous
Anonymous: drop the entire AuthContext.
AuthContext
Per-connection authentication context, populated during WS upgrade.
CallSite
Identifies a single edge in the call graph at the moment a policy runs.
Ceiling
A session’s upper bound (IDENTITY-40): (role or grant, scope) entries, spelled editor@MENGER-12, tickets.get@*. A check passes a ceiling when some entry’s scope is in the target’s chain and the entry allows the grant (the grant itself, or a role listing it).
ForwardDerivation
What a policy returns: a derivation request, NOT a constructed context.
ForwardPolicyName
Stable identifier for a forwarding policy, surfaced into audit records and diagnostics.
Gate
The one rule in front of every call: the method’s grant, held through a role on the target’s scope, within the session’s ceiling. Default deny. Cheap to clone (one Arc); cheap to ask (memory only), so a stream may ask per event.
Grant
The right to call one method: <activation>.<method>, e.g. tickets.set_status. Every method has exactly one; nothing declares it.
IdentityOnly
Identity-only: forwards the caller’s IdP-verified user identity and drops roles, capabilities, and metadata.
Membership
A principal holds a role on a scope: key:ac79… is editor on MENGER.
MethodPath
A dotted method path like auth.login or cone.send_message.
PassThrough
Pass-through: forward every field of the caller’s context.
Reach
Where a call may act: the scopes the caller holds the method’s grant on (within its ceiling), handed to the method beside auth. A read without a target (list, watch) answers only from these.
RoleTable
An in-memory Roles: each role an explicit list of grants, where an entry may also name an earlier role (inclusion, flattened when defined). ADMIN is built in.
ServiceIdentity
Service-identity claim, paired with Principal::Service to identify a non-user authenticated actor (e.g., another Plexus deployment).
VerifiedUser
Sealed proof that an IdP-signed token was verified.

Enums§

GrantSet
What a role holds: every grant (ADMIN) or exactly those it lists.
MethodPathError
Why a MethodPath::try_new rejected its input.
Principal
An authenticated actor: a user, a service, or anonymous.
Refusal
Why the gate refused a call.
RoleOrGrant
One ceiling entry’s left side: a role (editor) or a single grant (tickets.get). A dotted name is a grant; a bare one is a role.
ScopeRef
Where a role is held: everywhere (*) or one named scope (MENGER). What a name means — a shortcode, a tenant, a project — is the service’s; the gate only compares names and asks Resolve::chain how they nest.

Constants§

ADMIN
The built-in role that holds every grant. No other role holds anything it does not list.
ANONYMOUS_NAME
The anonymous policy name (stable string surfaced in audit).
CEILING_KEY
The metadata key a session’s ceiling rides under (IDENTITY-42’s menger_session sessions write it): either a list of role@SCOPE / grant@SCOPE strings (one layer) or a list of such lists (layers, every one of which must allow a check).
IDENTITY_ONLY_NAME
The identity_only policy name (stable string surfaced in audit).
PASS_THROUGH_NAME
The pass_through policy name (stable string surfaced in audit).

Traits§

ForwardPolicy
The forwarding-policy trait.
Memberships
Who holds which role where (menger: its members table, cached). Answered from memory: no I/O on a call.
Resolve
Where a target lives. Answered from memory.
Roles
Role → grants (defaults declared in code, edits as data). Answered from memory. ADMIN holds every grant whatever this answers.
SessionValidator