fix(browser): add profile param to tabs routes and browser-tool
- tabs.ts now uses getProfileContext like other routes - browser-tool threads profile param through all actions - add tests for profile query param on /tabs endpoints - update docs with browser tool profile parameter
This commit is contained in:
@@ -189,10 +189,26 @@ All existing endpoints accept optional `?profile=<name>` query parameter:
|
||||
- `GET /?profile=work` — status for work profile
|
||||
- `POST /start?profile=work` — start work profile browser
|
||||
- `GET /tabs?profile=work` — list tabs for work profile
|
||||
- `POST /tabs/open?profile=work` — open tab in work profile
|
||||
- etc.
|
||||
|
||||
When `profile` is omitted, uses `browser.defaultProfile` (defaults to "clawd").
|
||||
|
||||
### Agent browser tool
|
||||
|
||||
The `browser` tool accepts an optional `profile` parameter for all actions:
|
||||
|
||||
```json
|
||||
{
|
||||
"action": "open",
|
||||
"targetUrl": "https://example.com",
|
||||
"profile": "work"
|
||||
}
|
||||
```
|
||||
|
||||
This routes the operation to the specified profile's browser instance. Omitting
|
||||
`profile` uses the default profile.
|
||||
|
||||
### Profile naming rules
|
||||
|
||||
- Lowercase alphanumeric characters and hyphens only
|
||||
|
||||
Reference in New Issue
Block a user