Empty string is outside most enum value sets, so model_dump would
serialize an out-of-set value violating the schema. Use None with
a type union (same treatment as nested objects) since no in-set
default can be safely chosen.
PR #3911 changed the browser-use entry point to skill_cli/main.py but
didn't port the early command interception for install, init, --template,
and --mcp. This broke:
- `browser-use install` (installs Chromium via playwright)
- `browser-use init` (generates template files)
- `browser-use --template` (direct template generation)
- `browser-use --mcp` (MCP server mode)
This fix adds early command interception to skill_cli/main.py, matching
the behavior from browser_use/cli.py. Commands are handled before argparse
to avoid loading heavy dependencies for simple setup tasks.
Also adds tests to prevent regression.
Non-required fields were always unioned with None, allowing null values
even when the JSON Schema did not permit them. Now only explicitly
nullable fields accept null. Non-required primitives get type-appropriate
zero defaults (empty string, 0, 0.0, False), arrays get [], and nested
objects fall back to None only where constructing a default is infeasible.
- Fix f-string quote style (double→single) in _build_filename_error_message
- Remove unused XmlFile import from test file
- Add missing blank lines before DEFAULT_FILE_SYSTEM_PATH
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Allow dots, spaces, and parentheses in filenames (e.g. report.v2.md, my file.csv)
- Auto-sanitize invalid filenames instead of rejecting them (spaces→hyphens, strip bad chars)
- Add specific error messages for binary extensions (.png, .jpg, etc.) to stop infinite retry loops
- Add specific error messages for unsupported extensions explaining which ones are valid
- Add .html and .xml as supported file types
- Improve write_file tool description with explicit filename rules and append behavior
- Add HtmlFile and XmlFile classes
- Add comprehensive tests for sanitization, new file types, and error messages
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This change ensures that sensitive data in action results is filtered before being included in state messages sent to the LLM. This prevents accidental leakage of private information. New tests are added to verify this functionality.
Co-authored-by: mailmertunsal <mailmertunsal@gmail.com>