Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The Notte CLI brings the full power of [notte.cc](https://notte.cc?ref=github) t
## Features

- **AI agents** - run and monitor AI-powered browser functions
- **Browser sessions** - headless or headed Chrome/Firefox with full control
- **Browser sessions** - headless or headed Chromium/Chrome with full control
- **Files** - upload and download files to notte.cc
- **Output formats** - human-readable text or JSON for scripting
- **Personas** - create and manage digital identities with email, phone, and SMS
Expand Down Expand Up @@ -118,7 +118,7 @@ notte sessions code # Get Python script for session steps

```bash
notte sessions start \
--browser-type chromium|chrome|firefox # Browser type (default: chromium)
--browser-type chromium|chrome # Browser type (default: chromium)
--headless # Run in headless mode (default: true)
--idle-timeout-minutes <minutes> # Idle timeout (closes after inactivity)
--max-duration-minutes <minutes> # Maximum session lifetime
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/sessions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func TestRunSessionsStart(t *testing.T) {
})

SessionStartHeadless = false
SessionStartBrowserType = "firefox"
SessionStartBrowserType = "chrome"
SessionStartIdleTimeoutMinutes = 5
sessionsStartProxy = true
SessionStartSolveCaptchas = true
Expand Down
7 changes: 5 additions & 2 deletions internal/cmd/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ func TestValidateBrowser(t *testing.T) {
wantErr bool
}{
{"chromium", "chromium", false},
{"firefox", "firefox", false},
{"webkit", "webkit", false},
{"chrome", "chrome", false},
{"chrome-nightly", "chrome-nightly", false},
{"chrome-turbo", "chrome-turbo", false},
{"firefox", "firefox", true},
{"webkit", "webkit", true},
{"invalid", "safari", true},
{"empty", "", true},
}
Expand Down
4 changes: 2 additions & 2 deletions internal/errors/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ func TestAPIError_Unwrap(t *testing.T) {
func TestValidationError_Error(t *testing.T) {
err := &ValidationError{
Field: "browser",
Message: "expected chromium|firefox|webkit, got 'chrome'",
Message: "expected chromium|chrome, got 'firefox'",
}

got := err.Error()
want := "validation error: browser: expected chromium|firefox|webkit, got 'chrome'"
want := "validation error: browser: expected chromium|chrome, got 'firefox'"

if got != want {
t.Errorf("got %q, want %q", got, want)
Expand Down
17 changes: 12 additions & 5 deletions internal/validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,23 @@ func JSON(s string) error {
return nil
}

// Browser validates browser type
// Browser validates browser type.
//
// Notte runs Chromium-family browsers only. Firefox and WebKit are not
// supported - the API rejects a Firefox session with "Firefox sessions are not
// supported. Please use 'chromium' or 'chrome' as `browser_type`" - and
// `chrome` is valid despite an earlier version of this list omitting it.
// chrome-nightly and chrome-turbo are accepted as legacy aliases for chrome.
func Browser(s string) error {
valid := map[string]bool{
"chromium": true,
"firefox": true,
"webkit": true,
"chromium": true,
"chrome": true,
"chrome-nightly": true,
"chrome-turbo": true,
}

if !valid[s] {
return fmt.Errorf("invalid browser: expected chromium|firefox|webkit, got %q", s)
return fmt.Errorf("invalid browser: expected chromium|chrome, got %q", s)
}

return nil
Expand Down
10 changes: 6 additions & 4 deletions internal/validate/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ func TestBrowser(t *testing.T) {
wantErr bool
}{
{"chromium", false},
{"firefox", false},
{"webkit", false},
{"chrome", true}, // Not valid - should be chromium
{"safari", true}, // Not valid - should be webkit
{"chrome", false},
{"chrome-nightly", false}, // legacy alias for chrome
{"chrome-turbo", false}, // legacy alias for chrome
{"firefox", true}, // the API rejects Firefox sessions outright
{"webkit", true}, // never supported
{"safari", true},
{"", true},
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/gen-flags/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var FlattenWithoutPrefix = map[string]map[string]bool{
// whose OpenAPI metadata is currently flattened away before flag generation.
var FieldDescriptionOverrides = map[string]map[string]string{
"SessionStart": {
"browser_type": "The browser type to use. Can be chromium, chrome or firefox.",
"browser_type": "The browser type to use. Supported values are chromium and chrome.",
},
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func TestErrorParsing_ValidationErrorContainsDetails(t *testing.T) {
stderr := result.Stderr

// Check that error mentions at least one valid browser type
validBrowsers := []string{"chromium", "chrome", "firefox"}
validBrowsers := []string{"chromium", "chrome"}
foundValidBrowser := false
for _, browser := range validBrowsers {
if containsString(stderr, browser) {
Expand Down
Loading