@startuml
package "Server Module" {
  [ServerModule] as SM
  [GlobalStreamHandler] as GSH
  [SessionStreamHandler] as SSH
  [ApprovalCoordinator] as AC
  [DomainEventMapper] as DEM
  [LoggingEventStore] as LES
  [SessionEventBridge] as SEB
}

package "Core Domain" {
  [DefaultSessionOrchestrator] as DSO
  [EventStore] as ES
}

package "Infrastructure" {
  [DefaultProviderRegistry] as DPR
  [ToolExecutor] as TE
  [FileSystemWorkflowRegistry] as FSWR
}

SM --> LES : decorates
SM --> DSO : orchestrator
SM --> FSWR : workflowRegistry
SM --> AC : creates
SM --> ES : subscribeAll

GSH --> SM : reads registries
GSH --> DEM : map events
GSH --> SEB : replaySnapshot

SSH --> AC : registerClient
SSH --> DEM : map events
SSH --> DSO : cancel

AC --> DSO : submitApprovalDecision
AC --> SM.moduleScope : timeout jobs

LES --> ES : delegates

@enduml
