browser/boot
Import
Section titled “Import”import * as api from "@fungi.computer/oyster/browser/boot";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | BootPageTarget | One boot check: the host’s capability-route origin, the candidate and its token. |
| type alias | BootPageFailedPredicate | Why a page that loaded did not count as mounted; the first observed wins. |
| type alias | BootPageFailedRequest | One failed request, by path only (out-of-scope for another origin). |
| type alias | BootPageDiagnostics | Bounded, page-supplied observations; the host’s boot gate sanitizes the text. |
| type alias | BootPageResult | The boot check’s closed outcome. |
| constant | BOOT_CHECK_VERSION | The version of this check’s judgement. A recorded result is reused only for the same version; changing what counts as mounted, or what is recordable as a verdict, bumps it. v2: a host or transport failure (the parent page not loading, a dropped browser) is never a verdict. |
| function | checkBootPage() | Open one candidate’s pinned boot page on a dedicated provider session, wait for its UI to mount, and confirm the session closed. Cleanup uncertainty outranks every other outcome. |
BootPageTargettype alias
Section titled “BootPageTarget”type BootPageTarget = Readonly<{ origin: string; releaseId: string; capability: Readonly<{ header: string; token: string; }>; deadlineAt: number;}>;One boot check: the host’s capability-route origin, the candidate and its token.
BootPageFailedPredicatetype alias
Section titled “BootPageFailedPredicate”type BootPageFailedPredicate = | "unexpected_candidate_request" | "response_status" | "request_failed" | "page_error" | "candidate_not_mounted";Why a page that loaded did not count as mounted; the first observed wins.
BootPageFailedRequesttype alias
Section titled “BootPageFailedRequest”type BootPageFailedRequest = Readonly<{ path: string; status?: number; failureKind: "unexpected_candidate_request" | "response_status" | "request_failed";}>;One failed request, by path only (out-of-scope for another origin).
BootPageDiagnosticstype alias
Section titled “BootPageDiagnostics”type BootPageDiagnostics = Readonly<{ failedPredicate: BootPageFailedPredicate; finalUrlPath: string; consoleErrors: readonly string[]; pageErrors: readonly string[]; failedRequests: readonly BootPageFailedRequest[]; droppedCount: number;}>;Bounded, page-supplied observations; the host’s boot gate sanitizes the text.
BootPageResulttype alias
Section titled “BootPageResult”type BootPageResult = | Readonly<{ kind: "mounted"; }> | Readonly<{ kind: "refused"; code: "ui_mount_failed"; diagnostics: BootPageDiagnostics; }> | Readonly<{ kind: "refused"; code: "boot_timeout" | "boot_cleanup_failed" | "boot_runner_unavailable"; }>;The boot check’s closed outcome.
BOOT_CHECK_VERSIONconstant
Section titled “BOOT_CHECK_VERSION”const BOOT_CHECK_VERSION: "boot-page-v2" = "boot-page-v2";The version of this check’s judgement. A recorded result is reused only for the same version; changing what counts as mounted, or what is recordable as a verdict, bumps it. v2: a host or transport failure (the parent page not loading, a dropped browser) is never a verdict.
checkBootPage()function
Section titled “checkBootPage()”function checkBootPage(sessions, target): Promise<BootPageResult>;Open one candidate’s pinned boot page on a dedicated provider session, wait for its UI to mount, and confirm the session closed. Cleanup uncertainty outranks every other outcome.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sessions |
BrowserSessions |
target |
BootPageTarget |
Returns
Section titled “Returns”Promise<BootPageResult>