kernl API
    Preparing search index...

    Function toGuardEvent

    • Turn a runtime budget event into a guard event. The runtime's event names the window and the operation and carries nothing the applet sent. Reasons follow the guard's vocabulary: a spent class budget is rate:<class>, and a question the firewall did not put to the person because the applet asked too often is flood:prompts.

      Parameters

      • event: PermissionRateEvent

        What the runtime reported through permissions.onRateLimit.

      • napplet: string

        The applet the window runs, as the shell resolved it.

      • at: number

        When it happened.

      Returns GuardEvent

      The guard event.

      toGuardEvent({ windowId: 'w1', operation: 'storage.set', action: 'block', reason: 'rate-exceeded' }, 'chat', 0).reason;
      // 'rate:storage:write'