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;
17/// BIDIR-8 (BIDIR-5's rule): the gate over a duplex call — open, admit,
18/// re-verify on the gate's grants generation, answer, audit.
19pub mod duplex_gate;
20pub mod errors;
21pub mod forward_registry;
22/// AUTH-2: the grant gate in dispatch, and the task-local reach.
23pub mod grant_gate;
24pub mod hub_context;
25// MACRO-2.B3: the in-process transport for the macro-generated typed client.
26pub mod in_process;
27/// LOCAL-6: a whole hub, called in memory.
28pub mod hub_transport;
29pub mod method_enum;
30pub mod middleware;
31pub mod path;
32pub mod plexus;
33// POLYGLOT-5: the child seam's second implementation — a process or a socket.
34pub mod remote_child;
35pub mod schema;
36mod schema_sites;
37pub(crate) mod scope_gate;
38pub mod streaming;
39pub mod types;
40/// AUTH-4: the caller's view of a gated hub.
41pub mod view;
42/// PERF-7: the item path — each item encoded once, straight into the frame
43/// its socket writes.
44pub mod wire;
45
46// AuthContext + SessionValidator + the sealed Principal / VerifiedUser /
47// ServiceIdentity types are re-exported from plexus-auth-core via
48// plexus::auth. New code should import directly from plexus_auth_core.
49pub use auth::{AuthContext, Principal, ServiceIdentity, SessionValidator, VerifiedUser, Anonymous, CallSite, ForwardDerivation, ForwardPolicy, ForwardPolicyName, IdentityOnly, MethodPath, MethodPathError, PassThrough, ANONYMOUS_NAME, IDENTITY_ONLY_NAME, PASS_THROUGH_NAME};
50pub use test_validator::TestSessionValidator;
51pub use bidirectional::{BidirChannel, BidirError, SelectOption, StandardBidirChannel, StandardRequest, StandardResponse};
52pub use context::PlexusContext;
53pub use in_process::InProcessTransport;
54pub use hub_transport::HubTransport;
55pub use remote_child::{Backoff, ChildError, ChildMethods, ChildOptions, ChildSpec, ChildStats, MountTimings, RemoteChild};
56#[cfg(feature = "clap")]
57pub use remote_child::ChildArgs;
58#[deprecated(note = "Use GuidanceErrorType and GuidanceSuggestion from stream events instead")]
59pub use errors::{GuidedError, GuidedErrorData, TryRequest};
60pub use forward_registry::{ForwardPolicyRegistry, SameService, SAME_SERVICE_NAME};
61pub use grant_gate::{current_reach, with_reach, ForbiddenItem};
62pub use view::View;
63pub use auth_activation::{
64    Auth, AuthActivation, AuthBackend, AuthClient, AuthEvent, AuthFailure, AuthSetup, LoginAnswer, LoginFlow, MembershipEntry, MembershipStore,
65    Provider, ProviderKind, Requirement, RoleStore, Session, SignupAnswer, StoreError, Waiting, SIGNED_IN_GRANTS,
66};
67pub use auth_memory::{MemoryAuthBackend, MemoryMemberships, MemoryRoles};
68// AUTH-2: the grant model, re-exported so an activation needs only plexus-core.
69pub use plexus_auth_core::grants::{
70    Ceiling, Gate, Grant, GrantSet, Membership, Memberships, Reach, Refusal, Resolve, RoleOrGrant,
71    RoleTable, Roles, ScopeRef, ADMIN, CEILING_KEY,
72};
73#[deprecated(note = "Middleware removed - guidance provided via PlexusStreamEvent::Guidance")]
74pub use middleware::{ActivationRegistry, GuidedErrorMiddleware};
75pub use path::Provenance;
76#[allow(deprecated)]
77pub use plexus::{error_item, Activation, ActivationInfo, AuthzDenyReason, ChildCapabilities, ChildRouter, DynamicHub, PlexusError, TransportErrorKind, route_to_child, PLEXUS_NOTIF_METHOD};
78pub use crate::types::Handle;
79pub use schema::{
80    AuthPosture, ChildHashes, ChildSummary, DeprecationInfo, MethodExample, MethodRole, MethodSchema,
81    ParamSchema, PluginHashes, PluginSchema, RequiredCredential, ReturnShape, Schema,
82    SchemaParams, SchemaProperty, SchemaResult, SchemaType, ViewKind, JSON_TYPES,
83    X_PLEXUS_VALUES,
84};
85pub use types::{PlexusStreamItem, StreamMetadata};
86pub use wire::Shared;
87pub use method_enum::MethodEnumSchema;
88pub use streaming::{PlexusStream, wrap_stream, wrap_stream_with_bidir, create_bidir_stream, error_stream, done_stream, progress_stream};
89// Note: Method enum is auto-generated by hub_macro and exported from plexus module
90pub use dispatch::{HubDispatch, StreamItem, from_dispatch_stream};
91pub use crate::request::PlexusRequestField;
92pub use hub_context::{HubContext, ParentAware, NoParent};