LemonRouter. SessionCoordinator
(lemon_router v0.1.0)
View Source
Router-owned owner of per-conversation queue semantics.
Queue mode behavior is implemented here so gateway remains execution-only.
Reducer state changes live in LemonRouter.SessionTransitions; this module
interprets reducer effects, owns registry/process IO, and emits router phases.
The internal LemonRouter.RunOrchestrator remains responsible for the initial
LemonCore.EventBridge.subscribe_run/1 call on accepted router submissions.
This coordinator only cleans up event bridge subscriptions when queued or
pending submissions are later dropped from reducer state.
Summary
Functions
Returns a specification to start this module under a supervisor.
Submit a prepared router submission into the per-conversation coordinator.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec submit(term(), LemonRouter.Submission.t() | map() | keyword(), keyword()) :: :ok | {:error, term()}
Submit a prepared router submission into the per-conversation coordinator.
Orchestrator-facing code is expected to subscribe the run on
LemonCore.EventBridge before calling this function. The coordinator keeps
later queue cleanup consistent, but it does not claim initial subscription
ownership from the orchestrator boundary.