Skip to content

refactor: resolve session settings through one module - #2387

Merged
Railly merged 7 commits into
mainfrom
railly/session-settings
Nov 3, 2026
Merged

Railly merged 7 commits into
mainfrom
railly/session-settings

Conversation

@Railly

@Railly Railly commented Nov 3, 2026

Copy link
Copy Markdown
Member

Problem

Changes

  • Adds session_settings: one table with a row per option (effect, persistence, secret), Patch::from_flags carrying only the values a command set explicitly, and typed views over the running settings.
  • The daemon reads its session settings through those views, seeded once from the environment at start. launch_options_from_env and the *_from_env helpers are gone.
  • Debug output redacts secret settings (proxy password, CDP headers, credentials in the proxy URL).
  • No behavior change. The patch is not sent yet. Follow-up PRs move the reuse and relaunch decision into the daemon and close the issues above.

Visual proof

Session settings before and after

One table lists every session setting with its flag, effect class
(launch or live), persistence class, secrecy and the rule that reads it
from the resolved flags. Patch::from_flags builds the set of values an
invocation set explicitly, with a wire encoding. Characterization tests
check the patch carries every value DaemonOptions and the launch
envelope helpers send. Nothing calls the module yet; parse_proxy moves
into it unchanged.
DaemonState holds a Running value seeded once from AGENT_BROWSER_*
at startup. The state initializers, auto launch, launch fallbacks, init
script and enable lists, CDP headers, the extensions file and the policy
and confirm-actions loaders read it through views instead of the
environment. Behavior is unchanged: the seed applies each variable's
existing parsing rules. The idle timeout resolution moves into the
module so one definition serves the daemon and the view.
…lts from settings

The idle timeout, the provider named in policy checks and the headed,
engine, user agent and color scheme defaults handed to plugin providers
come from Running instead of the environment. Plugin providers keep
their looser headed rule, where any value except 0, false, no or empty
counts, behind a dedicated view.
The running views and the env seed are used by the daemon, so the
compiler checks them again. Only the patch, the option table and the
settings error keep an allowance until the CLI sends the patch.
A separator-only allowed domains value seeds an empty list and the
resulting filter allows every host. The daemon state test now loads a
real action policy file and the plugin provider headed rule has its own
tests.
Patch and Running print through a manual Debug that hides secret rows and
strips credentials embedded in the proxy URL.
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agent-browser Ready Ready Preview, v0 Nov 3, 2026 9:34pm UTC
agent-browser-env-demo Ready Ready Preview, v0 Nov 3, 2026 9:34pm UTC

@Railly
Railly merged commit d52a5e9 into main Nov 3, 2026
19 checks passed

This branch was successfully deployed

2 active deployments
Preview – agent-browser-env-demo — 1a6c31f5 Deployed Nov 3, 2026 by vercel[bot]
Preview – agent-browser — 1a6c31f5 Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants