Merge pull request #464 from saffron-health/release-v0.6.34
v0.6.34 Release Notes
Features
-
New
@libretto/browser-toolspackage: A new SDK for building AI agents that can drive real browsers. Agents using the AI SDK (or other supported frameworks) can open browsers, inspect pages via accessibility snapshots, and execute Playwright code against them.import { createAiSdkBrowserTools } from "@libretto/browser-tools/ai-sdk"; import { LocalBrowserProvider } from "@libretto/browser-tools"; const { tools, dispose } = createAiSdkBrowserTools(new LocalBrowserProvider()); // tools: browser_open, browser_exec, browser_snapshot, // browser_status, browser_close, browser_connect
-
browser_snapshottool: Captures the current page as a compact, labelled accessibility tree withrefhandles for precise element targeting. Supports optional PNG screenshots returned as multipart AI SDK output. -
Full session control (
browser_status,browser_close,browser_connect): Agents can now list open sessions and pages, close sessions, and attach to externally managed browsers via CDP without killing them on detach. -
Snapshot diff on
browser_exec: Every successfulbrowser_execcall now returns asnapshotDifffield — a compact accessibility-tree diff showing what the page changed since the previous exec. Empty when nothing changed.// Each exec result includes: { ok: true, result: ..., stdout: "", stderr: "", snapshotDiff: "..." }
-
Per-page targeting: Both
browser_execandbrowser_snapshotaccept an optionalpageId(frombrowser_status) to target a specific tab rather than the most recently active one. -
Cloud browser providers: New subpath exports for four cloud browser services —
@libretto/browser-tools/kernel,@libretto/browser-tools/browserbase,@libretto/browser-tools/steel, and@libretto/browser-tools/libretto-cloud— with live-view URLs and optional recording.import { KernelBrowserProvider } from "@libretto/browser-tools/kernel"; const { tools, dispose } = createAiSdkBrowserTools( new KernelBrowserProvider({ stealth: true, headless: false }), );
-
Domain policy (allow/block lists): Factory-level
allowedDomainsandblockedDomainsoptions enforce navigation restrictions acrossbrowser_open,browser_connect, and navigations frombrowser_exec. Blocked top-level navigations throw a typedDomainPolicyRestrictederror; blocked subresources are silently aborted.const { tools, dispose } = createAiSdkBrowserTools(provider, { blockedDomains: ["private.example.com"], allowedDomains: ["*.example.com"], });
-
Pi adapter (
@libretto/browser-tools/pi): A new adapter exposes the six browser tools as Pi custom tools, with screenshot content preserved as Pi image content. -
@libretto/playwright-debugpackage: A new package for investigating Playwright failures and automatically opening fix pull requests on GitHub. AdddebugPlaywrightFailure(error, page)to your automation's failure path and the agent inspects the live page — preserving authentication and in-memory state — then commits a targeted fix to a new branch and opens a pull request citing observed evidence. Infrastructure failures return a structureddebugger_failedresult so the caller's original error and fallback are never replaced.import { createLibrettoDebugger } from "@libretto/playwright-debug"; const librettoDebugger = createLibrettoDebugger({ github: { owner: "acme", repo: "automations", baseBranch: "main" }, agent: { model: "openai/gpt-5.4" }, }); try { await runAutomation(page); } catch (error) { await librettoDebugger.debugPlaywrightFailure(error, page); throw error; }
-
Playwright debugging agent and GitHub setup: New documentation and a Libretto Cloud setup wizard for connecting GitHub repositories, generating API keys, and adding the Playwright debugger to existing scripts. A new
/dashboard/cloud-browserspage provides a dedicated view for cloud browser sessions, jobs, users, and billing. -
GitHub sign-in: The sign-in page now supports GitHub as an OAuth provider alongside Google and email/password.
Improvements
-
Borrowed-page browser tools:
createBrowserToolsForPage(page)andcreateAiSdkBrowserToolsForPage(page)attach the browser-tools session to an existing PlaywrightPagewithout taking ownership. Disposing detaches listeners without closing the caller's page, context, or browser — enabling safe use inside automation failure paths. -
beforeExitcleanup backstop: The session registry now installs aprocess.beforeExithook as a last resort to release provider-owned (cloud) sessions whendispose()is forgotten. The hook is removed after a successfuldispose()call. -
Linting migrated from
lintcnto oxlint: The Go-basedlintcn/tsgolinttoolchain has been replaced with oxlint + a small JS plugin.no-floating-promises,await-thenable,no-await-import, and disable-directive reason enforcement are all preserved. The Go toolchain is no longer required. -
Benchmarks now type-checked: The
@libretto/benchmarkspackage has atype-checkscript wired into the root Turbo validation task, with stale cross-package imports replaced by supported workspace package imports.