kernl API
    Preparing search index...

    Function createConsentHandler

    • Answer kehto's own consent requests.

      The kehto runtime kernl pins emits only firewall-policy requests, which carry no event; kernl's guard decides firewall policy itself, so those are refused without asking. Destructive writes are not asked for here: kehto signs through ShellAdapter.auth.getSigner, and kernl gates that seam with createSigningConsent. A request that does carry an event, from a window the shell recognises, is still described and put to the user, so a kehto release that adds such prompts is answered honestly; one from a window the shell cannot name is refused.

      Parameters

      • host: Pick<KernlHost, "presentConsent">

        Supplies presentConsent.

      • lookupBefore: LookupBefore

        Finds the current replaceable event for the diff.

      • resolveApplet: ResolveAppletIdentity

        Maps the requesting window to its applet identity.

      Returns (request: ConsentRequest) => void

      A handler for bridge.registerConsentHandler.

      bridge.registerConsentHandler(createConsentHandler(host, lookupBefore, (windowId) => applets.get(windowId)?.summary.identity));