diff --git a/cli/src/output.rs b/cli/src/output.rs index a20cb54..7ee2909 100644 --- a/cli/src/output.rs +++ b/cli/src/output.rs @@ -478,6 +478,11 @@ pub fn print_response_with_opts(resp: &Response, action: Option<&str>, opts: &Ou .get("title") .and_then(|v| v.as_str()) .unwrap_or("Untitled"); + // A page can set its title to a multi-KB string (e.g. equal to a + // giant JWT/OTP URL); truncate it like the URL so the row stays + // readable. + let title = truncate_middle(title, 120); + let title = title.as_str(); let url = tab.get("url").and_then(|v| v.as_str()).unwrap_or(""); // Truncate very long URLs (e.g. multi-KB JWT/OTP login links) so // the list stays readable instead of flooding the terminal. diff --git a/skill-data/core/SKILL.md b/skill-data/core/SKILL.md index 96a9367..a48523e 100644 --- a/skill-data/core/SKILL.md +++ b/skill-data/core/SKILL.md @@ -408,6 +408,13 @@ top-level `const x`/`let x`/`var x` in one call collides with the next names, assign to `window.x`, or wrap the body in an IIFE (`(() => { const x = …; return x; })()`). +**For array/object results, use `eval --json`** — the plain renderer +pretty-prints across multiple lines, which `tail`/`head`/pipes mangle; `--json` +emits one parseable line. Also note **`type`/`fill` insert text without firing +`keydown`/`keyup`** (CDP insertText) — the value lands, but a page that gates on +key events (some search-as-you-type widgets) won't react; use `keyboard type` (or +`press` per key) when real keystrokes are required. + ### Screenshot ```bash @@ -453,11 +460,16 @@ shell. **Concurrent agents MUST each use a distinct `--session `.** Within one session, commands are pinned to the tab you opened (by target_id, so a foreign -tab can't drift your `eval`/`screenshot`). But two agents sharing the *same* -session (e.g. both on the bare default) share one daemon and one active tab — -they will clobber each other's tab/eval context. A unique session per agent gives -each its own isolated tab group (own cookies, tabs, pin) on the one real Chrome, -with no cross-talk. +tab can't drift your `eval`/`screenshot`). Two agents sharing the *same* session +(e.g. both on the bare default) share one daemon and one active tab and will +clobber each other. + +True multi-agent isolation requires the **extension-connect path**: each +`--session` gets its own colored Chrome tab group, so sessions never touch each +other's tabs. **Raw `--cdp ` does NOT isolate** — every session attaches to +the same browser's existing targets, so a second session's first `open` can +navigate a sibling's tab. For concurrent agents on one real Chrome, use the +extension (each with a distinct `--session`), not raw `--cdp`. ### Mock network requests