kernl API
    Preparing search index...

    Interface KernlHost

    Host hooks the core calls. Applets never reach these.

    interface KernlHost {
        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): void;
        openApplet?(address: string): Promise<string | undefined>;
        openLink(url: string): void;
        presentConsent(prompt: ConsentPrompt): void;
    }
    Index
    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.

      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.

      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.

      Parameters

      • windowId: string
      • reason: string

      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 after the link policy allowed it.

      Parameters

      • url: string

      Returns void

    • Ask the user. Resolve false on dismiss. The core never times this out.

      Parameters

      Returns void