@startuml
!theme plain
package "infra-artifacts-cas" {
  class CasArtifactStore
  class CasConfig
  interface ArtifactIndex
  class SqliteArtifactIndex
  class SegmentLayout
  class SegmentWriter
  class SegmentReader
  class Location
  class TailScanner
  class LivenessScanner
  class Compactor
  class Evictor
  class DefaultMaterializingArtifactWriter
}
interface ArtifactStore <<core:artifactstore>>
interface MaterializingArtifactWriter <<core:artifacts>>
ArtifactStore <|.. CasArtifactStore
MaterializingArtifactWriter <|.. DefaultMaterializingArtifactWriter
CasArtifactStore *--> CasConfig
CasArtifactStore *--> ArtifactIndex
CasArtifactStore *--> SegmentWriter
CasArtifactStore *--> SegmentReader
ArtifactIndex <|.. SqliteArtifactIndex
CasArtifactStore --> TailScanner : recover()
CasArtifactStore --> Compactor : compact()
CasArtifactStore --> Evictor : evict()
Compactor --> LivenessScanner
Evictor --> LivenessScanner
TailScanner --> ArtifactIndex : uses
TailScanner --> SegmentLayout : uses
SegmentWriter --> SegmentLayout : uses
SegmentReader --> SegmentLayout : uses
@enduml
