interface LinkSpace {
    bundleChrooted?: boolean;
    corpusRoot: null | string;
}

Properties

bundleChrooted?: boolean

True when the filesystem this document resolves against is chroot'd to the bundle — i.e. the port the app holds was scoped to the bundle's subtree, so the mount root and the bundle root are the same directory (BUNDLE_LAYERS_SPEC §9; the T2/T4 wrapper, R3-319 / BL-2).

Under that grant $fs: collapses to the scoped root: $fs:/p and /p name the same byte, because there is no longer any "mount-absolute" space outside the bundle for $fs: to reach into. Without this flag the resolver would hand back a mount-absolute path that the chroot then re-roots anyway — a link that renders as valid and resolves somewhere the author did not mean.

This is an invariant to CREATE, not one to inherit (BUNDLE_LAYERS_SPEC §11): the shipped resolver reads {currentFile, corpusRoot} and nothing else, so $fs: is bundle-anchored only if something says so. It lives here, in the resolver, rather than as a rule each caller applies by passing corpusRoot: '/' — an invariant the arithmetic carries cannot be forgotten at one call site out of five.

corpusRoot: null | string

Absolute filesystem path of the enclosing corpus's root (e.g. /app/content), or null when the document is not corpus-hosted (default).