Class TreePublisher

java.lang.Object
ai.badmonkey.agentspaces.pdt.blob.TreePublisher

public final class TreePublisher extends Object
Publishes a directory as a map from relative path to FileEntry (srad/agentspaces-pdt.md ยง3.3, PD-B-05). Every regular file becomes a PBlob; a symbolic link inside the root becomes an entry of mode 120000 whose blob holds the link target, after Git; a symbolic link that leaves the root is refused; empty directories have no entry. A publish with a previous result hands each file's previous blob to PBlob.of(Path, NodeStore, PBlob), so an unchanged file writes nothing and a changed file writes its delta.

The map itself is written through a TreePublisher.MapWriter. The default of pmapWriter() builds a PMap<String, FileEntry> from the sorted entries through one editor and returns its root; load(NodeStore, String) reads that map back. This class walks files, builds blobs, and shares; the writer owns the map layout, and a test may substitute one.