一键导入
libretto-readonly
// Read-only Libretto workflow for diagnosing live browser state without clicks, typing, navigation, or mutation requests.
// Read-only Libretto workflow for diagnosing live browser state without clicks, typing, navigation, or mutation requests.
| name | libretto-readonly |
| description | Read-only Libretto workflow for diagnosing live browser state without clicks, typing, navigation, or mutation requests. |
| license | MIT |
| metadata | {"author":"saffron-health","version":"0.6.21"} |
snapshot and readonly-exec.readonly-exec reuses Libretto's normal execution pipeline, but it only exposes read-only helpers and denies mutating Playwright methods.exec, run, or any direct Playwright action that could change browser or application state.snapshot first when the visible page state is unclear.readonly-exec for focused inspection: titles, HTML, locator text, counts, visibility checks, and GET requests.readonly-exec commands at the same time.connectconnect to attach to an existing CDP endpoint for a preserved browser session.--read-only when creating the Libretto session handle for a preserved browser session.libretto connect http://127.0.0.1:9222 --read-only --session failed-job-debug
pagespages when a popup, new tab, or second page exists.readonly-exec or snapshot complains about multiple pages, list ids first and then pass --page.libretto pages --session failed-job-debug
snapshotsnapshot as the first high-level observation tool.snapshot <ref> to inspect a subtree from the latest full snapshot.readonly-execreadonly-exec for narrow inspection code only.ReadonlyExecDenied: ....page — a read-only Playwright Page proxy. Standard Playwright read methods work normally (url(), title(), content(), getByRole(), locator(), textContent(), isVisible(), count(), scrollIntoViewIfNeeded(), etc.). Anything that mutates the page (click, fill, goto, evaluate, keyboard, mouse) is blocked.state — the current Libretto session state object.get(url, options?) — HTTP client restricted to GET and HEAD requests. Replaces fetch, which is blocked in readonly mode. Any request with a body or a non-GET/HEAD method throws ReadonlyExecDenied.scrollBy(deltaX, deltaY) — scroll the viewport by pixel offset. Use this to inspect content below the fold without targeting a specific element.Standard JS globals console, URL, Buffer, setTimeout, and setInterval are also available.
libretto readonly-exec "return page.url()" --session failed-job-debug
libretto readonly-exec "return await page.getByRole('heading').first().textContent()" --session failed-job-debug
# HTTP GET inspection
echo "const r = await get('https://api.example.com/status'); return await r.json()" \
| libretto readonly-exec - --session failed-job-debug
# Scroll down to inspect below-the-fold content
libretto readonly-exec "await scrollBy(0, 500)" --session failed-job-debug
closeclose when the inspection session is no longer needed.libretto close --session failed-job-debug
Browser automation CLI for building, maintaining, and running browser automation workflows by inspecting live pages and prototyping interactions.
Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.
Automate user-installed Electron desktop apps (Slack, Discord, VS Code, Notion, Figma, Spotify, etc.) via CDP using this repo's Libretto CLI. Use when the task is to control a local desktop app on the user's machine, not this repo's own Electron app. Triggers: "desktop Slack app", "connect to Electron app", "remote-debugging-port", "CDP desktop app", "automate VS Code desktop app".
Create a spec sheet for the given feature/fix request in specs/ directory. Use when planning a significant new feature or complex fix.
Stage ALL changes in the repository (not just session changes), commit, and push. Use when you need to commit all pending changes.
Commit and push changes, creating or updating a PR as needed. Use for standard push workflow.