kernl API
    Preparing search index...

    Function grantNarrowingReason

    • Why a grant change stops a running window, or nothing when it does not.

      A window keeps the environment it was started with, and shell.init is not sent again, so a window whose grant no longer covers a domain it was started with would go on advertising it. Granting more never stops a window; the applet sees the new domain the next time it opens. The one grant that narrows is messages: it withholds every domain that could send them on, so a window started with one of those stops (D-046).

      Parameters

      • plan: MountPlan

        The running window's plan; its environment is what it was started with.

      • record: GrantRecord

        The grant record that just changed.

      • baseline: readonly string[]

        Domains every applet holds, from grants.baselineDomains().

      Returns "blocked" | "grant-narrowed" | undefined

      blocked, grant-narrowed, or undefined when the window may keep running.

      grants.changes$.subscribe((record) => {
      const reason = grantNarrowingReason(plan, record, grants.baselineDomains());
      if (reason) handle.revoked(reason);
      });