Commit Graph
100 Commits
Author SHA1 Message Date
Chris Tate 71a79f64e8 fix: sync Cargo.lock when version changes (#302)
Update sync-version.js to also run `cargo update -p agent-browser` after
updating Cargo.toml, keeping Cargo.lock in sync. Also update pre-commit
hook to stage Cargo.lock along with Cargo.toml.

This commit also brings Cargo.lock up to date (was stuck at 0.7.6).
2026-01-27 09:33:47 -06:00
Chris Tate 759302ead5 v0.8.4 changeset (#300) 2026-01-27 09:20:32 -06:00
Chris Tate 3ce441bc4e fix daemon not found (#299) 2026-01-27 09:06:09 -06:00
Chris Tate 4116a8ac7f chore: add patch changeset for release (#294) 2026-01-27 00:15:04 -06:00
Chris Tate 18a1abda6e test: add Windows npm global install CI test (reproduces #262) (#293)
* test: add Windows npm global install CI test (reproduces #262)

This test packs the package and installs it globally with npm,
then runs agent-browser --version. This reproduces the issue where
npm-generated shims on Windows try to invoke /bin/sh which doesn't exist.

The bin/agent-browser.js wrapper is added but not yet wired up,
so this commit should fail CI to confirm the issue.

* fix: Windows npm global install and npx support

The shell script wrapper (bin/agent-browser) with #!/bin/sh shebang
causes npm to generate Windows shims that try to invoke /bin/sh,
which doesn't exist on Windows.

This fix uses a hybrid approach:

1. Node.js wrapper (bin/agent-browser.js) as bin entry
   - Makes npx work on all platforms
   - ~100ms overhead (acceptable since npx has its own overhead)

2. postinstall patches bin entries for global installs
   - Windows: Overwrites .cmd/.ps1 shims to invoke .exe directly
   - Mac/Linux: Replaces symlink to point to native binary
   - Zero overhead for `npm i -g agent-browser` users on all platforms

Also fixes PowerShell glob expansion in CI test.

Fixes #262

* fix: Windows npm global install and npx support

The shell script wrapper (bin/agent-browser) with #!/bin/sh shebang
causes npm to generate Windows shims that try to invoke /bin/sh,
which doesn't exist on Windows.

This fix uses a hybrid approach:

1. Node.js wrapper (bin/agent-browser.js) as bin entry
   - Makes npx work on all platforms
   - ~100ms overhead (acceptable since npx has its own overhead)

2. postinstall patches bin entries for global installs
   - Windows: Overwrites .cmd/.ps1 shims to invoke .exe directly
   - Mac/Linux: Replaces symlink to point to native binary
   - Zero overhead for `npm i -g agent-browser` users on all platforms

Also adds cross-platform CI tests for npm global install to catch
regressions on all platforms (Ubuntu, macOS, Windows).

Fixes #262

* test global install

* remove dead code
2026-01-27 00:09:51 -06:00
Chris Tate 7e6336f65b chore: add patch changeset for release (#291) 2026-01-26 18:01:48 -06:00
Chris Tate 143c8a8f3e ci: add test for Windows CMD wrapper (#289)
* ci: add test for Windows CMD wrapper

This test will fail until the CMD wrapper is fixed to call the native binary.

* fix: Windows CMD wrapper calls native binary instead of missing index.js
2026-01-26 17:54:46 -06:00
Chris Tate 0256c8f2e9 ci: add retry logic to flaky Windows integration test (#287)
* durable windows ci

* more
2026-01-26 17:29:44 -06:00
Chris Tate 8eec634c6f chore: add patch changeset for release (#286) 2026-01-26 17:13:21 -06:00
Chris Tate 6a17379aaf fix: CLI binary not executable when postinstall is skipped (pnpm, bun) (#285)
* fix binary

* check binary in CI
2026-01-26 17:04:25 -06:00
Chris Tate bf5ba0a557 header (#283) 2026-01-26 14:09:17 -06:00
Chris Tate efb1923fbb v0.8.0 changelog (#282) 2026-01-26 13:46:17 -06:00
Chris Tate e0597304ec chore: add minor changeset for release (#280) 2026-01-26 11:56:51 -06:00
Chris Tate 1b26ff886c Fix tab list command not recognizing new pages opened via clicks (#275)
## Summary

Fixed an issue where the `tab list` command couldn't recognize new pages that were opened externally (e.g., via `target="_blank"` links or popup windows). The problem occurred because context-level page tracking wasn't properly set up for all browser launch methods, causing new pages created outside of explicit `newTab()` calls to go untracked.

## Changes

- Added `setupContextTracking(context)` calls to `launch()`, `launchIncognito()`, and other context creation methods to ensure all contexts listen for new page events
- Added duplicate page checks (`!this.pages.includes(page)`) in `setupContextTracking()`, `newTab()`, and `launchIncognito()` to prevent the same page from being tracked multiple times
- Fixed `activePageIndex` calculation in `launch()` to properly set the active page index
- Enhanced comments to clarify that `setupContextTracking()` handles externally created pages (popups, new tabs from links)

## Implementation Details

The fix ensures that when a user clicks an element that opens a new tab/window, the browser context's 'page' event listener will automatically detect and track the new page. The duplicate prevention logic handles cases where both the context listener and manual page creation might try to add the same page.

Fixes #273
2026-01-26 01:25:49 -06:00
Chris Tate f862e2f7df Security: Reject cross-origin connections to daemon and stream server (#274) 2026-01-26 00:42:00 -06:00
Chris Tate a99f59cd20 Fix: check command hangs indefinitely (#272)
Fixes #257
2026-01-25 23:58:53 -06:00
Chris Tate 45506fbff0 Fix: set device does not apply deviceScaleFactor - HiDPI screenshots not possible (#270)
Fixes #255
2026-01-25 15:27:03 -06:00
Chris Tate 79863a5180 Fix: CLI: state load / profile persistence not usable in v0.7.6 (#268)
* Fix: CLI: state load / profile persistence not usable in v0.7.6

This PR addresses issue #259

* Fix issues identified in code review
2026-01-25 13:45:17 -06:00
Chris Tate ae09fdd431 Add CLI flags for cookie URL, domain, path, httpOnly, secure, and expires (#266)
* Add CLI flags for cookie URL, domain, path, httpOnly, secure, and expires

Extends the `cookies set` command to support setting cookies with additional parameters before loading a page, solving authentication workflows where cookies need to be set for different domains.

**Key changes:**
- Added CLI flags: `--url`, `--domain`, `--path`, `--httpOnly`, `--secure`, `--sameSite`, `--expires`
- Added comprehensive test coverage for all new flags and combinations
- Updated help documentation with usage examples
- No daemon changes needed - it already supported these parameters

**Example usage:**
```bash
agent-browser cookies set session_id "abc123" --url https://app.example.com --httpOnly --secure
```

This allows setting cookies for a URL before opening the page, eliminating the need for workarounds in cross-domain authentication scenarios.

Fixes #261

* Update lock

* Fix compilation error
2026-01-25 11:53:49 -06:00
Chris Tate a4d0c2624b chore: add patch changeset for release (#242) 2026-01-23 23:40:05 -06:00
Chris Tate 8c2a6ec5d2 fix: handle existing GitHub releases in workflow (#232) 2026-01-23 15:55:18 -06:00
Chris Tate 957b5e5994 fix: ensure binary is executable after npm install (#229) 2026-01-23 15:40:46 -06:00
Chris Tate 161d8f5c8d chore: add changeset for binary distribution fix (#227) 2026-01-23 15:25:53 -06:00
Chris Tate 6afede28b3 chore: release v0.7.1 (#225)
Fix native binary distribution in npm package. Binaries are now built
before publishing to npm, ensuring all platforms work on installation.
2026-01-23 15:08:59 -06:00
Chris Tate 6f1c83de1b fix bin (#224) 2026-01-23 15:00:13 -06:00
Chris Tate 28129df124 fix docs (#223)
* fix: download artifacts to temp directory to avoid naming conflict

The download-artifact action creates directories named after each artifact.
When downloading to bin/, this caused conflicts because the artifact directory
names matched the binary names (e.g., bin/agent-browser-darwin-arm64/agent-browser-darwin-arm64).

Fix by downloading to artifacts/ first, then using find to move the binaries to bin/.

* fix docs
2026-01-23 13:51:23 -06:00
Chris Tate eb8325e9b4 fix: download artifacts to temp directory to avoid naming conflict (#221)
The download-artifact action creates directories named after each artifact.
When downloading to bin/, this caused conflicts because the artifact directory
names matched the binary names (e.g., bin/agent-browser-darwin-arm64/agent-browser-darwin-arm64).

Fix by downloading to artifacts/ first, then using find to move the binaries to bin/.
2026-01-23 13:15:51 -06:00
Chris Tate 316e649740 chore: add changeset for v0.7.0 release (#219) 2026-01-23 13:00:24 -06:00
Chris Tate 35d345b2b4 v0.7.0 docs (#218)
* auto-release

* fixes

* fix secret name

* update provider flag

* v0.7.0 changelog
2026-01-23 12:49:40 -06:00
Chris Tate fff4312d16 update provider flag (#217)
* auto-release

* fixes

* fix secret name

* update provider flag
2026-01-23 11:41:17 -06:00
Chris Tate 57dc7602fc auto-release (#216)
* auto-release

* fixes

* fix secret name
2026-01-23 11:19:43 -06:00
Chris Tate 307f970d53 fix: support WebSocket URLs in connect command (#205)
* fix: support WebSocket URLs in connect command

* address feedback
2026-01-22 08:38:53 -06:00
Chris Tate 61c004db94 add missing flag (#203)
* add missing flag

* clean up tests
2026-01-22 00:59:53 -06:00
Chris Tate 399fd7a434 v0.6.0 changelog (#154) 2026-01-18 11:44:56 -06:00
Chris Tate 62f9b4dd6b chore: bump version to 0.6.0 (#153) 2026-01-18 11:37:26 -06:00
Chris Tate 818d9fa95e format code (#152) 2026-01-18 11:21:28 -06:00
Chris Tate 6abee37641 v0.5.0 (#78) 2026-01-13 21:54:20 -06:00
Chris TateandVercel <vercel[bot]@users.noreply.github.com> 2dc093cd62 add screencast (#67)
* docs

* updates

* Fix: The handleCopy function fails to handle errors from navigator.clipboard.writeText(), causing unhandled exceptions and misleading UI feedback when clipboard operations fail.

Co-authored-by: ctate <chris@ctate.dev>

* Fix: The benchmark file uses emojis (📊, 🚀, 🔨, 📈, 📋, , ⏱️, ⚠) in console output, violating repository guidelines that forbid emojis in code and output.

Co-authored-by: ctate <chris@ctate.dev>

* Remove benchmark/run.ts from PR

* screencast

* update docs

* address comments

---------

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
2026-01-13 14:53:27 -06:00
Chris TateandVercel <vercel[bot]@users.noreply.github.com> 4713c8b520 add docs (#54)
* docs

* updates

* Fix: The handleCopy function fails to handle errors from navigator.clipboard.writeText(), causing unhandled exceptions and misleading UI feedback when clipboard operations fail.

Co-authored-by: ctate <chris@ctate.dev>

* Fix: The benchmark file uses emojis (📊, 🚀, 🔨, 📈, 📋, , ⏱️, ⚠) in console output, violating repository guidelines that forbid emojis in code and output.

Co-authored-by: ctate <chris@ctate.dev>

* Remove benchmark/run.ts from PR

---------

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
2026-01-13 02:54:56 -06:00
Chris Tate b4bc761168 fix builds (#55) 2026-01-13 02:41:39 -06:00
Chris Tate 57a04385c1 v0.4.4 (#32)
* v0.4.4

* 0.4.4
2026-01-12 12:12:16 -06:00
Chris Tate 1a88d7f585 custom headers via --headers (#30)
* add custom headers via --headers

* add tests

* better parsing
2026-01-12 12:01:19 -06:00
Chris Tate 4f6fd8ec5c support serverless environments (#29)
* add --executable-path

* tests

* test vercel

* fixes
2026-01-12 11:41:25 -06:00
Chris Tate 3cd0ab468f add sub --help flag (#27) 2026-01-12 10:52:31 -06:00
Chris Tate a4fcc1c198 fix windows bug (#26)
* fix windows bug

* test windows

* address feedback
2026-01-12 10:33:21 -06:00
Chris Tate 574037080c 0.4.3 (#20) 2026-01-12 01:24:48 -06:00
Chris Tate 278466764b fix readme + add missing wait flags (#19)
* fix inaccuracies

* fix wait

* address feedback
2026-01-12 01:22:10 -06:00
Chris Tate f2878c750d fix typo (#18)
* fix skill name

* 0.4.2
2026-01-12 00:58:07 -06:00
Chris Tate bc0b99c374 0.4.1 (#17)
* sync version

* 0.4.1

* add release script
2026-01-12 00:43:52 -06:00
Chris Tate a0802b1863 fix locator issues (#14)
* fix locator issues

* address feedback
2026-01-12 00:29:53 -06:00
Chris Tate 403a7e5d56 usage with agents (#15) 2026-01-12 00:29:45 -06:00
Chris Tate 277febad63 fix session cmd (#13)
* fix session cmd

* address feedback
2026-01-12 00:06:34 -06:00
Chris Tate 5a7c7440c0 add ci action (#12)
* add ci action

* pre-commit hook

* format
2026-01-12 00:02:38 -06:00
Chris Tate 24881c7327 better ax/dx (#11) 2026-01-11 23:48:07 -06:00
Chris Tate 9f7d7d6447 fix cookies/storage (#10) 2026-01-11 23:27:49 -06:00
Chris Tate 70816dc594 0.4.0 2026-01-11 23:06:30 -06:00
Chris Tate eb8c1098a0 0.4.0 2026-01-11 10:16:06 -06:00
Chris Tate 8bfa698975 0.4.0 2026-01-11 10:15:07 -06:00
Chris Tate 31b0d18eb7 add lock file 2026-01-11 10:14:44 -06:00
Chris Tate 3bd331b97f cleanup 2026-01-11 10:08:08 -06:00
Chris Tate ee4eacff27 split up main.rs 2026-01-11 10:04:24 -06:00
Chris Tate 9e31100dcb faster builds 2026-01-11 09:59:20 -06:00
Chris Tate c0ed5c443e remove ts cli 2026-01-11 09:57:41 -06:00
Chris Tate 36b1af29f6 windows 2026-01-11 09:54:51 -06:00
Chris Tate 82079d6d20 update unit tests 2026-01-11 09:48:44 -06:00
Chris Tate fe8f16c7a5 0.3.7 2026-01-11 04:30:10 -06:00
Chris Tate 87f11b4190 fixes 2026-01-11 04:30:01 -06:00
Chris Tate e36d03c8d9 0.3.6 2026-01-11 04:24:44 -06:00
Chris Tate 83bcb6be73 0.3.5 2026-01-11 04:05:57 -06:00
Chris Tate b81534f719 fix wrapper script 2026-01-11 04:05:31 -06:00
Chris Tate 58bbd17635 0.3.4 2026-01-11 04:00:44 -06:00
Chris Tate 24d32ade9c fix agent browser bin 2026-01-11 03:52:44 -06:00
Chris Tate c0fb9f32fd fix install 2026-01-11 03:47:00 -06:00
Chris Tate bc6fd4162f 0.3.3 2026-01-11 03:35:40 -06:00
Chris Tate b2c54d3eea fix symlink 2026-01-11 03:35:33 -06:00
Chris Tate 33b7c2bfdb fix missing binaries 2026-01-11 03:29:33 -06:00
Chris Tate 6b3bae760b fixes 2026-01-11 03:23:39 -06:00
Chris Tate 924eb85e82 0.3.0 2026-01-11 03:09:27 -06:00
Chris Tate be972f6c9c rust 2026-01-11 03:08:00 -06:00
Chris Tate b614d29461 0.2.0 2026-01-11 03:01:14 -06:00
Chris Tate 7443a4a4c5 smart snapshots 2026-01-11 02:44:27 -06:00
Chris Tate a144735451 chore: ignore bin/ directory and remove compiled binary from tracking 2026-01-11 02:31:04 -06:00
Chris Tate 34821f001e bun 2026-01-11 02:28:51 -06:00
Chris Tate 71b1c50533 refs 2026-01-11 02:06:17 -06:00
Chris Tate b30a7f137b add opensrc 2026-01-11 01:48:47 -06:00
Chris Tate 6f2da29bc7 0.1.3 2026-01-11 01:07:34 -06:00
Chris Tate 68115b85ce prevent relaunch 2026-01-11 01:05:25 -06:00
Chris Tate b8a786c992 0.1.2 2026-01-11 00:21:40 -06:00
Chris Tate 627c88888e fix console/errors 2026-01-11 00:21:26 -06:00
Chris Tate 5fda532ae2 0.1.1 2026-01-10 23:50:58 -06:00
Chris Tate e7c25e9030 --with-deps 2026-01-10 23:50:09 -06:00
Chris Tate a7e5de5e4f install 2026-01-10 23:47:30 -06:00
Chris Tate aff8a056c6 update readme 2026-01-10 23:43:52 -06:00
Chris Tate 554ceec908 update readme 2026-01-10 23:42:08 -06:00
Chris Tate b4653837e6 fixes 2026-01-10 23:40:54 -06:00
Chris Tate e2b8f146dd 0.1.0 2026-01-10 23:38:45 -06:00
Chris Tate 0cd29aa119 agent-browser 2026-01-10 22:51:59 -06:00
Chris Tate 6de8102978 headed 2026-01-10 13:37:52 -06:00
Chris Tate 0638bcdd3c tests 2026-01-10 13:12:38 -06:00
Chris Tate 93374638eb scripts 2026-01-10 13:08:22 -06:00