docs(browser): qualified spawned kill behavior
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `all` | `boolean` | No | Release every known managed tab. Omitted releases only `name`. Tool-owned headless pages and owned cmux surfaces close; spawned, connected, and relay pages remain open. |
|
||||
| `all` | `boolean` | No | Release every known managed tab. Omitted releases only `name`. Tool-owned headless pages and owned cmux surfaces close; spawned, connected, and relay pages remain open unless `kill: true` terminates a spawned browser. |
|
||||
| `kill` | `boolean` | No | When a tab release drops a spawned-app browser handle to refcount 0, also terminate its process tree. Has no effect on headless shutdown; connected and relay browsers are only disconnected. |
|
||||
|
||||
### `action: "run"`
|
||||
|
||||
@@ -21,7 +21,7 @@ Drives real Chromium tab; full puppeteer access via JS.
|
||||
|
||||
- `app.path` → NEVER tamper with a real desktop app (no stealth patches).
|
||||
- `app.relay: true` → drive the user's own Chrome tabs via the omp browser relay (auto-started; needs the OMP Browser Relay extension installed). `app.target` picks a tab by URL/title substring; without it the visible tab is adopted without stealing focus.
|
||||
- `close` releases the named tool session. It closes tool-owned headless pages and owned cmux surfaces, but NEVER closes pages in spawned, CDP-connected, or relay browsers; those user-owned pages remain open.
|
||||
- `close` releases the named tool session. It closes tool-owned headless pages and owned cmux surfaces, but NEVER closes pages in CDP-connected or relay browsers. Spawned-browser pages remain open unless `kill: true` terminates their process.
|
||||
- Selectors: CSS + puppeteer `aria/…`, `text/…`, `xpath/…`, `pierce/…`. Playwright-only pseudos (`:has-text()`, `:visible`) are REJECTED.
|
||||
</instruction>
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ function resolveBrowserKind(params: BrowserParams, session: ToolSession): Browse
|
||||
/**
|
||||
* Browser tool: stateful, multi-tab. Three actions:
|
||||
* - `open` → acquire/create a named tab on a browser kind (headless | spawned | connected) and optionally goto a url.
|
||||
* - `close` → release a named tab handle (or all handles); attached/spawned/relay pages remain open.
|
||||
* - `close` → release a named tab handle (or all handles); attached/relay pages remain open, and spawned pages remain unless killed.
|
||||
* - `run` → execute JS code against an existing tab with `page`/`browser`/`tab` helpers in scope.
|
||||
*/
|
||||
export class BrowserTool implements AgentTool<typeof browserSchema, BrowserToolDetails> {
|
||||
|
||||
Reference in New Issue
Block a user