import type { RuntimeMode } from './install.mjs' export interface ActivationObservation { attempts: number elapsedMs: number /** * `ready` verified the signed-in runtime; `live` verified only the public * release, because an in-place update keeps an owner key the installer never sees. */ status: 'pending' | 'live' | 'ready' } export interface ExpectedHealth { workerVersionId: string deploymentId: string shell: 'just-bash-direct' | 'just-bash-isolated' | 'linux-container' } export const ACTIVATION_WAIT_MS: number export const ACTIVATION_REQUEST_TIMEOUT_MS: number export const ACTIVATION_RETRY_MS: number export function observePublicActivation(options: { publicUrl: string mode: RuntimeMode ownerSecret?: string versionId?: string fetchImpl?: typeof fetch now?: () => number requestTimeoutMs?: number retryMs?: number signal?: AbortSignal sleepImpl?: ( delay: number, value?: undefined, options?: { signal?: AbortSignal }, ) => Promise waitMs?: number }): Promise export function isExpectedHealth(value: unknown, expected: ExpectedHealth): boolean export class RuntimeActivationError extends Error {}