merge with develop and edit the browser_use_tool code
This commit is contained in:
commit
69106ec711
38 changed files with 1437 additions and 6842 deletions
3047
hermes_code/package-lock.json
generated
3047
hermes_code/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -4,7 +4,7 @@
|
|||
"description": "An AI agent with advanced tool-calling capabilities, featuring a flexible toolsets system for organizing and managing tools.",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"postinstall": "echo '✅ Browser tools ready. Run: python run_agent.py --help'"
|
||||
"postinstall": "echo '✅ Hermes Node hooks ready. Run: python run_agent.py --help'"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -15,9 +15,7 @@
|
|||
"url": "https://github.com/NousResearch/Hermes-Agent/issues"
|
||||
},
|
||||
"homepage": "https://github.com/NousResearch/Hermes-Agent#readme",
|
||||
"dependencies": {
|
||||
"agent-browser": "^0.13.0"
|
||||
},
|
||||
"dependencies": {},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,10 +34,6 @@ dependencies = [
|
|||
"faster-whisper>=1.0.0,<2",
|
||||
# Skills Hub (GitHub App JWT auth — optional, only needed for bot identity)
|
||||
"PyJWT[crypto]>=2.10.1,<3",
|
||||
"browser-use>=0.12.5",
|
||||
"playwright>=1.49.0",
|
||||
"playwright-stealth>=1.0.6",
|
||||
"langchain-openai>=1.1.12",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
|
|
|
|||
|
|
@ -19,9 +19,6 @@ PyJWT[crypto]
|
|||
# Web tools
|
||||
firecrawl-py
|
||||
parallel-web>=0.4.2
|
||||
browser-use>=0.12.5
|
||||
playwright
|
||||
playwright-stealth
|
||||
|
||||
# Image generation
|
||||
fal-client
|
||||
|
|
@ -36,5 +33,4 @@ croniter
|
|||
python-telegram-bot>=20.0
|
||||
discord.py>=2.0
|
||||
aiohttp>=3.9.0
|
||||
langchain-openai>=1.1.12,
|
||||
|
||||
|
|
|
|||
|
|
@ -874,41 +874,14 @@ install_node_deps() {
|
|||
fi
|
||||
|
||||
if [ -f "$INSTALL_DIR/package.json" ]; then
|
||||
log_info "Installing Node.js dependencies (browser tools)..."
|
||||
log_info "Installing Node.js dependencies..."
|
||||
cd "$INSTALL_DIR"
|
||||
npm install --silent 2>/dev/null || {
|
||||
log_warn "npm install failed (browser tools may not work)"
|
||||
log_warn "npm install failed (some Node.js helpers may not work)"
|
||||
}
|
||||
log_success "Node.js dependencies installed"
|
||||
|
||||
# Install Playwright browser + system dependencies.
|
||||
# Playwright's install-deps only supports apt/dnf/zypper natively.
|
||||
# For Arch/Manjaro we install the system libs via pacman first.
|
||||
log_info "Installing browser engine (Playwright Chromium)..."
|
||||
case "$DISTRO" in
|
||||
arch|manjaro)
|
||||
if command -v pacman &> /dev/null; then
|
||||
log_info "Arch/Manjaro detected — installing Chromium system dependencies via pacman..."
|
||||
if command -v sudo &> /dev/null && sudo -n true 2>/dev/null; then
|
||||
sudo NEEDRESTART_MODE=a pacman -S --noconfirm --needed \
|
||||
nss atk at-spi2-core cups libdrm libxkbcommon mesa pango cairo alsa-lib >/dev/null 2>&1 || true
|
||||
elif [ "$(id -u)" -eq 0 ]; then
|
||||
pacman -S --noconfirm --needed \
|
||||
nss atk at-spi2-core cups libdrm libxkbcommon mesa pango cairo alsa-lib >/dev/null 2>&1 || true
|
||||
else
|
||||
log_warn "Cannot install browser deps without sudo. Run manually:"
|
||||
log_warn " sudo pacman -S nss atk at-spi2-core cups libdrm libxkbcommon mesa pango cairo alsa-lib"
|
||||
fi
|
||||
fi
|
||||
cd "$INSTALL_DIR" && npx playwright install chromium 2>/dev/null || true
|
||||
;;
|
||||
*)
|
||||
log_info "Playwright may request sudo to install browser system dependencies (shared libraries)."
|
||||
log_info "This is standard Playwright setup — Hermes itself does not require root access."
|
||||
cd "$INSTALL_DIR" && npx playwright install --with-deps chromium 2>/dev/null || true
|
||||
;;
|
||||
esac
|
||||
log_success "Browser engine installed"
|
||||
log_info "Skipping local Playwright/Chromium bootstrap (browser automation runs in browser container)"
|
||||
fi
|
||||
|
||||
# Install WhatsApp bridge dependencies
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import json
|
||||
import os
|
||||
from urllib import error, request
|
||||
from urllib import error, request
|
||||
from tools.registry import registry
|
||||
|
||||
logger = logging.getLogger("hermes.browser_use_tool")
|
||||
|
|
|
|||
3716
hermes_code/uv.lock
generated
3716
hermes_code/uv.lock
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue