diff --git a/.clawhub/lock.json b/.clawhub/lock.json index 322a84e..8bbec25 100644 --- a/.clawhub/lock.json +++ b/.clawhub/lock.json @@ -12,6 +12,10 @@ "gitea": { "version": "1.0.0", "installedAt": 1771481717998 + }, + "agent-browser": { + "version": "0.2.0", + "installedAt": 1771517234848 } } } diff --git a/HEARTBEAT.md b/HEARTBEAT.md index c6779d8..ba4013d 100644 --- a/HEARTBEAT.md +++ b/HEARTBEAT.md @@ -3,6 +3,7 @@ ## Check: Email (Lightweight) - Log: Append timestamp to `~/.openclaw/workspace/logs/email_checks.log` before checking - Run: ~/.local/bin/himalaya envelope list --page-size 20 -- If unread emails found, report count and subjects +- **Only report UNREAD emails** (flagged with `*` in FLAGS column) +- Read emails: completely ignore, do not mention at all in response - No Ollama analysis (too slow for heartbeat) -- Remind user to manually process if count > 0 +- Remind user to manually process unread emails if count > 0 diff --git a/logs/email_checks.log b/logs/email_checks.log index 6080cd2..3efddbf 100644 --- a/logs/email_checks.log +++ b/logs/email_checks.log @@ -1,3 +1,20 @@ [2026-02-18 17:48:26] Email check triggered [2026-02-18 18:48:54] Email check triggered [2026-02-18 21:48:30] Email check triggered +[2026-02-19 00:48:25] Email check triggered +Check: 2026-02-19 04:48:34 +Check: 2026-02-19 05:48:22 +Check: 2026-02-19 06:48:19 +Check: 2026-02-19 07:48:25 +Check: 2026-02-19 09:01:34 +Check: 2026-02-19 10:01:28 +Check: 2026-02-19 12:01:20 +Check: 2026-02-19 13:01:47 +Check: 2026-02-19 14:01:20 +Check: 2026-02-19 15:01:19 +Check: 2026-02-19 16:01:30 +Check: 2026-02-19 17:01:17 +Check: 2026-02-19 17:23:21 +[2026-02-19T18:23:19-08:00] Heartbeat email check +[2026-02-19T19:23:21-08:00] Heartbeat email check +[2026-02-19T20:23:19-08:00] Heartbeat email check diff --git a/skills/agent-browser/.clawhub/origin.json b/skills/agent-browser/.clawhub/origin.json new file mode 100644 index 0000000..5c17d35 --- /dev/null +++ b/skills/agent-browser/.clawhub/origin.json @@ -0,0 +1,7 @@ +{ + "version": 1, + "registry": "https://clawhub.ai", + "slug": "agent-browser", + "installedVersion": "0.2.0", + "installedAt": 1771517234847 +} diff --git a/skills/agent-browser/CONTRIBUTING.md b/skills/agent-browser/CONTRIBUTING.md new file mode 100644 index 0000000..d44561a --- /dev/null +++ b/skills/agent-browser/CONTRIBUTING.md @@ -0,0 +1,63 @@ +# Contributing to Agent Browser Skill + +This skill wraps the agent-browser CLI. Determine where the problem lies before reporting issues. + +## Issue Reporting Guide + +### Open an issue in this repository if + +- The skill documentation is unclear or missing +- Examples in SKILL.md do not work +- You need help using the CLI with this skill wrapper +- The skill is missing a command or feature + +### Open an issue at the agent-browser repository if + +- The CLI crashes or throws errors +- Commands do not behave as documented +- You found a bug in the browser automation +- You need a new feature in the CLI + +## Before Opening an Issue + +1. Install the latest version + ```bash + npm install -g agent-browser@latest + ``` + +2. Test the command in your terminal to isolate the issue + +## Issue Report Template + +Use this template to provide necessary information. + +```markdown +### Description +[Provide a clear and concise description of the bug] + +### Reproduction Steps +1. [First Step] +2. [Second Step] +3. [Observe error] + +### Expected Behavior +[Describe what you expected to happen] + +### Environment Details +- **Skill Version:** [e.g. 1.0.2] +- **agent-browser Version:** [output of agent-browser --version] +- **Node.js Version:** [output of node -v] +- **Operating System:** [e.g. macOS Sonoma, Windows 11, Ubuntu 22.04] + +### Additional Context +- [Full error output or stack trace] +- [Screenshots] +- [Website URLs where the failure occurred] +``` + +## Adding New Commands to the Skill + +Update SKILL.md when the upstream CLI adds new commands. +- Keep the Installation section +- Add new commands in the correct category +- Include usage examples diff --git a/skills/agent-browser/SKILL.md b/skills/agent-browser/SKILL.md new file mode 100644 index 0000000..85d1ac3 --- /dev/null +++ b/skills/agent-browser/SKILL.md @@ -0,0 +1,328 @@ +--- +name: Agent Browser +description: A fast Rust-based headless browser automation CLI with Node.js fallback that enables AI agents to navigate, click, type, and snapshot pages via structured commands. +read_when: + - Automating web interactions + - Extracting structured data from pages + - Filling forms programmatically + - Testing web UIs +metadata: {"clawdbot":{"emoji":"🌐","requires":{"bins":["node","npm"]}}} +allowed-tools: Bash(agent-browser:*) +--- + +# Browser Automation with agent-browser + +## Installation + +### npm recommended + +```bash +npm install -g agent-browser +agent-browser install +agent-browser install --with-deps +``` + +### From Source + +```bash +git clone https://github.com/vercel-labs/agent-browser +cd agent-browser +pnpm install +pnpm build +agent-browser install +``` + +## Quick start + +```bash +agent-browser open # Navigate to page +agent-browser snapshot -i # Get interactive elements with refs +agent-browser click @e1 # Click element by ref +agent-browser fill @e2 "text" # Fill input by ref +agent-browser close # Close browser +``` + +## Core workflow + +1. Navigate: `agent-browser open ` +2. Snapshot: `agent-browser snapshot -i` (returns elements with refs like `@e1`, `@e2`) +3. Interact using refs from the snapshot +4. Re-snapshot after navigation or significant DOM changes + +## Commands + +### Navigation + +```bash +agent-browser open # Navigate to URL +agent-browser back # Go back +agent-browser forward # Go forward +agent-browser reload # Reload page +agent-browser close # Close browser +``` + +### Snapshot (page analysis) + +```bash +agent-browser snapshot # Full accessibility tree +agent-browser snapshot -i # Interactive elements only (recommended) +agent-browser snapshot -c # Compact output +agent-browser snapshot -d 3 # Limit depth to 3 +agent-browser snapshot -s "#main" # Scope to CSS selector +``` + +### Interactions (use @refs from snapshot) + +```bash +agent-browser click @e1 # Click +agent-browser dblclick @e1 # Double-click +agent-browser focus @e1 # Focus element +agent-browser fill @e2 "text" # Clear and type +agent-browser type @e2 "text" # Type without clearing +agent-browser press Enter # Press key +agent-browser press Control+a # Key combination +agent-browser keydown Shift # Hold key down +agent-browser keyup Shift # Release key +agent-browser hover @e1 # Hover +agent-browser check @e1 # Check checkbox +agent-browser uncheck @e1 # Uncheck checkbox +agent-browser select @e1 "value" # Select dropdown +agent-browser scroll down 500 # Scroll page +agent-browser scrollintoview @e1 # Scroll element into view +agent-browser drag @e1 @e2 # Drag and drop +agent-browser upload @e1 file.pdf # Upload files +``` + +### Get information + +```bash +agent-browser get text @e1 # Get element text +agent-browser get html @e1 # Get innerHTML +agent-browser get value @e1 # Get input value +agent-browser get attr @e1 href # Get attribute +agent-browser get title # Get page title +agent-browser get url # Get current URL +agent-browser get count ".item" # Count matching elements +agent-browser get box @e1 # Get bounding box +``` + +### Check state + +```bash +agent-browser is visible @e1 # Check if visible +agent-browser is enabled @e1 # Check if enabled +agent-browser is checked @e1 # Check if checked +``` + +### Screenshots & PDF + +```bash +agent-browser screenshot # Screenshot to stdout +agent-browser screenshot path.png # Save to file +agent-browser screenshot --full # Full page +agent-browser pdf output.pdf # Save as PDF +``` + +### Video recording + +```bash +agent-browser record start ./demo.webm # Start recording (uses current URL + state) +agent-browser click @e1 # Perform actions +agent-browser record stop # Stop and save video +agent-browser record restart ./take2.webm # Stop current + start new recording +``` + +Recording creates a fresh context but preserves cookies/storage from your session. If no URL is provided, it automatically returns to your current page. For smooth demos, explore first, then start recording. + +### Wait + +```bash +agent-browser wait @e1 # Wait for element +agent-browser wait 2000 # Wait milliseconds +agent-browser wait --text "Success" # Wait for text +agent-browser wait --url "/dashboard" # Wait for URL pattern +agent-browser wait --load networkidle # Wait for network idle +agent-browser wait --fn "window.ready" # Wait for JS condition +``` + +### Mouse control + +```bash +agent-browser mouse move 100 200 # Move mouse +agent-browser mouse down left # Press button +agent-browser mouse up left # Release button +agent-browser mouse wheel 100 # Scroll wheel +``` + +### Semantic locators (alternative to refs) + +```bash +agent-browser find role button click --name "Submit" +agent-browser find text "Sign In" click +agent-browser find label "Email" fill "user@test.com" +agent-browser find first ".item" click +agent-browser find nth 2 "a" text +``` + +### Browser settings + +```bash +agent-browser set viewport 1920 1080 # Set viewport size +agent-browser set device "iPhone 14" # Emulate device +agent-browser set geo 37.7749 -122.4194 # Set geolocation +agent-browser set offline on # Toggle offline mode +agent-browser set headers '{"X-Key":"v"}' # Extra HTTP headers +agent-browser set credentials user pass # HTTP basic auth +agent-browser set media dark # Emulate color scheme +``` + +### Cookies & Storage + +```bash +agent-browser cookies # Get all cookies +agent-browser cookies set name value # Set cookie +agent-browser cookies clear # Clear cookies +agent-browser storage local # Get all localStorage +agent-browser storage local key # Get specific key +agent-browser storage local set k v # Set value +agent-browser storage local clear # Clear all +``` + +### Network + +```bash +agent-browser network route # Intercept requests +agent-browser network route --abort # Block requests +agent-browser network route --body '{}' # Mock response +agent-browser network unroute [url] # Remove routes +agent-browser network requests # View tracked requests +agent-browser network requests --filter api # Filter requests +``` + +### Tabs & Windows + +```bash +agent-browser tab # List tabs +agent-browser tab new [url] # New tab +agent-browser tab 2 # Switch to tab +agent-browser tab close # Close tab +agent-browser window new # New window +``` + +### Frames + +```bash +agent-browser frame "#iframe" # Switch to iframe +agent-browser frame main # Back to main frame +``` + +### Dialogs + +```bash +agent-browser dialog accept [text] # Accept dialog +agent-browser dialog dismiss # Dismiss dialog +``` + +### JavaScript + +```bash +agent-browser eval "document.title" # Run JavaScript +``` + +### State management + +```bash +agent-browser state save auth.json # Save session state +agent-browser state load auth.json # Load saved state +``` + +## Example: Form submission + +```bash +agent-browser open https://example.com/form +agent-browser snapshot -i +# Output shows: textbox "Email" [ref=e1], textbox "Password" [ref=e2], button "Submit" [ref=e3] + +agent-browser fill @e1 "user@example.com" +agent-browser fill @e2 "password123" +agent-browser click @e3 +agent-browser wait --load networkidle +agent-browser snapshot -i # Check result +``` + +## Example: Authentication with saved state + +```bash +# Login once +agent-browser open https://app.example.com/login +agent-browser snapshot -i +agent-browser fill @e1 "username" +agent-browser fill @e2 "password" +agent-browser click @e3 +agent-browser wait --url "/dashboard" +agent-browser state save auth.json + +# Later sessions: load saved state +agent-browser state load auth.json +agent-browser open https://app.example.com/dashboard +``` + +## Sessions (parallel browsers) + +```bash +agent-browser --session test1 open site-a.com +agent-browser --session test2 open site-b.com +agent-browser session list +``` + +## JSON output (for parsing) + +Add `--json` for machine-readable output: + +```bash +agent-browser snapshot -i --json +agent-browser get text @e1 --json +``` + +## Debugging + +```bash +agent-browser open example.com --headed # Show browser window +agent-browser console # View console messages +agent-browser console --clear # Clear console +agent-browser errors # View page errors +agent-browser errors --clear # Clear errors +agent-browser highlight @e1 # Highlight element +agent-browser trace start # Start recording trace +agent-browser trace stop trace.zip # Stop and save trace +agent-browser record start ./debug.webm # Record from current page +agent-browser record stop # Save recording +agent-browser --cdp 9222 snapshot # Connect via CDP +``` + +## Troubleshooting + +- If the command is not found on Linux ARM64, use the full path in the bin folder. +- If an element is not found, use snapshot to find the correct ref. +- If the page is not loaded, add a wait command after navigation. +- Use --headed to see the browser window for debugging. + +## Options + +- --session uses an isolated session. +- --json provides JSON output. +- --full takes a full page screenshot. +- --headed shows the browser window. +- --timeout sets the command timeout in milliseconds. +- --cdp connects via Chrome DevTools Protocol. + +## Notes + +- Refs are stable per page load but change on navigation. +- Always snapshot after navigation to get new refs. +- Use fill instead of type for input fields to ensure existing text is cleared. + +## Reporting Issues + +- Skill issues: Open an issue at https://github.com/TheSethRose/Agent-Browser-CLI +- agent-browser CLI issues: Open an issue at https://github.com/vercel-labs/agent-browser diff --git a/skills/agent-browser/_meta.json b/skills/agent-browser/_meta.json new file mode 100644 index 0000000..16d865a --- /dev/null +++ b/skills/agent-browser/_meta.json @@ -0,0 +1,6 @@ +{ + "ownerId": "kn72ce44tqw8bnnnewrn1s5x3s7yz7sq", + "slug": "agent-browser", + "version": "0.2.0", + "publishedAt": 1768882342488 +} \ No newline at end of file diff --git a/skills/gitea/.clawhub/origin.json b/skills/gitea/.clawhub/origin.json deleted file mode 100644 index c16f29a..0000000 --- a/skills/gitea/.clawhub/origin.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 1, - "registry": "https://clawhub.ai", - "slug": "gitea", - "installedVersion": "1.0.0", - "installedAt": 1771481717994 -} diff --git a/skills/gitea/SKILL.md b/skills/gitea/SKILL.md deleted file mode 100644 index c2a5c1f..0000000 --- a/skills/gitea/SKILL.md +++ /dev/null @@ -1,203 +0,0 @@ ---- -name: gitea -description: "Interact with Gitea using the `tea` CLI. Use `tea issues`, `tea pulls`, `tea releases`, and other commands for issues, PRs, releases, and repository management." ---- - -# Gitea Skill - -Use the `tea` CLI to interact with Gitea servers. Use `--repo owner/repo` when not in a git directory, or `--login instance.com` to specify a Gitea instance. - -## Setup - -Add a login once to get started: -```bash -tea login add -``` - -Check current logged in user: -```bash -tea whoami -``` - -## Repositories - -List repositories you have access to: -```bash -tea repos list -``` - -Create a new repository: -```bash -tea repos create --name my-repo --description "My project" --init -``` - -Create a private repository: -```bash -tea repos create --name my-repo --private --init -``` - -Fork a repository: -```bash -tea repos fork owner/repo -``` - -Delete a repository: -```bash -tea repos delete --name my-repo --owner myuser --force -``` - -## Pull Requests - -List open pull requests: -```bash -tea pulls --repo owner/repo -``` - -View a specific PR: -```bash -tea pr 55 --repo owner/repo -``` - -Checkout a PR locally: -```bash -tea pr checkout 55 -``` - -Create a new PR: -```bash -tea pr create --title "Feature title" --description "Description" -``` - -## Issues - -List open issues: -```bash -tea issues --repo owner/repo -``` - -View a specific issue: -```bash -tea issue 189 --repo owner/repo -``` - -Create a new issue: -```bash -tea issue create --title "Bug title" --body "Description" -``` - -View issues for a milestone: -```bash -tea milestone issues 0.7.0 -``` - -## Comments - -Add a comment to an issue or PR: -```bash -tea comment 189 --body "Your comment here" -``` - -## Releases - -List releases: -```bash -tea releases --repo owner/repo -``` - -Create a new release: -```bash -tea release create --tag v1.0.0 --title "Release 1.0.0" -``` - -## Actions (CI/CD) - -List repository action secrets: -```bash -tea actions secrets list -``` - -Create a new secret: -```bash -tea actions secrets create API_KEY -``` - -List action variables: -```bash -tea actions variables list -``` - -Set an action variable: -```bash -tea actions variables set API_URL https://api.example.com -``` - -## Webhooks - -List repository webhooks: -```bash -tea webhooks list -``` - -List organization webhooks: -```bash -tea webhooks list --org myorg -``` - -Create a webhook: -```bash -tea webhooks create https://example.com/hook --events push,pull_request -``` - -## Other Entities - -List branches: -```bash -tea branches --repo owner/repo -``` - -List labels: -```bash -tea labels --repo owner/repo -``` - -List milestones: -```bash -tea milestones --repo owner/repo -``` - -List organizations: -```bash -tea organizations -``` - -Show repository details: -```bash -tea repo --repo owner/repo -``` - -## Helpers - -Open something in browser: -```bash -tea open 189 # open issue/PR 189 -tea open milestones # open milestones page -``` - -Clone a repository: -```bash -tea clone owner/repo -``` - -Show notifications: -```bash -tea notifications --mine -``` - -## Output Formats - -Use `--output` or `-o` to control output format: -```bash -tea issues --output simple # simple text output -tea issues --output csv # CSV format -tea issues --output yaml # YAML format -``` diff --git a/skills/gitea/_meta.json b/skills/gitea/_meta.json deleted file mode 100644 index f06d2c8..0000000 --- a/skills/gitea/_meta.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "ownerId": "kn7dnbj0wvhgz2c6bg8cvbsmb9808s4w", - "slug": "gitea", - "version": "1.0.0", - "publishedAt": 1769899848068 -} \ No newline at end of file