Cotal TypeScript packages
    Preparing search index...

    Function assertSingleSpaceBroker

    • Refuse a BROKER-WIDE operation on a root that hosts several spaces - or whose tenant list cannot be read with certainty.

      Distinct from soleSpaceOf's ambiguity, and the distinction is the whole point: the broker process, its JetStream store and the single .cotal/auth broker record are shared by every space on the root, so naming a space cannot scope down, clean store|all, backup or a restore - they would apply to all of them regardless. Sending the operator after a --space they cannot use (two of these commands do not even take one) is a dead end dressed as advice, so this refusal names the blast radius and stops, and stays a refusal until per-space teardown exists.

      A corrupt/foreign account record is refused too, NOT skipped: an under-count is the fail-open this guard exists to prevent - a file that occupies the account namespace but will not validate might be a real tenant, so the blast radius is unknown and a broker-wide delete must not proceed.

      Parameters

      • dir: string
      • operation: string

      Returns void