Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,12 @@ pnpm -r update <package...> # in-range bumps only
pnpm check && pnpm verify # both gates must pass before opening the PR
```

Caret ranges stop short on `0.x` packages (caret pins the minor), so those need an explicit target: `pnpm update oxfmt@0.68.0`. Upstream majors that change our own contract are separate work, not part of the sweep — `@browserbasehq/stagehand` v4 (extension-based runtime, see the Stagehand decisions docs) and `vitest` 5 while `@cloudflare/vitest-plugin` peers `vitest ^4.1.0`.
Caret ranges stop short on `0.x` packages (caret pins the minor), so those need an explicit target: `pnpm update oxfmt@0.68.0`. Upstream majors that change our own contract are separate work, not part of the sweep — `@browserbasehq/stagehand` v4 (extension-based runtime, see the Stagehand decisions docs).

Two follow-ups are parked for the next sweep:

- **Remove `fsModuleCache: false` from the four workerd vitest configs.** Vitest 5 enables the filesystem module cache by default; `@cloudflare/vitest-plugin` 1.4.0 cannot read those host-FS cache entries from workerd, so every test file fails before running (`readAll: no such file or directory`). Revert the overrides once [`cloudflare/workers-sdk#16163`](https://github.com/cloudflare/workers-sdk/pull/16163) ships.
- **The 16 anti-slop rules in `@mpsuesser/oxlint-plugin-effect` are not adopted.** Since 0.5.0 both presets enable 16 generic rules ported from `dmmulroy/anti-slop` (`no-unknown-parameters`, `no-unsafe-dictionary-type`, `no-runtime-typeof`, `require-safety-comment-for-type-assertion`, …), taking the rule count 57 → 73. On this codebase they produce 1410 findings across 139 files, so they stay off in `oxlint.config.ts`; the other 57 rules pass clean. Adopting them is its own lint-policy migration.

Bumping outside the monthly cadence is fine for security fixes and for known-needed peer-dep ranges (e.g., before a release that needs to drop support for an old effect version). Just don't expect to see Dependabot queue it for you.

Expand Down
6 changes: 3 additions & 3 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ Pick the client that matches what you're using now:
**Coming from `@cloudflare/playwright` or upstream Playwright?**

```bash
pnpm add @effect-libs/browser-playwright effect@4.0.0-rc.115
pnpm add @effect-libs/browser-playwright effect@4.0.0
```

`@effect-libs/browser-playwright` brings `@effect-libs/cloudflare-playwright` (our maintained fork of `@cloudflare/playwright@1.3.0`) as a transitive direct dependency — no separate install.

> **Effect v4 RC required.** All packages require the Effect v4 RC API and are incompatible with Effect v3 and prior Effect v4 beta APIs.
> **Effect v4 required.** All packages require the Effect v4 API and are incompatible with Effect v3 and prior Effect v4 beta APIs.

**Coming from `@browserbasehq/stagehand`?**

```bash
pnpm add @effect-libs/browser-stagehand @browserbasehq/stagehand effect@4.0.0-rc.115
pnpm add @effect-libs/browser-stagehand @browserbasehq/stagehand effect@4.0.0
```

**Want a zero-dependency Chrome DevTools Protocol client without `nodejs_compat`?**

```bash
pnpm add @effect-libs/browser-cdp effect@4.0.0-rc.115
pnpm add @effect-libs/browser-cdp effect@4.0.0
```

