Skip to main content

Module app_context

Module app_context 

Source
Expand description

Dependency-inversion context for the agent-session-orchestration cluster.

The session/event/title/gold modules that live in this crate need a handful of shared application resources (sessions cache, storage, persistence, providers, the per-session event senders, and the account change-feed sink). Historically those were reached through the server’s AppState, which coupled the cluster to the actix-web server crate.

AgentSessionContext inverts that dependency: the cluster depends only on this trait, and the server implements it on AppState. This keeps the orchestration code free of any HTTP / server types.

Accessor return types are deliberately the exact field types AppState already exposes, so the server-side impl is a thin delegation and no copying is introduced. Provider lookups return Option (the server’s fallible lookups discard the error type, which is actix-coupled).

Traits§

AgentSessionContext
Shared application context the agent-session-orchestration cluster depends on, in place of the server’s concrete AppState.