Commit Graph

8 Commits

Author SHA1 Message Date
sauravpanda
ea99055e53 fix: write config.json atomically via tmp+rename to prevent silent data loss
A SIGKILL mid-write truncates config.json; read_config() catches
json.JSONDecodeError and returns {}, silently wiping the API key and
all other settings. Mirror the pattern already used by _write_state():
write to a sibling temp file, fsync, chmod 600, then os.replace() into
place — which is atomic on POSIX and effectively atomic on Windows.
2026-04-02 13:08:37 -07:00
ShawnPana
0530545c1a fix: API key single source of truth (config.json only), daemon-safe profile creation
- Remove BROWSER_USE_API_KEY env var as a read source from CLI code; config.json is the only source of truth
- Split _create_cloud_profile into daemon-safe _inner (raises) and CLI wrapper (sys.exit)
- Daemon auto-heal no longer kills process on profile creation API errors
2026-04-02 11:51:38 -07:00
ShawnPana
d6c9b8a24b fix: reject invalid boolean config values instead of silently coercing to False 2026-04-01 22:29:36 -07:00
ShawnPana
f27c567aad fix: enable_recording defaults False in library, configurable in CLI
Library keeps recording off by default. CLI reads cloud_connect_recording
from config (defaults True). Users can disable with:
  browser-use config set cloud_connect_recording false
2026-04-01 22:22:33 -07:00
ShawnPana
0bf1f02d97 fix: CI failures — ruff formatting, type errors, test_setup_command
- Ruff format all skill_cli and test files
- Fix type: get_config_value returns str|int|None, callers cast properly
- Fix type: BrowserWrapper.actions is non-optional (always provided)
- Fix type: config comparison uses 'is' not '=='
- Rewrite test_setup_command for new setup.handle(yes=True) API
- Add None guard in test_cli_lifecycle for state file
2026-04-01 19:58:33 -07:00
ShawnPana
b19a8bb0b0 fix: treat empty BROWSER_USE_API_KEY as unset
Empty string or whitespace-only env var now treated as missing
across all CLI code that checks the API key.
2026-04-01 19:24:23 -07:00
ShawnPana
c19a9a5b1b feat: add browser-use config command (set, get, list, unset)
CLI config management driven by CONFIG_KEYS schema. Validates keys,
coerces types (int for timeout), shows all values with config list.
2026-04-01 15:49:17 -07:00
ShawnPana
7cf543dc91 feat: add CLI config module as single source of truth
New browser_use/skill_cli/config.py with CONFIG_KEYS schema, read/write
helpers, get_config_value (with defaults), and get_config_display (for
doctor). Refactored cloud.py to import from config module instead of
inline helpers. Removed hardcoded proxy code validation — server-side
validation covers 249 country codes.
2026-04-01 15:29:51 -07:00