Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2322e5b639 | ||
|
|
36ad3ac66e | ||
|
|
3739ebca2d |
@@ -83,75 +83,3 @@ jobs:
|
|||||||
|
|
||||||
- name: Build release binary
|
- name: Build release binary
|
||||||
run: cargo build --release --manifest-path cli/Cargo.toml --target ${{ matrix.target }}
|
run: cargo build --release --manifest-path cli/Cargo.toml --target ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Run Rust tests
|
|
||||||
run: cargo test --manifest-path cli/Cargo.toml --target ${{ matrix.target }}
|
|
||||||
|
|
||||||
windows-integration:
|
|
||||||
name: Windows Integration Test
|
|
||||||
runs-on: windows-latest
|
|
||||||
needs: rust
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup pnpm
|
|
||||||
uses: pnpm/action-setup@v4
|
|
||||||
with:
|
|
||||||
version: 9
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
cache: pnpm
|
|
||||||
|
|
||||||
- name: Setup Rust toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
targets: x86_64-pc-windows-msvc
|
|
||||||
|
|
||||||
- name: Cache Cargo dependencies
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/bin/
|
|
||||||
~/.cargo/registry/index/
|
|
||||||
~/.cargo/registry/cache/
|
|
||||||
~/.cargo/git/db/
|
|
||||||
cli/target/
|
|
||||||
key: windows-cargo-x86_64-pc-windows-msvc-${{ hashFiles('cli/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
windows-cargo-x86_64-pc-windows-msvc-
|
|
||||||
|
|
||||||
- name: Build Rust CLI
|
|
||||||
run: cargo build --release --manifest-path cli/Cargo.toml --target x86_64-pc-windows-msvc
|
|
||||||
|
|
||||||
- name: Install npm dependencies
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Build TypeScript
|
|
||||||
run: pnpm build
|
|
||||||
|
|
||||||
- name: Copy CLI binary to bin directory
|
|
||||||
run: |
|
|
||||||
Copy-Item cli/target/x86_64-pc-windows-msvc/release/agent-browser.exe bin/agent-browser-win32-x64.exe
|
|
||||||
|
|
||||||
- name: Test agent-browser install command
|
|
||||||
run: |
|
|
||||||
$env:PATH = "$pwd\bin;$env:PATH"
|
|
||||||
bin/agent-browser-win32-x64.exe install
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
- name: Verify Chromium was installed
|
|
||||||
run: |
|
|
||||||
$playwrightPath = "$env:LOCALAPPDATA\ms-playwright"
|
|
||||||
if (Test-Path $playwrightPath) {
|
|
||||||
Write-Host "Playwright browsers installed at: $playwrightPath"
|
|
||||||
Get-ChildItem $playwrightPath -Recurse -Depth 2 | Select-Object -First 20
|
|
||||||
} else {
|
|
||||||
Write-Error "Playwright browsers not found!"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
shell: pwsh
|
|
||||||
|
|||||||
Generated
+1
-1
@@ -4,7 +4,7 @@ version = 4
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "agent-browser"
|
name = "agent-browser"
|
||||||
version = "0.4.3"
|
version = "0.4.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "agent-browser"
|
name = "agent-browser"
|
||||||
version = "0.4.3"
|
version = "0.4.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Fast browser automation CLI for AI agents"
|
description = "Fast browser automation CLI for AI agents"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|||||||
@@ -206,13 +206,8 @@ pub fn ensure_daemon(session: &str, headed: bool) -> Result<(), String> {
|
|||||||
{
|
{
|
||||||
use std::os::windows::process::CommandExt;
|
use std::os::windows::process::CommandExt;
|
||||||
|
|
||||||
// On Windows, use cmd.exe to run node to ensure proper PATH resolution.
|
let mut cmd = Command::new("node");
|
||||||
// This handles cases where node.exe isn't directly in PATH but node.cmd is.
|
cmd.arg(daemon_path)
|
||||||
// Pass the entire command as a single string to /c to handle paths with spaces.
|
|
||||||
let cmd_string = format!("node \"{}\"", daemon_path.display());
|
|
||||||
let mut cmd = Command::new("cmd");
|
|
||||||
cmd.arg("/c")
|
|
||||||
.arg(&cmd_string)
|
|
||||||
.env("AGENT_BROWSER_DAEMON", "1")
|
.env("AGENT_BROWSER_DAEMON", "1")
|
||||||
.env("AGENT_BROWSER_SESSION", session);
|
.env("AGENT_BROWSER_SESSION", session);
|
||||||
|
|
||||||
|
|||||||
@@ -128,16 +128,6 @@ pub fn run_install(with_deps: bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
println!("\x1b[36mInstalling Chromium browser...\x1b[0m");
|
println!("\x1b[36mInstalling Chromium browser...\x1b[0m");
|
||||||
|
|
||||||
// On Windows, we need to use cmd.exe to run npx because npx is actually npx.cmd
|
|
||||||
// and Command::new() doesn't resolve .cmd files the way the shell does.
|
|
||||||
// Pass the entire command as a single string to /c to handle paths with spaces.
|
|
||||||
#[cfg(windows)]
|
|
||||||
let status = Command::new("cmd")
|
|
||||||
.args(["/c", "npx playwright install chromium"])
|
|
||||||
.status();
|
|
||||||
|
|
||||||
#[cfg(not(windows))]
|
|
||||||
let status = Command::new("npx")
|
let status = Command::new("npx")
|
||||||
.args(["playwright", "install", "chromium"])
|
.args(["playwright", "install", "chromium"])
|
||||||
.status();
|
.status();
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "agent-browser",
|
"name": "agent-browser",
|
||||||
"version": "0.4.3",
|
"version": "0.4.2",
|
||||||
"description": "Headless browser automation CLI for AI agents",
|
"description": "Headless browser automation CLI for AI agents",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/daemon.js",
|
"main": "dist/daemon.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user