class Capsium::Package::MergedView

The merged (overlay) view of a package’s content, per ARCHITECTURE.md section 5a. Shared by Package (validation) and Reactor (serving).

The content/ tree is always the implicit bottom layer; layers from storage.layers stack on top of it, bottom -> top in declaration order. Resolution scans from the TOP down and the first hit wins. Deletions are recorded as tombstones: a .capsium-tombstones JSON file in a writable layer listing content/-relative paths; a tombstoned path resolves to nil even when a lower layer (including a dependency’s content) holds the file, while a file reappearing in a layer ABOVE the tombstone is served again.

Composite packages (section 4a): dependency_views are

dependency GUID, MergedView

pairs acting as read-only layers below

ALL own layers. A resource reference that is a URI of the form “<dependency-guid>/<path>” resolves explicitly against that dependency’s view; plain content paths fall through to the dependency layers in declaration order after all own layers miss.

With ‘exported_only: true` (the view a dependent package gets): layers whose visibility is “private” are hidden entirely, and a path resolves only when the manifest lists the resource as “exported”. extra_layers stack on top of ALL own layers (e.g. the reactor’s writable overlay, section 5a).