Repository navigation
Release 0.1.15 - #1071
Draft
gregpr07 wants to merge 26 commits into
Draft
Release 0.1.15#1071gregpr07 wants to merge 26 commits into
gregpr07 wants to merge 26 commits into
Conversation
`browser-harness scripts save <name> --from-last|--file` stores the last successful stdin script under <workspace>/scripts/<host>/<name>.py with a small header (host, url, params, verified_at). `scripts run` replays it with PARAMS injected (also BH_PARAMS), a 30s IPC timeout, stamps verified_at on success and prints `drifted: <error>` + exit 1 on failure. `scripts list` and a goto_url hint make saved scripts discoverable. Typed secrets and credential URL params are redacted on save. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…trailing comments The regex-based rewrite turned a param value inside another string into PARAMS[...], saving a file that no longer compiled, and missed typed secrets when the line ended in a comment. Use the AST instead, skip required secrets on re-save, and keep unit tests off the real journal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first replay that prints JSON records its shape in an '# expect:' header line. Later replays are drifted (exit 1) when a key goes missing, a type changes, or a value that was non-empty comes back null or empty. In the A/B experiment a replay printed top_comment: null and exited 0; this catches it. Malformed header JSON now fails with a clear message instead of a traceback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A legitimately empty value (an HN story with no comments) tripped the output check. --accept keeps that output and relaxes the expectation to what both runs share; everything else stays enforced. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CodeQL flagged the 'literal not found' note: it printed the value, which can be a secret passed with --param. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ctory too Agents often share the default daemon (same BU_NAME). Keying the journal by the working directory as well stops an agent in another folder from saving or overwriting this one's last script. Tests now isolate the journal through BH_RUNTIME_DIR so the real key logic runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- save: a --param whose key looks secret (password, token, api_key...) is not written to the header; it becomes a required param at run time - run --accept: refuse when the replay printed no JSON, so an outage page cannot remove the drift check - host/name refs: normalize www. and case; goto_url and SKILL.md show the host-qualified form so same-named scripts on two sites stay runnable - goto_url only looks up saved scripts for plain hostnames - output capture keeps at most the cap even for one huge write - accepting an empty list drops its item shape - a stdin script ending in sys.exit(0) is journaled for --from-last - an explicit 0 IPC timeout is no longer replaced by the default - SKILL.md says exactly when # expect: is recorded and what drifts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…work Chrome renders only the active tab of each window. A background tab in a shared window never produces a frame, so Page.captureScreenshot on it hangs (#882). With one owner per tab on a shared remote browser most tabs are background tabs, and about one screenshot in four timed out after 60 s. Nobody watches a remote browser's windows and they stack at the same bounds, so every owner tab there now gets its own window. Local Chrome is unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…st that pins it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Local headless and headful Chrome screenshot background tabs fine (measured on Chrome 157: 0.07-0.1 s per shot in a shared window), so BU_CDP_URL and BU_CDP_WS keep one window instead of opening a window per agent tab on the person's screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts against 0.1.14: _send keeps the per-MiB budget and resolves its default per call; the replay path keeps the captcha note in finally; the goto_url hint names the wrapping CLI. Tests stub the shared-owner notice and allow the captcha note's probe after the script's call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pty --param
- A run report's helper arguments showed a secret passed as --param or
BH_PARAMS, e.g. fill_input('#password', '<the password>'). Values of params
the saved file requires (redacted typed secrets) and of secret-looking keys
are now replaced by [redacted] there.
- The kept last script can hold a typed password: it is now mode 600.
- --param k= rewrote every "" literal in the script (sep="" included) to
PARAMS["k"]; an empty value now rewrites nothing and prints a note.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Off by default: click_at_xy and fill_input are unchanged. With BH_HUMAN_MOUSE=1, click_at_xy asks the daemon (meta=mouse) to move the mouse there along a macOS-Harness-style path (25-45 mouseMoved events, pipelined: travel time plus one round trip), press on arrival, and draw the arrow on Chrome's DevTools overlay (kept out of screenshots). fill_input clicks the field instead of a JS focus(). Akamai only trusts a session that saw pointer travel. The captcha-solver wait from the earlier version of this PR is dropped: solve_captcha() already waits for an in-flight solve and for one that starts after the call; a test covers the late start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rebased onto the 0.1.14 per-owner daemon (reimplemented; the old hooks into self.session and the single event buffer are gone). - Allowlist CDP domains/methods; refuse Fetch.*, Tracing.*, IO.*, Security.*, Target.attachToBrowserTarget/exposeDevToolsProtocol/sendMessageToTarget/ openDevTools/setAutoAttach/createBrowserContext, Network.setRequestInterception, Network.loadNetworkResource, response/post-body reads, and Page.navigate / Target.createTarget to chrome:, file:, devtools: and other internal schemes. - Check the live target before any attach (raw, switch_tab, first use of an owner's tab) and the session's current target on every call, including auto-attached iframe/worker sessions; only Page.navigate leaves a tab that landed on chrome://. set_session only accepts a session this daemon attached to that same tab. - Uploads/downloads only inside BH_UPLOAD_DIR / BH_DOWNLOAD_DIR. - Drop *ExtraInfo/Fetch/interception events and wire request headers from each owner's drain_events. - The mode is the daemon's (one BU_NAME) and covers every owner sharing it. Sticky per-name marker, mode in ping, ensure_daemon/require_existing_daemon refuse a daemon without a required mode; another name's marker never applies. - Live headless-Chrome probes (incl. two owners, unprotected daemon refusal, no cross-name leak) and a pytest PR workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…omium shim Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owners share one daemon. One owner's click cancelled another tab's press pulse and its screenshot jumped the other tab's arrow without repainting it, leaving that arrow mid-pulse. Track the pulse per tab session. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lease/0.1.15 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Refuse cookie reads (Network.getCookies/getAllCookies, Storage.getCookies) and drop Network.webSocketWillSendHandshakeRequest from drain_events. - Raw Target.activateTarget/closeTarget check the live target like attach. - required_deny_mode raises on an unknown BH_CDP_DENY value instead of treating it as an opt-out. - Live test: honor BH_TEST_CHROME, fail clearly (and kill Chrome) when it writes no DevToolsActivePort, prove daemon 'other' really passes Fetch. - CI on Python 3.11 and 3.12; SKILL.md wording on bodies and clearing the mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
….1.15 Kept both sides: deny-list checks plus #1056's own-window tab creation and the pointer bookkeeping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
browser-harness 0.1.15. Every user-visible change is in CHANGELOG.md under 0.1.15.
Included
browser-harnesscommand, never inside a host that pins browser-harness.scripts save / run / listper site). The last successful script is kept locally (owner-only file) forscripts save --from-last, but not under an embedding CLI such as browser-use. Secret params stay out of run reports.BH_HUMAN_MOUSE=1. With the flag off, clicks andfill_inputrun 0.1.14's code.BH_CDP_DENY=tokens, rebased onto 0.1.14's per-owner daemon.Proof
Release, after merge
gh release create v0.1.15 --target mainruns release.yml and publishes to PyPI. A PyPI release cannot be undone, only yanked.Rollback