Skip to main content
Read the Notte skill and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.
Source: node-sdk/src/session.ts Context manager pattern: start the session, run the callback and stop the session, with close reason error when the callback throws. Always waits for Managed Auth readiness before invoking the callback.

Parameters

(session: Session) => Promise<T>
required
Async work to perform with the ready session.
AuthWaitOptions
Controls the Managed Auth readiness wait, including timeout and cancellation.Default:

Returns

The callback’s return value after session cleanup has been attempted.

Raises

  • Error if startup fails, the callback throws, or cleanup fails after a successful callback.

Example