rebrand: agent-browser-stealth → chrome-use, de-fork, reset to v1.0.0
Release binaries / Build macOS ARM64 (push) Has been cancelled
Release binaries / Build macOS x64 (push) Has been cancelled
Release binaries / Build Linux ARM64 (push) Has been cancelled
Release binaries / Build Linux musl ARM64 (push) Has been cancelled
Release binaries / Build Linux musl x64 (push) Has been cancelled
Release binaries / Build Linux x64 (push) Has been cancelled
Release binaries / Build Windows x64 (push) Has been cancelled
Release binaries / Attach binaries to GitHub Release (push) Has been cancelled
Release binaries / Build macOS ARM64 (push) Has been cancelled
Release binaries / Build macOS x64 (push) Has been cancelled
Release binaries / Build Linux ARM64 (push) Has been cancelled
Release binaries / Build Linux musl ARM64 (push) Has been cancelled
Release binaries / Build Linux musl x64 (push) Has been cancelled
Release binaries / Build Linux x64 (push) Has been cancelled
Release binaries / Build Windows x64 (push) Has been cancelled
Release binaries / Attach binaries to GitHub Release (push) Has been cancelled
Standalone product rename across the whole repo (issue: project identity): - Binary/package/repo/skill/docs: agent-browser[-stealth] → chrome-use (single binary name `chrome-use`; old aliases agent-browser/abs dropped). - Version: 0.27.0-fork.51 → 1.0.0 (drop the upstream-fork counter). - Native-messaging host: com.agent_browser.connect → com.leeguoo.chrome_use (CLI + ab-connect extension in lockstep — this is a breaking handshake change, extension bumped 0.4.2 → 0.5.0, needs a Web Store republish). - Config dir: ~/.agent-browser → ~/.chrome-use. - README/zh: reframed from "stealth fork of agent-browser" to a standalone product with a small `originally based on vercel-labs/agent-browser` credit. - Kept AGENT_BROWSER_* env vars working (63 vars across the codebase; renaming them would break every existing script/skill for no user-facing gain). Build green, 802 unit tests pass, fmt + clippy clean. Upstream attribution to vercel-labs/agent-browser preserved.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Build agent-browser for all platforms using Docker
|
||||
# Build chrome-use for all platforms using Docker
|
||||
# Usage: ./scripts/build-all-platforms.sh
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
@@ -14,7 +14,7 @@ GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
echo -e "${YELLOW}Building agent-browser for all platforms...${NC}"
|
||||
echo -e "${YELLOW}Building chrome-use for all platforms...${NC}"
|
||||
echo ""
|
||||
|
||||
# Ensure output directory exists
|
||||
@@ -22,7 +22,7 @@ mkdir -p "$OUTPUT_DIR"
|
||||
|
||||
# Build the Docker image if needed
|
||||
echo -e "${YELLOW}Building Docker cross-compilation image...${NC}"
|
||||
docker build -t agent-browser-builder -f "$PROJECT_ROOT/docker/Dockerfile.build" "$PROJECT_ROOT"
|
||||
docker build -t chrome-use-builder -f "$PROJECT_ROOT/docker/Dockerfile.build" "$PROJECT_ROOT"
|
||||
|
||||
# Function to build for a target
|
||||
build_target() {
|
||||
@@ -34,8 +34,8 @@ build_target() {
|
||||
docker run --rm \
|
||||
-v "$PROJECT_ROOT/cli:/build" \
|
||||
-v "$OUTPUT_DIR:/output" \
|
||||
agent-browser-builder \
|
||||
-c "cargo zigbuild --release --target ${target} && cp /build/target/${target}/release/agent-browser* /output/${output_name} && chmod +x /output/${output_name} 2>/dev/null || true"
|
||||
chrome-use-builder \
|
||||
-c "cargo zigbuild --release --target ${target} && cp /build/target/${target}/release/chrome-use* /output/${output_name} && chmod +x /output/${output_name} 2>/dev/null || true"
|
||||
|
||||
if [ -f "$OUTPUT_DIR/$output_name" ]; then
|
||||
echo -e "${GREEN}✓ Built ${output_name}${NC}"
|
||||
@@ -47,28 +47,28 @@ build_target() {
|
||||
|
||||
# Build for each platform
|
||||
# Linux x64
|
||||
build_target "x86_64-unknown-linux-gnu" "agent-browser-linux-x64"
|
||||
build_target "x86_64-unknown-linux-gnu" "chrome-use-linux-x64"
|
||||
|
||||
# Linux ARM64
|
||||
build_target "aarch64-unknown-linux-gnu" "agent-browser-linux-arm64"
|
||||
build_target "aarch64-unknown-linux-gnu" "chrome-use-linux-arm64"
|
||||
|
||||
# Windows x64
|
||||
build_target "x86_64-pc-windows-gnu" "agent-browser-win32-x64.exe"
|
||||
build_target "x86_64-pc-windows-gnu" "chrome-use-win32-x64.exe"
|
||||
|
||||
# macOS x64 (via zig for cross-compilation)
|
||||
build_target "x86_64-apple-darwin" "agent-browser-darwin-x64"
|
||||
build_target "x86_64-apple-darwin" "chrome-use-darwin-x64"
|
||||
|
||||
# macOS ARM64 (via zig for cross-compilation)
|
||||
build_target "aarch64-apple-darwin" "agent-browser-darwin-arm64"
|
||||
build_target "aarch64-apple-darwin" "chrome-use-darwin-arm64"
|
||||
|
||||
# Linux musl x64 (Alpine)
|
||||
build_target "x86_64-unknown-linux-musl" "agent-browser-linux-musl-x64"
|
||||
build_target "x86_64-unknown-linux-musl" "chrome-use-linux-musl-x64"
|
||||
|
||||
# Linux musl ARM64 (Alpine)
|
||||
build_target "aarch64-unknown-linux-musl" "agent-browser-linux-musl-arm64"
|
||||
build_target "aarch64-unknown-linux-musl" "chrome-use-linux-musl-arm64"
|
||||
|
||||
echo ""
|
||||
echo -e "${GREEN}Build complete!${NC}"
|
||||
echo ""
|
||||
echo "Binaries are in: $OUTPUT_DIR"
|
||||
ls -la "$OUTPUT_DIR"/agent-browser-*
|
||||
ls -la "$OUTPUT_DIR"/chrome-use-*
|
||||
|
||||
@@ -13,13 +13,13 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const projectRoot = join(__dirname, '..');
|
||||
|
||||
const sourceExt = platform() === 'win32' ? '.exe' : '';
|
||||
const sourcePath = join(projectRoot, `cli/target/release/agent-browser${sourceExt}`);
|
||||
const sourcePath = join(projectRoot, `cli/target/release/chrome-use${sourceExt}`);
|
||||
const binDir = join(projectRoot, 'bin');
|
||||
|
||||
// Determine platform suffix
|
||||
const platformKey = `${platform()}-${arch()}`;
|
||||
const ext = platform() === 'win32' ? '.exe' : '';
|
||||
const targetName = `agent-browser-${platformKey}${ext}`;
|
||||
const targetName = `chrome-use-${platformKey}${ext}`;
|
||||
const targetPath = join(binDir, targetName);
|
||||
|
||||
if (!existsSync(sourcePath)) {
|
||||
|
||||
+12
-12
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Postinstall script for agent-browser
|
||||
* Postinstall script for chrome-use
|
||||
*
|
||||
* Downloads the platform-specific native binary if not present.
|
||||
* On global installs, patches npm's bin entry to use the native binary directly:
|
||||
@@ -35,7 +35,7 @@ function isMusl() {
|
||||
const osKey = platform() === 'linux' && isMusl() ? 'linux-musl' : platform();
|
||||
const platformKey = `${osKey}-${arch()}`;
|
||||
const ext = platform() === 'win32' ? '.exe' : '';
|
||||
const binaryName = `agent-browser-${platformKey}${ext}`;
|
||||
const binaryName = `chrome-use-${platformKey}${ext}`;
|
||||
const binaryPath = join(binDir, binaryName);
|
||||
|
||||
// Package info
|
||||
@@ -82,7 +82,7 @@ async function downloadFile(url, dest) {
|
||||
|
||||
/**
|
||||
* Detect which package manager ran this postinstall and write a marker file
|
||||
* next to the binary so `agent-browser upgrade` can use the correct one
|
||||
* next to the binary so `chrome-use upgrade` can use the correct one
|
||||
* without fragile path heuristics or slow subprocess probing.
|
||||
*
|
||||
* npm_config_user_agent is set by npm/pnpm/yarn/bun during lifecycle scripts,
|
||||
@@ -193,7 +193,7 @@ function showInstallReminder() {
|
||||
if (systemChrome) {
|
||||
console.log('');
|
||||
console.log(` ✓ System Chrome found: ${systemChrome}`);
|
||||
console.log(' agent-browser will use it automatically.');
|
||||
console.log(' chrome-use will use it automatically.');
|
||||
console.log('');
|
||||
return;
|
||||
}
|
||||
@@ -202,12 +202,12 @@ function showInstallReminder() {
|
||||
console.log(' ⚠ No Chrome installation detected.');
|
||||
console.log(' If you plan to use a local browser, run:');
|
||||
console.log('');
|
||||
console.log(' agent-browser install');
|
||||
console.log(' chrome-use install');
|
||||
if (platform() === 'linux') {
|
||||
console.log('');
|
||||
console.log(' On Linux, include system dependencies with:');
|
||||
console.log('');
|
||||
console.log(' agent-browser install --with-deps');
|
||||
console.log(' chrome-use install --with-deps');
|
||||
}
|
||||
console.log('');
|
||||
console.log(' You can skip this if you use --cdp, --provider, --engine, or --executable-path.');
|
||||
@@ -240,7 +240,7 @@ async function fixUnixSymlink() {
|
||||
return; // npm not available
|
||||
}
|
||||
|
||||
const symlinkPath = join(npmBinDir, 'agent-browser');
|
||||
const symlinkPath = join(npmBinDir, 'chrome-use');
|
||||
|
||||
// Check if symlink exists (indicates global install)
|
||||
try {
|
||||
@@ -277,19 +277,19 @@ async function fixWindowsShims() {
|
||||
return;
|
||||
}
|
||||
|
||||
const cmdShim = join(npmBinDir, 'agent-browser.cmd');
|
||||
const ps1Shim = join(npmBinDir, 'agent-browser.ps1');
|
||||
const cmdShim = join(npmBinDir, 'chrome-use.cmd');
|
||||
const ps1Shim = join(npmBinDir, 'chrome-use.ps1');
|
||||
|
||||
// Shims may not exist yet during postinstall (npm creates them after
|
||||
// lifecycle scripts). If missing, fall back: the JS wrapper at
|
||||
// bin/agent-browser.js handles Windows correctly via child_process.spawn.
|
||||
// bin/chrome-use.js handles Windows correctly via child_process.spawn.
|
||||
if (!existsSync(cmdShim)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Point the shims at the binary's ABSOLUTE path. The previous code rebuilt a
|
||||
// relative `node_modules\agent-browser\bin\...` path, but this fork's package
|
||||
// is `agent-browser-stealth`, so that path never existed → the rewrite was
|
||||
// relative `node_modules\chrome-use\bin\...` path, but this fork's package
|
||||
// is `chrome-use`, so that path never existed → the rewrite was
|
||||
// skipped and the shim stayed the (slower) JS wrapper. `binaryPath` is the
|
||||
// real absolute path to the native binary inside this package.
|
||||
if (!existsSync(binaryPath)) {
|
||||
|
||||
@@ -44,7 +44,7 @@ let cargoToml = readFileSync(cargoTomlPath, "utf-8");
|
||||
const cargoVersionRegex = /^version\s*=\s*"[^"]*"/m;
|
||||
const newCargoVersion = `version = "${version}"`;
|
||||
const cargoNameMatch = cargoToml.match(/^name\s*=\s*"([^"]+)"/m);
|
||||
const cargoPackageName = cargoNameMatch?.[1] ?? "agent-browser-stealth";
|
||||
const cargoPackageName = cargoNameMatch?.[1] ?? "chrome-use";
|
||||
|
||||
let cargoTomlUpdated = false;
|
||||
if (cargoVersionRegex.test(cargoToml)) {
|
||||
|
||||
@@ -3,7 +3,7 @@ set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
INSTANCE_FILE="$SCRIPT_DIR/.instance"
|
||||
NAME_PREFIX="agent-browser-debug"
|
||||
NAME_PREFIX="chrome-use-debug"
|
||||
INSTANCE_TYPE="${INSTANCE_TYPE:-t3.xlarge}"
|
||||
|
||||
if [[ -f "$INSTANCE_FILE" ]]; then
|
||||
@@ -103,7 +103,7 @@ if [[ "$SG_ID" == "None" || -z "$SG_ID" ]]; then
|
||||
echo "Creating security group: $SG_NAME"
|
||||
SG_ID=$(aws ec2 create-security-group \
|
||||
--group-name "$SG_NAME" \
|
||||
--description "agent-browser Windows debug instance (SSM only, no inbound)" \
|
||||
--description "chrome-use Windows debug instance (SSM only, no inbound)" \
|
||||
--vpc-id "$VPC_ID" \
|
||||
--query "GroupId" --output text)
|
||||
|
||||
@@ -161,19 +161,19 @@ Start-Process -FilePath $vsInstaller -ArgumentList "--quiet --wait --norestart -
|
||||
Log "Build tools installed."
|
||||
|
||||
# Clone repo
|
||||
Log "Cloning agent-browser..."
|
||||
git clone https://github.com/vercel-labs/agent-browser.git C:\agent-browser
|
||||
Set-Location C:\agent-browser
|
||||
Log "Cloning chrome-use..."
|
||||
git clone https://github.com/vercel-labs/agent-browser.git C:\chrome-use
|
||||
Set-Location C:\chrome-use
|
||||
Log "Repo cloned."
|
||||
|
||||
# Build CLI
|
||||
Log "Building agent-browser CLI..."
|
||||
Log "Building chrome-use CLI..."
|
||||
cargo build --release --manifest-path cli\Cargo.toml
|
||||
Log "Build complete."
|
||||
|
||||
# Install Chrome
|
||||
Log "Installing Chrome via agent-browser..."
|
||||
.\cli\target\release\agent-browser.exe install
|
||||
Log "Installing Chrome via chrome-use..."
|
||||
.\cli\target\release\chrome-use.exe install
|
||||
Log "Chrome installed."
|
||||
|
||||
Log "--- Bootstrap complete ---"
|
||||
@@ -214,7 +214,7 @@ echo " ./scripts/windows-debug/run.sh \"Get-Content C:\\bootstrap.log\""
|
||||
echo ""
|
||||
echo "Once ready, sync your branch and start debugging:"
|
||||
echo " ./scripts/windows-debug/sync.sh"
|
||||
echo " ./scripts/windows-debug/run.sh \"cd C:\\agent-browser && cargo test\""
|
||||
echo " ./scripts/windows-debug/run.sh \"cd C:\\chrome-use && cargo test\""
|
||||
echo ""
|
||||
echo "Stop when done to save costs:"
|
||||
echo " ./scripts/windows-debug/stop.sh"
|
||||
|
||||
@@ -13,9 +13,9 @@ if [[ $# -eq 0 ]]; then
|
||||
echo "Usage: ./scripts/windows-debug/run.sh \"<powershell-command>\""
|
||||
echo ""
|
||||
echo "Examples:"
|
||||
echo " ./scripts/windows-debug/run.sh \"cd C:\\agent-browser && cargo test\""
|
||||
echo " ./scripts/windows-debug/run.sh \"cd C:\\chrome-use && cargo test\""
|
||||
echo " ./scripts/windows-debug/run.sh \"Get-Content C:\\bootstrap.log\""
|
||||
echo " ./scripts/windows-debug/run.sh \"cd C:\\agent-browser && cargo test e2e -- --ignored --test-threads=1\""
|
||||
echo " ./scripts/windows-debug/run.sh \"cd C:\\chrome-use && cargo test e2e -- --ignored --test-threads=1\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ REMOTE_URL=$(git remote get-url origin 2>/dev/null || echo "https://github.com/v
|
||||
echo "Syncing branch '$BRANCH' on Windows instance..."
|
||||
|
||||
"$RUN" "
|
||||
cd C:\agent-browser
|
||||
cd C:\chrome-use
|
||||
git remote set-url origin '$REMOTE_URL'
|
||||
git fetch origin
|
||||
git checkout -B '$BRANCH' 'origin/$BRANCH'
|
||||
@@ -21,7 +21,7 @@ echo ""
|
||||
echo "Branch synced. Rebuilding..."
|
||||
|
||||
"$RUN" "
|
||||
cd C:\agent-browser
|
||||
cd C:\chrome-use
|
||||
cargo build --release --manifest-path cli\Cargo.toml
|
||||
Write-Host 'Build complete.'
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user