From da5ad04a76917fe9e95c0d74e3061d457f318bd5 Mon Sep 17 00:00:00 2001 From: Nikolai Savelev <39529279+Xrazik1@users.noreply.github.com> Date: Fri, 13 Nov 2026 18:56:54 +0100 Subject: [PATCH 1/7] feat: add Browserless provider profiles for NVIDIA OpenShell Provider profiles that let an agent in an NVIDIA OpenShell sandbox (0.1.8 or newer) use Browserless: REST, BrowserQL, Puppeteer, Playwright, durable sessions and the hosted MCP server. The API token stays in the OpenShell gateway. - providers/: the main profile, with WebSocket paths on their own endpoints, and a Stripe Link approval pair. - examples/: Puppeteer, Playwright, BrowserQL and MCP clients with a sandbox image. - scripts/ and CI: lint and import every profile against the latest OpenShell release and 0.1.8, on pull requests and weekly. - docs/: version notes, NemoClaw's hosted MCP route and the Stripe Link approval flow. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/actions.lock | 13 + .github/workflows/profile-lint.yml | 39 + .gitignore | 5 + .nvmrc | 1 + CHANGELOG.md | 12 + README.md | 141 +++ SECURITY.md | 24 + assets/logo.svg | 5 + docs/nemoclaw.md | 22 + docs/stripe-link-approval.md | 56 + docs/version-notes.md | 27 + examples/Dockerfile | 17 + examples/README.md | 35 + examples/browserql.mjs | 17 + examples/mcp.mjs | 26 + examples/package-lock.json | 1545 +++++++++++++++++++++++ examples/package.json | 15 + examples/playwright.mjs | 26 + examples/puppeteer.mjs | 20 + providers/browserless-link-approve.yaml | 19 + providers/browserless-linkgated.yaml | 52 + providers/browserless.yaml | 102 ++ scripts/lint-profiles.sh | 97 ++ scripts/smoke.sh | 30 + 24 files changed, 2346 insertions(+) create mode 100644 .github/workflows/actions.lock create mode 100644 .github/workflows/profile-lint.yml create mode 100644 .gitignore create mode 100644 .nvmrc create mode 100644 CHANGELOG.md create mode 100644 README.md create mode 100644 SECURITY.md create mode 100644 assets/logo.svg create mode 100644 docs/nemoclaw.md create mode 100644 docs/stripe-link-approval.md create mode 100644 docs/version-notes.md create mode 100644 examples/Dockerfile create mode 100644 examples/README.md create mode 100644 examples/browserql.mjs create mode 100644 examples/mcp.mjs create mode 100644 examples/package-lock.json create mode 100644 examples/package.json create mode 100644 examples/playwright.mjs create mode 100644 examples/puppeteer.mjs create mode 100644 providers/browserless-link-approve.yaml create mode 100644 providers/browserless-linkgated.yaml create mode 100644 providers/browserless.yaml create mode 100755 scripts/lint-profiles.sh create mode 100755 scripts/smoke.sh diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock new file mode 100644 index 0000000..2fcf5ba --- /dev/null +++ b/.github/workflows/actions.lock @@ -0,0 +1,13 @@ +# This file is machine-generated by `gh actions-lock`. +# Do not edit by hand; run `gh actions-lock` to update. +# Docs: https://gh.io/actions-lockfile +version: 'v0.0.3' +workflows: + '.github/workflows/profile-lint.yml': + - 'actions/checkout@v7.0.1' +dependencies: + 'actions/checkout@v7.0.1': + ref: 'v7.0.1' + commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1' + owner_id: 44036562 + repo_id: 197814629 diff --git a/.github/workflows/profile-lint.yml b/.github/workflows/profile-lint.yml new file mode 100644 index 0000000..c1639b0 --- /dev/null +++ b/.github/workflows/profile-lint.yml @@ -0,0 +1,39 @@ +name: Profile lint + +on: + pull_request: + push: + branches: + - main + schedule: + # Weekly, the day after OpenShell's usual Tuesday release, so a breaking + # provider change shows up here before users hit it. + - cron: '0 6 * * 3' + workflow_dispatch: + +permissions: {} + +jobs: + lint: + name: Lint profiles (OpenShell ${{ matrix.openshell }}) + # ubuntu-latest ships Docker, which the throwaway gateway uses as its + # compute driver. + runs-on: ubuntu-latest + timeout-minutes: 15 + permissions: + contents: read + strategy: + fail-fast: false + matrix: + # latest: what new users install. v0.1.8: the oldest supported release. + openshell: [latest, v0.1.8] + + steps: + - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false + + - name: Lint and import every profile + env: + OPENSHELL_VERSION: ${{ matrix.openshell }} + run: scripts/lint-profiles.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c79b2e4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +node_modules/ +.DS_Store +*.log +.env +.env.local diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..a45fd52 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..3699174 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +All notable changes to these profiles are documented here. Tags match the headings below. + +## 1.0.0 — initial release + +- Added `providers/browserless.yaml`: REST, BrowserQL, CDP and Playwright WebSockets on their own `protocol: websocket` endpoints (required from OpenShell 0.1.8), durable-session and reconnect paths in every region, and the hosted MCP server with the Stripe Link payment tools denied. One Browserless API token, declared as `BROWSERLESS_TOKEN` (query parameter) and `BROWSERLESS_MCP_TOKEN` (bearer header). +- Added `providers/browserless-linkgated.yaml` and `providers/browserless-link-approve.yaml` for Stripe Link behind human approval. +- Documented NemoClaw's own route to the hosted MCP server. +- Added Puppeteer, Playwright, BrowserQL and MCP examples with a sandbox image. +- Added `scripts/lint-profiles.sh` and a CI workflow that lints and imports every profile against the latest OpenShell release and 0.1.8, on pull requests and weekly. +- Requires OpenShell 0.1.8 or newer. Tested on 0.1.8. diff --git a/README.md b/README.md new file mode 100644 index 0000000..43f0f18 --- /dev/null +++ b/README.md @@ -0,0 +1,141 @@ +# Browserless for NVIDIA OpenShell and NemoClaw + +Give an agent running in an [NVIDIA OpenShell](https://github.com/NVIDIA/OpenShell) sandbox a real browser, without installing one in the sandbox. + +This repository holds OpenShell **provider profiles** for [Browserless](https://www.browserless.io). A provider profile tells OpenShell where a credential may be sent. Your Browserless API token stays in the OpenShell gateway: the sandbox's environment holds a placeholder, and OpenShell puts the real token on requests to Browserless only. + +--- + +## Install + +### Import from this repository (recommended) + +Needs OpenShell 0.1.8 or newer. + +```shell +openshell provider profile import --global \ + --url https://raw.githubusercontent.com/browserless/openshell/main/providers/browserless.yaml + +export BROWSERLESS_TOKEN= +export BROWSERLESS_MCP_TOKEN="$BROWSERLESS_TOKEN" +openshell provider create --name browserless --type browserless \ + --credential BROWSERLESS_TOKEN --credential BROWSERLESS_MCP_TOKEN +``` + +Then attach the provider to a sandbox with `--provider browserless`. Inside the sandbox, `BROWSERLESS_TOKEN` and `BROWSERLESS_MCP_TOKEN` hold placeholders, not the token. + +No account yet? Sign up at [browserless.io/signup/email](https://www.browserless.io/signup/email) and copy the API token from [account.browserless.io](https://account.browserless.io). + +### Pin a version + +To keep the profile from changing under you, replace `main` in the URL with a tag from this repository's [releases](https://github.com/browserless/openshell/releases). + +### Update + +Importing a profile that already exists fails. To move to a newer version, delete the profile and import it again. Providers created from it keep working: + +```shell +openshell provider profile delete --global browserless +openshell provider profile import --global \ + --url https://raw.githubusercontent.com/browserless/openshell/main/providers/browserless.yaml +``` + +### From a local copy + +```shell +openshell provider profile lint -f providers/browserless.yaml +openshell provider profile import -f providers/browserless.yaml --global +``` + +NemoClaw pins an older OpenShell release, which these profiles do not support. [docs/nemoclaw.md](docs/nemoclaw.md) covers NemoClaw's own route to the hosted MCP server. + +--- + +## Profiles + +| Profile | Use it for | +|---|---| +| [`providers/browserless.yaml`](providers/browserless.yaml) | REST, BrowserQL, Puppeteer and Playwright (CDP and native), durable sessions in every region, and the hosted MCP server. The Stripe Link payment tools are denied. | +| [`providers/browserless-linkgated.yaml`](providers/browserless-linkgated.yaml) | Ordinary browsing, with Stripe Link only after a person approves. See [docs/stripe-link-approval.md](docs/stripe-link-approval.md). | +| [`providers/browserless-link-approve.yaml`](providers/browserless-link-approve.yaml) | Credential-free companion an operator attaches to allow `browserless_link_connect`, and detaches to revoke. | + +--- + +## What these profiles allow + +The main profile, `providers/browserless.yaml`: + +- **One token, two placements.** `BROWSERLESS_TOKEN` resolves only as the `token` query parameter, and `BROWSERLESS_MCP_TOKEN` only as an `Authorization: Bearer` header. Create both from the same Browserless API token. +- **Only Browserless hosts.** The token is sent only to `production-*.browserless.io` (the SFO, LON and AMS regions) and to `mcp.browserless.io/mcp`. Requests from the sandbox to any other host are blocked by the sandbox's network policy. +- **Only the processes you list.** `binaries` lets `node` and `curl` at `/usr/bin` or `/usr/local/bin` reach those hosts. Edit it to match your image. +- **REST and BrowserQL** with full access, including `DELETE` so an agent can stop its own sessions. +- **WebSockets** only on the CDP and Playwright connect and reconnect paths, including the worker-pinned URLs that durable sessions return. +- **Every MCP tool except the Stripe Link payment tools.** OpenShell answers `browserless_link_checkout` and `browserless_link_connect` with `policy_denied`. Remove those deny rules only if your workload is approved to pay, or use the [approval flow](docs/stripe-link-approval.md). + +Usage is billed to the Browserless account that owns the token, as it is outside OpenShell. + +--- + +## Quick check + +This starts a throwaway sandbox and fetches example.com through Browserless. OpenShell's default sandbox image has no `curl` or `node`, so it uses the official Node image: + +```shell +openshell sandbox create --no-keep --from node:24-bookworm-slim --provider browserless -- node -e ' + fetch(`https://production-sfo.browserless.io/content?token=${process.env.BROWSERLESS_TOKEN}`, { + method: "POST", + headers: { "content-type": "application/json" }, + body: JSON.stringify({ url: "https://example.com" }), + }).then((r) => r.text()).then(console.log)' +``` + +Keep the single quotes: `${process.env.BROWSERLESS_TOKEN}` is read inside the sandbox, where it holds the placeholder. [`scripts/smoke.sh`](scripts/smoke.sh) runs the same check and prints `PASS` or `FAIL`. + +Puppeteer, Playwright, BrowserQL and MCP examples, with an image to run them in, are in [examples/](examples/). + +--- + +## Version notes + +- **OpenShell 0.1.8 and newer** need WebSocket paths on their own `protocol: websocket` endpoints, and resolve each credential only where the profile places it. The main profile does both. +- **Earlier OpenShell releases** are not supported. +- OpenShell closes the connection on any client WebSocket message over 4 MiB. + +Details, and what each profile was tested on: [docs/version-notes.md](docs/version-notes.md). + +--- + +## Repository layout + +``` +providers/ OpenShell provider profiles +docs/ Version notes, NemoClaw's MCP route, Stripe Link approval +examples/ Puppeteer, Playwright, BrowserQL and MCP clients, and a sandbox image +scripts/lint-profiles.sh Lints and imports every profile against a throwaway gateway (CI) +scripts/smoke.sh The quick check above +assets/logo.svg Browserless logo +``` + +CI runs `scripts/lint-profiles.sh` against the latest OpenShell release and against 0.1.8 on every pull request and once a week. It runs on Linux with Docker; locally: + +```shell +OPENSHELL_VERSION=v0.1.8 scripts/lint-profiles.sh +``` + +--- + +## Resources + +- OpenShell: [github.com/NVIDIA/OpenShell](https://github.com/NVIDIA/OpenShell) and the [provider docs](https://docs.nvidia.com/openshell/latest/how-it-works/providers/overview) +- NemoClaw: [github.com/NVIDIA/NemoClaw](https://github.com/NVIDIA/NemoClaw) +- Browserless docs: [docs.browserless.io](https://docs.browserless.io) +- Hosted MCP server: [`https://mcp.browserless.io/mcp`](https://mcp.browserless.io/mcp) +- Report a security issue: [SECURITY.md](SECURITY.md) + +--- + +## License + +MIT, see [LICENSE](LICENSE). + +The Browserless server itself is licensed separately under SSPL-1.0. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..18a1d85 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,24 @@ +# Security Policy + +## Reporting a vulnerability + +If you discover a security vulnerability in these profiles, the scripts or the examples, please report it privately. **Do not open a public GitHub issue.** + +Email: **support@browserless.io** + +When reporting, please include: + +- A description of the vulnerability and its potential impact +- Steps to reproduce, ideally with a minimal proof of concept +- The affected profile or file, and the OpenShell version you used +- Any suggested mitigation, if known + +## Out of scope + +The following are generally **not** considered vulnerabilities in this project: + +- Issues in OpenShell or NemoClaw themselves. Report those to NVIDIA as their [OpenShell security policy](https://github.com/NVIDIA/OpenShell/blob/main/SECURITY.md) and [NemoClaw security policy](https://github.com/NVIDIA/NemoClaw/blob/main/SECURITY.md) describe. +- Issues in the Browserless API or Chrome itself. Report those to [browserless.io](https://www.browserless.io) directly. +- A profile you edited to allow more than the published one does. + +Thanks for helping keep the project and its users safe. diff --git a/assets/logo.svg b/assets/logo.svg new file mode 100644 index 0000000..7c1fc10 --- /dev/null +++ b/assets/logo.svg @@ -0,0 +1,5 @@ + + Browserless + + + diff --git a/docs/nemoclaw.md b/docs/nemoclaw.md new file mode 100644 index 0000000..87b88f8 --- /dev/null +++ b/docs/nemoclaw.md @@ -0,0 +1,22 @@ +# NemoClaw + +[NemoClaw](https://github.com/NVIDIA/NemoClaw) runs OpenClaw inside an OpenShell sandbox. It pins an OpenShell release older than 0.1.8, so the provider profiles in this repository do not apply to it. Use NemoClaw's own MCP support instead. + +## Hosted MCP server + +NemoClaw adds the hosted Browserless MCP server as a tool provider. Deny the Stripe Link payment tools when you add it: + +```shell +export BROWSERLESS_TOKEN= +nemoclaw mcp add browserless --url https://mcp.browserless.io/mcp \ + --env BROWSERLESS_TOKEN \ + --deny-tool browserless_link_checkout --deny-tool browserless_link_connect +``` + +NemoClaw stores the token as an OpenShell provider, and the sandbox sees only a placeholder. The agent gets every Browserless MCP tool except the two denied ones, including `browserless_agent` for multi-step browsing and `browserless_smartscraper` for single pages. + +Tested with NemoClaw v0.0.142. + +## Puppeteer, Playwright and OpenClaw's built-in browser + +These connect to Browserless over a WebSocket, and the profiles here need OpenShell 0.1.8 or newer for that. Use them in an OpenShell 0.1.8 sandbox outside NemoClaw, with [`providers/browserless.yaml`](../providers/browserless.yaml), until NemoClaw moves to OpenShell 0.1.8 or newer. diff --git a/docs/stripe-link-approval.md b/docs/stripe-link-approval.md new file mode 100644 index 0000000..593e8ba --- /dev/null +++ b/docs/stripe-link-approval.md @@ -0,0 +1,56 @@ +# Stripe Link behind human approval + +Browserless can pay with a [Stripe Link](https://link.com) wallet. The main profile denies both Stripe Link MCP tools, `browserless_link_checkout` and `browserless_link_connect`. When an agent should be able to use the wallet only after a person says yes, use the two profiles below instead. They need OpenShell 0.1.8 or newer and were tested on 0.1.8. + +- `providers/browserless-linkgated.yaml` covers ordinary browsing: REST `/content`, BrowserQL, `/json/*` discovery, CDP on `/`, and the MCP tools `browserless_smartscraper` and `browserless_usage`. Every Stripe Link REST path is outside it, and `browserless_link_checkout` is always denied. +- `providers/browserless-link-approve.yaml` is credential-free. Attaching it to a sandbox allows `browserless_link_connect`; detaching it takes that away again. + +## Set it up + +```shell +openshell settings set --global --key agent_policy_proposals_enabled --value true --yes +openshell provider profile import -f providers/browserless-linkgated.yaml --global +openshell provider profile import -f providers/browserless-link-approve.yaml --global + +export BROWSERLESS_TOKEN= +export BROWSERLESS_MCP_TOKEN="$BROWSERLESS_TOKEN" +openshell provider create --name browserless-gated --type browserless-linkgated \ + --credential BROWSERLESS_TOKEN --credential BROWSERLESS_MCP_TOKEN +openshell provider create --name link-approve --type browserless-link-approve + +openshell sandbox create --name agent --from --provider browserless-gated +``` + +## How approval works + +1. **The agent asks.** A Stripe Link REST call such as `GET /integrations/stripe-link/status` gets `403 policy_denied`. The agent proposes a rule for exactly that path by posting to `http://policy.local/v1/proposals` from inside the sandbox. +2. **A person reviews it.** The proposal shows the rule, the endpoint and the agent's reason: + + ```shell + openshell rule get agent --status pending + openshell rule approve agent --chunk-id + ``` + +3. **A person allows the wallet tool**, if the agent also needs `browserless_link_connect`: + + ```shell + openshell sandbox provider attach agent link-approve + ``` + +4. **Revoke it** when the purchase is done: + + ```shell + openshell sandbox provider detach agent link-approve + ``` + + Detaching removes only the wallet tool. The REST rule approved in step 2 stays in the sandbox's policy. + +`browserless_link_checkout` stays denied at every step: approval through OpenShell's policy advisor cannot lift a tool-level deny. Review every proposal before approving it, especially one that opens another Browserless path. Browserless's own agent endpoints can also use a connected Stripe Link wallet. + +## What we observed on 0.1.8 + +| Step | REST link status | `browserless_link_connect` | `browserless_link_checkout` | `browserless_smartscraper` | +|---|---|---|---|---| +| Before approval | 403 `policy_denied` | denied | denied | works | +| After approving the rule and attaching `link-approve` | 200 | works | denied | works | +| After detaching `link-approve` | 200 (the approved rule stays) | denied | denied | works | diff --git a/docs/version-notes.md b/docs/version-notes.md new file mode 100644 index 0000000..86d1ada --- /dev/null +++ b/docs/version-notes.md @@ -0,0 +1,27 @@ +# OpenShell version notes + +The profiles here need **OpenShell 0.1.8 or newer**. They were tested on 0.1.8: REST, BrowserQL, Puppeteer, Playwright (CDP and native), durable sessions, the LON and AMS regions, the hosted MCP server, and the Stripe Link approval flow. Earlier releases are not supported. + +CI lints and imports every profile against the latest OpenShell release and against 0.1.8 on each pull request and once a week. + +## What 0.1.8 changed + +Two 0.1.8 changes shape the main profile: + +- **REST endpoints refuse WebSocket upgrades.** CDP and Playwright connections need endpoints with `protocol: websocket`. The main profile declares one for each connect and reconnect path, including the worker-pinned `/e//…` URLs that durable sessions return. Any other WebSocket path is refused. +- **Credentials resolve only where the profile places them.** `BROWSERLESS_TOKEN` resolves only as the `token` query parameter, and `BROWSERLESS_MCP_TOKEN` only as the `Authorization: Bearer` header. Send each where the profile expects it. + +## Updating a profile + +A gateway keeps the profile it imported; editing the YAML afterwards changes nothing. Importing a profile that already exists fails, so to load a newer version, delete it and import it again (`openshell provider profile delete --global browserless`, then the import). Providers created from it keep working. + +## Sandbox images + +- **Bring your own image.** OpenShell's default sandbox image has no `curl`, `node` or `python`. Pass `--from` with an image that has your client, such as `node:24-bookworm-slim` or the image built from [`examples/Dockerfile`](../examples/Dockerfile). +- **Install code where the sandbox can read it.** The default filesystem policy does not allow reads under `/opt`. Put scripts and `node_modules` under `/usr` (the examples image uses `/usr/local/lib/browserless-examples`) or in the sandbox working directory, or pass a policy that allows your path. +- **Match `binaries` to your image.** The profile lets only `node` and `curl` at `/usr/bin` or `/usr/local/bin` reach Browserless. Add your paths if your client lives elsewhere. +- **macOS VM driver.** On 0.1.8 the VM driver could not prepare images published with Docker's v2 manifest format, such as `curlimages/curl`. Images published with an OCI index, such as the official `node` images, work. + +## Limits + +- **Message size.** OpenShell inspects every client WebSocket message and closes the connection on a message over 4 MiB (measured on 0.1.8: 3.9 MiB passes, 4.1 MiB closes). Everyday CDP traffic from Puppeteer and Playwright stays far below that. Large `page.evaluate` arguments or `page.setContent` payloads can hit it. diff --git a/examples/Dockerfile b/examples/Dockerfile new file mode 100644 index 0000000..c354fb8 --- /dev/null +++ b/examples/Dockerfile @@ -0,0 +1,17 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 Browserless +# SPDX-License-Identifier: MIT +# +# Sandbox image for the examples: Node 24 plus the pinned Browserless clients. +# docker build -t browserless-openshell-examples examples +FROM node:24-bookworm-slim + +# Under /usr so OpenShell's default filesystem policy can read it; /opt is not +# readable inside a sandbox unless a custom policy allows it. +WORKDIR /usr/local/lib/browserless-examples +COPY package.json package-lock.json ./ +RUN npm ci --omit=dev --no-audit --no-fund +COPY *.mjs ./ +RUN chmod -R a+rX /usr/local/lib/browserless-examples + +USER node +WORKDIR /sandbox diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..4dc7c0e --- /dev/null +++ b/examples/README.md @@ -0,0 +1,35 @@ +# Examples + +Browserless clients to run inside an OpenShell sandbox that has the `browserless` provider attached. Each script reads the OpenShell placeholders from `BROWSERLESS_TOKEN` or `BROWSERLESS_MCP_TOKEN`; OpenShell puts the real API token on the request on its way to Browserless. + +| Script | What it does | +|---|---| +| `puppeteer.mjs` | Puppeteer over CDP: opens example.com and prints the title. | +| `playwright.mjs` | Playwright over CDP, then over Playwright's own protocol on `/chromium/playwright`. | +| `browserql.mjs` | One BrowserQL query with Node's `fetch`; no dependencies. | +| `mcp.mjs` | The hosted MCP server: lists the tools and runs `browserless_smartscraper`. | + +## Run them + +OpenShell's default sandbox image has no Node, so build an image with the clients first. The [Dockerfile](Dockerfile) installs the pinned versions from `package-lock.json` under `/usr/local/lib/browserless-examples`, a path the default sandbox filesystem policy can read. + +```shell +docker build -t browserless-openshell-examples examples +openshell sandbox create --no-keep --from browserless-openshell-examples \ + --provider browserless -- sh -c ' + cd /usr/local/lib/browserless-examples + node puppeteer.mjs && node playwright.mjs && node browserql.mjs && node mcp.mjs' +``` + +Expected output: + +```text +puppeteer: Example Domain +playwright (CDP): Example Domain +playwright (native): Example Domain +browserql: 200 Example Domain +mcp: 23 tools +mcp smartscraper: Example Domain found +``` + +The tool count follows the hosted server and changes as tools are added. Set `BROWSERLESS_REGION` to `production-lon` or `production-ams` to use another region. diff --git a/examples/browserql.mjs b/examples/browserql.mjs new file mode 100644 index 0000000..b00d36c --- /dev/null +++ b/examples/browserql.mjs @@ -0,0 +1,17 @@ +// SPDX-FileCopyrightText: Copyright (c) 2026 Browserless +// SPDX-License-Identifier: MIT +// +// One BrowserQL query from inside an OpenShell sandbox. Needs only Node's fetch. +const region = process.env.BROWSERLESS_REGION ?? 'production-sfo'; +const token = encodeURIComponent(process.env.BROWSERLESS_TOKEN ?? ''); + +const res = await fetch(`https://${region}.browserless.io/chromium/bql?token=${token}`, { + method: 'POST', + headers: { 'content-type': 'application/json' }, + body: JSON.stringify({ + query: 'mutation { goto(url: "https://example.com") { status } title { title } }', + }), +}); +if (!res.ok) throw new Error(`BrowserQL returned ${res.status}`); +const { data } = await res.json(); +console.log(`browserql: ${data.goto.status} ${data.title.title}`); diff --git a/examples/mcp.mjs b/examples/mcp.mjs new file mode 100644 index 0000000..3ce658c --- /dev/null +++ b/examples/mcp.mjs @@ -0,0 +1,26 @@ +// SPDX-FileCopyrightText: Copyright (c) 2026 Browserless +// SPDX-License-Identifier: MIT +// +// The hosted Browserless MCP server from inside an OpenShell sandbox. +// BROWSERLESS_MCP_TOKEN holds an OpenShell placeholder for the bearer header. +import { Client } from '@modelcontextprotocol/sdk/client/index.js'; +import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'; + +const transport = new StreamableHTTPClientTransport(new URL('https://mcp.browserless.io/mcp'), { + requestInit: { headers: { Authorization: `Bearer ${process.env.BROWSERLESS_MCP_TOKEN ?? ''}` } }, +}); +const client = new Client({ name: 'browserless-openshell-example', version: '1.0.0' }); + +await client.connect(transport); +try { + const { tools } = await client.listTools(); + console.log(`mcp: ${tools.length} tools`); + const result = await client.callTool({ + name: 'browserless_smartscraper', + arguments: { url: 'https://example.com', formats: ['markdown'] }, + }); + const text = (result.content ?? []).map((part) => part.text ?? '').join('\n'); + console.log(`mcp smartscraper: ${text.includes('Example Domain') ? 'Example Domain found' : text.slice(0, 200)}`); +} finally { + await client.close(); +} diff --git a/examples/package-lock.json b/examples/package-lock.json new file mode 100644 index 0000000..3bcf846 --- /dev/null +++ b/examples/package-lock.json @@ -0,0 +1,1545 @@ +{ + "name": "browserless-openshell-examples", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "browserless-openshell-examples", + "license": "MIT", + "dependencies": { + "@modelcontextprotocol/sdk": "1.32.1", + "playwright-core": "1.64.1", + "puppeteer-core": "25.14.0" + }, + "engines": { + "node": ">=24" + } + }, + "node_modules/@hono/node-server": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.8.tgz", + "integrity": "sha512-jdf7FHh6A1lzjpHHQUgxsg2GeER2vMetnAOfeActzcoli6jamlK+NAwL6Dsr5Fl3BS3tYUQzCdtZjU8Qxv7bEA==", + "license": "MIT", + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "hono": "^4 || ^5.0.0-0" + } + }, + "node_modules/@modelcontextprotocol/sdk": { + "version": "1.32.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.32.1.tgz", + "integrity": "sha512-2DdE+SJDtzLEEWzY1ZjY7Q+VcPhcV1KisD3zI4u0XZyktsjHum1mwbMI+JaulUBi2OZk+KJAi2uPXzxichPkdw==", + "license": "MIT", + "dependencies": { + "@hono/node-server": "^1.19.9 || ^2.0.5", + "ajv": "^8.17.1", + "ajv-formats": "^3.0.1", + "content-type": "^1.0.5", + "cors": "^2.8.5", + "cross-spawn": "^7.0.5", + "eventsource": "^3.0.2", + "eventsource-parser": "^3.0.0", + "express": "^5.2.1", + "express-rate-limit": "^8.2.1", + "hono": "^4.11.4", + "jose": "^6.1.3", + "json-schema-typed": "^8.0.2", + "pkce-challenge": "^5.0.0", + "raw-body": "^3.0.0", + "zod": "^3.25 || ^4.0", + "zod-to-json-schema": "^3.25.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@cfworker/json-schema": "^4.1.1", + "zod": "^3.25 || ^4.0" + }, + "peerDependenciesMeta": { + "@cfworker/json-schema": { + "optional": true + }, + "zod": { + "optional": false + } + } + }, + "node_modules/@puppeteer/browsers": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-3.2.5.tgz", + "integrity": "sha512-UoCo3Pynbm37aLEEoydSiG+t24ui7sLD40+07CKxzxNy4PpSowJMkvlLIiV67XjP1lMVynhQVnuwlTABqBH8LQ==", + "license": "Apache-2.0", + "dependencies": { + "modern-tar": "^0.8.5", + "yargs": "^18.0.0" + }, + "bin": { + "browsers": "lib/main-cli.js" + }, + "engines": { + "node": ">=22.12.0" + }, + "peerDependencies": { + "proxy-agent": ">=8.0.1", + "yauzl": "^2.10.0 || ^3.4.0" + }, + "peerDependenciesMeta": { + "proxy-agent": { + "optional": true + }, + "yauzl": { + "optional": true + } + } + }, + "node_modules/accepts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "license": "MIT", + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ansi-regex": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.6.0.tgz", + "integrity": "sha512-XZ5apbzreCbXSKwPjJstu8R0zOi247w3XYwWxtwBXgpZrCyc1Ka7p9/xY0A9/diMewmHbEKz+FIraWaEWjlN5g==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/body-parser": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.4.0.tgz", + "integrity": "sha512-Ifk1KcLrxaGt1occQagQNFNNOqRt1LFuehEnHHzB8Z6cRgIxRU1TBaiIsUiCdA+gy5PL7Y1IX31DNKkRmxtXjQ==", + "license": "MIT", + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^2.1.0", + "debug": "^4.4.3", + "http-errors": "^2.0.1", + "iconv-lite": "^0.7.3", + "on-finished": "^2.4.1", + "qs": "^6.16.1", + "raw-body": "^3.0.2", + "type-is": "^2.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/body-parser/node_modules/content-type": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz", + "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chromium-bidi": { + "version": "157.0.8090-0", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-157.0.8090-0.tgz", + "integrity": "sha512-KJw7IQgqXwxpJgJlEIPg5mr2ZoqA+jkTRtc5EABI7sUJ3bu3cpI7NuEBoj4Gn1AsF78CaT9So5WQWspK3/wYag==", + "license": "Apache-2.0", + "dependencies": { + "mitt": "^3.0.1", + "zod": "^4.6.5" + }, + "engines": { + "node": ">=20.19.0 <22.0.0 || >=22.12.0" + }, + "peerDependencies": { + "devtools-protocol": "*" + } + }, + "node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", + "license": "ISC", + "dependencies": { + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/content-disposition": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-2.0.1.tgz", + "integrity": "sha512-e+H0ZXHSWYrENhQzw1LPuP4oF5MzVKmDU6d3hxlvaPEYLLg62MxtQNPRx4SYSuYJSBUgnQIG4HIN2tEtNv7Dog==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } + }, + "node_modules/cors": { + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz", + "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/devtools-protocol": { + "version": "0.0.1696802", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1696802.tgz", + "integrity": "sha512-FO5/SENfvc2K8wRnWQflKcwuoTH4dBkXCWTQ9ebIWtuX8JM5+ZvCotaEmkfh21pO7TvIKGTM3hG4xFiq9WTwmg==", + "license": "BSD-3-Clause" + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.3.tgz", + "integrity": "sha512-mIteYONiEfc4xWf2F1WXovh1c8npzS00vNeiUPdwFF+QlVJni+gNvpQltLMQhob8rew/bWWc/bGTuUr0EUGt0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventsource": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz", + "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==", + "license": "MIT", + "dependencies": { + "eventsource-parser": "^3.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/eventsource-parser": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.1.1.tgz", + "integrity": "sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/express": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/express/-/express-5.3.0.tgz", + "integrity": "sha512-qCqy1xSoaugxOD4IVHb1ZWdkvCF2W3aE2okKouWj8VwJ+ztskSiXoBnCSJqfKT+cVPJhuJqe9YLbY425+Zh00g==", + "license": "MIT", + "dependencies": { + "accepts": "^2.0.0", + "body-parser": "^2.3.0", + "content-disposition": "^2.0.1", + "content-type": "^2.0.0", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "depd": "^2.0.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.8", + "qs": "^6.16.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.1.0", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express-rate-limit": { + "version": "8.7.4", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.7.4.tgz", + "integrity": "sha512-LKBXzX700wz3zAGNNmVnjRI5mEbYkLv7UbMI4+9Xa+JPcg2UZh6AgY/2CZh9RrJjFM5ttC/N1lD+KzyFoZITCw==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.3", + "ip-address": "^10.2.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/express-rate-limit" + }, + "peerDependencies": { + "express": ">= 4.11" + } + }, + "node_modules/express/node_modules/content-type": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz", + "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz", + "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/finalhandler": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", + "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.7.0.tgz", + "integrity": "sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hono": { + "version": "4.13.18", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.18.tgz", + "integrity": "sha512-H9q/E1XizaWstJxUW881dmLxEj+t/TrGGnyxINkm4+sK0qUwsMtFdo2BWI9Vs3cIS19MU6b6iCijoUoEf4f3DA==", + "license": "MIT", + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/iconv-lite": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz", + "integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ip-address": { + "version": "10.7.6", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.7.6.tgz", + "integrity": "sha512-00LYkM6byILa9eQIx6qoaXCM40xTLd56AZ4vyaPW3YTyb49VZYPo5xsiAq4tuQ54GH4R7gVdYScJ1B7B77PuTg==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/jose": { + "version": "6.2.17", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.17.tgz", + "integrity": "sha512-wOuK9V1yujQFH5S0ZWmLcDZN7+IKh9bUCC2ZPCf2HDlol3WWHy+PPyNjEI75FXRLMp3vDKQcupP59xhVU95hcg==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/json-schema-typed": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.2.tgz", + "integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==", + "license": "BSD-2-Clause" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.1.tgz", + "integrity": "sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/merge-descriptors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "license": "MIT" + }, + "node_modules/modern-tar": { + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/modern-tar/-/modern-tar-0.8.6.tgz", + "integrity": "sha512-LYSks0tNVqbtez/9OB0YFP6qLRSqkdAxJWOQpVaR67lNTbj2zNLyYpowkRMia5lXLCZKzxwoxkxH2MbbBR2aEg==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.1.0.tgz", + "integrity": "sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==", + "license": "MIT", + "dependencies": { + "content-type": "^2.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/negotiator/node_modules/content-type": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz", + "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.2.tgz", + "integrity": "sha512-ATWUv387i+nLD49EiDoOft5scf32Vsdz3ktrQJG9bi7jRFmaXTssvyvj1EmeKVVgvesbqUtvQQvaS2TpTukAZQ==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-to-regexp": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz", + "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/pkce-challenge": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz", + "integrity": "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==", + "license": "MIT", + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/playwright-core": { + "version": "1.64.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.64.1.tgz", + "integrity": "sha512-BC4s8y6SEVA6Q1rSxZTto8hI1KUI3xXlHGZgvGqP4IqPdI/a6FX9H29IDNz7vKo9l21b6LfYosScPL6M3xxyDQ==", + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.8.tgz", + "integrity": "sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/puppeteer-core": { + "version": "25.14.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-25.14.0.tgz", + "integrity": "sha512-LQitnes3tBeVbdZ7V/4iwJPLZGgkl9uBVK0W7YYMh68j/3Y9eNuvj4yl+Fdo7zN0SuajOMrhd7aPj3DifK8k6A==", + "license": "Apache-2.0", + "dependencies": { + "@puppeteer/browsers": "3.2.5", + "chromium-bidi": "157.0.8090-0", + "devtools-protocol": "0.0.1696802", + "typed-query-selector": "^2.12.3", + "webdriver-bidi-protocol": "1.0.1", + "ws": "^8.22.0" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/qs": { + "version": "6.17.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.17.1.tgz", + "integrity": "sha512-jd3COkaKVgGUW+ZHyEHCG9bH7RoaaiWuMgzsIBjUMVjLAaWGWpoUAVwljVvBHxRu/2qEHnadLGZrkutYUBPQJA==", + "license": "BSD-3-Clause", + "dependencies": { + "es-define-property": "^1.0.1", + "side-channel": "^1.1.1" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.3.0.tgz", + "integrity": "sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/raw-body": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", + "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.7.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/send": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz", + "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.3", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.1", + "mime-types": "^3.0.2", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/serve-static": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz", + "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz", + "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4", + "side-channel-list": "^1.0.1", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string-width": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.3.0.tgz", + "integrity": "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==", + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.5.0", + "strip-ansi": "^7.1.2" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.1.0.tgz", + "integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==", + "license": "MIT", + "dependencies": { + "content-type": "^2.0.0", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/type-is/node_modules/content-type": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz", + "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/typed-query-selector": { + "version": "2.12.3", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.3.tgz", + "integrity": "sha512-/dtuMZyutHLlrxWhhC1uib00ELUr2dZ8C9B8YzZYsJmeE3V56OxRblrSM2UaF142pcMtak7ehZ6+poWGeehNIg==", + "license": "MIT" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/webdriver-bidi-protocol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-1.0.1.tgz", + "integrity": "sha512-WXWs/aXF2a6Al1Z2/V/7Gp2oPZOAAmHjJOTmv4KCXRJ122IMj3tSSMc6a4q3K4QOmhQbse/Ahr+oTVJOU2dUiw==", + "license": "Apache-2.0" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.23.0.tgz", + "integrity": "sha512-wCkmX8QMOrKjgO8HW2WyDbTSGeqkocxgDzS9iR79rEAexty6/2qzilx3Ag8Tqf9ykop3irLKle0MtVn5qjVnoQ==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.2.0.tgz", + "integrity": "sha512-9OpKOLeaoNFecEp7P6iYbzze/5CqWoH7N3SMs/6y1XF4nMvFMspEGZzJ6uFi9MmQwXhyzqYoSEKO3tvA3Z/o2w==", + "license": "MIT", + "dependencies": { + "cliui": "^9.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "string-width": "^8.2.1", + "y18n": "^5.0.5", + "yargs-parser": "^22.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/zod": { + "version": "4.6.7", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz", + "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-json-schema": { + "version": "3.25.2", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.2.tgz", + "integrity": "sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA==", + "license": "ISC", + "peerDependencies": { + "zod": "^3.25.28 || ^4" + } + } + } +} diff --git a/examples/package.json b/examples/package.json new file mode 100644 index 0000000..0fe97b4 --- /dev/null +++ b/examples/package.json @@ -0,0 +1,15 @@ +{ + "name": "browserless-openshell-examples", + "private": true, + "type": "module", + "description": "Browserless clients to run inside an OpenShell sandbox", + "license": "MIT", + "engines": { + "node": ">=24" + }, + "dependencies": { + "@modelcontextprotocol/sdk": "1.32.1", + "playwright-core": "1.64.1", + "puppeteer-core": "25.14.0" + } +} diff --git a/examples/playwright.mjs b/examples/playwright.mjs new file mode 100644 index 0000000..427b749 --- /dev/null +++ b/examples/playwright.mjs @@ -0,0 +1,26 @@ +// SPDX-FileCopyrightText: Copyright (c) 2026 Browserless +// SPDX-License-Identifier: MIT +// +// Playwright inside an OpenShell sandbox, both ways Browserless accepts it: +// over CDP, and over Playwright's own protocol on /chromium/playwright. +import { chromium } from 'playwright-core'; + +const region = process.env.BROWSERLESS_REGION ?? 'production-sfo'; +const token = encodeURIComponent(process.env.BROWSERLESS_TOKEN ?? ''); + +async function title(browser) { + try { + const context = browser.contexts()[0] ?? (await browser.newContext()); + const page = await context.newPage(); + await page.goto('https://example.com'); + return await page.title(); + } finally { + await browser.close(); + } +} + +const overCDP = await chromium.connectOverCDP(`wss://${region}.browserless.io?token=${token}`); +console.log(`playwright (CDP): ${await title(overCDP)}`); + +const native = await chromium.connect(`wss://${region}.browserless.io/chromium/playwright?token=${token}`); +console.log(`playwright (native): ${await title(native)}`); diff --git a/examples/puppeteer.mjs b/examples/puppeteer.mjs new file mode 100644 index 0000000..19632bc --- /dev/null +++ b/examples/puppeteer.mjs @@ -0,0 +1,20 @@ +// SPDX-FileCopyrightText: Copyright (c) 2026 Browserless +// SPDX-License-Identifier: MIT +// +// Puppeteer over CDP, run inside an OpenShell sandbox. BROWSERLESS_TOKEN holds +// an OpenShell placeholder; the sandbox swaps in the real key on the way out. +import puppeteer from 'puppeteer-core'; + +const region = process.env.BROWSERLESS_REGION ?? 'production-sfo'; +const token = encodeURIComponent(process.env.BROWSERLESS_TOKEN ?? ''); + +const browser = await puppeteer.connect({ + browserWSEndpoint: `wss://${region}.browserless.io?token=${token}`, +}); +try { + const page = await browser.newPage(); + await page.goto('https://example.com', { waitUntil: 'domcontentloaded' }); + console.log(`puppeteer: ${await page.title()}`); +} finally { + await browser.close(); +} diff --git a/providers/browserless-link-approve.yaml b/providers/browserless-link-approve.yaml new file mode 100644 index 0000000..7a90c02 --- /dev/null +++ b/providers/browserless-link-approve.yaml @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 Browserless +# SPDX-License-Identifier: MIT +# +# Operator approval for the Stripe Link wallet tool. Credential-free: attaching +# it to a sandbox only adds an MCP allow rule for browserless_link_connect; the +# Browserless token still comes from the gated provider. +id: browserless-link-approve +display_name: Browserless Stripe Link wallet (approved) +description: Allows the browserless_link_connect MCP tool +category: other +endpoints: + - host: mcp.browserless.io + port: 443 + path: /mcp + protocol: mcp + enforcement: enforce + rules: + - allow: { method: tools/call, tool: browserless_link_connect } +binaries: [/usr/bin/node, /usr/local/bin/node] diff --git a/providers/browserless-linkgated.yaml b/providers/browserless-linkgated.yaml new file mode 100644 index 0000000..33e2eb7 --- /dev/null +++ b/providers/browserless-linkgated.yaml @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 Browserless +# SPDX-License-Identifier: MIT +# +# Browserless with Stripe Link behind human approval. Ordinary browsing works. +# The Stripe Link REST paths are not allowed, so an agent must request them +# through the OpenShell policy advisor and an operator must approve. The +# browserless_link_connect MCP tool is allowed only while the operator attaches +# the companion browserless-link-approve provider. browserless_link_checkout is +# always denied. +id: browserless-linkgated +display_name: Browserless (Stripe Link gated) +description: Browserless with Stripe Link behind human approval +category: other +credentials: + - name: api_token + description: Browserless API token, sent as the token query parameter + env_vars: [BROWSERLESS_TOKEN] + required: true + auth_style: query + query_param: token + - name: mcp_token + description: Browserless API token, sent as a bearer header to the MCP server + env_vars: [BROWSERLESS_MCP_TOKEN] + required: true + auth_style: bearer + header_name: authorization +discovery: + credentials: [api_token, mcp_token] +endpoints: + - host: "production-*.browserless.io" + port: 443 + protocol: rest + enforcement: enforce + rules: + - allow: { method: POST, path: "/content" } + - allow: { method: POST, path: "/chromium/bql" } + - allow: { method: GET, path: "/json/**" } + - { host: "production-*.browserless.io", port: 443, path: "/", protocol: websocket, access: read-write, enforcement: enforce } + - host: mcp.browserless.io + port: 443 + path: /mcp + protocol: mcp + enforcement: enforce + rules: + - allow: { method: initialize } + - allow: { method: notifications/initialized } + - allow: { method: tools/list } + - allow: { method: tools/call, tool: browserless_smartscraper } + - allow: { method: tools/call, tool: browserless_usage } + deny_rules: + - { method: tools/call, tool: browserless_link_checkout } +binaries: [/usr/bin/node, /usr/local/bin/node, /usr/bin/curl, /usr/local/bin/curl] diff --git a/providers/browserless.yaml b/providers/browserless.yaml new file mode 100644 index 0000000..be34777 --- /dev/null +++ b/providers/browserless.yaml @@ -0,0 +1,102 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 Browserless +# SPDX-License-Identifier: MIT +# +# Browserless provider profile for NVIDIA OpenShell 0.1.8 or newer. +# openshell provider profile import --global \ +# --url https://raw.githubusercontent.com/browserless/openshell/main/providers/browserless.yaml +# +# Copy and edit this file rather than importing it unchanged when your image +# differs from the reference layout. `binaries` is the least-privilege control +# that decides which processes may reach the endpoints below, so it has to name +# the paths in *your* image. +# +# Client binaries: node (puppeteer-core, playwright-core, MCP SDK clients) and +# curl. Python Playwright drives Chromium through its bundled +# node driver under site-packages/playwright/driver/; add that +# path if your image uses it. +# Reference layout: node and curl on PATH at /usr/bin or /usr/local/bin. +# Connect CDP clients to wss://production-sfo.browserless.io +# (or production-lon / production-ams) with +# ?token=$BROWSERLESS_TOKEN, and send +# Authorization: Bearer $BROWSERLESS_MCP_TOKEN to the hosted +# MCP server. Create the provider with both credentials set +# to the same Browserless API token. +# Credential scope: one Browserless API token, declared twice so each request +# location is explicit: BROWSERLESS_TOKEN as the `token` +# query parameter, BROWSERLESS_MCP_TOKEN as a bearer +# authorization header. Sent only to the endpoints below. +# Endpoint access: the regional Browserless hosts (production-*.browserless.io): +# REST and BrowserQL over HTTP, plus CDP and Playwright +# WebSocket upgrades on the connect and reconnect paths; and +# the hosted MCP server at mcp.browserless.io/mcp. The Stripe +# Link payment tools (browserless_link_checkout, +# browserless_link_connect) stay denied; remove those deny +# rules only if your workload is approved to pay. +# Smoke test: openshell sandbox create --no-keep --from node:24-bookworm-slim \ +# --provider -- node -e ' +# fetch(`https://production-sfo.browserless.io/content?token=${process.env.BROWSERLESS_TOKEN}`, { +# method: "POST", +# headers: { "content-type": "application/json" }, +# body: JSON.stringify({ url: "https://example.com" }), +# }).then((r) => r.text()).then(console.log)' + +id: browserless +display_name: Browserless +description: Hosted headless browsers (CDP, Playwright, BrowserQL, REST APIs) and the Browserless MCP server +category: other +credentials: + - name: api_token + description: Browserless API token, sent as the token query parameter + env_vars: [BROWSERLESS_TOKEN] + required: true + auth_style: query + query_param: token + - name: mcp_token + description: Browserless API token, sent as a bearer header to the MCP server + env_vars: [BROWSERLESS_MCP_TOKEN] + required: true + auth_style: bearer + header_name: authorization +discovery: + credentials: [api_token, mcp_token] +endpoints: + # REST APIs and BrowserQL over HTTP. `full` lets an agent stop its own + # sessions (DELETE /session/...); use explicit rules for narrower access. + - host: "production-*.browserless.io" + port: 443 + protocol: rest + access: full + enforcement: enforce + # CDP and Playwright WebSocket upgrades. Client messages are JSON text. + - { host: "production-*.browserless.io", port: 443, path: "/", protocol: websocket, access: read-write, enforcement: enforce } + - { host: "production-*.browserless.io", port: 443, path: "/chromium", protocol: websocket, access: read-write, enforcement: enforce } + - { host: "production-*.browserless.io", port: 443, path: "/chrome", protocol: websocket, access: read-write, enforcement: enforce } + - { host: "production-*.browserless.io", port: 443, path: "/stealth", protocol: websocket, access: read-write, enforcement: enforce } + - { host: "production-*.browserless.io", port: 443, path: "/chromium/stealth", protocol: websocket, access: read-write, enforcement: enforce } + - { host: "production-*.browserless.io", port: 443, path: "/chromium/playwright", protocol: websocket, access: read-write, enforcement: enforce } + - { host: "production-*.browserless.io", port: 443, path: "/chrome/playwright", protocol: websocket, access: read-write, enforcement: enforce } + - { host: "production-*.browserless.io", port: 443, path: "/reconnect/**", protocol: websocket, access: read-write, enforcement: enforce } + - { host: "production-*.browserless.io", port: 443, path: "/chromium/stealth/reconnect/**", protocol: websocket, access: read-write, enforcement: enforce } + - { host: "production-*.browserless.io", port: 443, path: "/session/connect/**", protocol: websocket, access: read-write, enforcement: enforce } + # Session and reconnect URLs returned by the API are pinned to one worker + # under /e//. A trailing /** is a literal prefix in OpenShell, so these + # use *, which also matches /: each pattern covers any /e//... path that + # ends in that suffix. + - { host: "production-*.browserless.io", port: 443, path: "/e/*/session/connect/*", protocol: websocket, access: read-write, enforcement: enforce } + - { host: "production-*.browserless.io", port: 443, path: "/e/*/reconnect/*", protocol: websocket, access: read-write, enforcement: enforce } + - { host: "production-*.browserless.io", port: 443, path: "/e/*/chromium/stealth/reconnect/*", protocol: websocket, access: read-write, enforcement: enforce } + # Hosted MCP server, Streamable HTTP. + - host: mcp.browserless.io + port: 443 + path: /mcp + protocol: mcp + enforcement: enforce + rules: + - allow: { method: initialize } + - allow: { method: notifications/initialized } + - allow: { method: tools/list } + - allow: { method: tools/call } + deny_rules: + - { method: tools/call, tool: browserless_link_checkout } + - { method: tools/call, tool: browserless_link_connect } +binaries: [/usr/bin/node, /usr/local/bin/node, /usr/bin/curl, /usr/local/bin/curl] diff --git a/scripts/lint-profiles.sh b/scripts/lint-profiles.sh new file mode 100755 index 0000000..c3cdfdc --- /dev/null +++ b/scripts/lint-profiles.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 Browserless +# SPDX-License-Identifier: MIT +# +# Lints and imports every profile in providers/ against a throwaway local +# OpenShell gateway. `openshell provider profile lint` validates through a +# running gateway, so this downloads the release binaries, checks their +# checksums, starts a gateway with the Docker compute driver, and removes +# everything on exit. Linux only (x86_64 or aarch64); needs curl and Docker. +# +# OPENSHELL_VERSION release tag to test, v0.1.8 or newer (default: latest) +# OPENSHELL_PORT local gateway port (default: 17670) +set -euo pipefail + +repo_root="$(cd "$(dirname "$0")/.." && pwd)" +version="${OPENSHELL_VERSION:-latest}" +port="${OPENSHELL_PORT:-17670}" + +case "$(uname -m)" in + x86_64) cli_target=x86_64-unknown-linux-musl gateway_target=x86_64-unknown-linux-gnu ;; + aarch64 | arm64) cli_target=aarch64-unknown-linux-musl gateway_target=aarch64-unknown-linux-gnu ;; + *) + echo "unsupported architecture: $(uname -m)" >&2 + exit 1 + ;; +esac + +if [ "$version" = latest ]; then + base_url=https://github.com/NVIDIA/OpenShell/releases/latest/download +else + base_url="https://github.com/NVIDIA/OpenShell/releases/download/$version" +fi + +work="$(mktemp -d)" +gateway_pid="" +# shellcheck disable=SC2317 # cleanup runs from the EXIT trap +cleanup() { + if [ -n "$gateway_pid" ]; then kill "$gateway_pid" 2>/dev/null || true; fi + rm -rf "$work" +} +trap cleanup EXIT + +# The gateway and the CLI keep their state under HOME; keep it in the temp dir. +export HOME="$work/home" +mkdir -p "$HOME" "$work/bin" + +download() { + local asset="$1" checksums="$2" + curl -fsSL -o "$work/$asset" "$base_url/$asset" + curl -fsSL -o "$work/$checksums" "$base_url/$checksums" + (cd "$work" && grep " $asset\$" "$checksums" | sha256sum -c -) + tar -xzf "$work/$asset" -C "$work/bin" +} +download "openshell-$cli_target.tar.gz" openshell-checksums-sha256.txt +download "openshell-gateway-$gateway_target.tar.gz" openshell-gateway-checksums-sha256.txt + +openshell="$work/bin/openshell" +gateway="$work/bin/openshell-gateway" +"$openshell" --version + +"$gateway" generate-certs --output-dir "$work/tls" --server-san host.openshell.internal >/dev/null +OPENSHELL_LOCAL_TLS_DIR="$work/tls" "$gateway" --port "$port" --compute-driver docker >"$work/gateway.log" 2>&1 & +gateway_pid=$! + +for _ in $(seq 1 60); do + if (exec 3<>"/dev/tcp/127.0.0.1/$port") 2>/dev/null; then break; fi + sleep 1 +done +# The gateway writes client certificates for its default name, `openshell`. +"$openshell" gateway add "https://127.0.0.1:$port" --local >/dev/null 2>&1 || true + +ready="" +for _ in $(seq 1 30); do + if "$openshell" status 2>/dev/null | grep -q 'Connected'; then + ready=1 + break + fi + sleep 1 +done +if [ -z "$ready" ]; then + echo "gateway did not become ready; log follows" >&2 + cat "$work/gateway.log" >&2 + exit 1 +fi + +failed=0 +for profile in "$repo_root"/providers/*.yaml; do + name="$(basename "$profile")" + if "$openshell" provider profile lint -f "$profile" && + "$openshell" provider profile import -f "$profile" --global; then + echo "ok: $name" + else + echo "FAILED: $name" >&2 + failed=1 + fi +done +exit "$failed" diff --git a/scripts/smoke.sh b/scripts/smoke.sh new file mode 100755 index 0000000..93ad28c --- /dev/null +++ b/scripts/smoke.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 Browserless +# SPDX-License-Identifier: MIT +# +# The README smoke test as a script. Starts a throwaway sandbox with the given +# provider attached and fetches example.com through Browserless /content. The +# sandbox only ever sees the OpenShell placeholder, never the API key. +# +# scripts/smoke.sh [provider-name] (default: browserless) +# +# Needs `openshell` on PATH, connected to a gateway that has the provider. +set -euo pipefail + +provider="${1:-browserless}" + +# shellcheck disable=SC2016 # ${...} below is JavaScript, evaluated inside the sandbox +out="$(openshell sandbox create --no-keep --from node:24-bookworm-slim --provider "$provider" -- node -e ' + fetch(`https://production-sfo.browserless.io/content?token=${process.env.BROWSERLESS_TOKEN}`, { + method: "POST", + headers: { "content-type": "application/json" }, + body: JSON.stringify({ url: "https://example.com" }), + }).then((r) => r.text()).then(console.log)' 2>&1)" || true + +if grep -q 'Example Domain' <<<"$out"; then + echo "PASS: Browserless returned example.com through provider '$provider'" +else + echo "FAIL: no example.com content; last lines follow" >&2 + printf '%s\n' "$out" | tail -20 >&2 + exit 1 +fi From 1fede07a2b35b80c184480b0fa7dabfe9c98f073 Mon Sep 17 00:00:00 2001 From: Nikolai Savelev <39529279+Xrazik1@users.noreply.github.com> Date: Fri, 13 Nov 2026 19:06:56 +0100 Subject: [PATCH 2/7] feat: narrow BrowserQL and WebSocket access in the profiles BrowserQL paths, including the worker-pinned durable-session URLs, now use protocol: graphql endpoints. Each request must be a single anonymous operation, and every query and mutation is allowed except reconnect, which hands the live browser to another client. Agents keep a browser between connections with durable sessions instead. The Link-gated profile gets the same rule on /chromium/bql. WebSocket upgrades are limited to the CDP and Playwright connect paths and the worker-pinned session and reconnect URLs the API returns; the unpinned reconnect and session-connect prefixes are dropped, and upgrades to BrowserQL paths are refused. The Link-gated profile's discovery rules match single-segment /json/* paths, with or without a trailing slash. scripts/lint-profiles.sh now also starts a sandbox with a provider built from each profile and waits for the gateway to accept its policy, which catches rules that lint and import but are rejected when a sandbox starts. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/profile-lint.yml | 2 +- CHANGELOG.md | 4 +- README.md | 9 ++-- docs/stripe-link-approval.md | 2 +- docs/version-notes.md | 4 +- providers/browserless-linkgated.yaml | 6 ++- providers/browserless.yaml | 45 +++++++++++------- scripts/lint-profiles.sh | 70 +++++++++++++++++++++++++--- 8 files changed, 105 insertions(+), 37 deletions(-) diff --git a/.github/workflows/profile-lint.yml b/.github/workflows/profile-lint.yml index c1639b0..bf8ceaf 100644 --- a/.github/workflows/profile-lint.yml +++ b/.github/workflows/profile-lint.yml @@ -33,7 +33,7 @@ jobs: with: persist-credentials: false - - name: Lint and import every profile + - name: Lint, import and attach every profile env: OPENSHELL_VERSION: ${{ matrix.openshell }} run: scripts/lint-profiles.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 3699174..345a0ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,9 @@ All notable changes to these profiles are documented here. Tags match the headin ## 1.0.0 — initial release -- Added `providers/browserless.yaml`: REST, BrowserQL, CDP and Playwright WebSockets on their own `protocol: websocket` endpoints (required from OpenShell 0.1.8), durable-session and reconnect paths in every region, and the hosted MCP server with the Stripe Link payment tools denied. One Browserless API token, declared as `BROWSERLESS_TOKEN` (query parameter) and `BROWSERLESS_MCP_TOKEN` (bearer header). +- Added `providers/browserless.yaml`: REST, BrowserQL on its own `protocol: graphql` endpoints, as single anonymous operations without `reconnect`, CDP and Playwright WebSockets on their own `protocol: websocket` endpoints (required from OpenShell 0.1.8), the worker-pinned durable-session and reconnect URLs in every region, and the hosted MCP server with the Stripe Link payment tools denied. One Browserless API token, declared as `BROWSERLESS_TOKEN` (query parameter) and `BROWSERLESS_MCP_TOKEN` (bearer header). - Added `providers/browserless-linkgated.yaml` and `providers/browserless-link-approve.yaml` for Stripe Link behind human approval. - Documented NemoClaw's own route to the hosted MCP server. - Added Puppeteer, Playwright, BrowserQL and MCP examples with a sandbox image. -- Added `scripts/lint-profiles.sh` and a CI workflow that lints and imports every profile against the latest OpenShell release and 0.1.8, on pull requests and weekly. +- Added `scripts/lint-profiles.sh` and a CI workflow that lints and imports every profile and starts a sandbox with each, against the latest OpenShell release and 0.1.8, on pull requests and weekly. - Requires OpenShell 0.1.8 or newer. Tested on 0.1.8. diff --git a/README.md b/README.md index 43f0f18..2cc1410 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,9 @@ The main profile, `providers/browserless.yaml`: - **One token, two placements.** `BROWSERLESS_TOKEN` resolves only as the `token` query parameter, and `BROWSERLESS_MCP_TOKEN` only as an `Authorization: Bearer` header. Create both from the same Browserless API token. - **Only Browserless hosts.** The token is sent only to `production-*.browserless.io` (the SFO, LON and AMS regions) and to `mcp.browserless.io/mcp`. Requests from the sandbox to any other host are blocked by the sandbox's network policy. - **Only the processes you list.** `binaries` lets `node` and `curl` at `/usr/bin` or `/usr/local/bin` reach those hosts. Edit it to match your image. -- **REST and BrowserQL** with full access, including `DELETE` so an agent can stop its own sessions. -- **WebSockets** only on the CDP and Playwright connect and reconnect paths, including the worker-pinned URLs that durable sessions return. +- **REST** with full access, including `DELETE` so an agent can stop its own sessions. +- **BrowserQL**: every query and mutation except `reconnect`, which hands the live browser to another client. Send each request as a single anonymous operation (`mutation { … }`); named operations are denied. To keep a browser between connections, use a durable session (`POST /session`) and the connect and BrowserQL URLs it returns. +- **WebSockets** only on the CDP and Playwright connect paths, and on the worker-pinned session and reconnect URLs that the API returns. - **Every MCP tool except the Stripe Link payment tools.** OpenShell answers `browserless_link_checkout` and `browserless_link_connect` with `policy_denied`. Remove those deny rules only if your workload is approved to pay, or use the [approval flow](docs/stripe-link-approval.md). Usage is billed to the Browserless account that owns the token, as it is outside OpenShell. @@ -111,12 +112,12 @@ Details, and what each profile was tested on: [docs/version-notes.md](docs/versi providers/ OpenShell provider profiles docs/ Version notes, NemoClaw's MCP route, Stripe Link approval examples/ Puppeteer, Playwright, BrowserQL and MCP clients, and a sandbox image -scripts/lint-profiles.sh Lints and imports every profile against a throwaway gateway (CI) +scripts/lint-profiles.sh Lints, imports and attaches every profile on a throwaway gateway (CI) scripts/smoke.sh The quick check above assets/logo.svg Browserless logo ``` -CI runs `scripts/lint-profiles.sh` against the latest OpenShell release and against 0.1.8 on every pull request and once a week. It runs on Linux with Docker; locally: +CI runs `scripts/lint-profiles.sh` against the latest OpenShell release and against 0.1.8 on every pull request and once a week. It runs on Linux with Docker and a kernel with Landlock; locally: ```shell OPENSHELL_VERSION=v0.1.8 scripts/lint-profiles.sh diff --git a/docs/stripe-link-approval.md b/docs/stripe-link-approval.md index 593e8ba..2caf2ef 100644 --- a/docs/stripe-link-approval.md +++ b/docs/stripe-link-approval.md @@ -2,7 +2,7 @@ Browserless can pay with a [Stripe Link](https://link.com) wallet. The main profile denies both Stripe Link MCP tools, `browserless_link_checkout` and `browserless_link_connect`. When an agent should be able to use the wallet only after a person says yes, use the two profiles below instead. They need OpenShell 0.1.8 or newer and were tested on 0.1.8. -- `providers/browserless-linkgated.yaml` covers ordinary browsing: REST `/content`, BrowserQL, `/json/*` discovery, CDP on `/`, and the MCP tools `browserless_smartscraper` and `browserless_usage`. Every Stripe Link REST path is outside it, and `browserless_link_checkout` is always denied. +- `providers/browserless-linkgated.yaml` covers ordinary browsing: REST `/content`, BrowserQL on `/chromium/bql` (single anonymous operations, without `reconnect`), `/json/*` discovery, CDP on `/`, and the MCP tools `browserless_smartscraper` and `browserless_usage`. Every Stripe Link REST path is outside it, and `browserless_link_checkout` is always denied. - `providers/browserless-link-approve.yaml` is credential-free. Attaching it to a sandbox allows `browserless_link_connect`; detaching it takes that away again. ## Set it up diff --git a/docs/version-notes.md b/docs/version-notes.md index 86d1ada..27e868e 100644 --- a/docs/version-notes.md +++ b/docs/version-notes.md @@ -2,13 +2,13 @@ The profiles here need **OpenShell 0.1.8 or newer**. They were tested on 0.1.8: REST, BrowserQL, Puppeteer, Playwright (CDP and native), durable sessions, the LON and AMS regions, the hosted MCP server, and the Stripe Link approval flow. Earlier releases are not supported. -CI lints and imports every profile against the latest OpenShell release and against 0.1.8 on each pull request and once a week. +CI lints and imports every profile, and starts a sandbox with a provider built from each to check that the gateway accepts its policy, against the latest OpenShell release and against 0.1.8 on each pull request and once a week. ## What 0.1.8 changed Two 0.1.8 changes shape the main profile: -- **REST endpoints refuse WebSocket upgrades.** CDP and Playwright connections need endpoints with `protocol: websocket`. The main profile declares one for each connect and reconnect path, including the worker-pinned `/e//…` URLs that durable sessions return. Any other WebSocket path is refused. +- **REST endpoints refuse WebSocket upgrades.** CDP and Playwright connections need endpoints with `protocol: websocket`. The main profile declares one for each CDP and Playwright connect path, and for the worker-pinned `/e//…` session and reconnect URLs that the API returns. Any other WebSocket path is refused. - **Credentials resolve only where the profile places them.** `BROWSERLESS_TOKEN` resolves only as the `token` query parameter, and `BROWSERLESS_MCP_TOKEN` only as the `Authorization: Bearer` header. Send each where the profile expects it. ## Updating a profile diff --git a/providers/browserless-linkgated.yaml b/providers/browserless-linkgated.yaml index 33e2eb7..0b7929b 100644 --- a/providers/browserless-linkgated.yaml +++ b/providers/browserless-linkgated.yaml @@ -33,8 +33,10 @@ endpoints: enforcement: enforce rules: - allow: { method: POST, path: "/content" } - - allow: { method: POST, path: "/chromium/bql" } - - allow: { method: GET, path: "/json/**" } + - allow: { method: GET, path: "/json/*" } + - allow: { method: GET, path: "/json/*/" } + # BrowserQL on /chromium/bql: single anonymous operations, without `reconnect`. + - { host: "production-*.browserless.io", port: 443, path: "/chromium/bql", protocol: graphql, access: full, enforcement: enforce, deny_rules: [{ operation_type: mutation, fields: [reconnect] }, { operation_type: query, operation_name: "?*" }, { operation_type: mutation, operation_name: "?*" }, { operation_type: subscription, operation_name: "?*" }] } - { host: "production-*.browserless.io", port: 443, path: "/", protocol: websocket, access: read-write, enforcement: enforce } - host: mcp.browserless.io port: 443 diff --git a/providers/browserless.yaml b/providers/browserless.yaml index be34777..54f41f8 100644 --- a/providers/browserless.yaml +++ b/providers/browserless.yaml @@ -26,12 +26,15 @@ # query parameter, BROWSERLESS_MCP_TOKEN as a bearer # authorization header. Sent only to the endpoints below. # Endpoint access: the regional Browserless hosts (production-*.browserless.io): -# REST and BrowserQL over HTTP, plus CDP and Playwright -# WebSocket upgrades on the connect and reconnect paths; and -# the hosted MCP server at mcp.browserless.io/mcp. The Stripe -# Link payment tools (browserless_link_checkout, -# browserless_link_connect) stay denied; remove those deny -# rules only if your workload is approved to pay. +# REST over HTTP; BrowserQL as single anonymous GraphQL +# operations, without the `reconnect` mutation; and CDP +# and Playwright WebSocket upgrades on the connect paths +# and on the worker-pinned session and reconnect URLs the +# API returns. Plus the hosted MCP server at +# mcp.browserless.io/mcp. The Stripe Link payment tools +# (browserless_link_checkout, browserless_link_connect) stay +# denied; remove those deny rules only if your workload is +# approved to pay. # Smoke test: openshell sandbox create --no-keep --from node:24-bookworm-slim \ # --provider -- node -e ' # fetch(`https://production-sfo.browserless.io/content?token=${process.env.BROWSERLESS_TOKEN}`, { @@ -60,13 +63,21 @@ credentials: discovery: credentials: [api_token, mcp_token] endpoints: - # REST APIs and BrowserQL over HTTP. `full` lets an agent stop its own - # sessions (DELETE /session/...); use explicit rules for narrower access. + # REST APIs over HTTP. `full` lets an agent stop its own sessions + # (DELETE /session/...); use explicit rules for narrower access. - host: "production-*.browserless.io" port: 443 protocol: rest access: full enforcement: enforce + # BrowserQL, on every path that ends in /bql or continues after /bql/, + # including URLs that carry a path prefix. `*` also matches `/`. Each + # request must be a single anonymous operation (named operations are + # denied). Every query and mutation is allowed except `reconnect`, which + # hands the live browser to another client; agents that need to keep a + # browser between connections use durable sessions (POST /session) instead. + - { host: "production-*.browserless.io", port: 443, path: "/*/bql", protocol: graphql, access: full, enforcement: enforce, deny_rules: [{ operation_type: mutation, fields: [reconnect] }, { operation_type: query, operation_name: "?*" }, { operation_type: mutation, operation_name: "?*" }, { operation_type: subscription, operation_name: "?*" }] } + - { host: "production-*.browserless.io", port: 443, path: "/*/bql/*", protocol: graphql, access: full, enforcement: enforce, deny_rules: [{ operation_type: mutation, fields: [reconnect] }, { operation_type: query, operation_name: "?*" }, { operation_type: mutation, operation_name: "?*" }, { operation_type: subscription, operation_name: "?*" }] } # CDP and Playwright WebSocket upgrades. Client messages are JSON text. - { host: "production-*.browserless.io", port: 443, path: "/", protocol: websocket, access: read-write, enforcement: enforce } - { host: "production-*.browserless.io", port: 443, path: "/chromium", protocol: websocket, access: read-write, enforcement: enforce } @@ -75,16 +86,14 @@ endpoints: - { host: "production-*.browserless.io", port: 443, path: "/chromium/stealth", protocol: websocket, access: read-write, enforcement: enforce } - { host: "production-*.browserless.io", port: 443, path: "/chromium/playwright", protocol: websocket, access: read-write, enforcement: enforce } - { host: "production-*.browserless.io", port: 443, path: "/chrome/playwright", protocol: websocket, access: read-write, enforcement: enforce } - - { host: "production-*.browserless.io", port: 443, path: "/reconnect/**", protocol: websocket, access: read-write, enforcement: enforce } - - { host: "production-*.browserless.io", port: 443, path: "/chromium/stealth/reconnect/**", protocol: websocket, access: read-write, enforcement: enforce } - - { host: "production-*.browserless.io", port: 443, path: "/session/connect/**", protocol: websocket, access: read-write, enforcement: enforce } - # Session and reconnect URLs returned by the API are pinned to one worker - # under /e//. A trailing /** is a literal prefix in OpenShell, so these - # use *, which also matches /: each pattern covers any /e//... path that - # ends in that suffix. - - { host: "production-*.browserless.io", port: 443, path: "/e/*/session/connect/*", protocol: websocket, access: read-write, enforcement: enforce } - - { host: "production-*.browserless.io", port: 443, path: "/e/*/reconnect/*", protocol: websocket, access: read-write, enforcement: enforce } - - { host: "production-*.browserless.io", port: 443, path: "/e/*/chromium/stealth/reconnect/*", protocol: websocket, access: read-write, enforcement: enforce } + # Durable-session connect URLs and reconnect URLs. The API returns them + # pinned to one worker under /e//. A trailing /** is a literal prefix in + # OpenShell, so these use *, which also matches /: each pattern covers any + # /e//... path that ends in that suffix. The deny rules refuse WebSocket + # upgrades to BrowserQL paths, which go through the graphql endpoints instead. + - { host: "production-*.browserless.io", port: 443, path: "/e/*/session/connect/*", protocol: websocket, access: read-write, enforcement: enforce, deny_rules: [{ method: "*", path: "/**/bql" }, { method: "*", path: "/**/bql/**" }] } + - { host: "production-*.browserless.io", port: 443, path: "/e/*/reconnect/*", protocol: websocket, access: read-write, enforcement: enforce, deny_rules: [{ method: "*", path: "/**/bql" }, { method: "*", path: "/**/bql/**" }] } + - { host: "production-*.browserless.io", port: 443, path: "/e/*/chromium/stealth/reconnect/*", protocol: websocket, access: read-write, enforcement: enforce, deny_rules: [{ method: "*", path: "/**/bql" }, { method: "*", path: "/**/bql/**" }] } # Hosted MCP server, Streamable HTTP. - host: mcp.browserless.io port: 443 diff --git a/scripts/lint-profiles.sh b/scripts/lint-profiles.sh index c3cdfdc..2e9eba9 100755 --- a/scripts/lint-profiles.sh +++ b/scripts/lint-profiles.sh @@ -3,18 +3,28 @@ # SPDX-License-Identifier: MIT # # Lints and imports every profile in providers/ against a throwaway local -# OpenShell gateway. `openshell provider profile lint` validates through a -# running gateway, so this downloads the release binaries, checks their -# checksums, starts a gateway with the Docker compute driver, and removes -# everything on exit. Linux only (x86_64 or aarch64); needs curl and Docker. +# OpenShell gateway, then starts a sandbox with a provider built from each +# profile and waits for the gateway to accept the sandbox's configuration. +# `openshell provider profile lint` validates through a running gateway, so +# this downloads the release binaries, checks their checksums, starts a gateway +# with the Docker compute driver, and removes everything on exit. Linux only +# (x86_64 or aarch64); needs curl, Docker, and a kernel with Landlock. # -# OPENSHELL_VERSION release tag to test, v0.1.8 or newer (default: latest) -# OPENSHELL_PORT local gateway port (default: 17670) +# OPENSHELL_VERSION release tag to test, v0.1.8 or newer (default: latest) +# OPENSHELL_PORT local gateway port (default: 17670) +# OPENSHELL_BIND_ADDRESS gateway listen address (default: 0.0.0.0). Keep a +# wildcard address: sandbox containers reach the +# gateway through the Docker host, and the CLI +# through 127.0.0.1. +# OPENSHELL_SANDBOX_IMAGE image for the check sandboxes (default: +# node:24-bookworm-slim) set -euo pipefail repo_root="$(cd "$(dirname "$0")/.." && pwd)" version="${OPENSHELL_VERSION:-latest}" port="${OPENSHELL_PORT:-17670}" +sandbox_image="${OPENSHELL_SANDBOX_IMAGE:-node:24-bookworm-slim}" +export OPENSHELL_BIND_ADDRESS="${OPENSHELL_BIND_ADDRESS:-0.0.0.0}" case "$(uname -m)" in x86_64) cli_target=x86_64-unknown-linux-musl gateway_target=x86_64-unknown-linux-gnu ;; @@ -33,8 +43,14 @@ fi work="$(mktemp -d)" gateway_pid="" +openshell="" +sandboxes=() # shellcheck disable=SC2317 # cleanup runs from the EXIT trap cleanup() { + local name + for name in "${sandboxes[@]}"; do + "$openshell" sandbox delete "$name" >/dev/null 2>&1 || true + done if [ -n "$gateway_pid" ]; then kill "$gateway_pid" 2>/dev/null || true; fi rm -rf "$work" } @@ -83,11 +99,51 @@ if [ -z "$ready" ]; then exit 1 fi +# Lint checks each profile on its own. The gateway validates the policy a +# provider contributes only when a sandbox uses it, so start one sandbox per +# profile and wait until its configuration is accepted or rejected. Credential +# values are dummies; the sandboxes run no commands, so nothing reaches +# Browserless. +check_sandbox() { + local profile="$1" name="$2" id var created status="" + local args=() + id="$(sed -n 's/^id: *//p' "$profile")" + for var in $(sed -n 's/^ *env_vars: *\[\(.*\)\]/\1/p' "$profile" | tr ',' ' '); do + export "$var=ci-placeholder" + args+=(--credential "$var") + done + "$openshell" provider create --name "$name" --type "$id" "${args[@]}" >/dev/null + sandboxes+=("$name") + if ! created="$("$openshell" sandbox create --name "$name" --from "$sandbox_image" \ + --provider "$name" --detach 2>&1)"; then + echo "sandbox $name could not be created; output follows" >&2 + printf '%s\n' "$created" >&2 + return 1 + fi + for _ in $(seq 1 90); do + status="$("$openshell" sandbox get "$name" 2>&1 | sed 's/\x1b\[[0-9;]*m//g' || true)" + if grep -q 'ConfigurationReady: True' <<<"$status"; then + return 0 + fi + if grep -q -e 'ConfigurationInvalid' -e 'Phase: Error' <<<"$status"; then + break + fi + sleep 2 + done + echo "sandbox $name did not accept its configuration; status follows" >&2 + printf '%s\n' "$status" >&2 + return 1 +} + failed=0 +index=0 for profile in "$repo_root"/providers/*.yaml; do name="$(basename "$profile")" + index=$((index + 1)) + # Sandbox names are limited to 19 characters, so number them. if "$openshell" provider profile lint -f "$profile" && - "$openshell" provider profile import -f "$profile" --global; then + "$openshell" provider profile import -f "$profile" --global && + check_sandbox "$profile" "ci-check-$index"; then echo "ok: $name" else echo "FAILED: $name" >&2 From 5c836609943cb74e3e21bcd40af19c5827914e37 Mon Sep 17 00:00:00 2001 From: Nikolai Savelev <39529279+Xrazik1@users.noreply.github.com> Date: Fri, 13 Nov 2026 22:08:32 +0100 Subject: [PATCH 3/7] fix: state what the Stripe Link denies cover and let link-approve cover curl The main profile denies the two Stripe Link MCP tools, while its REST access stays open, including Browserless's own agent endpoints, which can use a Stripe Link wallet connected to the account. Say so in the profile, README and approval doc, and point accounts with a connected wallet to the Link-gated profiles. browserless-link-approve.yaml now lists the same node and curl binaries as the Link-gated profile, so attaching it allows browserless_link_connect for either client. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 +- README.md | 4 ++-- docs/stripe-link-approval.md | 2 +- providers/browserless-link-approve.yaml | 2 +- providers/browserless.yaml | 8 +++++--- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 345a0ec..81e1fc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to these profiles are documented here. Tags match the headin ## 1.0.0 — initial release -- Added `providers/browserless.yaml`: REST, BrowserQL on its own `protocol: graphql` endpoints, as single anonymous operations without `reconnect`, CDP and Playwright WebSockets on their own `protocol: websocket` endpoints (required from OpenShell 0.1.8), the worker-pinned durable-session and reconnect URLs in every region, and the hosted MCP server with the Stripe Link payment tools denied. One Browserless API token, declared as `BROWSERLESS_TOKEN` (query parameter) and `BROWSERLESS_MCP_TOKEN` (bearer header). +- Added `providers/browserless.yaml`: REST, BrowserQL on its own `protocol: graphql` endpoints, as single anonymous operations without `reconnect`, CDP and Playwright WebSockets on their own `protocol: websocket` endpoints (required from OpenShell 0.1.8), the worker-pinned durable-session and reconnect URLs in every region, and the hosted MCP server with the two Stripe Link MCP tools denied. One Browserless API token, declared as `BROWSERLESS_TOKEN` (query parameter) and `BROWSERLESS_MCP_TOKEN` (bearer header). - Added `providers/browserless-linkgated.yaml` and `providers/browserless-link-approve.yaml` for Stripe Link behind human approval. - Documented NemoClaw's own route to the hosted MCP server. - Added Puppeteer, Playwright, BrowserQL and MCP examples with a sandbox image. diff --git a/README.md b/README.md index 2cc1410..e6b6d3b 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ NemoClaw pins an older OpenShell release, which these profiles do not support. [ | Profile | Use it for | |---|---| -| [`providers/browserless.yaml`](providers/browserless.yaml) | REST, BrowserQL, Puppeteer and Playwright (CDP and native), durable sessions in every region, and the hosted MCP server. The Stripe Link payment tools are denied. | +| [`providers/browserless.yaml`](providers/browserless.yaml) | REST, BrowserQL, Puppeteer and Playwright (CDP and native), durable sessions in every region, and the hosted MCP server. The two Stripe Link MCP tools are denied; REST stays open (see [what it allows](#what-these-profiles-allow)). | | [`providers/browserless-linkgated.yaml`](providers/browserless-linkgated.yaml) | Ordinary browsing, with Stripe Link only after a person approves. See [docs/stripe-link-approval.md](docs/stripe-link-approval.md). | | [`providers/browserless-link-approve.yaml`](providers/browserless-link-approve.yaml) | Credential-free companion an operator attaches to allow `browserless_link_connect`, and detaches to revoke. | @@ -71,7 +71,7 @@ The main profile, `providers/browserless.yaml`: - **REST** with full access, including `DELETE` so an agent can stop its own sessions. - **BrowserQL**: every query and mutation except `reconnect`, which hands the live browser to another client. Send each request as a single anonymous operation (`mutation { … }`); named operations are denied. To keep a browser between connections, use a durable session (`POST /session`) and the connect and BrowserQL URLs it returns. - **WebSockets** only on the CDP and Playwright connect paths, and on the worker-pinned session and reconnect URLs that the API returns. -- **Every MCP tool except the Stripe Link payment tools.** OpenShell answers `browserless_link_checkout` and `browserless_link_connect` with `policy_denied`. Remove those deny rules only if your workload is approved to pay, or use the [approval flow](docs/stripe-link-approval.md). +- **Every MCP tool except the two Stripe Link tools.** OpenShell answers `browserless_link_checkout` and `browserless_link_connect` with `policy_denied`. These rules cover the MCP tools only. REST stays open, including Browserless's own agent endpoints, which can use a Stripe Link wallet connected to the account. If the account has a connected wallet, use the [Link-gated profiles](docs/stripe-link-approval.md), whose REST access is an allow-list. Usage is billed to the Browserless account that owns the token, as it is outside OpenShell. diff --git a/docs/stripe-link-approval.md b/docs/stripe-link-approval.md index 2caf2ef..ca34eb2 100644 --- a/docs/stripe-link-approval.md +++ b/docs/stripe-link-approval.md @@ -1,6 +1,6 @@ # Stripe Link behind human approval -Browserless can pay with a [Stripe Link](https://link.com) wallet. The main profile denies both Stripe Link MCP tools, `browserless_link_checkout` and `browserless_link_connect`. When an agent should be able to use the wallet only after a person says yes, use the two profiles below instead. They need OpenShell 0.1.8 or newer and were tested on 0.1.8. +Browserless can pay with a [Stripe Link](https://link.com) wallet. The main profile denies both Stripe Link MCP tools, `browserless_link_checkout` and `browserless_link_connect`, but keeps REST open, and Browserless's own agent endpoints can use a connected wallet. If the account has a connected wallet, or an agent should use the wallet only after a person says yes, use the two profiles below instead. They need OpenShell 0.1.8 or newer and were tested on 0.1.8. - `providers/browserless-linkgated.yaml` covers ordinary browsing: REST `/content`, BrowserQL on `/chromium/bql` (single anonymous operations, without `reconnect`), `/json/*` discovery, CDP on `/`, and the MCP tools `browserless_smartscraper` and `browserless_usage`. Every Stripe Link REST path is outside it, and `browserless_link_checkout` is always denied. - `providers/browserless-link-approve.yaml` is credential-free. Attaching it to a sandbox allows `browserless_link_connect`; detaching it takes that away again. diff --git a/providers/browserless-link-approve.yaml b/providers/browserless-link-approve.yaml index 7a90c02..f4feb76 100644 --- a/providers/browserless-link-approve.yaml +++ b/providers/browserless-link-approve.yaml @@ -16,4 +16,4 @@ endpoints: enforcement: enforce rules: - allow: { method: tools/call, tool: browserless_link_connect } -binaries: [/usr/bin/node, /usr/local/bin/node] +binaries: [/usr/bin/node, /usr/local/bin/node, /usr/bin/curl, /usr/local/bin/curl] diff --git a/providers/browserless.yaml b/providers/browserless.yaml index 54f41f8..434842c 100644 --- a/providers/browserless.yaml +++ b/providers/browserless.yaml @@ -31,10 +31,12 @@ # and Playwright WebSocket upgrades on the connect paths # and on the worker-pinned session and reconnect URLs the # API returns. Plus the hosted MCP server at -# mcp.browserless.io/mcp. The Stripe Link payment tools +# mcp.browserless.io/mcp. The Stripe Link MCP tools # (browserless_link_checkout, browserless_link_connect) stay -# denied; remove those deny rules only if your workload is -# approved to pay. +# denied. REST stays open, including Browserless's own agent +# endpoints, which can use a Stripe Link wallet connected to +# the account; for such an account use +# browserless-linkgated.yaml instead. # Smoke test: openshell sandbox create --no-keep --from node:24-bookworm-slim \ # --provider -- node -e ' # fetch(`https://production-sfo.browserless.io/content?token=${process.env.BROWSERLESS_TOKEN}`, { From a9afc6633f10805ffe328d2327ce787ca5a38468 Mon Sep 17 00:00:00 2001 From: Nikolai Savelev <39529279+Xrazik1@users.noreply.github.com> Date: Sat, 14 Nov 2026 01:06:14 +0100 Subject: [PATCH 4/7] fix: use one credential and deny the code-running endpoints BROWSERLESS_TOKEN is now the only credential. It is sent as the token query parameter to every endpoint, including the hosted MCP server (https://mcp.browserless.io/mcp?token=...). The README, the Link docs and the MCP example drop BROWSERLESS_MCP_TOKEN. The main profile denies the endpoints that run your own code in the browser. That covers any path ending in /function or /download on the regional hosts, in its bare, per-browser and worker-pinned forms, with or without a trailing slash; it also covers /profile//download. It denies the browserless_function MCP tool as well. The NemoClaw doc denies browserless_function too. lint-profiles.sh silences SC2329 next to SC2317 for the trap-called cleanup function. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 +- README.md | 13 +++--- docs/nemoclaw.md | 7 +-- docs/stripe-link-approval.md | 3 +- docs/version-notes.md | 2 +- examples/README.md | 2 +- examples/mcp.mjs | 7 ++- providers/browserless-linkgated.yaml | 8 +--- providers/browserless.yaml | 64 ++++++++++++++++------------ scripts/lint-profiles.sh | 2 +- 10 files changed, 55 insertions(+), 55 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81e1fc5..1f736cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to these profiles are documented here. Tags match the headin ## 1.0.0 — initial release -- Added `providers/browserless.yaml`: REST, BrowserQL on its own `protocol: graphql` endpoints, as single anonymous operations without `reconnect`, CDP and Playwright WebSockets on their own `protocol: websocket` endpoints (required from OpenShell 0.1.8), the worker-pinned durable-session and reconnect URLs in every region, and the hosted MCP server with the two Stripe Link MCP tools denied. One Browserless API token, declared as `BROWSERLESS_TOKEN` (query parameter) and `BROWSERLESS_MCP_TOKEN` (bearer header). +- Added `providers/browserless.yaml`: REST, BrowserQL on its own `protocol: graphql` endpoints, as single anonymous operations without `reconnect`, CDP and Playwright WebSockets on their own `protocol: websocket` endpoints (required from OpenShell 0.1.8), the worker-pinned durable-session and reconnect URLs in every region, and the hosted MCP server. The endpoints that run your own code in the browser (`/function`, `/download` and `browserless_function`) and the two Stripe Link MCP tools are denied. One Browserless API token, `BROWSERLESS_TOKEN`, sent as the `token` query parameter everywhere, including the MCP server. - Added `providers/browserless-linkgated.yaml` and `providers/browserless-link-approve.yaml` for Stripe Link behind human approval. - Documented NemoClaw's own route to the hosted MCP server. - Added Puppeteer, Playwright, BrowserQL and MCP examples with a sandbox image. diff --git a/README.md b/README.md index e6b6d3b..546bb76 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,11 @@ openshell provider profile import --global \ --url https://raw.githubusercontent.com/browserless/openshell/main/providers/browserless.yaml export BROWSERLESS_TOKEN= -export BROWSERLESS_MCP_TOKEN="$BROWSERLESS_TOKEN" openshell provider create --name browserless --type browserless \ - --credential BROWSERLESS_TOKEN --credential BROWSERLESS_MCP_TOKEN + --credential BROWSERLESS_TOKEN ``` -Then attach the provider to a sandbox with `--provider browserless`. Inside the sandbox, `BROWSERLESS_TOKEN` and `BROWSERLESS_MCP_TOKEN` hold placeholders, not the token. +Then attach the provider to a sandbox with `--provider browserless`. Inside the sandbox, `BROWSERLESS_TOKEN` holds a placeholder, not the token. No account yet? Sign up at [browserless.io/signup/email](https://www.browserless.io/signup/email) and copy the API token from [account.browserless.io](https://account.browserless.io). @@ -55,7 +54,7 @@ NemoClaw pins an older OpenShell release, which these profiles do not support. [ | Profile | Use it for | |---|---| -| [`providers/browserless.yaml`](providers/browserless.yaml) | REST, BrowserQL, Puppeteer and Playwright (CDP and native), durable sessions in every region, and the hosted MCP server. The two Stripe Link MCP tools are denied; REST stays open (see [what it allows](#what-these-profiles-allow)). | +| [`providers/browserless.yaml`](providers/browserless.yaml) | REST, BrowserQL, Puppeteer and Playwright (CDP and native), durable sessions in every region, and the hosted MCP server. The endpoints that run your own code in the browser, `browserless_function` and the two Stripe Link MCP tools are denied; the rest of REST stays open (see [what it allows](#what-these-profiles-allow)). | | [`providers/browserless-linkgated.yaml`](providers/browserless-linkgated.yaml) | Ordinary browsing, with Stripe Link only after a person approves. See [docs/stripe-link-approval.md](docs/stripe-link-approval.md). | | [`providers/browserless-link-approve.yaml`](providers/browserless-link-approve.yaml) | Credential-free companion an operator attaches to allow `browserless_link_connect`, and detaches to revoke. | @@ -65,13 +64,13 @@ NemoClaw pins an older OpenShell release, which these profiles do not support. [ The main profile, `providers/browserless.yaml`: -- **One token, two placements.** `BROWSERLESS_TOKEN` resolves only as the `token` query parameter, and `BROWSERLESS_MCP_TOKEN` only as an `Authorization: Bearer` header. Create both from the same Browserless API token. +- **One token, one placement.** `BROWSERLESS_TOKEN` resolves only as the `token` query parameter, for the REST and WebSocket APIs and for the MCP server (`https://mcp.browserless.io/mcp?token=…`). - **Only Browserless hosts.** The token is sent only to `production-*.browserless.io` (the SFO, LON and AMS regions) and to `mcp.browserless.io/mcp`. Requests from the sandbox to any other host are blocked by the sandbox's network policy. - **Only the processes you list.** `binaries` lets `node` and `curl` at `/usr/bin` or `/usr/local/bin` reach those hosts. Edit it to match your image. -- **REST** with full access, including `DELETE` so an agent can stop its own sessions. +- **REST** with full access, including `DELETE` so an agent can stop its own sessions, except the endpoints that run your own code in the browser. Any path that ends in `/function` or `/download`, in any browser or region form, gets `policy_denied`; that includes `/profile//download`. - **BrowserQL**: every query and mutation except `reconnect`, which hands the live browser to another client. Send each request as a single anonymous operation (`mutation { … }`); named operations are denied. To keep a browser between connections, use a durable session (`POST /session`) and the connect and BrowserQL URLs it returns. - **WebSockets** only on the CDP and Playwright connect paths, and on the worker-pinned session and reconnect URLs that the API returns. -- **Every MCP tool except the two Stripe Link tools.** OpenShell answers `browserless_link_checkout` and `browserless_link_connect` with `policy_denied`. These rules cover the MCP tools only. REST stays open, including Browserless's own agent endpoints, which can use a Stripe Link wallet connected to the account. If the account has a connected wallet, use the [Link-gated profiles](docs/stripe-link-approval.md), whose REST access is an allow-list. +- **Every MCP tool except `browserless_function` and the two Stripe Link tools.** OpenShell answers `browserless_function`, `browserless_link_checkout` and `browserless_link_connect` with `policy_denied`. The Stripe Link rules cover the MCP tools only. REST stays open, including Browserless's own agent endpoints, which can use a Stripe Link wallet connected to the account. If the account has a connected wallet, use the [Link-gated profiles](docs/stripe-link-approval.md), whose REST access is an allow-list. Usage is billed to the Browserless account that owns the token, as it is outside OpenShell. diff --git a/docs/nemoclaw.md b/docs/nemoclaw.md index 87b88f8..0f4c597 100644 --- a/docs/nemoclaw.md +++ b/docs/nemoclaw.md @@ -4,16 +4,17 @@ ## Hosted MCP server -NemoClaw adds the hosted Browserless MCP server as a tool provider. Deny the Stripe Link payment tools when you add it: +NemoClaw adds the hosted Browserless MCP server as a tool provider. When you add it, deny the Stripe Link payment tools and `browserless_function`, which runs your own code in the browser: ```shell export BROWSERLESS_TOKEN= nemoclaw mcp add browserless --url https://mcp.browserless.io/mcp \ --env BROWSERLESS_TOKEN \ - --deny-tool browserless_link_checkout --deny-tool browserless_link_connect + --deny-tool browserless_link_checkout --deny-tool browserless_link_connect \ + --deny-tool browserless_function ``` -NemoClaw stores the token as an OpenShell provider, and the sandbox sees only a placeholder. The agent gets every Browserless MCP tool except the two denied ones, including `browserless_agent` for multi-step browsing and `browserless_smartscraper` for single pages. +NemoClaw stores the token as an OpenShell provider, and the sandbox sees only a placeholder. The agent gets every Browserless MCP tool except the three denied ones, including `browserless_agent` for multi-step browsing and `browserless_smartscraper` for single pages. Tested with NemoClaw v0.0.142. diff --git a/docs/stripe-link-approval.md b/docs/stripe-link-approval.md index ca34eb2..9026593 100644 --- a/docs/stripe-link-approval.md +++ b/docs/stripe-link-approval.md @@ -13,9 +13,8 @@ openshell provider profile import -f providers/browserless-linkgated.yaml --glob openshell provider profile import -f providers/browserless-link-approve.yaml --global export BROWSERLESS_TOKEN= -export BROWSERLESS_MCP_TOKEN="$BROWSERLESS_TOKEN" openshell provider create --name browserless-gated --type browserless-linkgated \ - --credential BROWSERLESS_TOKEN --credential BROWSERLESS_MCP_TOKEN + --credential BROWSERLESS_TOKEN openshell provider create --name link-approve --type browserless-link-approve openshell sandbox create --name agent --from --provider browserless-gated diff --git a/docs/version-notes.md b/docs/version-notes.md index 27e868e..c81094a 100644 --- a/docs/version-notes.md +++ b/docs/version-notes.md @@ -9,7 +9,7 @@ CI lints and imports every profile, and starts a sandbox with a provider built f Two 0.1.8 changes shape the main profile: - **REST endpoints refuse WebSocket upgrades.** CDP and Playwright connections need endpoints with `protocol: websocket`. The main profile declares one for each CDP and Playwright connect path, and for the worker-pinned `/e//…` session and reconnect URLs that the API returns. Any other WebSocket path is refused. -- **Credentials resolve only where the profile places them.** `BROWSERLESS_TOKEN` resolves only as the `token` query parameter, and `BROWSERLESS_MCP_TOKEN` only as the `Authorization: Bearer` header. Send each where the profile expects it. +- **Credentials resolve only where the profile places them.** `BROWSERLESS_TOKEN` resolves only as the `token` query parameter, including for the MCP server. A placeholder sent in a header or a request body is not replaced. ## Updating a profile diff --git a/examples/README.md b/examples/README.md index 4dc7c0e..4337d56 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,6 +1,6 @@ # Examples -Browserless clients to run inside an OpenShell sandbox that has the `browserless` provider attached. Each script reads the OpenShell placeholders from `BROWSERLESS_TOKEN` or `BROWSERLESS_MCP_TOKEN`; OpenShell puts the real API token on the request on its way to Browserless. +Browserless clients to run inside an OpenShell sandbox that has the `browserless` provider attached. Each script reads the OpenShell placeholder from `BROWSERLESS_TOKEN` and sends it as the `token` query parameter; OpenShell puts the real API token on the request on its way to Browserless. | Script | What it does | |---|---| diff --git a/examples/mcp.mjs b/examples/mcp.mjs index 3ce658c..9276463 100644 --- a/examples/mcp.mjs +++ b/examples/mcp.mjs @@ -2,13 +2,12 @@ // SPDX-License-Identifier: MIT // // The hosted Browserless MCP server from inside an OpenShell sandbox. -// BROWSERLESS_MCP_TOKEN holds an OpenShell placeholder for the bearer header. +// BROWSERLESS_TOKEN holds an OpenShell placeholder for the token query parameter. import { Client } from '@modelcontextprotocol/sdk/client/index.js'; import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'; -const transport = new StreamableHTTPClientTransport(new URL('https://mcp.browserless.io/mcp'), { - requestInit: { headers: { Authorization: `Bearer ${process.env.BROWSERLESS_MCP_TOKEN ?? ''}` } }, -}); +const token = encodeURIComponent(process.env.BROWSERLESS_TOKEN ?? ''); +const transport = new StreamableHTTPClientTransport(new URL(`https://mcp.browserless.io/mcp?token=${token}`)); const client = new Client({ name: 'browserless-openshell-example', version: '1.0.0' }); await client.connect(transport); diff --git a/providers/browserless-linkgated.yaml b/providers/browserless-linkgated.yaml index 0b7929b..6893b76 100644 --- a/providers/browserless-linkgated.yaml +++ b/providers/browserless-linkgated.yaml @@ -18,14 +18,8 @@ credentials: required: true auth_style: query query_param: token - - name: mcp_token - description: Browserless API token, sent as a bearer header to the MCP server - env_vars: [BROWSERLESS_MCP_TOKEN] - required: true - auth_style: bearer - header_name: authorization discovery: - credentials: [api_token, mcp_token] + credentials: [api_token] endpoints: - host: "production-*.browserless.io" port: 443 diff --git a/providers/browserless.yaml b/providers/browserless.yaml index 434842c..1dbf258 100644 --- a/providers/browserless.yaml +++ b/providers/browserless.yaml @@ -15,27 +15,26 @@ # node driver under site-packages/playwright/driver/; add that # path if your image uses it. # Reference layout: node and curl on PATH at /usr/bin or /usr/local/bin. -# Connect CDP clients to wss://production-sfo.browserless.io -# (or production-lon / production-ams) with -# ?token=$BROWSERLESS_TOKEN, and send -# Authorization: Bearer $BROWSERLESS_MCP_TOKEN to the hosted -# MCP server. Create the provider with both credentials set -# to the same Browserless API token. -# Credential scope: one Browserless API token, declared twice so each request -# location is explicit: BROWSERLESS_TOKEN as the `token` -# query parameter, BROWSERLESS_MCP_TOKEN as a bearer -# authorization header. Sent only to the endpoints below. +# Add ?token=$BROWSERLESS_TOKEN to every URL: CDP clients +# connect to wss://production-sfo.browserless.io (or +# production-lon / production-ams), and MCP clients to +# https://mcp.browserless.io/mcp. +# Credential scope: one Browserless API token, BROWSERLESS_TOKEN, sent only as +# the `token` query parameter and only to the endpoints +# below. # Endpoint access: the regional Browserless hosts (production-*.browserless.io): -# REST over HTTP; BrowserQL as single anonymous GraphQL -# operations, without the `reconnect` mutation; and CDP -# and Playwright WebSocket upgrades on the connect paths -# and on the worker-pinned session and reconnect URLs the -# API returns. Plus the hosted MCP server at -# mcp.browserless.io/mcp. The Stripe Link MCP tools -# (browserless_link_checkout, browserless_link_connect) stay -# denied. REST stays open, including Browserless's own agent -# endpoints, which can use a Stripe Link wallet connected to -# the account; for such an account use +# REST over HTTP, except the endpoints that run your own +# code in the browser (/function and /download); BrowserQL +# as single anonymous GraphQL operations, without the +# `reconnect` mutation; and CDP and Playwright WebSocket +# upgrades on the connect paths and on the worker-pinned +# session and reconnect URLs the API returns. Plus the +# hosted MCP server at mcp.browserless.io/mcp, without +# browserless_function and the Stripe Link MCP tools +# (browserless_link_checkout, browserless_link_connect). +# The rest of REST stays open, including Browserless's own +# agent endpoints, which can use a Stripe Link wallet +# connected to the account; for such an account use # browserless-linkgated.yaml instead. # Smoke test: openshell sandbox create --no-keep --from node:24-bookworm-slim \ # --provider -- node -e ' @@ -56,22 +55,30 @@ credentials: required: true auth_style: query query_param: token - - name: mcp_token - description: Browserless API token, sent as a bearer header to the MCP server - env_vars: [BROWSERLESS_MCP_TOKEN] - required: true - auth_style: bearer - header_name: authorization discovery: - credentials: [api_token, mcp_token] + credentials: [api_token] endpoints: # REST APIs over HTTP. `full` lets an agent stop its own sessions - # (DELETE /session/...); use explicit rules for narrower access. + # (DELETE /session/...); use explicit rules for narrower access. Paths that + # end in /function or /download, the endpoints that run your own code in the + # browser, are denied in every form: bare, per browser (/chromium/function), + # worker-pinned (/e//...), with or without a trailing slash. This also + # covers /profile//download. The endpoint has no path, so these rules + # apply to every request to these hosts. - host: "production-*.browserless.io" port: 443 protocol: rest access: full enforcement: enforce + deny_rules: + - { method: "*", path: "/function" } + - { method: "*", path: "/function/" } + - { method: "*", path: "/**/function" } + - { method: "*", path: "/**/function/" } + - { method: "*", path: "/download" } + - { method: "*", path: "/download/" } + - { method: "*", path: "/**/download" } + - { method: "*", path: "/**/download/" } # BrowserQL, on every path that ends in /bql or continues after /bql/, # including URLs that carry a path prefix. `*` also matches `/`. Each # request must be a single anonymous operation (named operations are @@ -110,4 +117,5 @@ endpoints: deny_rules: - { method: tools/call, tool: browserless_link_checkout } - { method: tools/call, tool: browserless_link_connect } + - { method: tools/call, tool: browserless_function } binaries: [/usr/bin/node, /usr/local/bin/node, /usr/bin/curl, /usr/local/bin/curl] diff --git a/scripts/lint-profiles.sh b/scripts/lint-profiles.sh index 2e9eba9..7e94194 100755 --- a/scripts/lint-profiles.sh +++ b/scripts/lint-profiles.sh @@ -45,7 +45,7 @@ work="$(mktemp -d)" gateway_pid="" openshell="" sandboxes=() -# shellcheck disable=SC2317 # cleanup runs from the EXIT trap +# shellcheck disable=SC2317,SC2329 # cleanup runs from the EXIT trap cleanup() { local name for name in "${sandboxes[@]}"; do From 380cce8473881787eac1f973547373a5febefbd9 Mon Sep 17 00:00:00 2001 From: Nikolai Savelev <39529279+Xrazik1@users.noreply.github.com> Date: Sat, 14 Nov 2026 01:36:02 +0100 Subject: [PATCH 5/7] fix: deny /config and document the MCP revision OpenShell accepts The main profile also denies /config, the server configuration endpoint, in its bare, trailing-slash and prefixed forms, so the profile does not depend on the hosted service keeping that route disabled. The README and version notes say that OpenShell accepts MCP revision 2025-11-25 by default, so an older MCP client gets mcp_protocol_version_not_allowed, and point to the mcp.versions setting. Co-Authored-By: Claude Opus 5.5 --- README.md | 3 ++- docs/version-notes.md | 1 + providers/browserless.yaml | 7 ++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 546bb76..409e1d0 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ The main profile, `providers/browserless.yaml`: - **One token, one placement.** `BROWSERLESS_TOKEN` resolves only as the `token` query parameter, for the REST and WebSocket APIs and for the MCP server (`https://mcp.browserless.io/mcp?token=…`). - **Only Browserless hosts.** The token is sent only to `production-*.browserless.io` (the SFO, LON and AMS regions) and to `mcp.browserless.io/mcp`. Requests from the sandbox to any other host are blocked by the sandbox's network policy. - **Only the processes you list.** `binaries` lets `node` and `curl` at `/usr/bin` or `/usr/local/bin` reach those hosts. Edit it to match your image. -- **REST** with full access, including `DELETE` so an agent can stop its own sessions, except the endpoints that run your own code in the browser. Any path that ends in `/function` or `/download`, in any browser or region form, gets `policy_denied`; that includes `/profile//download`. +- **REST** with full access, including `DELETE` so an agent can stop its own sessions, except the endpoints that run your own code in the browser. Any path that ends in `/function` or `/download`, in any browser or region form, gets `policy_denied`; that includes `/profile//download`. So does `/config`, the server configuration endpoint. - **BrowserQL**: every query and mutation except `reconnect`, which hands the live browser to another client. Send each request as a single anonymous operation (`mutation { … }`); named operations are denied. To keep a browser between connections, use a durable session (`POST /session`) and the connect and BrowserQL URLs it returns. - **WebSockets** only on the CDP and Playwright connect paths, and on the worker-pinned session and reconnect URLs that the API returns. - **Every MCP tool except `browserless_function` and the two Stripe Link tools.** OpenShell answers `browserless_function`, `browserless_link_checkout` and `browserless_link_connect` with `policy_denied`. The Stripe Link rules cover the MCP tools only. REST stays open, including Browserless's own agent endpoints, which can use a Stripe Link wallet connected to the account. If the account has a connected wallet, use the [Link-gated profiles](docs/stripe-link-approval.md), whose REST access is an allow-list. @@ -100,6 +100,7 @@ Puppeteer, Playwright, BrowserQL and MCP examples, with an image to run them in, - **OpenShell 0.1.8 and newer** need WebSocket paths on their own `protocol: websocket` endpoints, and resolve each credential only where the profile places it. The main profile does both. - **Earlier OpenShell releases** are not supported. - OpenShell closes the connection on any client WebSocket message over 4 MiB. +- OpenShell accepts MCP revision `2025-11-25` by default; older MCP clients get `mcp_protocol_version_not_allowed`. Details, and what each profile was tested on: [docs/version-notes.md](docs/version-notes.md). diff --git a/docs/version-notes.md b/docs/version-notes.md index c81094a..158c51d 100644 --- a/docs/version-notes.md +++ b/docs/version-notes.md @@ -24,4 +24,5 @@ A gateway keeps the profile it imported; editing the YAML afterwards changes not ## Limits +- **MCP revision.** OpenShell accepts MCP revision `2025-11-25` by default. A client that negotiates an older revision, such as `2025-06-18`, gets `mcp_protocol_version_not_allowed`. Use a client that supports `2025-11-25`, such as the MCP SDK version pinned in [`examples/`](../examples/package.json), or allow more revisions with the endpoint's `mcp.versions` setting in OpenShell's policy schema. - **Message size.** OpenShell inspects every client WebSocket message and closes the connection on a message over 4 MiB (measured on 0.1.8: 3.9 MiB passes, 4.1 MiB closes). Everyday CDP traffic from Puppeteer and Playwright stays far below that. Large `page.evaluate` arguments or `page.setContent` payloads can hit it. diff --git a/providers/browserless.yaml b/providers/browserless.yaml index 1dbf258..133d98f 100644 --- a/providers/browserless.yaml +++ b/providers/browserless.yaml @@ -63,7 +63,8 @@ endpoints: # end in /function or /download, the endpoints that run your own code in the # browser, are denied in every form: bare, per browser (/chromium/function), # worker-pinned (/e//...), with or without a trailing slash. This also - # covers /profile//download. The endpoint has no path, so these rules + # covers /profile//download. /config, the server configuration + # endpoint, is denied the same way. The endpoint has no path, so these rules # apply to every request to these hosts. - host: "production-*.browserless.io" port: 443 @@ -79,6 +80,10 @@ endpoints: - { method: "*", path: "/download/" } - { method: "*", path: "/**/download" } - { method: "*", path: "/**/download/" } + - { method: "*", path: "/config" } + - { method: "*", path: "/config/" } + - { method: "*", path: "/**/config" } + - { method: "*", path: "/**/config/" } # BrowserQL, on every path that ends in /bql or continues after /bql/, # including URLs that carry a path prefix. `*` also matches `/`. Each # request must be a single anonymous operation (named operations are From 72a0af8219f59a3b265cbc771b5979d92a0d2d9f Mon Sep 17 00:00:00 2001 From: Nikolai Savelev <39529279+Xrazik1@users.noreply.github.com> Date: Sat, 14 Nov 2026 02:23:21 +0100 Subject: [PATCH 6/7] docs: list /config in the profile header and tighten the REST deny note The main profile's header now lists /config next to /function and /download among the blocked REST endpoints. The comment above the REST deny rules says they cover every path on these hosts that the endpoint handles, and that no WebSocket endpoint overlaps those paths. Co-Authored-By: Claude Opus 5.5 --- providers/browserless.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/providers/browserless.yaml b/providers/browserless.yaml index 133d98f..905b9d8 100644 --- a/providers/browserless.yaml +++ b/providers/browserless.yaml @@ -24,7 +24,8 @@ # below. # Endpoint access: the regional Browserless hosts (production-*.browserless.io): # REST over HTTP, except the endpoints that run your own -# code in the browser (/function and /download); BrowserQL +# code in the browser (/function and /download) and the +# server configuration endpoint (/config); BrowserQL # as single anonymous GraphQL operations, without the # `reconnect` mutation; and CDP and Playwright WebSocket # upgrades on the connect paths and on the worker-pinned @@ -64,8 +65,9 @@ endpoints: # browser, are denied in every form: bare, per browser (/chromium/function), # worker-pinned (/e//...), with or without a trailing slash. This also # covers /profile//download. /config, the server configuration - # endpoint, is denied the same way. The endpoint has no path, so these rules - # apply to every request to these hosts. + # endpoint, is denied the same way. This endpoint has no path, so its rules + # cover every path on these hosts that it handles; none of the WebSocket + # endpoints below overlaps these paths. - host: "production-*.browserless.io" port: 443 protocol: rest From 1c77b46a05a32b8c3b6350b3deb27f2535e0e463 Mon Sep 17 00:00:00 2001 From: Nikolai Savelev <39529279+Xrazik1@users.noreply.github.com> Date: Mon, 16 Nov 2026 15:25:49 +0100 Subject: [PATCH 7/7] chore: move the examples image and .nvmrc to Node 26 The examples image now builds FROM node:26-trixie-slim and .nvmrc is 26. The README quick check, scripts/smoke.sh, the profile's smoke-test comment, the version notes and the lint script's sandbox image use node:26-trixie-slim too, so every documented command runs on the same image. Co-Authored-By: Claude Opus 5.5 --- .nvmrc | 2 +- README.md | 2 +- docs/version-notes.md | 2 +- examples/Dockerfile | 4 ++-- providers/browserless.yaml | 2 +- scripts/lint-profiles.sh | 4 ++-- scripts/smoke.sh | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.nvmrc b/.nvmrc index a45fd52..6f4247a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -24 +26 diff --git a/README.md b/README.md index 409e1d0..57ec8c9 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ Usage is billed to the Browserless account that owns the token, as it is outside This starts a throwaway sandbox and fetches example.com through Browserless. OpenShell's default sandbox image has no `curl` or `node`, so it uses the official Node image: ```shell -openshell sandbox create --no-keep --from node:24-bookworm-slim --provider browserless -- node -e ' +openshell sandbox create --no-keep --from node:26-trixie-slim --provider browserless -- node -e ' fetch(`https://production-sfo.browserless.io/content?token=${process.env.BROWSERLESS_TOKEN}`, { method: "POST", headers: { "content-type": "application/json" }, diff --git a/docs/version-notes.md b/docs/version-notes.md index 158c51d..4feb31d 100644 --- a/docs/version-notes.md +++ b/docs/version-notes.md @@ -17,7 +17,7 @@ A gateway keeps the profile it imported; editing the YAML afterwards changes not ## Sandbox images -- **Bring your own image.** OpenShell's default sandbox image has no `curl`, `node` or `python`. Pass `--from` with an image that has your client, such as `node:24-bookworm-slim` or the image built from [`examples/Dockerfile`](../examples/Dockerfile). +- **Bring your own image.** OpenShell's default sandbox image has no `curl`, `node` or `python`. Pass `--from` with an image that has your client, such as `node:26-trixie-slim` or the image built from [`examples/Dockerfile`](../examples/Dockerfile). - **Install code where the sandbox can read it.** The default filesystem policy does not allow reads under `/opt`. Put scripts and `node_modules` under `/usr` (the examples image uses `/usr/local/lib/browserless-examples`) or in the sandbox working directory, or pass a policy that allows your path. - **Match `binaries` to your image.** The profile lets only `node` and `curl` at `/usr/bin` or `/usr/local/bin` reach Browserless. Add your paths if your client lives elsewhere. - **macOS VM driver.** On 0.1.8 the VM driver could not prepare images published with Docker's v2 manifest format, such as `curlimages/curl`. Images published with an OCI index, such as the official `node` images, work. diff --git a/examples/Dockerfile b/examples/Dockerfile index c354fb8..f181591 100644 --- a/examples/Dockerfile +++ b/examples/Dockerfile @@ -1,9 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 Browserless # SPDX-License-Identifier: MIT # -# Sandbox image for the examples: Node 24 plus the pinned Browserless clients. +# Sandbox image for the examples: Node 26 plus the pinned Browserless clients. # docker build -t browserless-openshell-examples examples -FROM node:24-bookworm-slim +FROM node:26-trixie-slim # Under /usr so OpenShell's default filesystem policy can read it; /opt is not # readable inside a sandbox unless a custom policy allows it. diff --git a/providers/browserless.yaml b/providers/browserless.yaml index 905b9d8..2e2499b 100644 --- a/providers/browserless.yaml +++ b/providers/browserless.yaml @@ -37,7 +37,7 @@ # agent endpoints, which can use a Stripe Link wallet # connected to the account; for such an account use # browserless-linkgated.yaml instead. -# Smoke test: openshell sandbox create --no-keep --from node:24-bookworm-slim \ +# Smoke test: openshell sandbox create --no-keep --from node:26-trixie-slim \ # --provider -- node -e ' # fetch(`https://production-sfo.browserless.io/content?token=${process.env.BROWSERLESS_TOKEN}`, { # method: "POST", diff --git a/scripts/lint-profiles.sh b/scripts/lint-profiles.sh index 7e94194..7dfb7fc 100755 --- a/scripts/lint-profiles.sh +++ b/scripts/lint-profiles.sh @@ -17,13 +17,13 @@ # gateway through the Docker host, and the CLI # through 127.0.0.1. # OPENSHELL_SANDBOX_IMAGE image for the check sandboxes (default: -# node:24-bookworm-slim) +# node:26-trixie-slim) set -euo pipefail repo_root="$(cd "$(dirname "$0")/.." && pwd)" version="${OPENSHELL_VERSION:-latest}" port="${OPENSHELL_PORT:-17670}" -sandbox_image="${OPENSHELL_SANDBOX_IMAGE:-node:24-bookworm-slim}" +sandbox_image="${OPENSHELL_SANDBOX_IMAGE:-node:26-trixie-slim}" export OPENSHELL_BIND_ADDRESS="${OPENSHELL_BIND_ADDRESS:-0.0.0.0}" case "$(uname -m)" in diff --git a/scripts/smoke.sh b/scripts/smoke.sh index 93ad28c..6ceb1cf 100755 --- a/scripts/smoke.sh +++ b/scripts/smoke.sh @@ -14,7 +14,7 @@ set -euo pipefail provider="${1:-browserless}" # shellcheck disable=SC2016 # ${...} below is JavaScript, evaluated inside the sandbox -out="$(openshell sandbox create --no-keep --from node:24-bookworm-slim --provider "$provider" -- node -e ' +out="$(openshell sandbox create --no-keep --from node:26-trixie-slim --provider "$provider" -- node -e ' fetch(`https://production-sfo.browserless.io/content?token=${process.env.BROWSERLESS_TOKEN}`, { method: "POST", headers: { "content-type": "application/json" },