kernl API
    Preparing search index...

    Interface KernlHost

    Host hooks the core calls. Applets never reach these.

    interface KernlHost {
        asks?: AskRenderers;
        outboxCacheStorage?: StorageLike;
        storage: StorageLike;
        chooseHandler?(prompt: HandlerPrompt): Promise<HandlerChoice | undefined>;
        chooseReply?(prompt: ReplyPrompt): Promise<ReplyAnswer | undefined>;
        fetchBlob?(
            sha256: string,
            servers: readonly string[],
        ): Promise<Uint8Array<ArrayBufferLike>>;
        focusApplet?(windowId: string): void;
        getVisibility(windowId: string): WindowVisibility;
        notify(
            notice: {
                body?: string;
                title: string;
                tone: "info" | "warning";
                windowId?: string;
            },
        ): void;
        now?(): number;
        onRevoked(
            windowId: string,
            reason: string,
            details?: AppletStopDetails,
        ): void;
        onShortcut?(key: ShortcutKey): void;
        openApplet?(address: string): Promise<string | undefined>;
        openLink(url: string, options?: { approved?: boolean }): void;
        presentApproval?(prompt: FirewallPrompt): void;
        presentConsent?(prompt: ConsentPrompt): void;
        presentSettings?(prompt: SettingsPrompt): void;
    }
    Index

    How the host draws each question the kernel puts to the person, one renderer per kind (D-067). A kind with no renderer, and no prompt callback below, is refused. Every ask carries its facts and kernl's own wording; a renderer may reword, never answer for another window.

    outboxCacheStorage?: StorageLike

    Optional Outbox cache backing for this browsing session only. Never share it across tabs.

    storage: StorageLike
    • Ask the user which applet should take a request. Resolve undefined on dismiss. Without it, requests with several handlers and no default are refused. Draws intent.choose-handler. Deprecated: register a renderer in asks instead (D-067); this callback goes after one minor.

      Parameters

      Returns Promise<HandlerChoice | undefined>

    • Ask the user which provider a reply should leave through when the person it is for last wrote through another one. Resolve undefined on dismiss, which stops the send. Without it the provider the user's order picked is used. Draws messaging.choose-reply. Deprecated: register a renderer in asks instead (D-067); this callback goes after one minor.

      Parameters

      • prompt: ReplyPrompt

      Returns Promise<ReplyAnswer | undefined>

    • Verify an artifact blob. Defaults to fetch over the manifest's servers.

      Parameters

      • sha256: string
      • servers: readonly string[]

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • Bring a running applet's window to the front.

      Parameters

      • windowId: string

      Returns void

    • Current visibility for a window, when the core needs it synchronously.

      Parameters

      • windowId: string

      Returns WindowVisibility

    • Show something the applet or the guard wants the user to know.

      Parameters

      • notice: { body?: string; title: string; tone: "info" | "warning"; windowId?: string }

      Returns void

    • Returns number

    • Called after the core removed a frame because its binding was revoked. reason is a stable code: one of kehto's revocation reasons, or kernl's own (quarantine, host, grant-narrowed, blocked, firewall). details carries what else is known about the stop.

      Parameters

      Returns void

    • Take a key pressed inside an applet that the applet has no shortcut for. Without it the shell's own shortcuts do nothing while an applet has focus (D-054).

      Parameters

      Returns void

    • Open the applet at an address, under its existing grants; resolve its window id, or undefined when it did not open.

      Parameters

      • address: string

      Returns Promise<string | undefined>

    • Open a link outside the shell. approved is set when the firewall already let this exact link through, by asking the person or by a rule they set, so the host should not ask again.

      Parameters

      • url: string
      • Optionaloptions: { approved?: boolean }

      Returns void

    • Put a firewall question to the person: a request a rule says to ask about, such as opening a link. Close the prompt when signal aborts. Without it, such a request is refused (D-056). Draws firewall.approve. Deprecated: register a renderer in asks instead (D-067); this callback goes after one minor.

      Parameters

      Returns void

    • Ask the user. Resolve false on dismiss. The core never times this out. Draws sign.replace, upload.file, download.add and connection.direct when asks has no renderer for them. Deprecated: register a renderer in asks instead (D-067); this callback goes after one minor.

      Parameters

      Returns void

    • Show an applet's settings form. Without it applets cannot have settings, and the config domain is not offered (D-036). Draws settings.present. Deprecated: register a renderer in asks instead (D-067); this callback goes after one minor.

      Parameters

      Returns void