Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a7f8b7a96 | ||
|
|
9077f451cf |
Generated
+3
-3
@@ -4,7 +4,7 @@ version = 4
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "agent-browser"
|
name = "agent-browser"
|
||||||
version = "0.4.0"
|
version = "0.4.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -109,6 +109,6 @@ checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zmij"
|
name = "zmij"
|
||||||
version = "1.0.12"
|
version = "1.0.13"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2fc5a66a20078bf1251bde995aa2fdcc4b800c70b5d92dd2c62abc5c60f679f8"
|
checksum = "ac93432f5b761b22864c774aac244fa5c0fd877678a4c37ebf6cf42208f9c9ec"
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "agent-browser"
|
name = "agent-browser"
|
||||||
version = "0.4.0"
|
version = "0.4.1"
|
||||||
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"
|
||||||
|
|||||||
+186
-686
File diff suppressed because it is too large
Load Diff
+8
-17
@@ -8,7 +8,7 @@ use serde_json::json;
|
|||||||
use std::env;
|
use std::env;
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
|
|
||||||
use commands::{gen_id, parse_command, ParseError};
|
use commands::{gen_id, parse_command};
|
||||||
use connection::{ensure_daemon, send_command};
|
use connection::{ensure_daemon, send_command};
|
||||||
use flags::{clean_args, parse_flags};
|
use flags::{clean_args, parse_flags};
|
||||||
use install::run_install;
|
use install::run_install;
|
||||||
@@ -32,22 +32,13 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let cmd = match parse_command(&clean, &flags) {
|
let cmd = match parse_command(&clean, &flags) {
|
||||||
Ok(c) => c,
|
Some(c) => c,
|
||||||
Err(e) => {
|
None => {
|
||||||
if flags.json {
|
eprintln!(
|
||||||
let error_type = match &e {
|
"\x1b[31mUnknown command:\x1b[0m {}",
|
||||||
ParseError::UnknownCommand { .. } => "unknown_command",
|
clean.get(0).unwrap_or(&String::new())
|
||||||
ParseError::UnknownSubcommand { .. } => "unknown_subcommand",
|
);
|
||||||
ParseError::MissingArguments { .. } => "missing_arguments",
|
eprintln!("\x1b[2mRun: agent-browser --help\x1b[0m");
|
||||||
};
|
|
||||||
println!(
|
|
||||||
r#"{{"success":false,"error":"{}","type":"{}"}}"#,
|
|
||||||
e.format().replace('\n', " "),
|
|
||||||
error_type
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
eprintln!("\x1b[31m{}\x1b[0m", e.format());
|
|
||||||
}
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "agent-browser",
|
"name": "agent-browser",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"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