Skip to main content

plexus_core/plexus/
mod.rs

1// Guidance system removed during caller-wraps streaming architecture refactor
2// pub mod guidance;
3
4pub mod auth;
5/// AUTH-5: the `auth` activation and what a service supplies it.
6pub mod auth_activation;
7pub mod auth_params;
8/// AUTH-5: a reference in-memory backend and stores for the `auth` activation.
9pub mod auth_memory;
10pub mod test_validator;
11pub mod bidirectional;
12/// MACRO-20: a hub sees through its activations' static children.
13pub mod children;
14pub mod context;
15pub mod credential_envelope;
16pub mod dispatch;
17pub mod errors;
18pub mod forward_registry;
19/// AUTH-2: the grant gate in dispatch, and the task-local reach.
20pub mod grant_gate;
21pub mod hub_context;
22// MACRO-2.B3: the in-process transport for the macro-generated typed client.
23pub mod in_process;
24/// LOCAL-6: a whole hub, called in memory.
25pub mod hub_transport;
26pub mod method_enum;
27pub mod middleware;
28pub mod path;
29pub mod plexus;
30pub mod schema;
31pub(crate) mod scope_gate;
32pub mod streaming;
33pub mod types;
34/// AUTH-4: the caller's view of a gated hub.
35pub mod view;
36
37// AuthContext + SessionValidator + the sealed Principal / VerifiedUser /
38// ServiceIdentity types are re-exported from plexus-auth-core via
39// plexus::auth. New code should import directly from plexus_auth_core.
40pub use auth::{AuthContext, Principal, ServiceIdentity, SessionValidator, VerifiedUser, Anonymous, CallSite, ForwardDerivation, ForwardPolicy, ForwardPolicyName, IdentityOnly, MethodPath, MethodPathError, PassThrough, ANONYMOUS_NAME, IDENTITY_ONLY_NAME, PASS_THROUGH_NAME};
41pub use test_validator::TestSessionValidator;
42pub use bidirectional::{BidirChannel, BidirError, SelectOption, StandardBidirChannel, StandardRequest, StandardResponse};
43pub use context::PlexusContext;
44pub use in_process::InProcessTransport;
45pub use hub_transport::HubTransport;
46#[deprecated(note = "Use GuidanceErrorType and GuidanceSuggestion from stream events instead")]
47pub use errors::{GuidedError, GuidedErrorData, TryRequest};
48pub use forward_registry::{ForwardPolicyRegistry, SameService, SAME_SERVICE_NAME};
49pub use grant_gate::{current_reach, with_reach, ForbiddenItem};
50pub use view::View;
51pub use auth_activation::{
52    Auth, AuthActivation, AuthBackend, AuthClient, AuthEvent, AuthFailure, AuthSetup, LoginAnswer, LoginFlow, MembershipEntry, MembershipStore,
53    Provider, ProviderKind, Requirement, RoleStore, Session, SignupAnswer, StoreError, Waiting, SIGNED_IN_GRANTS,
54};
55pub use auth_memory::{MemoryAuthBackend, MemoryMemberships, MemoryRoles};
56// AUTH-2: the grant model, re-exported so an activation needs only plexus-core.
57pub use plexus_auth_core::grants::{
58    Ceiling, Gate, Grant, GrantSet, Membership, Memberships, Reach, Refusal, Resolve, RoleOrGrant,
59    RoleTable, Roles, ScopeRef, ADMIN, CEILING_KEY,
60};
61#[deprecated(note = "Middleware removed - guidance provided via PlexusStreamEvent::Guidance")]
62pub use middleware::{ActivationRegistry, GuidedErrorMiddleware};
63pub use path::Provenance;
64#[allow(deprecated)]
65pub use plexus::{error_item, Activation, ActivationInfo, AuthzDenyReason, ChildCapabilities, ChildRouter, DynamicHub, PlexusError, TransportErrorKind, route_to_child, PLEXUS_NOTIF_METHOD};
66pub use crate::types::Handle;
67pub use schema::{
68    AuthPosture, ChildHashes, ChildSummary, DeprecationInfo, MethodExample, MethodRole, MethodSchema,
69    ParamSchema, PluginHashes, PluginSchema, RequiredCredential, ReturnShape, Schema,
70    SchemaProperty, SchemaResult, SchemaType, ViewKind, X_PLEXUS_VALUES,
71};
72pub use types::{PlexusStreamItem, StreamMetadata};
73pub use method_enum::MethodEnumSchema;
74pub use streaming::{PlexusStream, wrap_stream, wrap_stream_with_bidir, create_bidir_stream, error_stream, done_stream, progress_stream};
75// Note: Method enum is auto-generated by hub_macro and exported from plexus module
76pub use dispatch::{HubDispatch, StreamItem, from_dispatch_stream};
77pub use crate::request::PlexusRequestField;
78pub use hub_context::{HubContext, ParentAware, NoParent};