Repository navigation
Conversation
ben-reitz
added this pull request to stack #2295
September 16, 2026 22:31
🦋 Changeset detectedLatest commit: 69bc78b The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
agents
@cloudflare/ai-chat
@cloudflare/codemode
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
from
September 17, 2026 00:00
cee6d48 to
36c3f07
Compare
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
from
September 17, 2026 00:16
36c3f07 to
b126328
Compare
Contributor
⚪ agents import sizesMeasured 344 runtime imports as minified bundles. The primary size is gzip; raw minified size is included for diagnosis. An existing import growing by more than 10% is marked red. This report is informational.
Compared No import sizes changed. All 344 current runtime imports
Reported by agent-think[bot]. |
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
from
September 17, 2026 09:43
b126328 to
2a9111b
Compare
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
from
September 17, 2026 09:49
2a9111b to
2267237
Compare
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
from
September 17, 2026 13:52
2267237 to
f7f9e26
Compare
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
from
September 17, 2026 14:46
f7f9e26 to
32fb61f
Compare
ben-reitz
removed this pull request from stack #2295
September 18, 2026 09:51
ben-reitz
added this pull request to stack #2303
September 18, 2026 10:04
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
from
September 18, 2026 10:46
32fb61f to
39ecbfa
Compare
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
2 times, most recently
from
September 18, 2026 15:21
3687660 to
cd823e9
Compare
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
from
September 19, 2026 15:02
cd823e9 to
da5210a
Compare
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
from
September 19, 2026 16:36
da5210a to
e3cf19d
Compare
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
2 times, most recently
from
September 21, 2026 09:20
779b4f4 to
0fadd92
Compare
ben-reitz
marked this pull request as ready for review
September 21, 2026 09:50
Comment on lines
+422
to
+438
| You can also manage Browser Rendering sessions directly. `createBrowserSession` accepts [hostname guardrails](https://developers.cloudflare.com/browser-run/features/guardrails/) that restrict which domains the session may reach — fixed at launch for every connection to the session, including Live View (not supported with Kitesurf): | ||
|
|
||
| ```ts | ||
| import { createBrowserSession, connectBrowserSession } from "agents/browser"; | ||
|
|
||
| const { sessionId } = await createBrowserSession(this.env.BROWSER, { | ||
| guardrails: { allowedDomains: ["example.com", "*.example.com"] } | ||
| }); | ||
|
|
||
| // Connect (and reconnect) without deleting the session on close: | ||
| const session = await connectBrowserSession(this.env.BROWSER, sessionId, { | ||
| timeoutMs: 30_000, | ||
| onClose: () => { | ||
| /* the CDP socket closed; the session itself stays alive */ | ||
| } | ||
| }); | ||
| ``` |
Contributor
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
from
September 21, 2026 15:55
0fadd92 to
552f028
Compare
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
from
September 23, 2026 14:08
552f028 to
7801da5
Compare
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
3 times, most recently
from
September 23, 2026 20:10
cb892e4 to
036ae42
Compare
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
from
September 23, 2026 21:09
036ae42 to
37404c0
Compare
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
2 times, most recently
from
September 24, 2026 09:07
163718d to
c4c88c7
Compare
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
from
September 24, 2026 13:22
c4c88c7 to
5fb75ee
Compare
ben-reitz
force-pushed
the
docs/browser-interaction-design-record
branch
from
September 24, 2026 14:33
5fb75ee to
69bc78b
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
The top of the browser session stack (#2302 → #2293 → this PR): the design record, public type exports, changeset, and user-facing docs for the stack. No runtime code changes.
NamedBrowserSessionsandBrowserSessionsstay internal. Only the new Browser Run option types are exported.Contents
design/browser-sessions.md(new)BrowserSessionsLifecycle capability: how they work, key decisions, and tradeoffs.design/browser-tools.md,design/AGENTS.mddocs/agents/browse-the-web.mdcreateBrowserSessionwith hostname guardrails and reconnecting withconnectBrowserSession.packages/agents/src/browser/index.tsBrowserSessionGuardrails,ConnectBrowserSessionOptions,CdpSessionOptions,ConnectChromiumBrowserOptions, andConnectKitesurfBrowserOptions..changeset/browser-session-guardrails.mdagentsbump for the stack's public API changes (below).Public API changes (in the changeset)
createBrowserSessionacceptsguardrails(allowedDomains,allowedDomainSets). They're fixed for the session's lifetime, including Live View.connectBrowserSessiontakes an options object ({ timeoutMs, onClose, onActivity }). The bare-number timeout still works but is deprecated.ConnectBrowserOptionsis an engine-discriminated union:browser: "kitesurf"rejects Chromium-only options at the type level.CdpSessiontakes aCdpSessionOptionsobject. The positional constructor still works but is deprecated; the changeset includes migration notes. Sessions fromconnectBrowser/connectBrowserSessionare unaffected.After merge
Port the
browse-the-web.mdchanges tocloudflare/cloudflare-docs(src/content/docs/agents/) as usual.