Skip to main content

Crate af_context

Crate af_context 

Source
Expand description

Transport-neutral caller context and the branded identifiers every Factory crate shares. Nothing here knows about HTTP, gRPC, Postgres or a product.

Re-exports§

pub use ids::ActionIntentId;
pub use ids::EmptyId;
pub use ids::InputId;
pub use ids::InstanceId;
pub use ids::InteractionId;
pub use ids::NodeId;
pub use ids::ProfileRevisionId;
pub use ids::RequestId;
pub use ids::RunId;
pub use ids::SessionId;
pub use ids::SpaceId;
pub use ids::SubjectId;
pub use ids::TenantId;
pub use ids::ToolCallId;

Modules§

ids
Branded identifiers shared by every Factory crate.
testing
Test doubles for the context ports: a provider that resolves one fixed identity for every request.

Structs§

RequestContext
Caller identity and ambient product policy resolved from transport metadata. It is deliberately absent from Agent and Docs request bodies.
RequestMetadata
Transport metadata passed to a product context adapter.

Enums§

ContextError
Why a request context could not be resolved or accepted.

Traits§

PlatformContextProvider
Resolves transport metadata (headers, bearer tokens) into a verified RequestContext. Hosts own this seam; the platform never trusts caller-supplied identity claims.
ScheduledContextProvider
Re-resolves the identity persisted with scheduled work before it runs, so revoked principals cannot resume.