[Choosing a client](./overview.md#choosing-a-client) covers the stability / API surface / dependency trade-offs. For per-client deep-dives (added APIs, errors, comparison with alternatives), see [`browser-playwright`](./packages/playwright/index.md), [`browser-stagehand`](./packages/stagehand/index.md), and [`browser-cdp`](./packages/cdp/index.md).
Expand Down
4 changes: 2 additions & 2 deletions docs/packages/cdp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ A zero-dependency, native-WebSocket `@effect-libs/browser-cdp` client with a Pla
## Install

```bash
pnpm add @effect-libs/browser-cdp effect@4.0.0-rc.115
pnpm add @effect-libs/browser-cdp effect@4.0.0
```

> **Effect v4 RC required.** This package requires the Effect v4 RC API and is incompatible with Effect v3 and prior Effect v4 beta APIs. No additional runtime dependencies required.
> **Effect v4 required.** This package requires the Effect v4 API and is incompatible with Effect v3 and prior Effect v4 beta APIs. No additional runtime dependencies required.

## Resource acquisition

Expand Down
4 changes: 2 additions & 2 deletions docs/packages/playwright/added-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ values.
## `page.httpClient`

`page.httpClient` is the Effect-native equivalent of `page.fetch`. It
returns a `HttpClient.HttpClient` (from `effect/unstable/http`) that
returns a `HttpClient.HttpClient` (from `effect/http`) that
uses the browser's `fetch()` internally. This means you can compose it
with the rest of the Effect HTTP toolkit — `filterStatusOk`,
`retryTransient`, `schemaBodyJson`, middleware, etc.

```typescript
import { Effect, Schedule } from "effect";
import { Schema } from "effect";
import { HttpClient, HttpClientResponse } from "effect/unstable/http";
import { HttpClient, HttpClientResponse } from "effect/http";

import { Playwright } from "@effect-libs/browser-playwright";

Expand Down
4 changes: 2 additions & 2 deletions docs/packages/playwright/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Full upstream Playwright API on Cloudflare Workers and other edge runtimes. Chro
## Install

```bash
pnpm add @effect-libs/browser-playwright effect@4.0.0-rc.115
pnpm add @effect-libs/browser-playwright effect@4.0.0
```

The Playwright runtime comes from `@effect-libs/cloudflare-playwright` (our maintained fork of `@cloudflare/playwright@1.3.0`) as a transitive direct dependency — no separate install command needed.

> **Effect v4 RC required.** This package requires the Effect v4 RC API and is incompatible with Effect v3 and prior Effect v4 beta APIs.
> **Effect v4 required.** This package requires the Effect v4 API and is incompatible with Effect v3 and prior Effect v4 beta APIs.

## Resource acquisition

Expand Down
4 changes: 2 additions & 2 deletions docs/packages/stagehand/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ AI-powered browser automation with natural-language instructions. Stagehand v3 o
## Install

```bash
pnpm add @effect-libs/browser-stagehand @browserbasehq/stagehand effect@4.0.0-rc.115
pnpm add @effect-libs/browser-stagehand @browserbasehq/stagehand effect@4.0.0
```

> **Effect v4 RC required.** This package requires the Effect v4 RC API and is incompatible with Effect v3 and prior Effect v4 beta APIs.
> **Effect v4 required.** This package requires the Effect v4 API and is incompatible with Effect v3 and prior Effect v4 beta APIs.

## Resource acquisition

Expand Down
4 changes: 2 additions & 2 deletions docs/providers/browserbase.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Managed browser sessions with persistent contexts, proxies, and enterprise featu
## Install

```bash
pnpm add @effect-libs/browser-providers @browserbasehq/sdk effect@4.0.0-rc.115
pnpm add @effect-libs/browser-providers @browserbasehq/sdk effect@4.0.0
```

> **Effect v4 RC required.** This package requires the Effect v4 RC API and is incompatible with Effect v3 and prior Effect v4 beta APIs. No additional dependencies. Browserbase uses the HTTP API.
> **Effect v4 required.** This package requires the Effect v4 API and is incompatible with Effect v3 and prior Effect v4 beta APIs. No additional dependencies. Browserbase uses the HTTP API.

## Configuration

Expand Down
6 changes: 3 additions & 3 deletions docs/providers/cf-browser-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Two `BrowserProvider` implementations for [Cloudflare Browser Rendering](https:/
### Install

```bash
pnpm add @effect-libs/browser-providers cloudflare effect@4.0.0-rc.115
pnpm add @effect-libs/browser-providers cloudflare effect@4.0.0
```

> **Effect v4 RC required.** This package requires the Effect v4 RC API and is incompatible with Effect v3 and prior Effect v4 beta APIs.
> **Effect v4 required.** This package requires the Effect v4 API and is incompatible with Effect v3 and prior Effect v4 beta APIs.

### Configuration

Expand Down Expand Up @@ -42,7 +42,7 @@ Direct browser access via Cloudflare Workers binding. No external HTTP calls —
### Install

```bash
pnpm add @effect-libs/browser-providers @effect-libs/cloudflare-playwright effect@4.0.0-rc.115
pnpm add @effect-libs/browser-providers @effect-libs/cloudflare-playwright effect@4.0.0
```

### Usage
Expand Down
10 changes: 5 additions & 5 deletions docs/providers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ For help **picking** a provider (which one for what), see [Client & Provider →

```bash
# Steel — needs steel-sdk
pnpm add @effect-libs/browser-providers steel-sdk effect@4.0.0-rc.115
pnpm add @effect-libs/browser-providers steel-sdk effect@4.0.0

# Browserbase — needs @browserbasehq/sdk
pnpm add @effect-libs/browser-providers @browserbasehq/sdk effect@4.0.0-rc.115
pnpm add @effect-libs/browser-providers @browserbasehq/sdk effect@4.0.0

# Cloudflare Browser Run (HTTP) — needs cloudflare
pnpm add @effect-libs/browser-providers cloudflare effect@4.0.0-rc.115
pnpm add @effect-libs/browser-providers cloudflare effect@4.0.0

# Cloudflare Browser Run (binding) — needs `@effect-libs/cloudflare-playwright`; `browser-playwright` only
pnpm add @effect-libs/browser-providers @effect-libs/cloudflare-playwright effect@4.0.0-rc.115
pnpm add @effect-libs/browser-providers @effect-libs/cloudflare-playwright effect@4.0.0
```

> **Effect v4 RC required.** This package requires the Effect v4 RC API and is incompatible with Effect v3 and prior Effect v4 beta APIs.
> **Effect v4 required.** This package requires the Effect v4 API and is incompatible with Effect v3 and prior Effect v4 beta APIs.

Don't want a provider? Connect to any Chrome DevTools Protocol URL with `playwright.withConnection({ url: "wss://…" })` — no provider package needed.

Expand Down
4 changes: 2 additions & 2 deletions docs/providers/steel.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Managed browser sessions with anti-bot bypass, CAPTCHA solving, and persistent c
## Install

```bash
pnpm add @effect-libs/browser-providers steel-sdk effect@4.0.0-rc.115
pnpm add @effect-libs/browser-providers steel-sdk effect@4.0.0
```

> **Effect v4 RC required.** This package requires the Effect v4 RC API and is incompatible with Effect v3 and prior Effect v4 beta APIs.
> **Effect v4 required.** This package requires the Effect v4 API and is incompatible with Effect v3 and prior Effect v4 beta APIs.

## Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@effect-libs/browser-cdp": "workspace:*",
"@effect/platform-bun": "catalog:",
"@effect/platform-node": "catalog:",
"alchemy": "2.0.0-beta.79",
"alchemy": "2.0.0-beta.81",
"effect": "catalog:"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import * as Cloudflare from "alchemy/Cloudflare";
import { Config, Schema } from "effect";
import * as Effect from "effect/Effect";
import { HttpServerRequest } from "effect/http/HttpServerRequest";
import * as HttpServerResponse from "effect/http/HttpServerResponse";
import * as Redacted from "effect/Redacted";
import { HttpServerRequest } from "effect/unstable/http/HttpServerRequest";
import * as HttpServerResponse from "effect/unstable/http/HttpServerResponse";

import { Cdp } from "@effect-libs/browser-cdp";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@effect-libs/browser-playwright": "workspace:*",
"@effect/platform-bun": "catalog:",
"@effect/platform-node": "catalog:",
"alchemy": "2.0.0-beta.79",
"alchemy": "2.0.0-beta.81",
"effect": "catalog:"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import * as Cloudflare from "alchemy/Cloudflare";
import { Config, Schema } from "effect";
import * as Effect from "effect/Effect";
import { HttpServerRequest } from "effect/http/HttpServerRequest";
import * as HttpServerResponse from "effect/http/HttpServerResponse";
import * as Redacted from "effect/Redacted";
import { HttpServerRequest } from "effect/unstable/http/HttpServerRequest";
import * as HttpServerResponse from "effect/unstable/http/HttpServerResponse";

import { Playwright } from "@effect-libs/browser-playwright";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

import { NodeServices, NodeRuntime, NodeHttpClient } from "@effect/platform-node";
import { Effect, Schedule, Console, FileSystem, Stream, Layer, Schema } from "effect";
import { HttpClient } from "effect/unstable/http";
import { ChildProcess } from "effect/unstable/process";
import { HttpClient } from "effect/http";
import { ChildProcess } from "effect/process";

// Minimal local schema for Chrome's /json/version response.
// (The full CDP `ChromeVersionResponse` schema is an internal implementation
Expand Down
2 changes: 1 addition & 1 deletion examples/cf-workers/hackernews-cdp-wsUrl/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/

import { Effect, Schema, Match, Cause } from "effect";
import { HttpServerRequest } from "effect/unstable/http";
import { HttpServerRequest } from "effect/http";

import { Cdp } from "@effect-libs/browser-cdp";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/

import { Effect, Schema, Match, Cause } from "effect";
import { HttpServerRequest } from "effect/unstable/http";
import { HttpServerRequest } from "effect/http";

import { Playwright } from "@effect-libs/browser-playwright";

Expand Down
2 changes: 1 addition & 1 deletion examples/cf-workers/hackernews-stagehand-cdp/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

import { Effect, Schema, Match, Cause } from "effect";
import { HttpServerRequest } from "effect/unstable/http";
import { HttpServerRequest } from "effect/http";

import { Stagehand, toZodSchema } from "@effect-libs/browser-stagehand";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

import { Effect, Schema, Layer, Match, Cause } from "effect";
import { HttpServerRequest } from "effect/unstable/http";
import { HttpServerRequest } from "effect/http";

import { Playwright } from "@effect-libs/browser-playwright";
import { Stagehand, toZodSchema } from "@effect-libs/browser-stagehand";
Expand Down
25 changes: 25 additions & 0 deletions oxlint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,31 @@ export default defineConfig({
// Additional disables per project preference
"effect/prefer-namespace-imports": "off",

/* 16 anti-slop rules added in @mpsuesser/oxlint-plugin-effect@0.5.0.
Ported from `dmmulroy/anti-slop` — a generic (non-Effect) ruleset that
both presets now enable by default, taking the rule count 57 → 73.
Adopting them is a lint-policy decision, not a dependency bump: on this
codebase they produce 1410 findings across 139 files, 73% of them
`require-safety-comment-for-type-assertion` (1024). Not adopted here —
revisit as its own policy migration. The other 57 rules are unchanged and
pass clean. */
"effect/no-chained-type-assertions": "off",
"effect/no-conditional-empty-object-spread": "off",
"effect/no-known-value-widening": "off",
"effect/no-module-mocking": "off",
"effect/no-object-parameters": "off",
"effect/no-reflect-apply": "off",
"effect/no-reflect-get": "off",
"effect/no-runtime-typeof": "off",
"effect/no-service-constructor-imports": "off",
"effect/no-shape-in-symbol-names": "off",
"effect/no-unknown-parameters": "off",
"effect/no-unknown-returns": "off",
"effect/no-unknown-type-aliases": "off",
"effect/no-unsafe-dictionary-type": "off",
"effect/no-widen-then-assert": "off",
"effect/require-safety-comment-for-type-assertion": "off",

// Removed in @mpsuesser/oxlint-plugin-effect@0.4.x — no longer needed.
// "effect/prefer-schema-class": "off",
},
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@
"@effect/platform-node": "catalog:",
"@effect/tsgo": "latest",
"@effect/vitest": "catalog:",
"@mpsuesser/oxlint-plugin-effect": "^0.4.3",
"@mpsuesser/oxlint-plugin-effect": "^0.6.0",
"@types/bun": "^1.4.2",
"@types/node": "catalog:",
"@typescript/native-preview": "7.0.0-dev.20260707.2",
"@vitest/coverage-v8": "^4.1.11",
"@vitest/coverage-v8": "^5.0.4",
"cloudflare": "latest",
"devtools-protocol": "^0.0.1676105",
"effect": "catalog:",
Expand All @@ -71,7 +71,7 @@
"lint-staged": "^17.5.1",
"mdast-util-to-string": "^4.0.0",
"oxfmt": "^0.68.0",
"oxlint": "^1.83.0",
"oxlint": "^1.87.0",
"playwright": "^1.60.0",
"remark-gfm": "^4.0.1",
"remark-parse": "^11.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/browser-cdp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Fastly, Akamai).
## Install

```bash
pnpm add @effect-libs/browser-cdp effect@4.0.0-rc.115
pnpm add @effect-libs/browser-cdp effect@4.0.0
```

> **Effect v4 RC required.** This package requires the Effect v4 RC API and is incompatible with Effect v3 and prior Effect v4 beta APIs. No additional runtime dependencies required.
> **Effect v4 required.** This package requires the Effect v4 API and is incompatible with Effect v3 and prior Effect v4 beta APIs. No additional runtime dependencies required.

## AI / LLM usage

Expand Down
2 changes: 1 addition & 1 deletion packages/browser-cdp/src/internal/CdpHttpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { CdpError } from "../CdpError.js";
import type { FetchOptions, FetchResponse } from "./CdpPage.js";

import { Effect, Predicate } from "effect";
import { HttpClient, HttpClientError, HttpClientResponse } from "effect/unstable/http";
import { HttpClient, HttpClientError, HttpClientResponse } from "effect/http";

// ── Types ──────────────────────────────────────────────────────────────────────

Expand Down
2 changes: 1 addition & 1 deletion packages/browser-cdp/src/internal/CdpPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import type { Scope } from "effect";
import type { Input as DurationInput } from "effect/Duration";
import type { HttpClient } from "effect/unstable/http";
import type { HttpClient } from "effect/http";

import type { CdpError } from "../CdpError.js";
import type { CdpContextHandle } from "../CdpTypes.js";
Expand Down
2 changes: 1 addition & 1 deletion packages/browser-cdp/src/internal/Page/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import type { CdpCookie } from "../CdpSchema.js";

import { Effect, Match, Predicate as P } from "effect";
import * as Arr from "effect/Array";
import { HttpClient, HttpClientError, HttpClientResponse } from "effect/unstable/http";
import { HttpClient, HttpClientError, HttpClientResponse } from "effect/http";

import { CookieError } from "../../CdpError.js";
import { ensureSession } from "./EnsureSession.js";
Expand Down
4 changes: 2 additions & 2 deletions packages/browser-playwright/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ based on our fork of `@cloudflare/playwright` ([`@effect-libs/cloudflare-playwri
## Install

```bash
pnpm add @effect-libs/browser-playwright effect@4.0.0-rc.115
pnpm add @effect-libs/browser-playwright effect@4.0.0
```

The Playwright runtime comes from `@effect-libs/cloudflare-playwright` (our maintained fork of `@cloudflare/playwright@1.3.0`). It's a direct dependency, so it installs transitively — no second `pnpm add` needed.

> **Effect v4 RC required.** This package requires the Effect v4 RC API and is incompatible with Effect v3 and prior Effect v4 beta APIs.
> **Effect v4 required.** This package requires the Effect v4 API and is incompatible with Effect v3 and prior Effect v4 beta APIs.

## Documentation

Expand Down
Loading
Loading