Function narrowToForge

  • A host-built forge under a ceiling: its options may be narrower than the ceiling, and then they narrow it; they may never be wider. Only the capabilities the ceiling grants are compared, since the broker injects no other. An intersection is taken in the ceiling's terms and never widens: disjoint lists are wider, not empty. Read roots are compared after their symlinks are resolved, the forge's and the ceiling's alike, since the broker reads by real path: a forge root that is a link inside a ceiling root to a directory outside it is wider. The narrowed roots are the forge's, as it names them.

    Parameters

    • ceiling: ResolvedCeiling
    • forge: {
          fetchDomainAllowlist: string[];
          fsReadRoots: string[];
      }
      • fetchDomainAllowlist: string[]
      • fsReadRoots: string[]

    Returns ResolvedCeiling

    Throws

    CeilingError (forge_wider_than_ceiling) naming the forge option.