From 6f71f4e1ffb1b56ba016108b66ec29d010d1a93e Mon Sep 17 00:00:00 2001 From: leeguooooo Date: Thu, 11 Jun 2026 23:55:00 +0900 Subject: [PATCH] fix: truncate tab-list title too; doc raw --cdp isolation limit + eval/type notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From Hermes's fork.49 re-dogfood (9/11 fixes confirmed PASS): - tab list: a page can set its title to a multi-KB string (= a giant URL); cap the title column like the URL so the row stays readable. - skill: clarify that true multi-agent isolation needs the extension-connect path (per-session tab groups) — raw `--cdp` shares the browser, so a sibling session's `open` can navigate your tab. Use the extension for concurrent agents. - skill: prefer `eval --json` for array/object results (plain render is multi-line / pipe-hostile); note type/fill don't fire keydown (use `keyboard type` when key events are required). (Hermes's "find-text click bypasses humanize" was a false alarm — verified both paths curve; the apparent 1-vs-12 was cursor continuity on the same target.) --- cli/src/output.rs | 5 +++++ skill-data/core/SKILL.md | 22 +++++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) 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