diff --git a/TIMEOUT_UPDATE_SUMMARY.md b/TIMEOUT_UPDATE_SUMMARY.md new file mode 100644 index 0000000..c2b8ecc --- /dev/null +++ b/TIMEOUT_UPDATE_SUMMARY.md @@ -0,0 +1,101 @@ +# Default Timeout Update Summary + +## Overview +Updated all default timeout values from **5 seconds to 30 seconds** across the cremote codebase to provide more reasonable defaults for browser automation operations. + +## Files Modified + +### 1. daemon/daemon.go +Updated all default timeout values: +- **General operations**: 5s → 30s (86 instances) +- **Selection timeouts**: 5s → 30s (form operations, element selection) +- **Action timeouts**: 5s → 30s (clicks, form submissions, file uploads) +- **Comments**: Updated all "default to 5 seconds" → "default to 30 seconds" + +**Exceptions kept at higher values:** +- Bulk operations: 30s (unchanged) +- Axe-core testing: 30s (unchanged) +- OCR processing: 30s (unchanged) +- Library injection: 10s (unchanged) +- Keyboard testing: 15s (unchanged) +- Various accessibility tests: 10-15s (unchanged) + +### 2. main.go +Updated CLI flag defaults: +- `openTabTimeout`: 5s → 30s +- `loadURLTimeout`: 5s → 30s + +### 3. mcp/main.go +Updated MCP server defaults: +- **Tool schema defaults**: Updated all `"default": 5` → `"default": 30` in InputSchema definitions +- **getIntParam calls**: Updated all `getIntParam(params, "timeout", 5)` → `getIntParam(params, "timeout", 30)` +- **Description strings**: Updated all "(default: 5)" → "(default: 30)" + +**Total changes in mcp/main.go:** +- ~40+ tool schema default values +- ~35+ getIntParam default values +- ~40+ description strings + +## Rationale + +### Why 30 seconds? +1. **Browser automation is inherently slow**: Modern web pages with heavy JavaScript can take 10-20 seconds to fully load +2. **Network variability**: Users may have slower connections or be testing remote sites +3. **Reduces timeout errors**: 5 seconds was too aggressive and caused frequent timeout failures +4. **Industry standard**: Most browser automation tools (Selenium, Playwright, Puppeteer) use 30s as default +5. **Better user experience**: Users can always override with shorter timeouts if needed, but starting with a reasonable default prevents frustration + +### Operations that benefit most: +- Page navigation and loading +- Element selection (waiting for elements to appear) +- Form interactions (especially with validation) +- File uploads +- JavaScript execution +- Screenshot capture + +## Testing +✅ Code compiles successfully +✅ All timeout values updated consistently +✅ Comments and documentation updated +✅ No breaking changes (users can still override timeouts) + +## Migration Notes +- **No breaking changes**: This only affects default values +- **Backward compatible**: Users who explicitly set timeout parameters will see no change +- **Performance impact**: Operations may take longer to timeout, but this is intentional +- **User override**: All timeout parameters can still be explicitly set to any value + +## Examples + +### Before: +```go +timeout := 5 // Default: 5 seconds +``` + +### After: +```go +timeout := 30 // Default: 30 seconds +``` + +### MCP Tool Before: +```go +"timeout": map[string]any{ + "type": "integer", + "description": "Timeout in seconds (default: 5)", + "default": 5, +} +``` + +### MCP Tool After: +```go +"timeout": map[string]any{ + "type": "integer", + "description": "Timeout in seconds (default: 30)", + "default": 30, +} +``` + +## Related Documentation +- See `mcp/PERFORMANCE_BEST_PRACTICES.md` for timeout recommendations +- See individual tool documentation for specific timeout guidance + diff --git a/daemon/daemon.go b/daemon/daemon.go index c5bc40d..d1a1a7d 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -239,8 +239,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { case "open-tab": timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -259,8 +259,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { url := cmd.Params["url"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -280,14 +280,14 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { value := cmd.Params["value"] // Parse timeouts - selectionTimeout := 5 // Default: 5 seconds + selectionTimeout := 30 // Default: 30 seconds if timeoutStr, ok := cmd.Params["selection-timeout"]; ok { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { selectionTimeout = parsedTimeout } } - actionTimeout := 5 // Default: 5 seconds + actionTimeout := 30 // Default: 30 seconds if timeoutStr, ok := cmd.Params["action-timeout"]; ok { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { actionTimeout = parsedTimeout @@ -307,14 +307,14 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { filePath := cmd.Params["file"] // Parse timeouts - selectionTimeout := 5 // Default: 5 seconds + selectionTimeout := 30 // Default: 30 seconds if timeoutStr, ok := cmd.Params["selection-timeout"]; ok { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { selectionTimeout = parsedTimeout } } - actionTimeout := 5 // Default: 5 seconds + actionTimeout := 30 // Default: 30 seconds if timeoutStr, ok := cmd.Params["action-timeout"]; ok { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { actionTimeout = parsedTimeout @@ -333,14 +333,14 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { selector := cmd.Params["selector"] // Parse timeouts - selectionTimeout := 5 // Default: 5 seconds + selectionTimeout := 30 // Default: 30 seconds if timeoutStr, ok := cmd.Params["selection-timeout"]; ok { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { selectionTimeout = parsedTimeout } } - actionTimeout := 5 // Default: 5 seconds + actionTimeout := 30 // Default: 30 seconds if timeoutStr, ok := cmd.Params["action-timeout"]; ok { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { actionTimeout = parsedTimeout @@ -358,8 +358,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -378,7 +378,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { selector := cmd.Params["selector"] // Parse timeouts - selectionTimeout := 5 // Default: 5 seconds + selectionTimeout := 30 // Default: 30 seconds if timeoutStr, ok := cmd.Params["selection-timeout"]; ok { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { selectionTimeout = parsedTimeout @@ -396,8 +396,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -413,7 +413,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { case "wait-navigation": tabID := cmd.Params["tab"] - timeout := 5 // Default timeout + timeout := 30 // Default timeout if timeoutStr, ok := cmd.Params["timeout"]; ok { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -431,14 +431,14 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { selector := cmd.Params["selector"] // Parse timeouts - selectionTimeout := 5 // Default: 5 seconds + selectionTimeout := 30 // Default: 30 seconds if timeoutStr, ok := cmd.Params["selection-timeout"]; ok { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { selectionTimeout = parsedTimeout } } - actionTimeout := 5 // Default: 5 seconds + actionTimeout := 30 // Default: 30 seconds if timeoutStr, ok := cmd.Params["action-timeout"]; ok { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { actionTimeout = parsedTimeout @@ -458,14 +458,14 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { value := cmd.Params["value"] // Parse timeouts - selectionTimeout := 5 // Default: 5 seconds + selectionTimeout := 30 // Default: 30 seconds if timeoutStr, ok := cmd.Params["selection-timeout"]; ok { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { selectionTimeout = parsedTimeout } } - actionTimeout := 5 // Default: 5 seconds + actionTimeout := 30 // Default: 30 seconds if timeoutStr, ok := cmd.Params["action-timeout"]; ok { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { actionTimeout = parsedTimeout @@ -484,8 +484,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { jsCode := cmd.Params["code"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -504,8 +504,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { selector := cmd.Params["selector"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -565,8 +565,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { } } - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -603,8 +603,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { injectLibrary := cmd.Params["inject_library"] // Optional: library URL or name timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -634,8 +634,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { checkType := cmd.Params["type"] // exists, visible, enabled, focused, selected timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -655,8 +655,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { attributes := cmd.Params["attributes"] // comma-separated list or "all" timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -675,8 +675,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { selector := cmd.Params["selector"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -695,8 +695,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { selectors := cmd.Params["selectors"] // JSON array of selectors timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -717,8 +717,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { textPattern := cmd.Params["text-pattern"] // Optional: regex pattern for link text timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -738,8 +738,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { includeHeaders := cmd.Params["include-headers"] == "true" timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -760,8 +760,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { extractType := cmd.Params["type"] // text, innerText, textContent (default: textContent) timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -780,8 +780,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { selector := cmd.Params["selector"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -800,8 +800,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { interactionsJSON := cmd.Params["interactions"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -821,8 +821,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { fieldsJSON := cmd.Params["fields"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -840,8 +840,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -859,8 +859,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -878,8 +878,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -898,8 +898,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { contentType := cmd.Params["type"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -919,8 +919,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { outputPath := cmd.Params["output"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -946,8 +946,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { fullPage = true } - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1000,8 +1000,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { includeContrastStr := cmd.Params["include_contrast"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1035,8 +1035,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { fetchRelatives := cmd.Params["fetch-relatives"] // "true" or "false" timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1063,8 +1063,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { role := cmd.Params["role"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1082,8 +1082,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1101,8 +1101,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1120,8 +1120,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1139,8 +1139,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1158,8 +1158,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1177,8 +1177,8 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] timeoutStr := cmd.Params["timeout"] - // Parse timeout (default to 5 seconds if not specified) - timeout := 5 + // Parse timeout (default to 30 seconds if not specified) + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1197,7 +1197,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { sourceSelector := cmd.Params["source"] targetSelector := cmd.Params["target"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1226,7 +1226,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { targetXStr := cmd.Params["target-x"] targetYStr := cmd.Params["target-y"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1266,7 +1266,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { offsetXStr := cmd.Params["offset-x"] offsetYStr := cmd.Params["offset-y"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1304,7 +1304,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] selector := cmd.Params["selector"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1327,7 +1327,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] selector := cmd.Params["selector"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1350,7 +1350,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] selector := cmd.Params["selector"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1373,7 +1373,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] selector := cmd.Params["selector"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1397,7 +1397,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { xStr := cmd.Params["x"] yStr := cmd.Params["y"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1434,7 +1434,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { deltaXStr := cmd.Params["delta-x"] deltaYStr := cmd.Params["delta-y"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1478,7 +1478,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] keys := cmd.Params["keys"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1501,7 +1501,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] key := cmd.Params["key"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1525,7 +1525,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { selector := cmd.Params["selector"] modifiers := cmd.Params["modifiers"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1553,7 +1553,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { xStr := cmd.Params["x"] yStr := cmd.Params["y"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1589,7 +1589,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { yStr := cmd.Params["y"] durationStr := cmd.Params["duration"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1633,7 +1633,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { endXStr := cmd.Params["end-x"] endYStr := cmd.Params["end-y"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1679,7 +1679,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { centerYStr := cmd.Params["center-y"] scaleStr := cmd.Params["scale"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1720,7 +1720,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { deltaXStr := cmd.Params["delta-x"] deltaYStr := cmd.Params["delta-y"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1755,7 +1755,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { xStr := cmd.Params["x"] yStr := cmd.Params["y"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1791,7 +1791,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { startStr := cmd.Params["start"] endStr := cmd.Params["end"] timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout @@ -1825,7 +1825,7 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) { tabID := cmd.Params["tab"] selector := cmd.Params["selector"] // Optional - if empty, selects all text on page timeoutStr := cmd.Params["timeout"] - timeout := 5 + timeout := 30 if timeoutStr != "" { if parsedTimeout, err := strconv.Atoi(timeoutStr); err == nil && parsedTimeout > 0 { timeout = parsedTimeout diff --git a/main.go b/main.go index b060e81..977f4f5 100644 --- a/main.go +++ b/main.go @@ -70,14 +70,14 @@ func main() { // Define flags for each subcommand // open-tab flags - openTabTimeout := openTabCmd.Int("timeout", 5, "Timeout in seconds for opening the tab") + openTabTimeout := openTabCmd.Int("timeout", 30, "Timeout in seconds for opening the tab") openTabHost := openTabCmd.String("host", "localhost", "Daemon host") openTabPort := openTabCmd.Int("port", 8989, "Daemon port") // load-url flags loadURLTabID := loadURLCmd.String("tab", "", "Tab ID to load URL in (optional, uses current tab if not specified)") loadURLTarget := loadURLCmd.String("url", "", "URL to load") - loadURLTimeout := loadURLCmd.Int("timeout", 5, "Timeout in seconds for loading the URL") + loadURLTimeout := loadURLCmd.Int("timeout", 30, "Timeout in seconds for loading the URL") loadURLHost := loadURLCmd.String("host", "localhost", "Daemon host") loadURLPort := loadURLCmd.Int("port", 8989, "Daemon port") diff --git a/mcp/main.go b/mcp/main.go index 0b0c1d2..f50d542 100644 --- a/mcp/main.go +++ b/mcp/main.go @@ -173,7 +173,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, "clear_cache": map[string]any{ "type": "boolean", @@ -213,7 +213,7 @@ func main() { } tab := getStringParam(params, "tab", cremoteServer.currentTab) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) clearCache := getBoolParam(params, "clear_cache", false) takeScreenshot := getBoolParam(params, "screenshot", false) extractType := getStringParam(params, "extract", "") @@ -338,7 +338,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{"action", "selector"}, @@ -354,7 +354,7 @@ func main() { selector := getStringParam(params, "selector", "") value := getStringParam(params, "value", "") tab := getStringParam(params, "tab", cremoteServer.currentTab) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if action == "" { return nil, fmt.Errorf("action parameter is required") @@ -474,7 +474,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{"type"}, @@ -489,7 +489,7 @@ func main() { extractType := getStringParam(params, "type", "") selector := getStringParam(params, "selector", "") code := getStringParam(params, "code", "") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if extractType == "" { return nil, fmt.Errorf("type parameter is required") @@ -574,7 +574,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{"output"}, @@ -589,7 +589,7 @@ func main() { output := getStringParam(params, "output", "") fullPage := getBoolParam(params, "full_page", false) tab := getStringParam(params, "tab", cremoteServer.currentTab) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) // Get optional zoom and viewport parameters var zoomLevel float64 @@ -697,7 +697,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{"action"}, @@ -711,7 +711,7 @@ func main() { action := getStringParam(params, "action", "") tab := getStringParam(params, "tab", "") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if action == "" { return nil, fmt.Errorf("action parameter is required") @@ -814,7 +814,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{"action"}, @@ -829,7 +829,7 @@ func main() { action := getStringParam(params, "action", "") selector := getStringParam(params, "selector", "") tab := getStringParam(params, "tab", cremoteServer.currentTab) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if action == "" { return nil, fmt.Errorf("action parameter is required") @@ -1044,8 +1044,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, Required: []string{"command"}, @@ -1060,7 +1060,7 @@ func main() { command := getStringParam(params, "command", "") tab := getStringParam(params, "tab", cremoteServer.currentTab) injectLibrary := getStringParam(params, "inject_library", "") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if command == "" { return nil, fmt.Errorf("command parameter is required") @@ -1143,7 +1143,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{"selector"}, @@ -1157,7 +1157,7 @@ func main() { selector := getStringParam(params, "selector", "") checkType := getStringParam(params, "check_type", "exists") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if selector == "" { return nil, fmt.Errorf("selector parameter is required") @@ -1221,7 +1221,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{"selector"}, @@ -1235,7 +1235,7 @@ func main() { selector := getStringParam(params, "selector", "") attributes := getStringParam(params, "attributes", "all") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if selector == "" { return nil, fmt.Errorf("selector parameter is required") @@ -1285,7 +1285,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{"selectors"}, @@ -1299,7 +1299,7 @@ func main() { selectorsParam := params["selectors"] tab := getStringParam(params, "tab", cremoteServer.currentTab) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if selectorsParam == nil { return nil, fmt.Errorf("selectors parameter is required") @@ -1362,7 +1362,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{}, @@ -1378,7 +1378,7 @@ func main() { hrefPattern := getStringParam(params, "href_pattern", "") textPattern := getStringParam(params, "text_pattern", "") tab := getStringParam(params, "tab", cremoteServer.currentTab) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if tab == "" { return nil, fmt.Errorf("no tab available - navigate to a page first") @@ -1423,7 +1423,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{"selector"}, @@ -1438,7 +1438,7 @@ func main() { selector := getStringParam(params, "selector", "") includeHeaders := getBoolParam(params, "include_headers", true) tab := getStringParam(params, "tab", cremoteServer.currentTab) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if selector == "" { return nil, fmt.Errorf("selector parameter is required") @@ -1491,7 +1491,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{"selector"}, @@ -1507,7 +1507,7 @@ func main() { pattern := getStringParam(params, "pattern", "") extractType := getStringParam(params, "extract_type", "textContent") tab := getStringParam(params, "tab", cremoteServer.currentTab) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if selector == "" { return nil, fmt.Errorf("selector parameter is required") @@ -1550,7 +1550,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{"selector"}, @@ -1568,7 +1568,7 @@ func main() { } tab := getStringParam(params, "tab", cremoteServer.currentTab) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) result, err := cremoteServer.client.AnalyzeForm(tab, selector, timeout) if err != nil { @@ -1625,7 +1625,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{"interactions"}, @@ -1672,7 +1672,7 @@ func main() { } tab := getStringParam(params, "tab", cremoteServer.currentTab) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) result, err := cremoteServer.client.InteractMultiple(tab, interactions, timeout) if err != nil { @@ -1714,7 +1714,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{"fields"}, @@ -1743,7 +1743,7 @@ func main() { formSelector := getStringParam(params, "form_selector", "") tab := getStringParam(params, "tab", cremoteServer.currentTab) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) result, err := cremoteServer.client.FillFormBulk(tab, formSelector, fields, timeout) if err != nil { @@ -1785,8 +1785,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, }, @@ -1797,7 +1797,7 @@ func main() { return nil, fmt.Errorf("invalid arguments format") } - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) // Handle optional navigation and cache clearing tabID, err := handleOptionalNavigation(cremoteServer, params, timeout) @@ -1841,8 +1841,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, }, @@ -1854,7 +1854,7 @@ func main() { } tabID := getStringParam(params, "tab", "") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) result, err := cremoteServer.client.GetViewportInfo(tabID, timeout) if err != nil { @@ -1892,8 +1892,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, }, @@ -1905,7 +1905,7 @@ func main() { } tabID := getStringParam(params, "tab", "") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) result, err := cremoteServer.client.GetPerformance(tabID, timeout) if err != nil { @@ -1948,8 +1948,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, Required: []string{"type"}, @@ -1967,7 +1967,7 @@ func main() { } tabID := getStringParam(params, "tab", "") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) result, err := cremoteServer.client.CheckContent(tabID, contentType, timeout) if err != nil { @@ -2015,7 +2015,7 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", + "description": "Timeout in seconds (default: 30)", }, }, Required: []string{"selector", "output"}, @@ -2030,7 +2030,7 @@ func main() { selector := getStringParam(params, "selector", "") output := getStringParam(params, "output", "") tab := getStringParam(params, "tab", cremoteServer.currentTab) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if selector == "" { return nil, fmt.Errorf("selector parameter is required") @@ -2109,7 +2109,7 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", + "description": "Timeout in seconds (default: 30)", }, }, Required: []string{"output"}, @@ -2124,7 +2124,7 @@ func main() { output := getStringParam(params, "output", "") fullPage := getBoolParam(params, "full_page", false) tab := getStringParam(params, "tab", cremoteServer.currentTab) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if output == "" { return nil, fmt.Errorf("output parameter is required") @@ -2380,7 +2380,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{}, @@ -2393,7 +2393,7 @@ func main() { tab := getStringParam(params, "tab", cremoteServer.currentTab) includeContrast := getBoolParam(params, "include_contrast", false) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) // Parse depth parameter var depth *int @@ -2465,7 +2465,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{"selector"}, @@ -2482,7 +2482,7 @@ func main() { } tab := getStringParam(params, "tab", cremoteServer.currentTab) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) fetchRelatives := getBoolParam(params, "fetch_relatives", true) result, err := cremoteServer.client.GetPartialAccessibilityTree(tab, selector, fetchRelatives, timeout) @@ -2528,7 +2528,7 @@ func main() { "timeout": map[string]any{ "type": "integer", "description": "Timeout in seconds", - "default": 5, + "default": 30, }, }, Required: []string{}, @@ -2540,7 +2540,7 @@ func main() { } tab := getStringParam(params, "tab", cremoteServer.currentTab) - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) selector := getStringParam(params, "selector", "") accessibleName := getStringParam(params, "accessible_name", "") role := getStringParam(params, "role", "") @@ -2581,8 +2581,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, }, @@ -2594,7 +2594,7 @@ func main() { } tab := getStringParam(params, "tab", "") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) err := cremoteServer.client.DisableCache(tab, timeout) if err != nil { @@ -2626,8 +2626,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, }, @@ -2639,7 +2639,7 @@ func main() { } tab := getStringParam(params, "tab", "") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) err := cremoteServer.client.EnableCache(tab, timeout) if err != nil { @@ -2671,8 +2671,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, }, @@ -2684,7 +2684,7 @@ func main() { } tab := getStringParam(params, "tab", "") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) err := cremoteServer.client.ClearCache(tab, timeout) if err != nil { @@ -2717,8 +2717,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, }, @@ -2730,7 +2730,7 @@ func main() { } tab := getStringParam(params, "tab", "") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) err := cremoteServer.client.ClearAllSiteData(tab, timeout) if err != nil { @@ -2762,8 +2762,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, }, @@ -2775,7 +2775,7 @@ func main() { } tab := getStringParam(params, "tab", "") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) err := cremoteServer.client.ClearCookies(tab, timeout) if err != nil { @@ -2807,8 +2807,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, }, @@ -2820,7 +2820,7 @@ func main() { } tab := getStringParam(params, "tab", "") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) err := cremoteServer.client.ClearStorage(tab, timeout) if err != nil { @@ -2861,8 +2861,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, Required: []string{"source", "target"}, @@ -2877,7 +2877,7 @@ func main() { source := getStringParam(params, "source", "") target := getStringParam(params, "target", "") tab := getStringParam(params, "tab", "") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if source == "" { return &mcp.CallToolResult{ @@ -2939,8 +2939,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, Required: []string{"source", "x", "y"}, @@ -2956,7 +2956,7 @@ func main() { x := getIntParam(params, "x", 0) y := getIntParam(params, "y", 0) tab := getStringParam(params, "tab", "") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if source == "" { return &mcp.CallToolResult{ @@ -3009,8 +3009,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, Required: []string{"source", "offset_x", "offset_y"}, @@ -3026,7 +3026,7 @@ func main() { offsetX := getIntParam(params, "offset_x", 0) offsetY := getIntParam(params, "offset_y", 0) tab := getStringParam(params, "tab", "") - timeout := getIntParam(params, "timeout", 5) + timeout := getIntParam(params, "timeout", 30) if source == "" { return &mcp.CallToolResult{ @@ -3072,8 +3072,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, Required: []string{"selector"}, @@ -3138,8 +3138,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, Required: []string{"selector"}, @@ -3204,8 +3204,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, Required: []string{"selector"}, @@ -3270,8 +3270,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, Required: []string{"selector"}, @@ -3340,8 +3340,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, Required: []string{"x", "y"}, @@ -3426,8 +3426,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, Required: []string{"x", "y", "delta_y"}, @@ -3513,8 +3513,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, Required: []string{"keys"}, @@ -3579,8 +3579,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, Required: []string{"key"}, @@ -3649,8 +3649,8 @@ func main() { }, "timeout": map[string]any{ "type": "integer", - "description": "Timeout in seconds (default: 5)", - "default": 5, + "description": "Timeout in seconds (default: 30)", + "default": 30, }, }, Required: []string{"selector", "modifiers"},