API reference
ui-browser
Import
Section titled “Import”import * as api from "@fungi.computer/knapsack/ui/browser";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| class | UiBrowserError | Browser-side platform failure before a correlated result is accepted. |
| type alias | BrowserConnectionOptions | One Agent Session’s browser transport and the App’s command runtime. |
| type alias | BrowserConnection | A live browser connection; close it when the selected Session changes. |
| function | connectBrowser() | Start the named browser Promise facade over the Effect connection program. |
UiBrowserErrorclass
Section titled “UiBrowserError”Browser-side platform failure before a correlated result is accepted.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new UiBrowserError(message, options?): UiBrowserError;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
message |
string |
options? |
ErrorOptions |
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Error.constructor;BrowserConnectionOptionstype alias
Section titled “BrowserConnectionOptions”type BrowserConnectionOptions = Readonly<{ baseUrl: string; whistle: Pick<WhistleRuntime, "snapshot" | "execute">; transport?: Readonly<{ fetch: typeof globalThis.fetch; openEvents: (url) => EventTarget & object; }>;}>;One Agent Session’s browser transport and the App’s command runtime.
BrowserConnectiontype alias
Section titled “BrowserConnection”type BrowserConnection = Readonly<{ closed: Promise<void>; close: () => void;}>;A live browser connection; close it when the selected Session changes.
connectBrowser()function
Section titled “connectBrowser()”function connectBrowser(options): BrowserConnection;Start the named browser Promise facade over the Effect connection program.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
BrowserConnectionOptions |