browserclaw 0.12.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -664,6 +664,8 @@ interface AuthCheckResult {
664
664
  /** Per-rule results for debugging */
665
665
  checks: AuthCheckDetail[];
666
666
  }
667
+ /** Standard exit reasons for structured telemetry. */
668
+ type ExitReason = 'success' | 'auth_failed' | 'nav_failed' | 'timeout' | 'crash' | 'disconnected' | 'manual' | 'error';
667
669
  /** Structured telemetry envelope for a browser session lifecycle. */
668
670
  interface RunTelemetry {
669
671
  /** Milliseconds to launch Chrome (undefined if connected to existing instance) */
@@ -675,7 +677,7 @@ interface RunTelemetry {
675
677
  /** Whether auth verification passed (undefined if not checked) */
676
678
  authOk?: boolean;
677
679
  /** Structured exit reason when the session ends */
678
- exitReason?: 'success' | 'auth_failed' | 'timeout' | 'error' | 'manual' | (string & {});
680
+ exitReason?: ExitReason | (string & {});
679
681
  /** Whether cleanup (process kill, connection close) succeeded */
680
682
  cleanupOk?: boolean;
681
683
  /** Key timestamps in ISO 8601 format */
@@ -1729,7 +1731,7 @@ declare class BrowserClaw {
1729
1731
  *
1730
1732
  * @param exitReason - Optional structured reason for stopping (e.g. `'success'`, `'auth_failed'`, `'timeout'`)
1731
1733
  */
1732
- stop(exitReason?: string): Promise<void>;
1734
+ stop(exitReason?: ExitReason | (string & {})): Promise<void>;
1733
1735
  /**
1734
1736
  * Get structured telemetry for this browser session.
1735
1737
  *
@@ -2019,4 +2021,4 @@ declare function waitForChallengeViaPlaywright(opts: {
2019
2021
  pollMs?: number;
2020
2022
  }): Promise<ChallengeWaitResult>;
2021
2023
 
2022
- export { type AriaNode, type AriaSnapshotResult, type AuthCheckDetail, type AuthCheckResult, type AuthCheckRule, type AuthCheckRuleKind, type BatchAction, type BatchActionResult, BlockedBrowserTargetError, BrowserClaw, type BrowserNavigationPolicyOptions, type BrowserNavigationRequestLike, type BrowserTab, BrowserTabNotFoundError, type ChallengeInfo, type ChallengeKind, type ChallengeWaitResult, type ChromeExecutable, type ChromeKind, type ClickOptions, type ColorScheme, type ConnectOptions, type ConsoleMessage, type ContextState, type CookieData, CrawlPage, type DialogEvent, type DialogHandler, type DialogOptions, type DownloadResult, type FormField, type FrameEvalResult, type GeolocationOptions, type HttpCredentials, InvalidBrowserNavigationUrlError, type LaunchOptions, type LookupFn, type NetworkRequest, type PageError, type PinnedHostname, type RequestResult, type ResponseBodyResult, type RoleRefInfo, type RoleRefs, type RunTelemetry, STEALTH_SCRIPT, type ScreenshotOptions, type SnapshotOptions, type SnapshotResult, type SnapshotStats, type SsrfPolicy, type StorageKind, type TraceStartOptions, type TypeOptions, type UntrustedContentMeta, type WaitOptions, assertBrowserNavigationAllowed, assertBrowserNavigationRedirectChainAllowed, assertBrowserNavigationResultAllowed, assertSafeUploadPaths, batchViaPlaywright, createPinnedLookup, detectChallengeViaPlaywright, ensureContextState, executeSingleAction, forceDisconnectPlaywrightConnection, forceDisconnectPlaywrightForTarget, getChromeWebSocketUrl, getRestoredPageForTarget, isChromeCdpReady, isChromeReachable, normalizeCdpHttpBaseForJsonEndpoints, parseRoleRef, pressAndHoldViaCdp, requireRef, requireRefOrSelector, requiresInspectableBrowserNavigationRedirects, resolveBoundedDelayMs, resolveInteractionTimeoutMs, resolvePageByTargetIdOrThrow, resolvePinnedHostnameWithPolicy, resolveStrictExistingPathsWithinRoot, resolveStrictExistingUploadPaths, sanitizeUntrustedFileName, setDialogHandler, waitForChallengeViaPlaywright, withBrowserNavigationPolicy, withPageScopedCdpClient, withPlaywrightPageCdpSession, writeViaSiblingTempPath };
2024
+ export { type AriaNode, type AriaSnapshotResult, type AuthCheckDetail, type AuthCheckResult, type AuthCheckRule, type AuthCheckRuleKind, type BatchAction, type BatchActionResult, BlockedBrowserTargetError, BrowserClaw, type BrowserNavigationPolicyOptions, type BrowserNavigationRequestLike, type BrowserTab, BrowserTabNotFoundError, type ChallengeInfo, type ChallengeKind, type ChallengeWaitResult, type ChromeExecutable, type ChromeKind, type ClickOptions, type ColorScheme, type ConnectOptions, type ConsoleMessage, type ContextState, type CookieData, CrawlPage, type DialogEvent, type DialogHandler, type DialogOptions, type DownloadResult, type ExitReason, type FormField, type FrameEvalResult, type GeolocationOptions, type HttpCredentials, InvalidBrowserNavigationUrlError, type LaunchOptions, type LookupFn, type NetworkRequest, type PageError, type PinnedHostname, type RequestResult, type ResponseBodyResult, type RoleRefInfo, type RoleRefs, type RunTelemetry, STEALTH_SCRIPT, type ScreenshotOptions, type SnapshotOptions, type SnapshotResult, type SnapshotStats, type SsrfPolicy, type StorageKind, type TraceStartOptions, type TypeOptions, type UntrustedContentMeta, type WaitOptions, assertBrowserNavigationAllowed, assertBrowserNavigationRedirectChainAllowed, assertBrowserNavigationResultAllowed, assertSafeUploadPaths, batchViaPlaywright, createPinnedLookup, detectChallengeViaPlaywright, ensureContextState, executeSingleAction, forceDisconnectPlaywrightConnection, forceDisconnectPlaywrightForTarget, getChromeWebSocketUrl, getRestoredPageForTarget, isChromeCdpReady, isChromeReachable, normalizeCdpHttpBaseForJsonEndpoints, parseRoleRef, pressAndHoldViaCdp, requireRef, requireRefOrSelector, requiresInspectableBrowserNavigationRedirects, resolveBoundedDelayMs, resolveInteractionTimeoutMs, resolvePageByTargetIdOrThrow, resolvePinnedHostnameWithPolicy, resolveStrictExistingPathsWithinRoot, resolveStrictExistingUploadPaths, sanitizeUntrustedFileName, setDialogHandler, waitForChallengeViaPlaywright, withBrowserNavigationPolicy, withPageScopedCdpClient, withPlaywrightPageCdpSession, writeViaSiblingTempPath };
package/dist/index.d.ts CHANGED
@@ -664,6 +664,8 @@ interface AuthCheckResult {
664
664
  /** Per-rule results for debugging */
665
665
  checks: AuthCheckDetail[];
666
666
  }
667
+ /** Standard exit reasons for structured telemetry. */
668
+ type ExitReason = 'success' | 'auth_failed' | 'nav_failed' | 'timeout' | 'crash' | 'disconnected' | 'manual' | 'error';
667
669
  /** Structured telemetry envelope for a browser session lifecycle. */
668
670
  interface RunTelemetry {
669
671
  /** Milliseconds to launch Chrome (undefined if connected to existing instance) */
@@ -675,7 +677,7 @@ interface RunTelemetry {
675
677
  /** Whether auth verification passed (undefined if not checked) */
676
678
  authOk?: boolean;
677
679
  /** Structured exit reason when the session ends */
678
- exitReason?: 'success' | 'auth_failed' | 'timeout' | 'error' | 'manual' | (string & {});
680
+ exitReason?: ExitReason | (string & {});
679
681
  /** Whether cleanup (process kill, connection close) succeeded */
680
682
  cleanupOk?: boolean;
681
683
  /** Key timestamps in ISO 8601 format */
@@ -1729,7 +1731,7 @@ declare class BrowserClaw {
1729
1731
  *
1730
1732
  * @param exitReason - Optional structured reason for stopping (e.g. `'success'`, `'auth_failed'`, `'timeout'`)
1731
1733
  */
1732
- stop(exitReason?: string): Promise<void>;
1734
+ stop(exitReason?: ExitReason | (string & {})): Promise<void>;
1733
1735
  /**
1734
1736
  * Get structured telemetry for this browser session.
1735
1737
  *
@@ -2019,4 +2021,4 @@ declare function waitForChallengeViaPlaywright(opts: {
2019
2021
  pollMs?: number;
2020
2022
  }): Promise<ChallengeWaitResult>;
2021
2023
 
2022
- export { type AriaNode, type AriaSnapshotResult, type AuthCheckDetail, type AuthCheckResult, type AuthCheckRule, type AuthCheckRuleKind, type BatchAction, type BatchActionResult, BlockedBrowserTargetError, BrowserClaw, type BrowserNavigationPolicyOptions, type BrowserNavigationRequestLike, type BrowserTab, BrowserTabNotFoundError, type ChallengeInfo, type ChallengeKind, type ChallengeWaitResult, type ChromeExecutable, type ChromeKind, type ClickOptions, type ColorScheme, type ConnectOptions, type ConsoleMessage, type ContextState, type CookieData, CrawlPage, type DialogEvent, type DialogHandler, type DialogOptions, type DownloadResult, type FormField, type FrameEvalResult, type GeolocationOptions, type HttpCredentials, InvalidBrowserNavigationUrlError, type LaunchOptions, type LookupFn, type NetworkRequest, type PageError, type PinnedHostname, type RequestResult, type ResponseBodyResult, type RoleRefInfo, type RoleRefs, type RunTelemetry, STEALTH_SCRIPT, type ScreenshotOptions, type SnapshotOptions, type SnapshotResult, type SnapshotStats, type SsrfPolicy, type StorageKind, type TraceStartOptions, type TypeOptions, type UntrustedContentMeta, type WaitOptions, assertBrowserNavigationAllowed, assertBrowserNavigationRedirectChainAllowed, assertBrowserNavigationResultAllowed, assertSafeUploadPaths, batchViaPlaywright, createPinnedLookup, detectChallengeViaPlaywright, ensureContextState, executeSingleAction, forceDisconnectPlaywrightConnection, forceDisconnectPlaywrightForTarget, getChromeWebSocketUrl, getRestoredPageForTarget, isChromeCdpReady, isChromeReachable, normalizeCdpHttpBaseForJsonEndpoints, parseRoleRef, pressAndHoldViaCdp, requireRef, requireRefOrSelector, requiresInspectableBrowserNavigationRedirects, resolveBoundedDelayMs, resolveInteractionTimeoutMs, resolvePageByTargetIdOrThrow, resolvePinnedHostnameWithPolicy, resolveStrictExistingPathsWithinRoot, resolveStrictExistingUploadPaths, sanitizeUntrustedFileName, setDialogHandler, waitForChallengeViaPlaywright, withBrowserNavigationPolicy, withPageScopedCdpClient, withPlaywrightPageCdpSession, writeViaSiblingTempPath };
2024
+ export { type AriaNode, type AriaSnapshotResult, type AuthCheckDetail, type AuthCheckResult, type AuthCheckRule, type AuthCheckRuleKind, type BatchAction, type BatchActionResult, BlockedBrowserTargetError, BrowserClaw, type BrowserNavigationPolicyOptions, type BrowserNavigationRequestLike, type BrowserTab, BrowserTabNotFoundError, type ChallengeInfo, type ChallengeKind, type ChallengeWaitResult, type ChromeExecutable, type ChromeKind, type ClickOptions, type ColorScheme, type ConnectOptions, type ConsoleMessage, type ContextState, type CookieData, CrawlPage, type DialogEvent, type DialogHandler, type DialogOptions, type DownloadResult, type ExitReason, type FormField, type FrameEvalResult, type GeolocationOptions, type HttpCredentials, InvalidBrowserNavigationUrlError, type LaunchOptions, type LookupFn, type NetworkRequest, type PageError, type PinnedHostname, type RequestResult, type ResponseBodyResult, type RoleRefInfo, type RoleRefs, type RunTelemetry, STEALTH_SCRIPT, type ScreenshotOptions, type SnapshotOptions, type SnapshotResult, type SnapshotStats, type SsrfPolicy, type StorageKind, type TraceStartOptions, type TypeOptions, type UntrustedContentMeta, type WaitOptions, assertBrowserNavigationAllowed, assertBrowserNavigationRedirectChainAllowed, assertBrowserNavigationResultAllowed, assertSafeUploadPaths, batchViaPlaywright, createPinnedLookup, detectChallengeViaPlaywright, ensureContextState, executeSingleAction, forceDisconnectPlaywrightConnection, forceDisconnectPlaywrightForTarget, getChromeWebSocketUrl, getRestoredPageForTarget, isChromeCdpReady, isChromeReachable, normalizeCdpHttpBaseForJsonEndpoints, parseRoleRef, pressAndHoldViaCdp, requireRef, requireRefOrSelector, requiresInspectableBrowserNavigationRedirects, resolveBoundedDelayMs, resolveInteractionTimeoutMs, resolvePageByTargetIdOrThrow, resolvePinnedHostnameWithPolicy, resolveStrictExistingPathsWithinRoot, resolveStrictExistingUploadPaths, sanitizeUntrustedFileName, setDialogHandler, waitForChallengeViaPlaywright, withBrowserNavigationPolicy, withPageScopedCdpClient, withPlaywrightPageCdpSession, writeViaSiblingTempPath };