Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
Update readme & docs (#997)
ddupontf2f97677eeed
diff --git a/.github/workflows/cd-container-cuabot.yml b/.github/workflows/cd-container-cuabot.ymlnew file mode 100644index 0000000000..ba5c5dbf7f--- /dev/null+++ b/.github/workflows/cd-container-cuabot.yml@@ -0,0 +1,18 @@+name: "CD: Container CuaBot"++on:+ push:+ tags:+ - "docker-cuabot-v*.*.*"+ workflow_dispatch:++jobs:+ publish:+ uses: ./.github/workflows/docker-reusable-publish.yml+ with:+ image_name: cuabot+ context_dir: libs/cuabot+ tag_prefix: docker-cuabot-v+ docker_hub_org: trycua+ secrets:+ DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}diff --git a/.github/workflows/cd-ts-cuabot.yml b/.github/workflows/cd-ts-cuabot.ymlnew file mode 100644index 0000000000..5f5b5d97be--- /dev/null+++ b/.github/workflows/cd-ts-cuabot.yml@@ -0,0 +1,86 @@+name: "CD: cuabot (npm)"++on:+ push:+ tags:+ - "cuabot-v*"+ workflow_dispatch:+ inputs:+ version:+ description: "Version to publish (default: from package.json)"+ required: false+ default: ""+ workflow_call:+ inputs:+ version:+ description: "Version to publish"+ required: false+ type: string+ default: ""++permissions:+ id-token: write+ contents: write++jobs:+ prepare:+ runs-on: ubuntu-latest+ outputs:+ version: ${{ steps.get-version.outputs.version }}+ tag: ${{ steps.get-version.outputs.tag }}+ steps:+ - name: Checkout code+ uses: actions/checkout@v4++ - name: Determine version+ id: get-version+ run: |+ if [ -n "${{ inputs.version }}" ]; then+ VERSION="${{ inputs.version }}"+ elif [ "${{ github.event_name }}" == "push" ]; then+ if [[ "${{ github.ref }}" =~ ^refs/tags/cuabot-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then+ VERSION=${BASH_REMATCH[1]}+ else+ echo "ERROR: Invalid tag format"+ exit 1+ fi+ else+ VERSION=$(node -p "require('./libs/cuabot/package.json').version")+ fi+ echo "version=${VERSION}" >> $GITHUB_OUTPUT+ echo "tag=cuabot-v${VERSION}" >> $GITHUB_OUTPUT++ publish-npm:+ needs: prepare+ uses: ./.github/workflows/ts-reusable-publish.yml+ with:+ package_name: "cuabot"+ package_dir: "libs/cuabot"+ package_manager: "pnpm"+ version: ${{ needs.prepare.outputs.version }}+ secrets:+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}++ create-release:+ needs: [prepare, publish-npm]+ uses: ./.github/workflows/release-github-reusable.yml+ with:+ tag_name: ${{ needs.prepare.outputs.tag }}+ release_name: "cuabot v${{ needs.prepare.outputs.version }}"+ module_path: "libs/cuabot"+ body: |+ ## Installation++ ```bash+ npx cuabot+ ```++ Or install globally:++ ```bash+ npm install -g cuabot+ ```++ ## Documentation++ See [cua.ai/docs/cuabot](https://cua.ai/docs/cuabot)diff --git a/.github/workflows/ci-container-cuabot.yml b/.github/workflows/ci-container-cuabot.ymlnew file mode 100644index 0000000000..7e07a00380--- /dev/null+++ b/.github/workflows/ci-container-cuabot.yml@@ -0,0 +1,16 @@+name: "CI: Container CuaBot"++on:+ pull_request:+ paths:+ - "libs/cuabot/Dockerfile"+ - "libs/cuabot/src/**"+ - ".github/workflows/ci-container-cuabot.yml"+ - ".github/workflows/docker-reusable-build.yml"++jobs:+ build:+ uses: ./.github/workflows/docker-reusable-build.yml+ with:+ image_name: cuabot+ context_dir: libs/cuabotdiff --git a/.github/workflows/release-bump-version.yml b/.github/workflows/release-bump-version.ymlindex 4ec0c7922c..dad9ca82f2 100644--- a/.github/workflows/release-bump-version.yml+++ b/.github/workflows/release-bump-version.yml@@ -19,7 +19,9 @@ on:- npm/cli- npm/computer- npm/core+ - npm/cuabot- lume+ - docker/cuabot- docker/kasm- docker/xfce- docker/lumier@@ -90,10 +92,18 @@ jobs:echo "directory=libs/typescript/core" >> $GITHUB_OUTPUTecho "type=npm" >> $GITHUB_OUTPUT;;+ "npm/cuabot")+ echo "directory=libs/cuabot" >> $GITHUB_OUTPUT+ echo "type=npm" >> $GITHUB_OUTPUT+ ;;"lume")echo "directory=libs/lume" >> $GITHUB_OUTPUTecho "type=lume" >> $GITHUB_OUTPUT;;+ "docker/cuabot")+ echo "directory=libs/cuabot" >> $GITHUB_OUTPUT+ echo "type=docker" >> $GITHUB_OUTPUT+ ;;"docker/kasm")echo "directory=libs/kasm" >> $GITHUB_OUTPUTecho "type=docker" >> $GITHUB_OUTPUT@@ -345,6 +355,14 @@ jobs:echo "lume version: $VERSION"echo "version=$VERSION" >> "$GITHUB_OUTPUT"+ - name: Capture bumped cuabot version+ if: ${{ inputs.service == 'npm/cuabot' }}+ id: cuabot_version+ run: |+ VERSION=$(grep -oP '"version": "\K[^"]+' libs/cuabot/package.json)+ echo "cuabot version: $VERSION"+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"+- name: Generate GitHub App tokenid: app-tokenuses: actions/create-github-app-token@v1diff --git a/Development.md b/Development.mdindex 87bcdab615..590f02a071 100644--- a/Development.md+++ b/Development.md@@ -20,6 +20,7 @@ The project is organized as a monorepo with these main packages:- `libs/lume/` - Lume CLI (Swift)- `libs/typescript/` - TypeScript packages including `cua-cli`+- `libs/cuabot/` - CuaBot multi-agent computer-use sandbox CLIAll Python packages are part of a [uv workspace](https://docs.astral.sh/uv/concepts/projects/workspaces/) which manages a shared virtual environment and dependencies.@@ -316,6 +317,11 @@ All packages are managed through a single consolidated workflow: [Bump Version &- `npm/cli` - Cua command-line interface- `npm/computer` - Computer client for TypeScript- `npm/core` - Core TypeScript utilities+- `npm/cuabot` - Multi-agent computer-use sandbox++**Docker:**++- `docker/cuabot` - CuaBot container image**How to use:**@@ -365,6 +371,8 @@ Each package uses its own tag format defined in `.bumpversion.cfg`:- **cua-core**: `core-v{version}` (e.g., `core-v0.1.9`)- **cua-mcp-server**: `mcp-server-v{version}` (e.g., `mcp-server-v0.1.14`)- **cua-som**: `som-v{version}` (e.g., `som-v0.1.3`)+- **cuabot**: `cuabot-v{version}` (e.g., `cuabot-v1.0.0`)+- **cuabot (docker)**: `docker-cuabot-v{version}` (e.g., `docker-cuabot-v1.0.0`)</details>diff --git a/README.md b/README.mdindex 7e251e8c7b..f88261f448 100644--- a/README.md+++ b/README.md@@ -20,11 +20,29 @@</div>-**Cua** is an open-source platform for building, benchmarking, and deploying agents that can use any computer, with isolated, self-hostable sandboxes (Docker, QEMU, Apple Virtualization).+## CuaBot - Co-op computer-use for any agent.-<div align="center">- <video src="https://github.com/user-attachments/assets/c619b4ea-bb8e-4382-860e-f3757e36af20" width="600" controls></video>-</div>+`cuabot` gives any coding agent a seamless sandbox for computer-use. Individual windows appear natively on your desktop with H.265, shared clipboard, and audio.++```bash+npx cuabot # Start onboarding+```++```bash+cuabot claude # Run Claude Code in the sandbox+cuabot openclaw # Run OpenClaw in the sandbox+cuabot chromium # Open sandboxed chromium window++cuabot --screenshot+cuabot --type "hello"+cuabot --click <x> <y> [button]+```++**[Get Started](https://cua.ai/docs/cuabot/cuabot)** | **[Installation](https://cua.ai/docs/cuabot/install)**++---++**Beyond cuabot** — explore our SDKs, benchmarks, and sandboxes for your own computer-use agents.## Choose Your Path@@ -68,7 +86,7 @@Build agents that see screens, click buttons, and complete tasks autonomously. Run isolated code execution environments for AI coding assistants like Claude Code, Codex CLI, or OpenCode.-<img src="img/cua-architecture.png" alt="Cua Architecture" width="100%">+<!-- <img src="img/cua-architecture.png" alt="Cua Architecture" width="100%"> -->```python# Requires Python 3.12 or 3.13@@ -90,7 +108,7 @@ async for result in agent.run([{"role": "user", "content": "Open Firefox and seaEvaluate computer-use agents on OSWorld, ScreenSpot, Windows Arena, and custom tasks. Export trajectories for training.-<img src="img/cua-bench-architecture.png" alt="Cua-Bench Architecture" width="100%">+<!-- <img src="img/cua-bench-architecture.png" alt="Cua-Bench Architecture" width="100%"> -->```bash# Install and create base image@@ -109,7 +127,7 @@ cb run dataset datasets/cua-bench-basic --agent cua-agent --max-parallel 4Create and manage macOS/Linux VMs with near-native performance on Apple Silicon using Apple's Virtualization.Framework.-<img src="img/lume-architecture.png" alt="Lume Architecture" width="100%">+<!-- <img src="img/lume-architecture.png" alt="Lume Architecture" width="100%"> -->```bash# Install Lume@@ -127,6 +145,7 @@ lume run macos-sequoia-vanilla:latest| Package | Description || --------------------------------------------------------------------- | ---------------------------------------------------------- |+| [cuabot](https://cua.ai/docs/cuabot/cuabot) | Multi-agent computer-use sandbox CLI || [cua-agent](https://cua.ai/docs/cua/reference/agent-sdk) | AI agent framework for computer-use tasks || [cua-computer](https://cua.ai/docs/cua/reference/computer-sdk) | SDK for controlling desktop environments || [cua-computer-server](https://cua.ai/docs/cua/reference/computer-sdk) | Driver for UI interactions and code execution in sandboxes |diff --git a/docs/content/docs/cuabot/cuabot.mdx b/docs/content/docs/cuabot/cuabot.mdxnew file mode 100644index 0000000000..6b47bfbbad--- /dev/null+++ b/docs/content/docs/cuabot/cuabot.mdx@@ -0,0 +1,130 @@+---+title: CuaBot+description: Multi-user computing with AI+---++**Multi-user computing with AI**++`cuabot` gives any coding agent a seamless sandbox for computer-use. Windows stream to your desktop with clipboard sharing and audio, isolated from your system.++## Quick Start++```bash+# Start onboarding+npx cuabot++# Run your agent in the sandbox+cuabot claude+cuabot vibe+cuabot codex+```++Requirements:++- [Node.js](https://nodejs.org/) v18++- [Docker Desktop](https://www.docker.com/products/docker-desktop/)+- [Xpra client](https://github.com/Xpra-org/xpra/wiki/Download)++## Usage++```bash+cuabot # Run default agent (or setup if not configured)+cuabot <agent> # Run a specific agent+cuabot <command> # Run any command in the sandbox+```++### Agents++Run any agent CLI in the sandboxed container:++```bash+cuabot claude # Claude Code (Anthropic)+cuabot gemini # Gemini CLI (Google)+cuabot codex # Codex CLI (OpenAI)+cuabot aider # Aider+cuabot openclaw # OpenClaw+cuabot vibe # Vibe (Mistral)+```++Agents are lazily installed on first use.++### Sandboxed Apps++Safely run scripts or GUI apps in the sandbox:++```bash+cuabot chromium # Open chromium window+cuabot xterm # Open terminal window+cuabot bash # Interactive bash+```++Terminal sessions and GUI applications are seamlessly streamed to your terminal or as a native desktop window.++### Named Sessions++Run multiple isolated sandboxes simultaneously:++```bash+cuabot -n work claude # Run Claude in a session named "work"+cuabot -n personal claude # Run Claude in a separate session named "personal"+cuabot --name dev bash # Interactive bash in session "dev"+```++Each named session gets its own container, port, and window border color. Session files are stored as `server.<name>.pid` and `server.<name>.port`.++### Commands++```bash+# Options (can be combined with any command)+-n, --name <name> # Use a named session++# Control cuabotd+cuabot --serve [port] # Start cuabotd (auto-finds port)+cuabot --stop # Stop cuabotd+cuabot --status # Server status++# Control sandbox+cuabot --screenshot [path] # Take screenshot+cuabot --bash <command> # Execute bash command+cuabot --click <x> <y> [button] # Click at coordinates+cuabot --doubleclick <x> <y> # Double-click+cuabot --move <x> <y> # Move mouse+cuabot --mousedown <x> <y> # Press mouse button+cuabot --mouseup <x> <y> # Release mouse button+cuabot --drag <x1> <y1> <x2> <y2> # Drag+cuabot --scroll <x> <y> <dx> <dy> # Scroll+cuabot --type <text> # Type text+cuabot --key <key> # Press key+cuabot --keydown <key> # Key down+cuabot --keyup <key> # Key up++cuabot --help # Show help+```++## How It Works++CuaBot runs a Docker container with Xpra, streaming individual application windows to your desktop. Your chosen agent runs inside the container with:++- Full Ubuntu 22.04 environment+- Pre-installed: Node.js, Python, browsers, dev tools+- Computer-use MCP server for screenshot/click/type actions+- Isolated from your host system++## Configuration++Config files are stored in `~/.cuabot/`:+- `settings.json` - Default agent and preferences+- `server.pid` / `server.<name>.pid` - Server process ID+- `server.port` / `server.<name>.port` - Server port number+- `user/` - Persistent config for agent CLIs++## Development++```bash+pnpm dev # Run with file watching+pnpm build # Build TypeScript+```++## License++MITdiff --git a/docs/content/docs/cuabot/install.mdx b/docs/content/docs/cuabot/install.mdxnew file mode 100644index 0000000000..49ed5f58a2--- /dev/null+++ b/docs/content/docs/cuabot/install.mdx@@ -0,0 +1,71 @@+---+title: Installation+description: Install CuaBot and its dependencies+---++import { Tab, Tabs } from 'fumadocs-ui/components/tabs';+import { Callout } from 'fumadocs-ui/components/callout';++<Tabs items={['macOS', 'Linux', 'Windows']}>+ <Tab value="macOS">++ **Requirements:**+ - [Node.js](https://nodejs.org/) v18++ - [Docker Desktop](https://www.docker.com/products/docker-desktop/)+ - [Xpra client](https://github.com/Xpra-org/xpra/wiki/Download#-macos)++ **Install:**++ ```bash+ npm install -g cuabot+ ```++ <Callout type="warn">+ After installing Xpra, you may need to remove quarantine:+ ```bash+ sudo xattr -rd com.apple.quarantine /Applications/Xpra.app+ ```+ </Callout>++ </Tab>+ <Tab value="Linux">++ **Requirements:**+ - [Node.js](https://nodejs.org/) v18++ - [Docker Engine](https://docs.docker.com/engine/install/)+ - Xpra++ **Install:**++ ```bash+ # Install Xpra+ sudo apt install xpra++ # Install CuaBot+ npm install -g cuabot+ ```++ </Tab>+ <Tab value="Windows">++ **Requirements:**+ - [Node.js](https://nodejs.org/) v18++ - [Docker Desktop](https://www.docker.com/products/docker-desktop/)+ - [Xpra client](https://github.com/Xpra-org/xpra/wiki/Download#-windows)++ **Install:**++ ```bash+ npm install -g cuabot+ ```++ </Tab>+</Tabs>++Then run:++```bash+cuabot+```++This runs the onboarding wizard which checks for dependencies and guides you through setup.diff --git a/docs/content/docs/cuabot/meta.json b/docs/content/docs/cuabot/meta.jsonnew file mode 100644index 0000000000..ddbac8ba13--- /dev/null+++ b/docs/content/docs/cuabot/meta.json@@ -0,0 +1,5 @@+{+ "title": "CuaBot",+ "description": "Co-op computer-use for any agent",+ "pages": ["cuabot", "install"]+}diff --git a/docs/content/docs/meta.json b/docs/content/docs/meta.jsonindex c6f5ba380e..f4116a1c13 100644--- a/docs/content/docs/meta.json+++ b/docs/content/docs/meta.json@@ -1,5 +1,5 @@{"title": "Home","description": "Documentation Home",- "pages": ["cua", "cuabench", "lume"]+ "pages": ["cua", "cuabench", "cuabot", "lume"]}diff --git a/docs/src/components/custom-header.tsx b/docs/src/components/custom-header.tsxindex e962924061..188f8069ec 100644--- a/docs/src/components/custom-header.tsx+++ b/docs/src/components/custom-header.tsx@@ -68,6 +68,32 @@ const docsSites = [},],},+ {+ name: 'CuaBot',+ label: 'Docs',+ href: '/cuabot/cuabot',+ prefix: '/cuabot',+ isDefault: false,+ description: 'Co-op computer-use for any agent',+ logoBlack: LogoBlack,+ logoWhite: LogoWhite,+ iconWidth: 24,+ iconHeight: 24,+ dropdownIconWidth: 20,+ dropdownIconHeight: 20,+ navTabs: [+ {+ name: 'Overview',+ href: '/cuabot/cuabot',+ prefix: '/cuabot/cuabot',+ },+ {+ name: 'Install',+ href: '/cuabot/install',+ prefix: '/cuabot/install',+ },+ ],+ },{name: 'Lume',label: 'Docs',diff --git a/libs/cuabot/.gitignore b/libs/cuabot/.gitignorenew file mode 100644index 0000000000..9014a85aec--- /dev/null+++ b/libs/cuabot/.gitignore@@ -0,0 +1,5 @@+node_modules/+dist/+*.log+.env+.env.localdiff --git a/libs/cuabot/Dockerfile b/libs/cuabot/Dockerfilenew file mode 100644index 0000000000..3b699fc89e--- /dev/null+++ b/libs/cuabot/Dockerfile@@ -0,0 +1,118 @@+# Minimal xpra container with agent-browser+FROM ubuntu:22.04++ENV DEBIAN_FRONTEND=noninteractive++# First install sudo and set up non-root user+RUN apt-get update && \+ apt-get -y install sudo++ENV user user++RUN useradd -m -d /home/${user} ${user} && \+ chown -R ${user} /home/${user} && \+ adduser ${user} sudo && \+ echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers++USER ${user}+WORKDIR /home/${user}++ENV PATH="/home/${user}/.local/bin:${PATH}"++# Install base dependencies+RUN sudo apt-get update && sudo apt-get install -y \+ curl \+ ca-certificates \+ gnupg \+ wget \+ apt-transport-https \+ software-properties-common \+ python3 \+ python3-pip \+ lsb-release \+ netcat-openbsd \+ git++# Install xpra from official repo (must be v6+)+RUN sudo apt-get update \+ && sudo wget -O /usr/share/keyrings/xpra.asc https://xpra.org/xpra.asc \+ && cd /etc/apt/sources.list.d && sudo wget https://raw.githubusercontent.com/Xpra-org/xpra/master/packaging/repos/jammy/xpra.sources \+ && sudo apt-get update \+ && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y xpra \+ && xpra --version \+ && XPRA_VERSION=$(xpra --version | grep -oP 'v\K[0-9]+' | head -1) \+ && if [ "$XPRA_VERSION" -lt 5 ]; then echo "ERROR: xpra version must be >= 5, got v$XPRA_VERSION"; exit 1; fi++# Install Node.js 20.x+RUN sudo mkdir -p /etc/apt/keyrings \+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/nodesource.gpg > /dev/null \+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list \+ && sudo apt-get update && sudo apt-get install -y nodejs++# Install remaining packages and agent-browser+RUN sudo apt-get install -y \+ x11-apps \+ dbus \+ dbus-x11 \+ feh \+ xdg-utils \+ && sudo npm install -g agent-browser \+ && sudo DEBIAN_FRONTEND=noninteractive npx playwright install-deps \+ && agent-browser install \+ && sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*++# Install Chromium from xtradeb PPA (avoids snap requirement on Ubuntu 22.04)+RUN sudo add-apt-repository ppa:xtradeb/apps -y \+ && sudo apt-get update \+ && sudo apt-get install -y chromium \+ && sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*++# Create chromium wrapper that adds --no-sandbox (required in container)+RUN sudo mv /usr/bin/chromium /usr/bin/chromium-bin \+ && echo '#!/bin/bash\nexec /usr/bin/chromium-bin --no-sandbox "$@"' | sudo tee /usr/bin/chromium > /dev/null \+ && sudo chmod +x /usr/bin/chromium++# Set Chromium as default browser (needed for some agent CLI onboardings)+RUN xdg-settings set default-web-browser chromium.desktop 2>/dev/null || true++## ==== preinstalled apps for the agent ====++# Python plotting libraries+RUN pip3 install --no-cache-dir matplotlib numpy pandas seaborn plotly++# Claude Code CLI+RUN curl -fsSL https://claude.ai/install.sh | bash++# Install uv (Python package manager for self-contained scripts)+RUN curl -LsSf https://astral.sh/uv/install.sh | sh++# Add aliases so apt-get/apt work without explicit sudo+RUN echo "alias apt-get='sudo apt-get'" >> ~/.bashrc && \+ echo "alias apt='sudo apt'" >> ~/.bashrc++# Lazy-install wrapper scripts for agent CLIs+RUN mkdir -p ~/.local/bin && \+ echo '#!/bin/bash\nif ! command -v /usr/local/bin/codex &>/dev/null; then sudo npm install -g @openai/codex; fi\n/usr/local/bin/codex "$@"' > ~/.local/bin/codex && \+ echo '#!/bin/bash\nif ! command -v /usr/local/bin/aider &>/dev/null; then pip3 install --user aider-chat; fi\naider "$@"' > ~/.local/bin/aider && \+ echo '#!/bin/bash\nif ! command -v ~/.local/bin/openclaw-bin &>/dev/null; then curl -fsSL https://openclaw.ai/install.sh | bash && mv ~/.local/bin/openclaw ~/.local/bin/openclaw-bin; fi\n~/.local/bin/openclaw-bin "$@"' > ~/.local/bin/openclaw && \+ echo '#!/bin/bash\nif ! command -v ~/.local/bin/vibe-bin &>/dev/null; then curl -LsSf https://mistral.ai/vibe/install.sh | bash && mv ~/.local/bin/vibe ~/.local/bin/vibe-bin; fi\n~/.local/bin/vibe-bin "$@"' > ~/.local/bin/vibe && \+ echo '#!/bin/bash\nnpx @google/gemini-cli "$@"' > ~/.local/bin/gemini && \+ chmod +x ~/.local/bin/codex ~/.local/bin/aider ~/.local/bin/openclaw ~/.local/bin/vibe ~/.local/bin/gemini++# Setup dbus and create runtime directories+RUN sudo mkdir -p /run/dbus /tmp/runtime-user \+ && sudo dbus-uuidgen | sudo tee /var/lib/dbus/machine-id > /dev/null \+ && sudo chmod 777 /run/dbus /tmp/runtime-user++ENV DISPLAY=:100+ENV XDG_RUNTIME_DIR=/tmp/runtime-user+ENV AGENT_BROWSER_HEADED=1++# Copy cuabot prompts+COPY src/prompts/.mcp.json /home/user/.mcp.json+COPY src/prompts/SYSTEM.md /home/user/CLAUDE.md++EXPOSE 10000++# Note: dbus-daemon runs as session bus (not system) to avoid needing root+CMD ["sh", "-c", "xpra --version && dbus-daemon --session --fork --address=unix:path=/tmp/dbus-session 2>/dev/null || true && xpra seamless :100 --sharing=yes --no-daemon --bind-tcp=0.0.0.0:10000 --html=on"]diff --git a/libs/cuabot/README.md b/libs/cuabot/README.mdnew file mode 100644index 0000000000..e1a9533ff6--- /dev/null+++ b/libs/cuabot/README.md@@ -0,0 +1,18 @@+# cuabot++Co-op computer-use for any agent.++Multi-user computing sandbox that gives any coding agent (Claude, Gemini, Codex, OpenClaw, Vibe) seamless computer-use capabilities.++## Quick Start++```bash+npx cuabot+```++## Documentation++See the [CuaBot documentation](https://cua.ai/docs/cuabot) for:++- [Installation Guide](https://cua.ai/docs/cuabot/guide/getting-started/installation)+- [Commands Reference](https://cua.ai/docs/cuabot/reference/commands)diff --git a/libs/cuabot/assets/icon.ico b/libs/cuabot/assets/icon.iconew file mode 100644index 0000000000..c073228652Binary files /dev/null and b/libs/cuabot/assets/icon.ico differdiff --git a/libs/cuabot/assets/icon.png b/libs/cuabot/assets/icon.pngnew file mode 100644index 0000000000..b51bd0cb4cBinary files /dev/null and b/libs/cuabot/assets/icon.png differdiff --git a/libs/cuabot/assets/logo.png b/libs/cuabot/assets/logo.pngnew file mode 100644index 0000000000..4cc21b6261Binary files /dev/null and b/libs/cuabot/assets/logo.png differdiff --git a/libs/cuabot/bin/cuabot.js b/libs/cuabot/bin/cuabot.jsnew file mode 100755index 0000000000..995f7d8522--- /dev/null+++ b/libs/cuabot/bin/cuabot.js@@ -0,0 +1,18 @@+#!/usr/bin/env node+import { spawn } from "child_process";+import { fileURLToPath } from "url";+import { dirname, join } from "path";++const __filename = fileURLToPath(import.meta.url);+const __dirname = dirname(__filename);++const args = ["--no-warnings", join(__dirname, "..", "src", "cuabot.tsx"), ...process.argv.slice(2)];++const child = spawn("npx", ["tsx", ...args], {+ stdio: "inherit",+ shell: process.platform === "win32"+});++child.on("exit", (code) => {+ process.exit(code ?? 0);+});diff --git a/libs/cuabot/package.json b/libs/cuabot/package.jsonnew file mode 100644index 0000000000..c6c8281e5d--- /dev/null+++ b/libs/cuabot/package.json@@ -0,0 +1,40 @@+{+ "name": "cuabot",+ "version": "1.0.0",+ "type": "module",+ "bin": {+ "cuabot": "./bin/cuabot.js"+ },+ "scripts": {+ "build": "tsc",+ "start": "npx tsx src/cuabot.tsx",+ "dev": "npx tsx --watch src/cuabot.tsx",+ "serve": "npx tsx src/cuabotd.ts",+ "stop": "npx tsx src/cuabot.tsx stop",+ "status": "npx tsx src/cuabot.tsx status",+ "mcp": "npx tsx src/mcp/server-mcp.ts"+ },+ "dependencies": {+ "@anthropic-ai/claude-agent-sdk": "^0.1.0",+ "@lydell/node-pty": "1.2.0-beta.3",+ "@modelcontextprotocol/sdk": "^1.0.0",+ "better-sqlite3": "^11.0.0",+ "get-windows": "^9.2.3",+ "ink": "^5.1.0",+ "ink-spinner": "^5.0.0",+ "ink-text-input": "^6.0.0",+ "playwright": "^1.58.1",+ "react": "^18.3.1",+ "sharp": "^0.34.5",+ "tsx": "^4.19.0",+ "ws": "^8.19.0",+ "zod": "^3.24.0"+ },+ "devDependencies": {+ "@types/better-sqlite3": "^7.6.0",+ "@types/node": "^22.0.0",+ "@types/react": "^18.3.0",+ "@types/ws": "^8.18.1",+ "typescript": "^5.7.0"+ }+}diff --git a/libs/cuabot/pnpm-lock.yaml b/libs/cuabot/pnpm-lock.yamlnew file mode 100644index 0000000000..7c73c1dc2c--- /dev/null+++ b/libs/cuabot/pnpm-lock.yaml@@ -0,0 +1,3308 @@+lockfileVersion: '9.0'++settings:+ autoInstallPeers: true+ excludeLinksFromLockfile: false++importers:++ .:+ dependencies:+ '@anthropic-ai/claude-agent-sdk':+ specifier: ^0.1.0+ version: 0.1.77([email protected])+ '@lydell/node-pty':+ specifier: 1.2.0-beta.3+ version: 1.2.0-beta.3+ '@modelcontextprotocol/sdk':+ specifier: ^1.0.0+ version: 1.25.3([email protected])([email protected])+ better-sqlite3:+ specifier: ^11.0.0+ version: 11.10.0+ get-windows:+ specifier: ^9.2.3+ version: 9.2.3([email protected])+ ink:+ specifier: ^5.1.0+ version: 5.2.1(@types/[email protected])([email protected])+ ink-spinner:+ specifier: ^5.0.0+ ink-text-input:+ specifier: ^6.0.0+ playwright:+ specifier: ^1.58.1+ version: 1.58.1+ react:+ specifier: ^18.3.1+ version: 18.3.1+ sharp:+ specifier: ^0.34.5+ version: 0.34.5+ tsx:+ specifier: ^4.19.0+ version: 4.21.0+ ws:+ specifier: ^8.19.0+ version: 8.19.0+ zod:+ specifier: ^3.24.0+ version: 3.25.76+ devDependencies:+ '@types/better-sqlite3':+ specifier: ^7.6.0+ version: 7.6.13+ '@types/node':+ specifier: ^22.0.0+ version: 22.19.7+ '@types/react':+ specifier: ^18.3.0+ version: 18.3.27+ '@types/ws':+ specifier: ^8.18.1+ version: 8.18.1+ typescript:+ specifier: ^5.7.0+ version: 5.9.3++packages:++ '@alcalzone/[email protected]':+ resolution: {integrity: sha512-3yWxPTq3UQ/FY9p1ErPxIyfT64elWaMvM9lIHnaqpyft63tkxodF5aUElYHrdisWve5cETkh1+KBw1yJuW0aRw==}+ engines: {node: '>=14.13.1'}++ '@anthropic-ai/[email protected]':+ resolution: {integrity: sha512-ZEjWQtkoB2MEY6K16DWMmF+8OhywAynH0m08V265cerbZ8xPD/2Ng2jPzbbO40mPeFSsMDJboShL+a3aObP0Jg==}+ engines: {node: '>=18.0.0'}+ peerDependencies:+ zod: ^3.25.0 || ^4.0.0++ '@emnapi/[email protected]':+ resolution: {integrity: sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==}++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==}+ engines: {node: '>=18'}+ cpu: [ppc64]+ os: [aix]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [android]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==}+ engines: {node: '>=18'}+ cpu: [arm]+ os: [android]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [android]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [darwin]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [darwin]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [freebsd]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [freebsd]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==}+ engines: {node: '>=18'}+ cpu: [arm]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==}+ engines: {node: '>=18'}+ cpu: [ia32]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==}+ engines: {node: '>=18'}+ cpu: [loong64]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==}+ engines: {node: '>=18'}+ cpu: [mips64el]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==}+ engines: {node: '>=18'}+ cpu: [ppc64]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==}+ engines: {node: '>=18'}+ cpu: [riscv64]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==}+ engines: {node: '>=18'}+ cpu: [s390x]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [linux]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [netbsd]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [netbsd]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [openbsd]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [openbsd]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [openharmony]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [sunos]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [win32]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==}+ engines: {node: '>=18'}+ cpu: [ia32]+ os: [win32]++ '@esbuild/[email protected]':+ resolution: {integrity: sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [win32]++ '@hono/[email protected]':+ resolution: {integrity: sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw==}+ engines: {node: '>=18.14.1'}+ peerDependencies:+ hono: ^4++ '@img/[email protected]':+ resolution: {integrity: sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==}+ engines: {node: '>=18'}++ '@img/[email protected]':+ resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [arm64]+ os: [darwin]++ '@img/[email protected]':+ resolution: {integrity: sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [arm64]+ os: [darwin]++ '@img/[email protected]':+ resolution: {integrity: sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [x64]+ os: [darwin]++ '@img/[email protected]':+ resolution: {integrity: sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [x64]+ os: [darwin]++ '@img/[email protected]':+ resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==}+ cpu: [arm64]+ os: [darwin]++ '@img/[email protected]':+ resolution: {integrity: sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==}+ cpu: [arm64]+ os: [darwin]++ '@img/[email protected]':+ resolution: {integrity: sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==}+ cpu: [x64]+ os: [darwin]++ '@img/[email protected]':+ resolution: {integrity: sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==}+ cpu: [x64]+ os: [darwin]++ '@img/[email protected]':+ resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==}+ cpu: [arm64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==}+ cpu: [arm64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==}+ cpu: [arm]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==}+ cpu: [arm]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==}+ cpu: [ppc64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==}+ cpu: [riscv64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==}+ cpu: [s390x]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==}+ cpu: [x64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==}+ cpu: [x64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==}+ cpu: [arm64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==}+ cpu: [arm64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==}+ cpu: [x64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==}+ cpu: [x64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [arm64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [arm64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [arm]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [arm]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [ppc64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [riscv64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [s390x]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [x64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [x64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [arm64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [arm64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [x64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [x64]+ os: [linux]++ '@img/[email protected]':+ resolution: {integrity: sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [wasm32]++ '@img/[email protected]':+ resolution: {integrity: sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [arm64]+ os: [win32]++ '@img/[email protected]':+ resolution: {integrity: sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [ia32]+ os: [win32]++ '@img/[email protected]':+ resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [x64]+ os: [win32]++ '@img/[email protected]':+ resolution: {integrity: sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}+ cpu: [x64]+ os: [win32]++ '@isaacs/[email protected]':+ resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}+ engines: {node: '>=12'}++ '@lydell/[email protected]':+ resolution: {integrity: sha512-owcv+e1/OSu3bf9ZBdUQqJsQF888KyuSIiPYFNn0fLhgkhm9F3Pvha76Kj5mCPnodf7hh3suDe7upw7GPRXftQ==}+ cpu: [arm64]+ os: [darwin]++ '@lydell/[email protected]':+ resolution: {integrity: sha512-k38O+UviWrWdxtqZBBc/D8NJU11Rey8Y2YMwSWNxLv3eXZZdF5IVpbBkI/2RmLsV5nCcciqLPbukxeZnEfPlwA==}+ cpu: [x64]+ os: [darwin]++ '@lydell/[email protected]':+ resolution: {integrity: sha512-HUwRpGu3O+4sv9DAQFKnyW5LYhyYu2SDUa/bdFO/t4dIFCM4uDJEq47wfRM7+aYtJTi1b3lakN8SlWeuFQqJQQ==}+ cpu: [arm64]+ os: [linux]++ '@lydell/[email protected]':+ resolution: {integrity: sha512-+RRY0PoCUeQaCvPR7/UnkGbxulwbFtoTWJfe+o4T1RcNtngrgaI55I9nl8CD8uqhGrB3smKuyvPM5UtwGhASUw==}+ cpu: [x64]+ os: [linux]++ '@lydell/[email protected]':+ resolution: {integrity: sha512-UEDd9ASp2M3iIYpIzfmfBlpyn4+K1G4CAjYcHWStptCkefoSVXWTiUBIa1KjBjZi3/xmsHIDpBEYTkGWuvLt2Q==}+ cpu: [arm64]+ os: [win32]++ '@lydell/[email protected]':+ resolution: {integrity: sha512-TpdqSFYx7/Rj+68tuP6F/lkRYrHCYAIJgaS1bx3SctTkb5QAQCFwOKHd4xlsivmEOMT2LdhkJggPxwX9PAO5pQ==}+ cpu: [x64]+ os: [win32]++ '@lydell/[email protected]':+ resolution: {integrity: sha512-ngGAItlRhmJXrhspxt8kX13n1dVFqzETOq0m/+gqSkO8NJBvNMwP7FZckMwps2UFySdr4yxCXNGu/bumg5at6A==}++ '@mapbox/[email protected]':+ resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==}+ hasBin: true++ '@modelcontextprotocol/[email protected]':+ resolution: {integrity: sha512-vsAMBMERybvYgKbg/l4L1rhS7VXV1c0CtyJg72vwxONVX0l4ZfKVAnZEWTQixJGTzKnELjQ59e4NbdFDALRiAQ==}+ engines: {node: '>=18'}+ peerDependencies:+ '@cfworker/json-schema': ^4.1.1+ zod: ^3.25 || ^4.0+ peerDependenciesMeta:+ '@cfworker/json-schema':+ optional: true++ '@npmcli/[email protected]':+ resolution: {integrity: sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==}+ engines: {node: ^16.14.0 || >=18.0.0}++ '@npmcli/[email protected]':+ resolution: {integrity: sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==}+ engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}++ '@pkgjs/[email protected]':+ resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}+ engines: {node: '>=14'}++ '@types/[email protected]':+ resolution: {integrity: sha512-NMv9ASNARoKksWtsq/SHakpYAYnhBrQgGD8zkLYk/jaK8jUGn08CfEdTRgYhMypUQAfzSP8W6gNLe0q19/t4VA==}++ '@types/[email protected]':+ resolution: {integrity: sha512-MciR4AKGHWl7xwxkBa6xUGxQJ4VBOmPTF7sL+iGzuahOFaO0jHCsuEfS80pan1ef4gWId1oWOweIhrDEYLuaOw==}++ '@types/[email protected]':+ resolution: {integrity: sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==}++ '@types/[email protected]':+ resolution: {integrity: sha512-cisd7gxkzjBKU2GgdYrTdtQx1SORymWyaAFhaxQPK9bYO9ot3Y5OikQRvY0VYQtvwjeQnizCINJAenh/V7MK2w==}++ '@types/[email protected]':+ resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==}++ resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==}++ resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==}+ engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}++ resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==}+ engines: {node: '>= 0.6'}++ resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}+ engines: {node: '>= 6.0.0'}++ resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==}+ engines: {node: '>= 14'}++ resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==}+ peerDependencies:+ ajv: ^8.0.0+ peerDependenciesMeta:+ ajv:+ optional: true++ resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==}++ resolution: {integrity: sha512-g6LhBsl+GBPRWGWsBtutpzBYuIIdBkLEvad5C/va/74Db018+5TZiyA26cZJAr3Rft5lprVqOIPxf5Vid6tqAw==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew==}++ resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==}+ engines: {node: '>=10'}+ deprecated: This package is no longer supported.++ resolution: {integrity: sha512-ooviqdwwgfIfNmDwo94wlshcdzfO64XV0Cg6oDsDYBJfITDz1EngD2z7DkbvCWn+XIMsIqW27sEVF6qcpJrRcg==}+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}++ resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}++ resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}++ resolution: {integrity: sha512-EwhOpyXiOEL/lKzHz9AW1msWFNzGc/z+LzeB3/jnFJpxu+th2yqvzsSWas1v9jgs9+xiXJcD5A8CJxAG2TaghQ==}++ resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==}++ resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==}++ resolution: {integrity: sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==}++ resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==}++ resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==}++ resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==}+ engines: {node: '>= 0.8'}++ resolution: {integrity: sha512-B+L5iIa9mgcjLbliir2th36yEwPftrzteHYujzsx3dFP/31GCHcIeS8f5MGd80odLOjaOvSpU3EEAmRQptkxLQ==}+ engines: {node: ^16.14.0 || >=18.0.0}++ resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==}+ engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}++ resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==}++ resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==}+ engines: {node: '>=6'}++ resolution: {integrity: sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==}+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}++ resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==}+ engines: {node: '>=6'}++ resolution: {integrity: sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==}+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}++ resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}+ engines: {node: '>=7.0.0'}++ resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}++ resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==}+ hasBin: true++ resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}++ resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==}++ resolution: {integrity: sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==}+ engines: {node: '>= 0.6'}++ resolution: {integrity: sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==}+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}++ resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==}+ engines: {node: '>=6.6.0'}++ resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==}+ engines: {node: '>= 0.6'}++ resolution: {integrity: sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==}+ engines: {node: '>= 0.10'}++ resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==}+ engines: {node: '>= 8'}++ resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==}++ resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==}+ engines: {node: '>=6.0'}+ peerDependencies:+ supports-color: '*'+ peerDependenciesMeta:+ supports-color:+ optional: true++ resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==}+ engines: {node: '>=4.0.0'}++ resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==}++ resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==}+ engines: {node: '>= 0.8'}++ resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}++ resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}++ resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==}++ resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}++ resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}++ resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==}+ engines: {node: '>= 0.8'}++ resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==}++ resolution: {integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==}++ resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==}+ engines: {node: '>=6'}++ resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==}++ resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-6penXeZalaV88MM3cGkFZZfOoLGWshWWfdy0tWw/RlVVyhvMaWSBTOvXNeiW3e5FwdS5ePW0LGEu17zT139ktg==}++ resolution: {integrity: sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==}+ engines: {node: '>=18'}+ hasBin: true++ resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==}++ resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==}+ engines: {node: '>= 0.6'}++ resolution: {integrity: sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==}+ engines: {node: '>=18.0.0'}++ resolution: {integrity: sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==}+ engines: {node: '>=18.0.0'}++ resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==}+ engines: {node: '>=6'}++ resolution: {integrity: sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==}++ resolution: {integrity: sha512-7iN8iPMDzOMHPUYllBEsQdWVB6fPDMPqwjBaFrgr4Jgr/+okjvzAy+UHlYYL/Vs0OsOrMkwS6PJDkFlJwoxUnw==}+ engines: {node: '>= 16'}+ peerDependencies:+ express: '>= 4.11'++ resolution: {integrity: sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==}+ engines: {node: '>= 18'}++ resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}++ resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==}++ resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==}++ resolution: {integrity: sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==}+ engines: {node: '>= 18.0.0'}++ resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==}+ engines: {node: '>=14'}++ resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==}+ engines: {node: '>= 0.6'}++ resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==}+ engines: {node: '>= 0.8'}++ resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==}++ resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==}+ engines: {node: '>= 8'}++ resolution: {integrity: sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==}+ engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}++ resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}++ resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}+ engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}+ os: [darwin]++ resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}+ engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}+ os: [darwin]++ resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}++ resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==}+ engines: {node: '>=10'}+ deprecated: This package is no longer supported.++ resolution: {integrity: sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-EoY1N2xCn44xU6750Sx7OjOIT59FkmstNc3X6y5xpz7D5cBtZRe/3pSlTkDJgqsOk3WwZPkWfonhhUJfttQo3w==}++ resolution: {integrity: sha512-rTO5ms7Qb5upkNI0UM49W6O1PAcosGlEMitOE2JGeo8yDgBy38xWhxg5GrpV/A+i1p71JogyIM/CZg5RZO0Wjw==}+ engines: {node: '>=18.18'}++ resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==}++ resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==}+ deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]+ hasBin: true++ resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}+ deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]++ resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}++ resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==}++ resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-l7qMiNee7t82bH3SeyUCt9UF15EVmaBvsppY2zQtrbIhl/yzBTny+YUxsVjSjQ6gaqaeVtZmGocom8TzBlA4Yw==}+ engines: {node: '>=16.9.0'}++ resolution: {integrity: sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==}++ resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==}+ engines: {node: '>= 0.8'}++ resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==}+ engines: {node: '>= 14'}++ resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==}+ engines: {node: '>= 6'}++ resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==}+ engines: {node: '>= 14'}++ resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}++ resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==}+ engines: {node: '>=0.8.19'}++ resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}+ deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.++ resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}++ resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==}++ resolution: {integrity: sha512-EYEasbEjkqLGyPOUc8hBJZNuC5GvXGMLu0w5gdTNskPc7Izc5vO3tdQEYnzvshucyGCBXc86ig0ujXPMWaQCdA==}+ engines: {node: '>=14.16'}+ peerDependencies:+ ink: '>=4.0.0'+ react: '>=18.0.0'++ resolution: {integrity: sha512-Fw64n7Yha5deb1rHY137zHTAbSTNelUKuB5Kkk2HACXEtwIHBCf9OH2tP/LQ9fRYTl1F0dZgbW0zPnZk6FA9Lw==}+ engines: {node: '>=18'}+ peerDependencies:+ ink: '>=5'+ react: '>=18'++ resolution: {integrity: sha512-BqcUyWrG9zq5HIwW6JcfFHsIYebJkWWb4fczNah1goUO0vv5vneIlfwuS85twyJ5hYR/y18FlAYUxrO9ChIWVg==}+ engines: {node: '>=18'}+ peerDependencies:+ '@types/react': '>=18.0.0'+ react: '>=18.0.0'+ react-devtools-core: ^4.19.1+ peerDependenciesMeta:+ '@types/react':+ optional: true+ react-devtools-core:+ optional: true++ resolution: {integrity: sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==}+ engines: {node: '>= 12'}++ resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==}+ engines: {node: '>= 0.10'}++ resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-eUuAjybVTHMYWm/U+vBO1sY/JOCgoPCXRxzdju0K+K0BiGW0SChEL1MLC0PoCIR1OlPo5YAp8HuQoUlsWEICwg==}+ engines: {node: '>=18'}+ hasBin: true++ resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==}++ resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==}++ resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}++ resolution: {integrity: sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==}+ engines: {node: '>=16'}++ resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==}++ resolution: {integrity: sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ==}++ resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}++ resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==}++ resolution: {integrity: sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==}++ resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}+ hasBin: true++ resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}++ resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==}+ engines: {node: ^16.14.0 || >=18.0.0}++ resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==}+ engines: {node: '>= 0.8'}++ resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==}+ engines: {node: '>= 0.6'}++ resolution: {integrity: sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==}+ engines: {node: '>=6'}++ resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}++ resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}+ engines: {node: '>=16 || 14 >=14.17'}++ resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}++ resolution: {integrity: sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==}+ engines: {node: '>=16 || 14 >=14.17'}++ resolution: {integrity: sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==}+ engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}++ resolution: {integrity: sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==}+ engines: {node: '>= 8'}++ resolution: {integrity: sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==}+ engines: {node: '>=16 || 14 >=14.17'}++ resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==}+ engines: {node: '>= 8'}++ resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==}++ resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==}+ engines: {node: '>=10'}+ hasBin: true++ resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}++ resolution: {integrity: sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==}++ resolution: {integrity: sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==}+ engines: {node: '>= 0.6'}++ resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==}+ engines: {node: '>= 0.6'}++ resolution: {integrity: sha512-+CGM1L1CgmtheLcBuleyYOn7NWPVu0s0EJH2C4puxgEZb9h8QpR9G2dBfZJOAUhi7VQxuBPMd0hiISWcTyiYyQ==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-/bRZty2mXUIFY/xU5HLvveNHlswNJej+RnxBjOMkidWfwZzgTbPG1E3K5TOxRLOR+5hX7bSofy8yf1hZevMS8A==}+ engines: {node: ^18 || ^20 || >= 21}++ resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==}+ engines: {node: 4.x || >=6.0.0}+ peerDependencies:+ encoding: ^0.1.0+ peerDependenciesMeta:+ encoding:+ optional: true++ resolution: {integrity: sha512-Pp3nFHBThHzVtNY7U6JfPjvT/DTE8+o/4xKsLQtBoU+j2HLsGlhcfzflAoUreaJbNmYnX+LlLi0qjV8kpyO6xQ==}+ engines: {node: ^16.14.0 || >=18.0.0}+ hasBin: true++ resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==}+ engines: {node: '>=6'}+ hasBin: true++ resolution: {integrity: sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==}+ engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}+ hasBin: true++ resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==}+ deprecated: This package is no longer supported.++ resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==}+ engines: {node: '>= 0.8'}++ resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}++ resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==}+ engines: {node: '>=6'}++ resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==}++ resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==}+ engines: {node: '>= 0.8'}++ resolution: {integrity: sha512-0YNdUceMdaQwoKce1gatDScmMo5pu/tfABfnzEqeG0gtTmd7mh/WcwgUjtAeOU7N8nFFlbQBnFK2gXW5fGvmMA==}+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}++ resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}+ engines: {node: '>=16 || 14 >=14.18'}++ resolution: {integrity: sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==}++ resolution: {integrity: sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==}+ engines: {node: '>=16.20.0'}++ resolution: {integrity: sha512-bcWzOaTxcW+VOOGBCQgnaKToLJ65d6AqfLVKEWvexyS3AS6rbXl+xdpYRMGSRBClPvyj44njOWoxjNdL/H9UNg==}+ engines: {node: '>=18'}+ hasBin: true++ resolution: {integrity: sha512-+2uTZHxSCcxjvGc5C891LrS1/NlxglGxzrC4seZiVjcYVQfUa87wBL6rTDqzGjuoWNjnBzRqKmF6zRYGMvQUaQ==}+ engines: {node: '>=18'}+ hasBin: true++ resolution: {integrity: sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==}+ engines: {node: '>=10'}+ hasBin: true++ resolution: {integrity: sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==}+ engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}++ resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==}+ engines: {node: '>= 0.10'}++ resolution: {integrity: sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==}++ resolution: {integrity: sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==}+ engines: {node: '>=0.6'}++ resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==}+ engines: {node: '>= 0.6'}++ resolution: {integrity: sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==}+ engines: {node: '>= 0.10'}++ resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==}+ hasBin: true++ resolution: {integrity: sha512-zZQqIiYgDCTP/f1N/mAR10nJGrPD2ZR+jDSEsKWJHYC7Cm2wodlwbR3upZRdC3cjIjSlTLNVyO7Iu0Yy7t2AYg==}+ engines: {node: '>=0.10.0'}+ peerDependencies:+ react: ^18.3.1++ resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==}+ engines: {node: '>= 6'}++ resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}++ resolution: {integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==}+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}++ resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==}+ engines: {node: '>= 4'}++ resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}+ deprecated: Rimraf versions prior to v4 are no longer supported+ hasBin: true++ resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==}+ engines: {node: '>= 18'}++ resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}++ resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}++ resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==}++ resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==}+ hasBin: true++ resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==}+ engines: {node: '>=10'}+ hasBin: true++ resolution: {integrity: sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==}+ engines: {node: '>= 18'}++ resolution: {integrity: sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==}+ engines: {node: '>= 18'}++ resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==}++ resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==}++ resolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==}+ engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}++ resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}++ resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}+ engines: {node: '>=14'}++ resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==}++ resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==}++ resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==}+ engines: {node: '>= 6.0.0', npm: '>= 3.0.0'}++ resolution: {integrity: sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==}+ engines: {node: '>= 14'}++ resolution: {integrity: sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==}+ engines: {node: '>= 10.0.0', npm: '>= 3.0.0'}++ resolution: {integrity: sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==}+ engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}++ resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==}+ engines: {node: '>= 0.8'}++ resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}++ resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==}++ resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==}+ engines: {node: '>=6'}++ resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==}+ engines: {node: '>=10'}+ deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]++ resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==}+ engines: {node: '>=0.6'}++ resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}++ resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}++ resolution: {integrity: sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==}+ engines: {node: '>=18.0.0'}+ hasBin: true++ resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==}++ resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==}+ engines: {node: '>=16'}++ resolution: {integrity: sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==}+ engines: {node: '>= 0.6'}++ resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}+ engines: {node: '>=14.17'}+ hasBin: true++ resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}++ resolution: {integrity: sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==}+ engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}++ resolution: {integrity: sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==}+ engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}++ resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==}+ engines: {node: '>= 0.8'}++ resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}++ resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}+ engines: {node: '>= 0.8'}++ resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}++ resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}++ resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}+ engines: {node: '>= 8'}+ hasBin: true++ resolution: {integrity: sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==}+ engines: {node: ^16.13.0 || >=18.0.0}+ hasBin: true++ resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==}++ resolution: {integrity: sha512-c9bZp7b5YtRj2wOe6dlj32MK+Bx/M/d+9VB2SHM1OtsUHR0aV0tdP6DWh/iMt0kWi1t5g1Iudu6hQRNd1A4PVA==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}++ resolution: {integrity: sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==}+ engines: {node: '>=10.0.0'}+ peerDependencies:+ bufferutil: ^4.0.1+ utf-8-validate: '>=5.0.2'+ peerDependenciesMeta:+ bufferutil:+ optional: true+ utf-8-validate:+ optional: true++ resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}++ resolution: {integrity: sha512-0LPOt3AxKqMdFBZA3HBAt/t/8vIKq7VaQYbuA8WxCgung+p9TVyKRYdpvCb80HcdTN2NkbIKbhNwKUfm3tQywQ==}++ resolution: {integrity: sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==}+ peerDependencies:+ zod: ^3.25 || ^4++ resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==}++snapshots:++ '@alcalzone/[email protected]':+ dependencies:+ ansi-styles: 6.2.3+ is-fullwidth-code-point: 4.0.0++ '@anthropic-ai/[email protected]([email protected])':+ dependencies:+ zod: 3.25.76+ optionalDependencies:+ '@img/sharp-darwin-arm64': 0.33.5+ '@img/sharp-darwin-x64': 0.33.5+ '@img/sharp-linux-arm': 0.33.5+ '@img/sharp-linux-arm64': 0.33.5+ '@img/sharp-linux-x64': 0.33.5+ '@img/sharp-linuxmusl-arm64': 0.33.5+ '@img/sharp-linuxmusl-x64': 0.33.5+ '@img/sharp-win32-x64': 0.33.5++ '@emnapi/[email protected]':+ dependencies:+ tslib: 2.8.1+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@esbuild/[email protected]':+ optional: true++ '@hono/[email protected]([email protected])':+ dependencies:+ hono: 4.11.7++ '@img/[email protected]': {}++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-darwin-arm64': 1.0.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-darwin-arm64': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-darwin-x64': 1.0.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-darwin-x64': 1.2.4+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linux-arm64': 1.0.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linux-arm64': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linux-arm': 1.0.5+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linux-arm': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linux-ppc64': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linux-riscv64': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linux-s390x': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linux-x64': 1.0.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linux-x64': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linuxmusl-arm64': 1.0.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linuxmusl-arm64': 1.2.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linuxmusl-x64': 1.0.4+ optional: true++ '@img/[email protected]':+ optionalDependencies:+ '@img/sharp-libvips-linuxmusl-x64': 1.2.4+ optional: true++ '@img/[email protected]':+ dependencies:+ '@emnapi/runtime': 1.8.1+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@img/[email protected]':+ optional: true++ '@isaacs/[email protected]':+ dependencies:+ string-width: 5.1.2+ string-width-cjs: [email protected]+ strip-ansi: 7.1.2+ strip-ansi-cjs: [email protected]+ wrap-ansi: 8.1.0+ wrap-ansi-cjs: [email protected]+ optional: true++ '@lydell/[email protected]':+ optional: true++ '@lydell/[email protected]':+ optional: true++ '@lydell/[email protected]':+ optional: true++ '@lydell/[email protected]':+ optional: true++ '@lydell/[email protected]':+ optional: true++ '@lydell/[email protected]':+ optional: true++ '@lydell/[email protected]':+ optionalDependencies:+ '@lydell/node-pty-darwin-arm64': 1.2.0-beta.3+ '@lydell/node-pty-darwin-x64': 1.2.0-beta.3+ '@lydell/node-pty-linux-arm64': 1.2.0-beta.3+ '@lydell/node-pty-linux-x64': 1.2.0-beta.3+ '@lydell/node-pty-win32-arm64': 1.2.0-beta.3+ '@lydell/node-pty-win32-x64': 1.2.0-beta.3++ '@mapbox/[email protected]([email protected])':+ dependencies:+ detect-libc: 2.1.2+ https-proxy-agent: 5.0.1+ make-dir: 3.1.0+ node-fetch: 2.7.0([email protected])+ nopt: 5.0.0+ npmlog: 5.0.1+ rimraf: 3.0.2+ semver: 7.7.3+ tar: 6.2.1+ transitivePeerDependencies:+ - encoding+ - supports-color+ optional: true++ dependencies:+ '@hono/node-server': 1.19.9([email protected])+ ajv: 8.17.1+ ajv-formats: 3.0.1([email protected])+ content-type: 1.0.5+ cors: 2.8.6+ cross-spawn: 7.0.6+ eventsource: 3.0.7+ eventsource-parser: 3.0.6+ express: 5.2.1+ express-rate-limit: 7.5.1([email protected])+ jose: 6.1.3+ json-schema-typed: 8.0.2+ pkce-challenge: 5.0.1+ raw-body: 3.0.2+ zod: 3.25.76+ zod-to-json-schema: 3.25.1([email protected])+ transitivePeerDependencies:+ - hono+ - supports-color++ '@npmcli/[email protected]':+ dependencies:+ agent-base: 7.1.4+ http-proxy-agent: 7.0.2+ https-proxy-agent: 7.0.6+ lru-cache: 10.4.3+ socks-proxy-agent: 8.0.5+ transitivePeerDependencies:+ - supports-color+ optional: true++ '@npmcli/[email protected]':+ dependencies:+ semver: 7.7.3+ optional: true++ '@pkgjs/[email protected]':+ optional: true++ '@types/[email protected]':+ dependencies:+ '@types/node': 22.19.7++ '@types/[email protected]':+ dependencies:+ undici-types: 6.21.0++ '@types/[email protected]': {}++ '@types/[email protected]':+ dependencies:+ '@types/prop-types': 15.7.15+ csstype: 3.2.3++ '@types/[email protected]':+ dependencies:+ '@types/node': 22.19.7++ optional: true++ optional: true++ dependencies:+ mime-types: 3.0.2+ negotiator: 1.0.0++ dependencies:+ debug: 4.4.3+ transitivePeerDependencies:+ - supports-color+ optional: true++ optional: true++ dependencies:+ clean-stack: 2.2.0+ indent-string: 4.0.0+ optional: true++ optionalDependencies:+ ajv: 8.17.1++ dependencies:+ fast-deep-equal: 3.1.3+ fast-uri: 3.1.0+ json-schema-traverse: 1.0.0+ require-from-string: 2.0.2++ dependencies:+ environment: 1.1.0++ optional: true++ [email protected]: {}++ dependencies:+ color-convert: 2.0.1+ optional: true++ [email protected]: {}++ optional: true++ dependencies:+ delegates: 1.0.0+ readable-stream: 3.6.2+ optional: true++ [email protected]: {}++ optional: true++ [email protected]: {}++ dependencies:+ bindings: 1.5.0+ prebuild-install: 7.1.3++ dependencies:+ file-uri-to-path: 1.0.0++ dependencies:+ buffer: 5.7.1+ inherits: 2.0.4+ readable-stream: 3.6.2++ dependencies:+ bytes: 3.1.2+ content-type: 1.0.5+ debug: 4.4.3+ http-errors: 2.0.1+ iconv-lite: 0.7.2+ on-finished: 2.4.1+ qs: 6.14.1+ raw-body: 3.0.2+ type-is: 2.0.1+ transitivePeerDependencies:+ - supports-color++ dependencies:+ balanced-match: 1.0.2+ concat-map: 0.0.1+ optional: true++ dependencies:+ balanced-match: 1.0.2+ optional: true++ dependencies:+ base64-js: 1.5.1+ ieee754: 1.2.1++ [email protected]: {}++ dependencies:+ '@npmcli/fs': 3.1.1+ fs-minipass: 3.0.3+ glob: 10.5.0+ lru-cache: 10.4.3+ minipass: 7.1.2+ minipass-collect: 2.0.1+ minipass-flush: 1.0.5+ minipass-pipeline: 1.2.4+ p-map: 4.0.0+ ssri: 10.0.6+ tar: 6.2.1+ unique-filename: 3.0.0+ optional: true++ dependencies:+ es-errors: 1.3.0+ function-bind: 1.1.2++ dependencies:+ call-bind-apply-helpers: 1.0.2+ get-intrinsic: 1.3.0++ [email protected]: {}++ [email protected]: {}++ optional: true++ optional: true++ [email protected]: {}++ dependencies:+ restore-cursor: 4.0.0++ [email protected]: {}++ dependencies:+ slice-ansi: 5.0.0+ string-width: 7.2.0++ dependencies:+ convert-to-spaces: 2.0.1++ dependencies:+ color-name: 1.1.4+ optional: true++ optional: true++ optional: true++ optional: true++ optional: true++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ object-assign: 4.1.1+ vary: 1.1.2++ dependencies:+ path-key: 3.1.1+ shebang-command: 2.0.0+ which: 2.0.2++ [email protected]: {}++ dependencies:+ ms: 2.1.3++ dependencies:+ mimic-response: 3.1.0++ [email protected]: {}++ optional: true++ [email protected]: {}++ [email protected]: {}++ dependencies:+ call-bind-apply-helpers: 1.0.2+ es-errors: 1.3.0+ gopd: 1.2.0++ optional: true++ [email protected]: {}++ [email protected]: {}++ optional: true++ optional: true++ [email protected]: {}++ dependencies:+ iconv-lite: 0.6.3+ optional: true++ dependencies:+ once: 1.4.0++ optional: true++ [email protected]: {}++ optional: true++ [email protected]: {}++ [email protected]: {}++ dependencies:+ es-errors: 1.3.0++ [email protected]: {}++ optionalDependencies:+ '@esbuild/aix-ppc64': 0.27.2+ '@esbuild/android-arm': 0.27.2+ '@esbuild/android-arm64': 0.27.2+ '@esbuild/android-x64': 0.27.2+ '@esbuild/darwin-arm64': 0.27.2+ '@esbuild/darwin-x64': 0.27.2+ '@esbuild/freebsd-arm64': 0.27.2+ '@esbuild/freebsd-x64': 0.27.2+ '@esbuild/linux-arm': 0.27.2+ '@esbuild/linux-arm64': 0.27.2+ '@esbuild/linux-ia32': 0.27.2+ '@esbuild/linux-loong64': 0.27.2+ '@esbuild/linux-mips64el': 0.27.2+ '@esbuild/linux-ppc64': 0.27.2+ '@esbuild/linux-riscv64': 0.27.2+ '@esbuild/linux-s390x': 0.27.2+ '@esbuild/linux-x64': 0.27.2+ '@esbuild/netbsd-arm64': 0.27.2+ '@esbuild/netbsd-x64': 0.27.2+ '@esbuild/openbsd-arm64': 0.27.2+ '@esbuild/openbsd-x64': 0.27.2+ '@esbuild/openharmony-arm64': 0.27.2+ '@esbuild/sunos-x64': 0.27.2+ '@esbuild/win32-arm64': 0.27.2+ '@esbuild/win32-ia32': 0.27.2+ '@esbuild/win32-x64': 0.27.2++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ eventsource-parser: 3.0.6++ [email protected]: {}++ optional: true++ dependencies:+ express: 5.2.1++ dependencies:+ accepts: 2.0.0+ body-parser: 2.2.2+ content-disposition: 1.0.1+ content-type: 1.0.5+ cookie: 0.7.2+ cookie-signature: 1.2.2+ debug: 4.4.3+ depd: 2.0.0+ encodeurl: 2.0.0+ escape-html: 1.0.3+ etag: 1.8.1+ finalhandler: 2.1.1+ fresh: 2.0.0+ http-errors: 2.0.1+ merge-descriptors: 2.0.0+ mime-types: 3.0.2+ on-finished: 2.4.1+ once: 1.4.0+ parseurl: 1.3.3+ proxy-addr: 2.0.7+ qs: 6.14.1+ range-parser: 1.2.1+ router: 2.2.0+ send: 1.2.1+ serve-static: 2.2.1+ statuses: 2.0.2+ type-is: 2.0.1+ vary: 1.1.2+ transitivePeerDependencies:+ - supports-color++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ debug: 4.4.3+ encodeurl: 2.0.0+ escape-html: 1.0.3+ on-finished: 2.4.1+ parseurl: 1.3.3+ statuses: 2.0.2+ transitivePeerDependencies:+ - supports-color++ dependencies:+ cross-spawn: 7.0.6+ signal-exit: 4.1.0+ optional: true++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ minipass: 3.3.6+ optional: true++ dependencies:+ minipass: 7.1.2+ optional: true++ optional: true++ optional: true++ optional: true++ [email protected]: {}++ dependencies:+ aproba: 2.1.0+ color-support: 1.1.3+ console-control-strings: 1.1.0+ has-unicode: 2.0.1+ object-assign: 4.1.1+ signal-exit: 3.0.7+ string-width: 4.2.3+ strip-ansi: 6.0.1+ wide-align: 1.1.5+ optional: true++ [email protected]: {}++ dependencies:+ call-bind-apply-helpers: 1.0.2+ es-define-property: 1.0.1+ es-errors: 1.3.0+ es-object-atoms: 1.1.1+ function-bind: 1.1.2+ get-proto: 1.0.1+ gopd: 1.2.0+ has-symbols: 1.1.0+ hasown: 2.0.2+ math-intrinsics: 1.1.0++ dependencies:+ dunder-proto: 1.0.1+ es-object-atoms: 1.1.1++ dependencies:+ resolve-pkg-maps: 1.0.0++ optionalDependencies:+ '@mapbox/node-pre-gyp': 1.0.11([email protected])+ node-addon-api: 8.5.0+ node-gyp: 10.3.1+ transitivePeerDependencies:+ - encoding+ - supports-color++ [email protected]: {}++ dependencies:+ foreground-child: 3.3.1+ jackspeak: 3.4.3+ minimatch: 9.0.5+ minipass: 7.1.2+ package-json-from-dist: 1.0.1+ path-scurry: 1.11.1+ optional: true++ dependencies:+ fs.realpath: 1.0.0+ inflight: 1.0.6+ inherits: 2.0.4+ minimatch: 3.1.2+ once: 1.4.0+ path-is-absolute: 1.0.1+ optional: true++ [email protected]: {}++ optional: true++ [email protected]: {}++ optional: true++ dependencies:+ function-bind: 1.1.2++ [email protected]: {}++ optional: true++ dependencies:+ depd: 2.0.0+ inherits: 2.0.4+ setprototypeof: 1.2.0+ statuses: 2.0.2+ toidentifier: 1.0.1++ dependencies:+ agent-base: 7.1.4+ debug: 4.4.3+ transitivePeerDependencies:+ - supports-color+ optional: true++ dependencies:+ agent-base: 6.0.2+ debug: 4.4.3+ transitivePeerDependencies:+ - supports-color+ optional: true++ dependencies:+ agent-base: 7.1.4+ debug: 4.4.3+ transitivePeerDependencies:+ - supports-color+ optional: true++ dependencies:+ safer-buffer: 2.1.2+ optional: true++ dependencies:+ safer-buffer: 2.1.2++ [email protected]: {}++ optional: true++ optional: true++ [email protected]: {}++ dependencies:+ once: 1.4.0+ wrappy: 1.0.2+ optional: true++ [email protected]: {}++ [email protected]: {}++ [email protected]([email protected](@types/[email protected])([email protected]))([email protected]):+ dependencies:+ cli-spinners: 2.9.2+ ink: 5.2.1(@types/[email protected])([email protected])+ react: 18.3.1++ [email protected]([email protected](@types/[email protected])([email protected]))([email protected]):+ dependencies:+ chalk: 5.6.2+ ink: 5.2.1(@types/[email protected])([email protected])+ react: 18.3.1+ type-fest: 4.41.0++ dependencies:+ '@alcalzone/ansi-tokenize': 0.1.3+ ansi-escapes: 7.2.0+ ansi-styles: 6.2.3+ auto-bind: 5.0.1+ chalk: 5.6.2+ cli-boxes: 3.0.0+ cli-cursor: 4.0.0+ cli-truncate: 4.0.0+ code-excerpt: 4.0.0+ es-toolkit: 1.44.0+ indent-string: 5.0.0+ is-in-ci: 1.0.0+ patch-console: 2.0.0+ react: 18.3.1+ react-reconciler: 0.29.2([email protected])+ scheduler: 0.23.2+ signal-exit: 3.0.7+ slice-ansi: 7.1.2+ stack-utils: 2.0.6+ string-width: 7.2.0+ type-fest: 4.41.0+ widest-line: 5.0.0+ wrap-ansi: 9.0.2+ ws: 8.19.0+ yoga-layout: 3.2.1+ optionalDependencies:+ '@types/react': 18.3.27+ transitivePeerDependencies:+ - bufferutil+ - utf-8-validate++ optional: true++ [email protected]: {}++ optional: true++ [email protected]: {}++ dependencies:+ get-east-asian-width: 1.4.0++ [email protected]: {}++ optional: true++ [email protected]: {}++ [email protected]: {}++ optional: true++ dependencies:+ '@isaacs/cliui': 8.0.2+ optionalDependencies:+ '@pkgjs/parseargs': 0.11.0+ optional: true++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ js-tokens: 4.0.0++ optional: true++ dependencies:+ semver: 6.3.1+ optional: true++ dependencies:+ '@npmcli/agent': 2.2.2+ cacache: 18.0.4+ http-cache-semantics: 4.2.0+ is-lambda: 1.0.1+ minipass: 7.1.2+ minipass-fetch: 3.0.5+ minipass-flush: 1.0.5+ minipass-pipeline: 1.2.4+ negotiator: 0.6.4+ proc-log: 4.2.0+ promise-retry: 2.0.1+ ssri: 10.0.6+ transitivePeerDependencies:+ - supports-color+ optional: true++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ mime-db: 1.54.0++ [email protected]: {}++ [email protected]: {}++ dependencies:+ brace-expansion: 1.1.12+ optional: true++ dependencies:+ brace-expansion: 2.0.2+ optional: true++ [email protected]: {}++ dependencies:+ minipass: 7.1.2+ optional: true++ dependencies:+ minipass: 7.1.2+ minipass-sized: 1.0.3+ minizlib: 2.1.2+ optionalDependencies:+ encoding: 0.1.13+ optional: true++ dependencies:+ minipass: 3.3.6+ optional: true++ dependencies:+ minipass: 3.3.6+ optional: true++ dependencies:+ minipass: 3.3.6+ optional: true++ dependencies:+ yallist: 4.0.0+ optional: true++ optional: true++ optional: true++ dependencies:+ minipass: 3.3.6+ yallist: 4.0.0+ optional: true++ [email protected]: {}++ optional: true++ [email protected]: {}++ [email protected]: {}++ optional: true++ [email protected]: {}++ dependencies:+ semver: 7.7.3++ optional: true++ dependencies:+ whatwg-url: 5.0.0+ optionalDependencies:+ encoding: 0.1.13+ optional: true++ dependencies:+ env-paths: 2.2.1+ exponential-backoff: 3.1.3+ glob: 10.5.0+ graceful-fs: 4.2.11+ make-fetch-happen: 13.0.1+ nopt: 7.2.1+ proc-log: 4.2.0+ semver: 7.7.3+ tar: 6.2.1+ which: 4.0.0+ transitivePeerDependencies:+ - supports-color+ optional: true++ dependencies:+ abbrev: 1.1.1+ optional: true++ dependencies:+ abbrev: 2.0.0+ optional: true++ dependencies:+ are-we-there-yet: 2.0.0+ console-control-strings: 1.1.0+ gauge: 3.0.2+ set-blocking: 2.0.0+ optional: true++ [email protected]: {}++ [email protected]: {}++ dependencies:+ ee-first: 1.1.1++ dependencies:+ wrappy: 1.0.2++ dependencies:+ mimic-fn: 2.1.0++ dependencies:+ aggregate-error: 3.1.0+ optional: true++ optional: true++ [email protected]: {}++ [email protected]: {}++ optional: true++ [email protected]: {}++ dependencies:+ lru-cache: 10.4.3+ minipass: 7.1.2+ optional: true++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ playwright-core: 1.58.1+ optionalDependencies:+ fsevents: 2.3.2++ dependencies:+ detect-libc: 2.1.2+ expand-template: 2.0.3+ github-from-package: 0.0.0+ minimist: 1.2.8+ mkdirp-classic: 0.5.3+ napi-build-utils: 2.0.0+ node-abi: 3.87.0+ pump: 3.0.3+ rc: 1.2.8+ simple-get: 4.0.1+ tar-fs: 2.1.4+ tunnel-agent: 0.6.0++ optional: true++ dependencies:+ err-code: 2.0.3+ retry: 0.12.0+ optional: true++ dependencies:+ forwarded: 0.2.0+ ipaddr.js: 1.9.1++ dependencies:+ end-of-stream: 1.4.5+ once: 1.4.0++ dependencies:+ side-channel: 1.1.0++ [email protected]: {}++ dependencies:+ bytes: 3.1.2+ http-errors: 2.0.1+ iconv-lite: 0.7.2+ unpipe: 1.0.0++ dependencies:+ deep-extend: 0.6.0+ ini: 1.3.8+ minimist: 1.2.8+ strip-json-comments: 2.0.1++ dependencies:+ loose-envify: 1.4.0+ react: 18.3.1+ scheduler: 0.23.2++ dependencies:+ loose-envify: 1.4.0++ dependencies:+ inherits: 2.0.4+ string_decoder: 1.3.0+ util-deprecate: 1.0.2++ [email protected]: {}++ [email protected]: {}++ dependencies:+ onetime: 5.1.2+ signal-exit: 3.0.7++ optional: true++ dependencies:+ glob: 7.2.3+ optional: true++ dependencies:+ debug: 4.4.3+ depd: 2.0.0+ is-promise: 4.0.0+ parseurl: 1.3.3+ path-to-regexp: 8.3.0+ transitivePeerDependencies:+ - supports-color++ [email protected]: {}++ [email protected]: {}++ dependencies:+ loose-envify: 1.4.0++ optional: true++ [email protected]: {}++ dependencies:+ debug: 4.4.3+ encodeurl: 2.0.0+ escape-html: 1.0.3+ etag: 1.8.1+ fresh: 2.0.0+ http-errors: 2.0.1+ mime-types: 3.0.2+ ms: 2.1.3+ on-finished: 2.4.1+ range-parser: 1.2.1+ statuses: 2.0.2+ transitivePeerDependencies:+ - supports-color++ dependencies:+ encodeurl: 2.0.0+ escape-html: 1.0.3+ parseurl: 1.3.3+ send: 1.2.1+ transitivePeerDependencies:+ - supports-color++ optional: true++ [email protected]: {}++ dependencies:+ '@img/colour': 1.0.0+ detect-libc: 2.1.2+ semver: 7.7.3+ optionalDependencies:+ '@img/sharp-darwin-arm64': 0.34.5+ '@img/sharp-darwin-x64': 0.34.5+ '@img/sharp-libvips-darwin-arm64': 1.2.4+ '@img/sharp-libvips-darwin-x64': 1.2.4+ '@img/sharp-libvips-linux-arm': 1.2.4+ '@img/sharp-libvips-linux-arm64': 1.2.4+ '@img/sharp-libvips-linux-ppc64': 1.2.4+ '@img/sharp-libvips-linux-riscv64': 1.2.4+ '@img/sharp-libvips-linux-s390x': 1.2.4+ '@img/sharp-libvips-linux-x64': 1.2.4+ '@img/sharp-libvips-linuxmusl-arm64': 1.2.4+ '@img/sharp-libvips-linuxmusl-x64': 1.2.4+ '@img/sharp-linux-arm': 0.34.5+ '@img/sharp-linux-arm64': 0.34.5+ '@img/sharp-linux-ppc64': 0.34.5+ '@img/sharp-linux-riscv64': 0.34.5+ '@img/sharp-linux-s390x': 0.34.5+ '@img/sharp-linux-x64': 0.34.5+ '@img/sharp-linuxmusl-arm64': 0.34.5+ '@img/sharp-linuxmusl-x64': 0.34.5+ '@img/sharp-wasm32': 0.34.5+ '@img/sharp-win32-arm64': 0.34.5+ '@img/sharp-win32-ia32': 0.34.5+ '@img/sharp-win32-x64': 0.34.5++ dependencies:+ shebang-regex: 3.0.0++ [email protected]: {}++ dependencies:+ es-errors: 1.3.0+ object-inspect: 1.13.4++ dependencies:+ call-bound: 1.0.4+ es-errors: 1.3.0+ get-intrinsic: 1.3.0+ object-inspect: 1.13.4++ dependencies:+ call-bound: 1.0.4+ es-errors: 1.3.0+ get-intrinsic: 1.3.0+ object-inspect: 1.13.4+ side-channel-map: 1.0.1++ dependencies:+ es-errors: 1.3.0+ object-inspect: 1.13.4+ side-channel-list: 1.0.0+ side-channel-map: 1.0.1+ side-channel-weakmap: 1.0.2++ [email protected]: {}++ optional: true++ [email protected]: {}++ dependencies:+ decompress-response: 6.0.0+ once: 1.4.0+ simple-concat: 1.0.1++ dependencies:+ ansi-styles: 6.2.3+ is-fullwidth-code-point: 4.0.0++ dependencies:+ ansi-styles: 6.2.3+ is-fullwidth-code-point: 5.1.0++ optional: true++ dependencies:+ agent-base: 7.1.4+ debug: 4.4.3+ socks: 2.8.7+ transitivePeerDependencies:+ - supports-color+ optional: true++ dependencies:+ ip-address: 10.1.0+ smart-buffer: 4.2.0+ optional: true++ dependencies:+ minipass: 7.1.2+ optional: true++ dependencies:+ escape-string-regexp: 2.0.0++ [email protected]: {}++ dependencies:+ emoji-regex: 8.0.0+ is-fullwidth-code-point: 3.0.0+ strip-ansi: 6.0.1+ optional: true++ dependencies:+ eastasianwidth: 0.2.0+ emoji-regex: 9.2.2+ strip-ansi: 7.1.2+ optional: true++ dependencies:+ emoji-regex: 10.6.0+ get-east-asian-width: 1.4.0+ strip-ansi: 7.1.2++ dependencies:+ safe-buffer: 5.2.1++ dependencies:+ ansi-regex: 5.0.1+ optional: true++ dependencies:+ ansi-regex: 6.2.2++ [email protected]: {}++ dependencies:+ chownr: 1.1.4+ mkdirp-classic: 0.5.3+ pump: 3.0.3+ tar-stream: 2.2.0++ dependencies:+ bl: 4.1.0+ end-of-stream: 1.4.5+ fs-constants: 1.0.0+ inherits: 2.0.4+ readable-stream: 3.6.2++ dependencies:+ chownr: 2.0.0+ fs-minipass: 2.1.0+ minipass: 5.0.0+ minizlib: 2.1.2+ mkdirp: 1.0.4+ yallist: 4.0.0+ optional: true++ [email protected]: {}++ optional: true++ optional: true++ dependencies:+ esbuild: 0.27.2+ get-tsconfig: 4.13.1+ optionalDependencies:+ fsevents: 2.3.3++ dependencies:+ safe-buffer: 5.2.1++ [email protected]: {}++ dependencies:+ content-type: 1.0.5+ media-typer: 1.1.0+ mime-types: 3.0.2++ [email protected]: {}++ [email protected]: {}++ dependencies:+ unique-slug: 4.0.0+ optional: true++ dependencies:+ imurmurhash: 0.1.4+ optional: true++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ optional: true++ dependencies:+ tr46: 0.0.3+ webidl-conversions: 3.0.1+ optional: true++ dependencies:+ isexe: 2.0.0++ dependencies:+ isexe: 3.1.1+ optional: true++ dependencies:+ string-width: 4.2.3+ optional: true++ dependencies:+ string-width: 7.2.0++ dependencies:+ ansi-styles: 4.3.0+ string-width: 4.2.3+ strip-ansi: 6.0.1+ optional: true++ dependencies:+ ansi-styles: 6.2.3+ string-width: 5.1.2+ strip-ansi: 7.1.2+ optional: true++ dependencies:+ ansi-styles: 6.2.3+ string-width: 7.2.0+ strip-ansi: 7.1.2++ [email protected]: {}++ [email protected]: {}++ optional: true++ [email protected]: {}++ dependencies:+ zod: 3.25.76++ [email protected]: {}diff --git a/libs/cuabot/pnpm-workspace.yaml b/libs/cuabot/pnpm-workspace.yamlnew file mode 100644index 0000000000..bc8c41ab06--- /dev/null+++ b/libs/cuabot/pnpm-workspace.yaml@@ -0,0 +1,10 @@+packages:+ - "."++onlyBuiltDependencies:+ - better-sqlite3+ - electron+ - esbuild+ - get-windows+ - koffi+ - sharpdiff --git a/libs/cuabot/src/client.ts b/libs/cuabot/src/client.tsnew file mode 100644index 0000000000..2d1ab58843--- /dev/null+++ b/libs/cuabot/src/client.ts@@ -0,0 +1,258 @@+/**+ * CuaBot Server Client+ * Connects to the CuaBot server via HTTP+ */++import { spawn } from "child_process";+import { existsSync, readFileSync, openSync } from "fs";+import { join, dirname } from "path";+import { homedir } from "os";+import { fileURLToPath } from "url";+import { checkDependencies } from "./utils.js";++const __filename = fileURLToPath(import.meta.url);+const __dirname = dirname(__filename);++const CONFIG_DIR = join(homedir(), ".cuabot");++const STARTING_ERROR = "cuabotd is still starting";++// Session name support+let currentSessionName: string | null = null;++export function setSessionName(name: string | null): void {+ currentSessionName = name;+}++export function getSessionName(): string | null {+ return currentSessionName;+}++function getPidFile(): string {+ return currentSessionName+ ? join(CONFIG_DIR, `server.${currentSessionName}.pid`)+ : join(CONFIG_DIR, "server.pid");+}++function getPortFile(): string {+ return currentSessionName+ ? join(CONFIG_DIR, `server.${currentSessionName}.port`)+ : join(CONFIG_DIR, "server.port");+}++// Read port from port file, with optional wait+function readPortFromFile(): number | null {+ const portFile = getPortFile();+ if (existsSync(portFile)) {+ try {+ return parseInt(readFileSync(portFile, "utf-8").trim(), 10);+ } catch {+ return null;+ }+ }+ return null;+}++export class CuaBotClient {+ private baseUrl: string;++ constructor(port: number) {+ this.baseUrl = `http://localhost:${port}`;+ }++ private async request(endpoint: string, body?: any): Promise<any> {+ const maxRetries = 120; // 2 minutes max wait+ const retryDelay = 1000; // 1 second between retries++ for (let attempt = 0; attempt < maxRetries; attempt++) {+ const res = await fetch(`${this.baseUrl}/${endpoint}`, {+ method: "POST",+ headers: { "Content-Type": "application/json" },+ body: body ? JSON.stringify(body) : undefined,+ });++ const data = (await res.json()) as { error?: string; [key: string]: any };+ if (data.error) {+ // If server is still starting, wait and retry+ if (data.error === STARTING_ERROR) {+ if (attempt === 0) {+ console.error("Waiting for cuabotd to finish starting...");+ }+ await new Promise(r => setTimeout(r, retryDelay));+ continue;+ }+ throw new Error(data.error);+ }+ return data;+ }++ throw new Error("Timed out waiting for cuabotd to start");+ }++ async status(): Promise<{ ok: boolean; container: string; containerPort: number | null; playwright: string }> {+ return this.request("status");+ }++ async getContainerPort(): Promise<number | null> {+ const status = await this.status();+ return status.containerPort;+ }++ async bash(+ command: string,+ run_in_background?: boolean,+ timeout?: number+ ): Promise<{ stdout: string; stderr: string; pid?: number }> {+ return this.request("bash", { command, run_in_background, timeout });+ }++ async screenshot(): Promise<string> {+ const result = await this.request("screenshot");+ return result.image;+ }++ async click(x: number, y: number, button: "left" | "right" | "middle" = "left"): Promise<void> {+ await this.request("click", { x, y, button });+ }++ async doubleClick(x: number, y: number): Promise<void> {+ await this.request("doubleClick", { x, y });+ }++ async type(text: string, delay?: number): Promise<void> {+ await this.request("type", { text, delay });+ }++ async mouseMove(x: number, y: number): Promise<void> {+ await this.request("mouseMove", { x, y });+ }++ async mouseDown(x: number, y: number, button: "left" | "right" | "middle" = "left"): Promise<void> {+ await this.request("mouseDown", { x, y, button });+ }++ async mouseUp(x: number, y: number, button: "left" | "right" | "middle" = "left"): Promise<void> {+ await this.request("mouseUp", { x, y, button });+ }++ async scroll(x: number, y: number, deltaX: number, deltaY: number): Promise<void> {+ await this.request("scroll", { x, y, deltaX, deltaY });+ }++ async keyDown(key: string): Promise<void> {+ await this.request("keyDown", { key });+ }++ async keyUp(key: string): Promise<void> {+ await this.request("keyUp", { key });+ }++ async keyPress(key: string): Promise<void> {+ await this.request("keyPress", { key });+ }++ async drag(fromX: number, fromY: number, toX: number, toY: number): Promise<void> {+ await this.request("drag", { fromX, fromY, toX, toY });+ }+}++// Check if server is running and actually responding+export async function isServerRunning(): Promise<{ running: boolean; port: number | null; pid?: number }> {+ const pidFile = getPidFile();+ const portFile = getPortFile();++ if (!existsSync(pidFile)) {+ return { running: false, port: null };+ }++ const pid = parseInt(readFileSync(pidFile, "utf-8").trim(), 10);+ const port = existsSync(portFile)+ ? parseInt(readFileSync(portFile, "utf-8").trim(), 10)+ : null;++ try {+ process.kill(pid, 0);+ // Check if HTTP server is actually responding+ try {+ const res = await fetch(`http://localhost:${port}/status`, { signal: AbortSignal.timeout(2000) });+ if (res.ok) {+ return { running: true, port, pid };+ }+ } catch {+ // HTTP server not ready yet, but process exists+ return { running: false, port, pid };+ }+ } catch {+ return { running: false, port };+ }+ return { running: false, port };+}++// Start the server in background and wait for it to be ready+export async function ensureServerRunning(): Promise<number> {+ const info = await isServerRunning();+ if (info.running && info.port) {+ return info.port;+ }++ // Check dependencies before trying to start the server+ const deps = await checkDependencies();+ if (!deps.ok) {+ console.log("deps", deps);+ throw new Error(`Missing dependencies:\n${deps.errors.map(e => ` - ${e}`).join("\n")}\n\nSee https://github.com/trycua/cuabot#quick-start for installation instructions.`);+ }++ const sessionSuffix = currentSessionName ? ` (session: ${currentSessionName})` : "";+ console.error(`starting cuabotd in background${sessionSuffix}...`);++ // Start server as detached background process using npx cuabot serve+ const spawnArgs = ["cuabot", "--serve"];+ if (currentSessionName) {+ spawnArgs.push("--name", currentSessionName);+ }+ // Write stderr to a log file so we can debug issues+ const logFile = join(CONFIG_DIR, "server.log");+ const logFd = openSync(logFile, "w");++ // console.error(`Server logs will be written to: ${logFile}`);++ const child = spawn("npx", spawnArgs, {+ detached: true,+ stdio: ["ignore", "ignore", logFd],+ cwd: process.cwd(),+ windowsHide: true,+ shell: process.platform === "win32",+ });+ child.unref();++ // Wait for port file to be written, then poll for server ready+ let lastError: Error | null = null;+ for (let i = 0; i < 240; i++) {+ await new Promise(r => setTimeout(r, 500));++ // Try to read port from file+ const port = readPortFromFile();+ if (!port) continue;++ try {+ const res = await fetch(`http://localhost:${port}/status`, { signal: AbortSignal.timeout(1000) });+ if (res.ok) {+ const data = await res.json() as { ready?: boolean };+ if (data.ready) {+ console.error("Server ready!");+ return port;+ }+ // Server responded but not ready yet, keep waiting+ }+ } catch (err) {+ lastError = err instanceof Error ? err : new Error(String(err));+ // Show progress every 10 seconds+ if (i > 0 && i % 20 === 0) {+ console.error(`Waiting for server... (${i * 0.5}s)`);+ }+ }+ }++ const errorMsg = lastError ? `: ${lastError.message}` : "";+ throw new Error(`Failed to start server after 2 minutes${errorMsg}. The server may still be initializing (building Docker image, starting container, etc.). Check server logs at: ${logFile} or try again in a moment.`);+}diff --git a/libs/cuabot/src/cuabot.tsx b/libs/cuabot/src/cuabot.tsxnew file mode 100644index 0000000000..257df30c49--- /dev/null+++ b/libs/cuabot/src/cuabot.tsx@@ -0,0 +1,391 @@+#!/usr/bin/env node+/**+ * CuaBot CLI+ */++import { startServer, stopServer, getServerInfo, setSessionName as setServerSessionName } from "./cuabotd.js";+import { ensureServerRunning, setSessionName as setClientSessionName } from "./client.js";+import { getDefaultAgent, AGENTS, AgentId } from "./settings.js";+import { runOnboarding } from "./onboarding.js";+import { log_cli_invocation } from "./telemetry.js";++const args = process.argv.slice(2);++// Parse --name / -n flag from args and return [sessionName, remainingArgs]+function parseSessionName(inputArgs: string[]): [string | null, string[]] {+ const remaining: string[] = [];+ let sessionName: string | null = null;++ for (let i = 0; i < inputArgs.length; i++) {+ const arg = inputArgs[i];+ if (arg === "--name" || arg === "-n") {+ sessionName = inputArgs[i + 1] || null;+ i++; // Skip the next arg (the name value)+ } else {+ remaining.push(arg);+ }+ }++ return [sessionName, remaining];+}++// Set session name in both server and client modules+function setSessionName(name: string | null): void {+ setServerSessionName(name);+ setClientSessionName(name);+}++async function getClient() {+ const { CuaBotClient } = await import("./client.js");+ const port = await ensureServerRunning();+ return new CuaBotClient(port);+}++async function runCommand(shellCommand: string) {+ const WebSocket = (await import("ws")).default;+ const port = await ensureServerRunning();++ const cols = process.stdout.columns || 80;+ const rows = process.stdout.rows || 24;+ const wsUrl = `ws://localhost:${port}/?command=${encodeURIComponent(shellCommand)}&cols=${cols}&rows=${rows}`;++ const ws = new WebSocket(wsUrl);++ ws.on("open", () => {+ if (process.stdin.isTTY) process.stdin.setRawMode(true);+ process.stdin.resume();+ });++ ws.on("message", (data: Buffer) => {+ try {+ const msg = JSON.parse(data.toString());+ if (msg.type === "stdout" || msg.type === "stderr") {+ process.stdout.write(Buffer.from(msg.data, "base64"));+ } else if (msg.type === "exit") {+ cleanup();+ process.exit(msg.code || 0);+ } else if (msg.type === "error") {+ console.error(`\nError: ${msg.message}`);+ cleanup();+ process.exit(1);+ }+ } catch {+ process.stdout.write(data);+ }+ });++ const onStdinData = (data: Buffer) => {+ if (ws.readyState === WebSocket.OPEN) {+ ws.send(JSON.stringify({ type: "stdin", data: data.toString("base64") }));+ }+ };+ process.stdin.on("data", onStdinData);++ const onResize = () => {+ if (ws.readyState === WebSocket.OPEN) {+ ws.send(JSON.stringify({ type: "resize", cols: process.stdout.columns || 80, rows: process.stdout.rows || 24 }));+ }+ };+ process.stdout.on("resize", onResize);++ const cleanup = () => {+ process.stdin.removeListener("data", onStdinData);+ process.stdout.removeListener("resize", onResize);+ if (process.stdin.isTTY) process.stdin.setRawMode(false);+ ws.close();+ };++ ws.on("close", () => { cleanup(); process.exit(0); });+ ws.on("error", (err: Error & { code?: string }) => {+ console.error(`WebSocket error: ${err.message || err.code || err}`);+ cleanup();+ process.exit(1);+ });+ process.on("SIGINT", () => { cleanup(); process.exit(0); });+}++async function runAgent(agentId: string, extraArgs: string[] = []) {+ await ensureServerRunning();++ let shellCommand: string;+ if (agentId === "claude") {+ shellCommand = `claude --mcp-config /home/user/.mcp.json --append-system-prompt-file /home/user/CLAUDE.md ${extraArgs.join(" ")}`.trim();+ } else {+ const agent = AGENTS[agentId as AgentId];+ shellCommand = `${agent?.command || agentId} ${extraArgs.join(" ")}`.trim();+ }++ await runCommand(shellCommand);+}++async function main() {+ // Log CLI invocation for telemetry+ log_cli_invocation(args);++ // Parse session name first+ const [sessionName, remainingArgs] = parseSessionName(args);+ setSessionName(sessionName);++ const flag = remainingArgs[0];++ // Flag commands+ if (flag?.startsWith("--")) {+ const flagArgs = remainingArgs.slice(1);++ switch (flag) {+ case "--help":+ case "-h": {+ console.log(`cuabot - Computer Use Agent Bot++Usage:+ cuabot Run default agent (or setup if not configured)+ cuabot <agent> Run agent (claude, gemini, codex, aider, openclaw, vibe)+ cuabot <command> Run any command in the sandbox++Options:+ -n, --name <name> Use a named session (allows multiple instances)++Commands:+ --serve [port] Start server (auto-finds available port)+ --stop Stop server+ --status Server status+ --reset [all|sandbox|settings] Reset (default: all)+ --screenshot [path] Take screenshot+ --bash <command> Execute bash command+ --click <x> <y> [button] Click at coordinates+ --doubleclick <x> <y> Double-click+ --move <x> <y> Move mouse+ --mousedown <x> <y> Press mouse button+ --mouseup <x> <y> Release mouse button+ --drag <x1> <y1> <x2> <y2> Drag+ --scroll <x> <y> <dx> <dy> Scroll+ --type <text> Type text+ --key <key> Press key+ --keydown <key> Key down+ --keyup <key> Key up+ --help Show this help`);+ process.exit(0);+ }++ case "--serve": {+ const port = flagArgs[0] ? parseInt(flagArgs[0], 10) : undefined;+ await startServer(port);+ break;+ }++ case "--stop": {+ const stopped = await stopServer();+ process.exit(stopped ? 0 : 1);+ }++ case "--status": {+ const info = getServerInfo();+ if (info) {+ const nameSuffix = sessionName ? ` [${sessionName}]` : "";+ console.log(`Server${nameSuffix} running on port ${info.port} (PID: ${info.pid})`);+ } else {+ console.log("Server not running");+ }+ process.exit(0);+ }++ case "--reset": {+ const { execSync } = await import("child_process");+ const { rmSync } = await import("fs");+ const { homedir } = await import("os");+ const { join } = await import("path");++ const target = flagArgs[0] || "all";+ const CONTAINER_NAME = "cuabot-xpra";+ const IMAGE_NAME = "cuabot-xpra:latest";+ const CONFIG_DIR = join(homedir(), ".cuabot");++ if (target === "sandbox" || target === "all") {+ console.log("Resetting sandbox...");+ try { await stopServer(); } catch {}+ try { execSync(`docker rm -f ${CONTAINER_NAME}`, { stdio: "ignore" }); } catch {}+ try { execSync(`docker rmi ${IMAGE_NAME}`, { stdio: "ignore" }); } catch {}+ console.log(" ✓ Container and image removed");+ }++ if (target === "settings" || target === "all") {+ console.log("Resetting settings...");+ try { rmSync(CONFIG_DIR, { recursive: true, force: true }); } catch {}+ console.log(" ✓ ~/.cuabot removed");+ }++ if (target !== "all" && target !== "sandbox" && target !== "settings") {+ console.error("Usage: cuabot --reset [all|sandbox|settings]");+ process.exit(1);+ }++ console.log("Done.");+ process.exit(0);+ }++ case "--screenshot": {+ const client = await getClient();+ const base64 = await client.screenshot();+ const { writeFileSync } = await import("fs");+ const outputPath = flagArgs[0] || "screenshot.jpg";+ writeFileSync(outputPath, Buffer.from(base64, "base64"));+ console.log(`Screenshot saved to ${outputPath}`);+ process.exit(0);+ }++ case "--bash": {+ const cmd = flagArgs.join(" ");+ if (!cmd) {+ console.error("Usage: cuabot --bash <command>");+ process.exit(1);+ }+ const client = await getClient();+ const { stdout, stderr } = await client.bash(cmd);+ if (stdout) console.log(stdout);+ if (stderr) console.error(stderr);+ process.exit(0);+ }++ case "--click": {+ const [x, y, button] = flagArgs;+ if (!x || !y) { console.error("Usage: cuabot --click <x> <y> [button]"); process.exit(1); }+ const client = await getClient();+ await client.click(parseInt(x), parseInt(y), (button as any) || "left");+ console.log(`Clicked at ${x},${y}`);+ process.exit(0);+ }++ case "--doubleclick": {+ const [x, y] = flagArgs;+ if (!x || !y) { console.error("Usage: cuabot --doubleclick <x> <y>"); process.exit(1); }+ const client = await getClient();+ await client.doubleClick(parseInt(x), parseInt(y));+ console.log(`Double-clicked at ${x},${y}`);+ process.exit(0);+ }++ case "--move": {+ const [x, y] = flagArgs;+ if (!x || !y) { console.error("Usage: cuabot --move <x> <y>"); process.exit(1); }+ const client = await getClient();+ await client.mouseMove(parseInt(x), parseInt(y));+ console.log(`Moved to ${x},${y}`);+ process.exit(0);+ }++ case "--mousedown": {+ const [x, y, button] = flagArgs;+ if (!x || !y) { console.error("Usage: cuabot --mousedown <x> <y> [button]"); process.exit(1); }+ const client = await getClient();+ await client.mouseDown(parseInt(x), parseInt(y), (button as any) || "left");+ console.log(`Mouse down at ${x},${y}`);+ process.exit(0);+ }++ case "--mouseup": {+ const [x, y, button] = flagArgs;+ if (!x || !y) { console.error("Usage: cuabot --mouseup <x> <y> [button]"); process.exit(1); }+ const client = await getClient();+ await client.mouseUp(parseInt(x), parseInt(y), (button as any) || "left");+ console.log(`Mouse up at ${x},${y}`);+ process.exit(0);+ }++ case "--drag": {+ const [x1, y1, x2, y2] = flagArgs;+ if (!x1 || !y1 || !x2 || !y2) { console.error("Usage: cuabot --drag <x1> <y1> <x2> <y2>"); process.exit(1); }+ const client = await getClient();+ await client.drag(parseInt(x1), parseInt(y1), parseInt(x2), parseInt(y2));+ console.log(`Dragged from ${x1},${y1} to ${x2},${y2}`);+ process.exit(0);+ }++ case "--scroll": {+ const [x, y, dx, dy] = flagArgs;+ if (!x || !y || !dy) { console.error("Usage: cuabot --scroll <x> <y> <dx> <dy>"); process.exit(1); }+ const client = await getClient();+ await client.scroll(parseInt(x), parseInt(y), parseInt(dx || "0"), parseInt(dy));+ console.log(`Scrolled at ${x},${y}`);+ process.exit(0);+ }++ case "--type": {+ const text = flagArgs.join(" ");+ if (!text) { console.error("Usage: cuabot --type <text>"); process.exit(1); }+ const client = await getClient();+ await client.type(text);+ console.log(`Typed: ${text}`);+ process.exit(0);+ }++ case "--key": {+ const key = flagArgs[0];+ if (!key) { console.error("Usage: cuabot --key <key>"); process.exit(1); }+ const client = await getClient();+ await client.keyPress(key);+ console.log(`Pressed: ${key}`);+ process.exit(0);+ }++ case "--keydown": {+ const key = flagArgs[0];+ if (!key) { console.error("Usage: cuabot --keydown <key>"); process.exit(1); }+ const client = await getClient();+ await client.keyDown(key);+ console.log(`Key down: ${key}`);+ process.exit(0);+ }++ case "--keyup": {+ const key = flagArgs[0];+ if (!key) { console.error("Usage: cuabot --keyup <key>"); process.exit(1); }+ const client = await getClient();+ await client.keyUp(key);+ console.log(`Key up: ${key}`);+ process.exit(0);+ }++ default: {+ console.error(`Unknown flag: ${flag}`);+ console.error(`Run 'cuabot --help' for usage`);+ process.exit(1);+ }+ }+ return;+ }++ // No args: run default agent or onboarding+ if (remainingArgs.length === 0) {+ const defaultAgent = getDefaultAgent();+ if (defaultAgent) {+ try {+ await runAgent(defaultAgent);+ } catch (err) {+ // If dependencies fail, show onboarding+ if (err instanceof Error && err.message.includes("Missing dependencies")) {+ runOnboarding();+ return;+ }+ throw err;+ }+ } else {+ runOnboarding();+ }+ return;+ }++ // cuabot <agent id> - run agent if it's a known agent ID+ const firstArg = remainingArgs[0];+ if (firstArg in AGENTS) {+ await runAgent(firstArg, remainingArgs.slice(1));+ return;+ }++ // cuabot <command> - run command in sandbox+ await runCommand(remainingArgs.join(" "));+}++main().catch((err) => {+ console.error(err);+ process.exit(1);+});diff --git a/libs/cuabot/src/cuabotd.ts b/libs/cuabot/src/cuabotd.tsnew file mode 100644index 0000000000..2ca7c37839--- /dev/null+++ b/libs/cuabot/src/cuabotd.ts@@ -0,0 +1,1116 @@+#!/usr/bin/env node+/**+ * CuaBot HTTP Server+ * Provides exec, screenshot, and input capabilities via HTTP API+ * Uses Playwright for screenshot/input on the xpra HTML5 interface+ * WebSocket support for interactive shell sessions+ */++import { exec, spawn, ChildProcess } from "child_process";+import { promisify } from "util";+import { writeFileSync, readFileSync, unlinkSync, existsSync, mkdirSync, appendFileSync } from "fs";+import { join, dirname } from "path";+import { homedir } from "os";+import { fileURLToPath } from "url";++const __filename = fileURLToPath(import.meta.url);+const __dirname = dirname(__filename);+import { createServer, IncomingMessage, ServerResponse } from "http";+import { chromium, Browser, Page, BrowserContext } from "playwright";+import sharp from "sharp";+import { WebSocketServer, WebSocket } from "ws";+import * as pty from "@lydell/node-pty";+import { getXpraBinPath, getXpraAttachArgs, nameToColor } from "./utils.js";+import { log_event, TelemetryEvent, startHistoryPolling, stopHistoryPolling } from "./telemetry.js";+import { getTelemetryEnabled } from "./settings.js";+import { openWindows } from "get-windows";++const execAsync = promisify(exec);++// Config+const DEFAULT_PORT = 7842;+const CONFIG_DIR = join(homedir(), ".cuabot");+const CLAUDE_CONFIG_DIR = join(CONFIG_DIR, "user", ".claude");++const IMAGE_NAME = "cuabot-xpra:latest";+const BASE_CONTAINER_NAME = "cuabot-xpra";++// Session name support+let sessionName: string | null = null;++export function setSessionName(name: string | null): void {+ sessionName = name;+}++export function getSessionName(): string | null {+ return sessionName;+}++// Find an available HTTP server port+async function findAvailableServerPort(preferredPort: number): Promise<number> {+ const net = await import("net");++ const isPortAvailable = (port: number): Promise<boolean> => {+ return new Promise((resolve) => {+ const server = net.createServer();+ server.once("error", () => resolve(false));+ server.once("listening", () => {+ server.close();+ resolve(true);+ });+ server.listen(port);+ });+ };++ // Try preferred port first+ if (await isPortAvailable(preferredPort)) {+ return preferredPort;+ }++ // Find next available port starting from preferred + 1+ let port = preferredPort + 1;+ while (port < 65535) {+ if (await isPortAvailable(port)) {+ return port;+ }+ port++;+ }++ throw new Error("No available ports found");+}++function getContainerName(): string {+ return sessionName ? `${BASE_CONTAINER_NAME}-${sessionName}` : BASE_CONTAINER_NAME;+}++function getPidFile(): string {+ return sessionName ? join(CONFIG_DIR, `server.${sessionName}.pid`) : join(CONFIG_DIR, "server.pid");+}++function getPortFile(): string {+ return sessionName ? join(CONFIG_DIR, `server.${sessionName}.port`) : join(CONFIG_DIR, "server.port");+}+const SCREENSHOT_PATH = "F:\\Projects\\cuabot\\screenshot.jpg";+const SCREENSHOT_CLICKED_PATH = "F:\\Projects\\cuabot\\screenshot-clicked.jpg";+const DEBUG = false;++// State+let browser: Browser | null = null;+let context: BrowserContext | null = null;+let page: Page | null = null;+let containerPort: number | null = null;+let serverPort: number | null = null; // HTTP server port for CUABOT_HOST+let screenshotScale: number = 1; // Scale factor applied to screenshots (for scaling coords back)+let xpraClientPid: number | null = null; // Track xpra client process for cleanup+let serverReady: boolean = false; // Track if server initialization is complete++const STARTING_ERROR = "cuabotd is still starting";++// Ensure config directory exists+function ensureConfigDir() {+ if (!existsSync(CONFIG_DIR)) {+ mkdirSync(CONFIG_DIR, { recursive: true });+ }+ // Ensure Claude config directory exists for volume mount+ if (!existsSync(CLAUDE_CONFIG_DIR)) {+ mkdirSync(CLAUDE_CONFIG_DIR, { recursive: true });+ }+}++// Docker helpers+async function testDockerConnection(): Promise<{ ok: boolean; message: string }> {+ try {+ await execAsync("docker info");+ return { ok: true, message: "Docker connected" };+ } catch {+ try {+ await execAsync("docker --version");+ return { ok: false, message: "Docker installed but not running - start Docker Desktop" };+ } catch {+ return { ok: false, message: "Docker not installed" };+ }+ }+}++async function findAvailablePort(): Promise<number> {+ const usedPorts = new Set<number>();+ try {+ const { stdout } = await execAsync('docker ps -a --format "{{json .Ports}}"');+ for (const line of stdout.trim().split("\n")) {+ if (!line) continue;+ const matches = line.matchAll(/(\d+)->(\d+)/g);+ for (const match of matches) {+ usedPorts.add(parseInt(match[1], 10));+ }+ }+ } catch { }+ let port = 10000;+ while (usedPorts.has(port)) port++;+ return port;+}++async function ensureImage(): Promise<void> {+ try {+ await execAsync(`docker image inspect ${IMAGE_NAME}`);+ console.log(`[server] Image ${IMAGE_NAME} already exists`);+ } catch {+ console.log(`[server] Building ${IMAGE_NAME}...`);+ console.log(`[server] This may take 10-20 minutes on first build. Progress will be shown below:`);+ const buildProcess = exec(`docker build -t ${IMAGE_NAME} .`, {+ cwd: join(__dirname, ".."),+ });++ buildProcess.stdout?.on("data", (data: Buffer) => {+ const lines = data.toString().split("\n").filter(l => l.trim());+ for (const line of lines) {+ // Show progress lines (step numbers, downloading, etc.)+ if (line.includes("Step ") || line.includes("Downloading") || line.includes("Installing") || line.includes("RUN")) {+ console.log(`[build] ${line}`);+ }+ }+ });++ buildProcess.stderr?.on("data", (data: Buffer) => {+ const lines = data.toString().split("\n").filter(l => l.trim());+ for (const line of lines) {+ // Show important error/warning lines+ if (!line.includes("WARNING") || line.includes("ERROR")) {+ console.error(`[build] ${line}`);+ }+ }+ });++ await new Promise<void>((resolve, reject) => {+ buildProcess.on("exit", (code) => {+ if (code === 0) {+ console.log(`[server] Build completed successfully!`);+ resolve();+ } else {+ reject(new Error(`Docker build failed with exit code ${code}`));+ }+ });+ });+ }+}++async function ensureContainer(): Promise<number> {+ // Check if container is running+ try {+ const { stdout: runningOut } = await execAsync(`docker inspect -f "{{.State.Running}}" ${getContainerName()}`);+ if (runningOut.trim() === "true") {+ const { stdout: portOut } = await execAsync(`docker port ${getContainerName()} 10000`);+ return parseInt(portOut.split(":")[1]?.trim() || "10000", 10);+ }+ } catch { }++ const dockerCheck = await testDockerConnection();+ if (!dockerCheck.ok) {+ throw new Error(dockerCheck.message);+ }+ await ensureImage();++ // Remove existing stopped container+ await execAsync(`docker rm -f ${getContainerName()}`).catch(() => { });++ const port = await findAvailablePort();++ // Convert Windows path to Docker-compatible path for volume mount+ const toDockerPath = (p: string) => p.replace(/\\/g, "/").replace(/^([A-Z]):/, (_, letter) => `/${letter.toLowerCase()}`);+ const claudeConfigPath = toDockerPath(CLAUDE_CONFIG_DIR);+ const mcpPath = toDockerPath(join(__dirname, "mcp"));++ const telemetryEnabled = getTelemetryEnabled();+ const cuabotName = sessionName || "cuabot";+ const cuabotColor = nameToColor(cuabotName).slice(1); // Remove # prefix+ const createCmd = [+ "docker", "create",+ "--name", getContainerName(),+ "-p", `${port}:10000`,+ "-e", "DISPLAY=:100",+ "-e", "CLAUDE_CONFIG_DIR=/home/user/.claude",+ "-e", `CUABOT_HOST=http://host.docker.internal:${serverPort}`,+ "-e", `CUABOT_TELEMETRY=${telemetryEnabled ? "true" : "false"}`,+ "-e", `CUABOT_NAME=${cuabotName}`,+ "-e", `CUABOT_COLOR=${cuabotColor}`,+ "--add-host=host.docker.internal:host-gateway",+ "-v", `${claudeConfigPath}:/home/user/.claude`,+ "-v", `${mcpPath}:/home/user/.cuabot/mcp`,+ IMAGE_NAME,+ "xpra", "start", ":100", "--bind-tcp=0.0.0.0:10000", "--no-daemon", "--html=on",+ ];++ await execAsync(createCmd.join(" "));+ await execAsync(`docker start ${getContainerName()}`);++ // Wait for xpra to be ready+ for (let i = 0; i < 30; i++) {+ try {+ const { stdout } = await execAsync(+ `docker exec ${getContainerName()} sh -c "netstat -tln 2>/dev/null | grep -q 10000 && echo ready || ss -tln 2>/dev/null | grep -q 10000 && echo ready"`+ );+ if (stdout.includes("ready")) break;+ } catch { }+ await new Promise(r => setTimeout(r, 500));+ }++ // Start overlay cursor in background+ const cursorName = sessionName || "cuabot";+ try {+ await execAsync(+ `docker exec -d ${getContainerName()} python3 /home/user/.cuabot/mcp/overlay-cursor.py --name=${cursorName}`+ );+ } catch { }++ // Start mask polling for cursor visibility+ startMaskPolling();++ return port;+}++async function execInContainer(+ command: string,+ options: { timeout?: number; runInBackground?: boolean } = {}+): Promise<{ stdout: string; stderr: string; pid?: number }> {+ const { timeout = 60000, runInBackground = false } = options;++ // Write command to a temp script file inside the container to avoid shell escaping issues+ const scriptId = Date.now() + Math.random().toString(36).slice(2);+ const scriptPath = `/tmp/cuabot-cmd-${scriptId}.sh`;++ // Create the script content with proper shebang and DISPLAY+ const scriptContent = `#!/bin/bash+export DISPLAY=:100+${command}+`;++ // Write script to container using docker exec with base64 to avoid any escaping issues+ const base64Script = Buffer.from(scriptContent).toString("base64");+ await execAsync(+ `docker exec ${getContainerName()} bash -c "echo '${base64Script}' | base64 -d > ${scriptPath} && chmod +x ${scriptPath}"`+ );++ try {+ if (runInBackground) {+ // Run in background with nohup, capture PID+ // Wait 1 second to catch any immediate errors (syntax errors, command not found, etc.)+ const bgCmd = `docker exec ${getContainerName()} bash -c "nohup ${scriptPath} > /tmp/cuabot-bg-${scriptId}.log 2>&1 & echo \\$!; sleep 1; if ! kill -0 \\$! 2>/dev/null; then cat /tmp/cuabot-bg-${scriptId}.log; exit 1; fi"`;++ const { stdout, stderr } = await execAsync(bgCmd, { timeout: 10000 });+ const pid = parseInt(stdout.trim().split("\n")[0], 10);++ // Clean up script after a delay (let it start first)+ setTimeout(async () => {+ await execAsync(`docker exec ${getContainerName()} rm -f ${scriptPath}`).catch(() => {});+ }, 5000);++ return { stdout: `Background process started with PID ${pid}`, stderr, pid };+ } else {+ // Run synchronously+ const { stdout, stderr } = await execAsync(+ `docker exec ${getContainerName()} ${scriptPath}`,+ { timeout }+ );++ // Clean up script+ await execAsync(`docker exec ${getContainerName()} rm -f ${scriptPath}`).catch(() => {});++ return { stdout, stderr };+ }+ } catch (err: any) {+ // Clean up script on error+ await execAsync(`docker exec ${getContainerName()} rm -f ${scriptPath}`).catch(() => {});+ return { stdout: err.stdout || "", stderr: err.stderr || err.message };+ }+}++// Overlay cursor management+const CURSOR_SOCKET = "/tmp/cuabot-overlay-cursor.sock";+let maskPollingInterval: ReturnType<typeof setInterval> | null = null;+let lastCursorPos = { x: 0, y: 0 };++async function sendCursorCommand(cmd: Record<string, unknown>): Promise<void> {+ const json = JSON.stringify(cmd).replace(/"/g, '\\"');+ await execAsync(+ `docker exec ${getContainerName()} python3 -c "import socket; s=socket.socket(socket.AF_UNIX,socket.SOCK_STREAM); s.settimeout(0.1); s.connect('${CURSOR_SOCKET}'); s.send(b'${json}\\n'); s.close()"`+ ).catch(() => {});+}++async function notifyCursorMove(x: number, y: number, click = false): Promise<void> {+ lastCursorPos = { x, y };+ await sendCursorCommand({ type: "move", x: x, y: y, click });+}++// AABB types and operations for mask computation+interface AABB {+ x: number;+ y: number;+ width: number;+ height: number;+}++interface AABBOp extends AABB {+ op: "add" | "subtract";+}++function subtractAABB(a: AABB, b: AABB): AABB[] {+ const aRight = a.x + a.width;+ const aBottom = a.y + a.height;+ const bRight = b.x + b.width;+ const bBottom = b.y + b.height;++ // No intersection - return A unchanged+ if (b.x >= aRight || bRight <= a.x || b.y >= aBottom || bBottom <= a.y) {+ return [a];+ }++ const result: AABB[] = [];++ // Top slice+ if (b.y > a.y) {+ result.push({ x: a.x, y: a.y, width: a.width, height: b.y - a.y });+ }++ // Bottom slice+ if (bBottom < aBottom) {+ result.push({ x: a.x, y: bBottom, width: a.width, height: aBottom - bBottom });+ }++ // Left/right slices (between top and bottom cuts)+ const midTop = Math.max(a.y, b.y);+ const midBottom = Math.min(aBottom, bBottom);+ if (midBottom > midTop) {+ if (b.x > a.x) {+ result.push({ x: a.x, y: midTop, width: b.x - a.x, height: midBottom - midTop });+ }+ if (bRight < aRight) {+ result.push({ x: bRight, y: midTop, width: aRight - bRight, height: midBottom - midTop });+ }+ }++ return result;+}++function tryMerge(a: AABB, b: AABB): AABB | null {+ const aRight = a.x + a.width, aBottom = a.y + a.height;+ const bRight = b.x + b.width, bBottom = b.y + b.height;++ // Horizontal merge+ if (a.y === b.y && a.height === b.height) {+ if (aRight === b.x) return { x: a.x, y: a.y, width: a.width + b.width, height: a.height };+ if (bRight === a.x) return { x: b.x, y: a.y, width: a.width + b.width, height: a.height };+ }++ // Vertical merge+ if (a.x === b.x && a.width === b.width) {+ if (aBottom === b.y) return { x: a.x, y: a.y, width: a.width, height: a.height + b.height };+ if (bBottom === a.y) return { x: a.x, y: b.y, width: a.width, height: a.height + b.height };+ }++ return null;+}++function mergeRegions(regions: AABB[]): AABB[] {+ if (regions.length <= 1) return regions;++ let merged = true;+ while (merged) {+ merged = false;+ outer: for (let i = 0; i < regions.length; i++) {+ for (let j = i + 1; j < regions.length; j++) {+ const m = tryMerge(regions[i], regions[j]);+ if (m) {+ regions.splice(j, 1);+ regions[i] = m;+ merged = true;+ break outer;+ }+ }+ }+ }++ return regions;+}++function computeAABBs(ops: AABBOp[]): AABB[] {+ let regions: AABB[] = [];++ for (const op of ops) {+ const box: AABB = { x: op.x, y: op.y, width: op.width, height: op.height };++ if (op.op === "add") {+ regions.push(box);+ } else {+ regions = regions.flatMap(r => subtractAABB(r, box));+ }+ }++ return mergeRegions(regions);+}++async function updateCursorMasks(): Promise<void> {+ try {+ const windows = await openWindows();+ const cursorName = sessionName || "cuabot";+ const cursorWindowPattern = `cuabot-cursor-${cursorName}`;++ // Build AABB operations from windows (all in absolute screen coordinates)+ // Process back-to-front so Xpra windows only cut holes in things BEHIND them+ const ops: AABBOp[] = [];++ // Reverse to go back-to-front (openWindows returns front-to-back)+ for (const win of [...windows].reverse()) {+ const b = win.bounds;+ const isXpra = win.owner.name === "Xpra";+ const isCursorWindow = win.title.includes(cursorWindowPattern);+ const ignoredWindows = ["cuabot-debug-masks", "Screen Studio"];+ const isIgnoredWindow = ignoredWindows.some(name => win.title.includes(name));++ if (isCursorWindow || isIgnoredWindow) {+ continue;+ }++ if (isXpra) {+ // Xpra windows: subtract (cut holes in masks behind it)+ ops.push({ x: b.x, y: b.y, width: b.width, height: b.height, op: "subtract" });+ } else {+ // Non-Xpra windows: add (mask areas where cursor should hide)+ ops.push({ x: b.x, y: b.y, width: b.width, height: b.height, op: "add" });+ }+ }++ // Compute final mask regions in host screen coordinates.+ // Xpra runs in seamless mode - each app window is a separate Xpra window on the host,+ // and the xpra display coordinates map directly to host screen coordinates.+ const maskRects = computeAABBs(ops);++ // Check if cursor is inside any mask+ const cx = lastCursorPos.x;+ const cy = lastCursorPos.y;+ const isInMask = maskRects.some(r =>+ cx >= r.x && cx <= r.x + r.width && cy >= r.y && cy <= r.y + r.height+ );++ // Send masked state to overlay cursor (not the rects - calculation done here)+ await sendCursorCommand({ type: "masked", value: isInMask });+ } catch (e) {+ // Silently ignore errors+ }+}++function startMaskPolling(): void {+ if (maskPollingInterval) return;+ maskPollingInterval = setInterval(updateCursorMasks, 500);+}++function stopMaskPolling(): void {+ if (maskPollingInterval) {+ clearInterval(maskPollingInterval);+ maskPollingInterval = null;+ }+}++// Playwright session management+let playwrightConnected = false;++async function launchPlaywright(): Promise<void> {+ if (browser?.isConnected()) return;++ console.log(`[server] Launching Playwright browser...`);+ browser = await chromium.launch({ headless: true });+ context = await browser.newContext({+ viewport: { width: 1920, height: 1080 },+ ignoreHTTPSErrors: true,+ });+ page = await context.newPage();+ console.log(`[server] Playwright browser ready (not yet connected to xpra)`);+}++async function ensurePlaywrightConnected(): Promise<Page> {+ if (!browser?.isConnected() || !page) {+ await launchPlaywright();+ }++ if (playwrightConnected && page) {+ return page;+ }++ const url = `http://localhost:${containerPort}/?steal=no&sharing=yes`;+ console.log(`[server] Connecting to xpra-html5 at ${url}`);+ await page!.goto(url);++ // Wait for xpra to be ready+ for (let i = 0; i < 60; i++) {+ const isReady = await page!.evaluate(() => {+ const canvas = document.querySelector("canvas");+ return canvas !== null;+ });+ if (isReady) break;+ await new Promise(r => setTimeout(r, 500));+ }++ playwrightConnected = true;+ console.log(`[server] Playwright connected to xpra`);+ return page!;+}++async function closePlaywrightSession(): Promise<void> {+ if (page) { await page.close().catch(() => { }); page = null; }+ if (context) { await context.close().catch(() => { }); context = null; }+ if (browser) { await browser.close().catch(() => { }); browser = null; }+ playwrightConnected = false;+}++// Constants for screenshot scaling+const MAX_SCREENSHOT_DIMENSION = 1280;++// Scale screenshot to max dimension and track scale factor+async function scaleScreenshot(buffer: Buffer): Promise<{ scaled: Buffer; scale: number }> {+ const metadata = await sharp(buffer).metadata();+ const width = metadata.width || 1920;+ const height = metadata.height || 1080;+ const maxDim = Math.max(width, height);++ if (maxDim <= MAX_SCREENSHOT_DIMENSION) {+ return { scaled: buffer, scale: 1 };+ }++ const scale = MAX_SCREENSHOT_DIMENSION / maxDim;+ const newWidth = Math.round(width * scale);+ const newHeight = Math.round(height * scale);++ const scaled = await sharp(buffer)+ .resize(newWidth, newHeight)+ .jpeg()+ .toBuffer();++ return { scaled, scale };+}++// Scale coordinates from scaled screenshot back to original screen coordinates+function scaleCoordinates(x: number, y: number): { x: number; y: number } {+ if (screenshotScale === 1) return { x, y };+ return {+ x: Math.round(x / screenshotScale),+ y: Math.round(y / screenshotScale),+ };+}++// Save screenshot with click coordinates marked+async function saveClickedScreenshot(p: Page, x: number, y: number): Promise<void> {+ const buffer = await p.screenshot({ type: "jpeg", fullPage: false });++ // Save the regular screenshot+ writeFileSync(SCREENSHOT_PATH, buffer);++ // Get image dimensions+ const metadata = await sharp(buffer).metadata();+ const width = metadata.width || 1920;+ const height = metadata.height || 1080;++ // Create a crosshair/marker SVG overlay+ const markerSize = 20;+ const svg = `+ <svg width="${width}" height="${height}">+ <circle cx="${x}" cy="${y}" r="${markerSize}" fill="none" stroke="red" stroke-width="3"/>+ <line x1="${x - markerSize}" y1="${y}" x2="${x + markerSize}" y2="${y}" stroke="red" stroke-width="2"/>+ <line x1="${x}" y1="${y - markerSize}" x2="${x}" y2="${y + markerSize}" stroke="red" stroke-width="2"/>+ </svg>+ `;++ await sharp(buffer)+ .composite([{ input: Buffer.from(svg), top: 0, left: 0 }])+ .jpeg()+ .toFile(SCREENSHOT_CLICKED_PATH);+}++// Check if server is ready, throw error if not+function requireReady() {+ if (!serverReady) {+ throw new Error(STARTING_ERROR);+ }+}++// HTTP Server handlers+type Handler = (body: any) => Promise<any>;++const handlers: Record<string, Handler> = {+ async status() {+ return {+ ok: true,+ ready: serverReady,+ container: containerPort ? `running on port ${containerPort}` : "not started",+ containerPort: containerPort,+ playwright: browser?.isConnected() ? "connected" : "not connected",+ };+ },++ async bash(body: { command: string; run_in_background?: boolean; timeout?: number }) {+ requireReady();+ await ensureContainer();+ const { stdout, stderr, pid } = await execInContainer(body.command, {+ runInBackground: body.run_in_background,+ timeout: body.timeout,+ });+ return { stdout, stderr, pid };+ },++ async screenshot() {+ requireReady();+ const p = await ensurePlaywrightConnected();+ const buffer = await p.screenshot({ type: "jpeg", fullPage: false });+ const { scaled, scale } = await scaleScreenshot(buffer);+ screenshotScale = scale; // Store for coordinate scaling+ return { image: Buffer.from(scaled).toString("base64"), scale };+ },++ async click(body: { x: number; y: number; button?: "left" | "right" | "middle" }) {+ requireReady();+ const p = await ensurePlaywrightConnected();+ const { x, y } = scaleCoordinates(body.x, body.y);+ notifyCursorMove(x, y, true);+ await p.mouse.click(x, y, { button: body.button || "left" });+ // Save screenshot with click coordinates marked (DEBUG only)+ if (DEBUG) await saveClickedScreenshot(p, x, y);+ return { ok: true, scaledCoords: { x, y } };+ },++ async doubleClick(body: { x: number; y: number }) {+ requireReady();+ const p = await ensurePlaywrightConnected();+ const { x, y } = scaleCoordinates(body.x, body.y);+ notifyCursorMove(x, y, true);+ await p.mouse.dblclick(x, y);+ // Save screenshot with click coordinates marked (DEBUG only)+ if (DEBUG) await saveClickedScreenshot(p, x, y);+ return { ok: true, scaledCoords: { x, y } };+ },++ async type(body: { text: string; delay?: number }) {+ requireReady();+ const p = await ensurePlaywrightConnected();+ await p.keyboard.type(body.text, { delay: body.delay ?? 50 });+ return { ok: true };+ },++ async mouseMove(body: { x: number; y: number }) {+ requireReady();+ const p = await ensurePlaywrightConnected();+ const { x, y } = scaleCoordinates(body.x, body.y);+ notifyCursorMove(x, y);+ await p.mouse.move(x, y);+ return { ok: true, scaledCoords: { x, y } };+ },++ async mouseDown(body: { x: number; y: number; button?: "left" | "right" | "middle" }) {+ requireReady();+ const p = await ensurePlaywrightConnected();+ const { x, y } = scaleCoordinates(body.x, body.y);+ notifyCursorMove(x, y, true);+ await p.mouse.move(x, y);+ await p.mouse.down({ button: body.button || "left" });+ return { ok: true, scaledCoords: { x, y } };+ },++ async mouseUp(body: { x: number; y: number; button?: "left" | "right" | "middle" }) {+ requireReady();+ const p = await ensurePlaywrightConnected();+ const { x, y } = scaleCoordinates(body.x, body.y);+ notifyCursorMove(x, y);+ await p.mouse.move(x, y);+ await p.mouse.up({ button: body.button || "left" });+ return { ok: true, scaledCoords: { x, y } };+ },++ async scroll(body: { x: number; y: number; deltaX: number; deltaY: number }) {+ requireReady();+ const p = await ensurePlaywrightConnected();+ const { x, y } = scaleCoordinates(body.x, body.y);+ notifyCursorMove(x, y);+ await p.mouse.move(x, y);+ // Note: deltaX/deltaY are scroll amounts, not screen coordinates, so they're not scaled+ await p.mouse.wheel(body.deltaX, body.deltaY);+ return { ok: true, scaledCoords: { x, y } };+ },++ async keyDown(body: { key: string }) {+ requireReady();+ const p = await ensurePlaywrightConnected();+ await p.keyboard.down(body.key);+ return { ok: true };+ },++ async keyUp(body: { key: string }) {+ requireReady();+ const p = await ensurePlaywrightConnected();+ await p.keyboard.up(body.key);+ return { ok: true };+ },++ async keyPress(body: { key: string }) {+ requireReady();+ const p = await ensurePlaywrightConnected();+ await p.keyboard.press(body.key);+ return { ok: true };+ },++ async drag(body: { fromX: number; fromY: number; toX: number; toY: number }) {+ requireReady();+ const p = await ensurePlaywrightConnected();+ const from = scaleCoordinates(body.fromX, body.fromY);+ const to = scaleCoordinates(body.toX, body.toY);+ await p.mouse.move(from.x, from.y);+ await p.mouse.down();+ await p.mouse.move(to.x, to.y, { steps: 10 });+ await p.mouse.up();+ return { ok: true, scaledCoords: { from, to } };+ },++ async telemetry(body: TelemetryEvent) {+ log_event(body);+ return { ok: true };+ },+};++// Cleanup+async function cleanup() {+ console.log("[server] Cleaning up...");++ // Stop mask polling+ stopMaskPolling();++ // Stop history polling+ stopHistoryPolling();++ // Kill xpra client first (before container stops, so it exits cleanly)+ if (xpraClientPid) {+ try {+ process.kill(xpraClientPid, "SIGKILL");+ console.log(`[server] Killed xpra client (PID ${xpraClientPid})`);+ } catch { }+ xpraClientPid = null;+ }++ await closePlaywrightSession();+ await execAsync(`docker stop ${getContainerName()}`).catch(() => { });+ await execAsync(`docker rm ${getContainerName()}`).catch(() => { });+ try { unlinkSync(getPidFile()); } catch { }+ try { unlinkSync(getPortFile()); } catch { }+ console.log("[server] Cleanup complete");+}++// Server start+export async function startServer(preferredPort?: number): Promise<void> {+ ensureConfigDir();++ // Check if already running+ if (existsSync(getPidFile())) {+ const pids = readFileSync(getPidFile(), "utf-8").trim().split("\n");+ const serverPid = parseInt(pids[0], 10);+ try {+ process.kill(serverPid, 0); // Check if process exists+ console.log(`Server already running (PID ${serverPid})`);+ process.exit(1);+ } catch {+ // Process doesn't exist, clean up stale files+ unlinkSync(getPidFile());+ if (existsSync(getPortFile())) unlinkSync(getPortFile());+ }+ }++ // Find available port+ const basePort = preferredPort ?? DEFAULT_PORT;+ const port = await findAvailableServerPort(basePort);+ serverPort = port; // Store for CUABOT_HOST in container++ // Write PID and port files+ writeFileSync(getPidFile(), process.pid.toString());+ writeFileSync(getPortFile(), port.toString());++ // Create HTTP server immediately (before initialization)+ const server = createServer(async (req: IncomingMessage, res: ServerResponse) => {+ const url = new URL(req.url || "/", `http://localhost:${port}`);+ const path = url.pathname.slice(1); // Remove leading /++ // CORS headers+ res.setHeader("Content-Type", "application/json");+ res.setHeader("Access-Control-Allow-Origin", "*");+ res.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS");+ res.setHeader("Access-Control-Allow-Headers", "Content-Type");++ if (req.method === "OPTIONS") {+ res.writeHead(200);+ res.end();+ return;+ }++ // Handle stop request+ if (path === "stop") {+ res.writeHead(200);+ res.end(JSON.stringify({ ok: true, message: "Server stopping" }));+ setTimeout(async () => {+ await cleanup();+ process.exit(0);+ }, 100);+ return;+ }++ const handler = handlers[path];+ if (!handler) {+ res.writeHead(404);+ res.end(JSON.stringify({ error: `Unknown endpoint: ${path}` }));+ return;+ }++ try {+ let body = {};+ if (req.method === "POST") {+ const chunks: Buffer[] = [];+ for await (const chunk of req) {+ chunks.push(chunk as Buffer);+ }+ const text = Buffer.concat(chunks).toString();+ if (text) body = JSON.parse(text);+ }+ const result = await handler(body);+ res.writeHead(200);+ res.end(JSON.stringify(result));+ } catch (error) {+ const message = error instanceof Error ? error.message : String(error);+ res.writeHead(500);+ res.end(JSON.stringify({ error: message }));+ }+ });++ // WebSocket server for interactive shell sessions+ const wss = new WebSocketServer({ server });+ const activeSessions = new Map<string, pty.IPty>();++ wss.on("connection", (ws: WebSocket, req: IncomingMessage) => {+ // Check if server is ready+ if (!serverReady) {+ ws.send(JSON.stringify({ type: "error", message: STARTING_ERROR }));+ ws.close();+ return;+ }++ const url = new URL(req.url || "/", `http://localhost:${port}`);+ const command = url.searchParams.get("command") || "bash";+ const cols = parseInt(url.searchParams.get("cols") || "80", 10);+ const rows = parseInt(url.searchParams.get("rows") || "24", 10);+ const sessionId = Date.now().toString(36) + Math.random().toString(36).slice(2);++ console.log(`[ws] New interactive session: ${sessionId}, command: ${command}`);++ let ptyProcess: pty.IPty;+ try {+ // Use node-pty to spawn docker exec with proper PTY support+ // Wrap command in bash -c to ensure proper shell environment+ const shell = process.platform === "win32" ? "docker.exe" : "docker";+ ptyProcess = pty.spawn(shell, [+ "exec",+ "-it",+ "-e", `TERM=${process.env.TERM || "xterm-256color"}`,+ "-e", "DISPLAY=:100",+ getContainerName(),+ "bash", "-c", command,+ ], {+ name: "xterm-256color",+ cols,+ rows,+ cwd: process.cwd(),+ env: process.env as Record<string, string>,+ });+ } catch (err) {+ console.error(`[ws] Failed to spawn PTY:`, err);+ ws.send(JSON.stringify({ type: "error", message: `Failed to spawn: ${err}` }));+ ws.close();+ return;+ }++ activeSessions.set(sessionId, ptyProcess);++ // Pipe PTY output to WebSocket+ ptyProcess.onData((data: string) => {+ if (ws.readyState === WebSocket.OPEN) {+ ws.send(JSON.stringify({ type: "stdout", data: Buffer.from(data).toString("base64") }));+ }+ });++ ptyProcess.onExit(({ exitCode }: { exitCode: number }) => {+ console.log(`[ws] Session ${sessionId} exited with code ${exitCode}`);+ activeSessions.delete(sessionId);+ if (ws.readyState === WebSocket.OPEN) {+ ws.send(JSON.stringify({ type: "exit", code: exitCode }));+ ws.close();+ }+ });++ // Handle WebSocket messages (stdin from client)+ ws.on("message", (message: Buffer) => {+ try {+ const msg = JSON.parse(message.toString());+ if (msg.type === "stdin" && msg.data) {+ const data = Buffer.from(msg.data, "base64").toString();+ ptyProcess.write(data);+ } else if (msg.type === "resize" && msg.cols && msg.rows) {+ ptyProcess.resize(msg.cols, msg.rows);+ }+ } catch (err) {+ console.error(`[ws] Failed to parse message:`, err);+ }+ });++ ws.on("close", () => {+ console.log(`[ws] Session ${sessionId} WebSocket closed`);+ if (activeSessions.has(sessionId)) {+ ptyProcess.kill();+ activeSessions.delete(sessionId);+ }+ });++ ws.on("error", (err) => {+ console.error(`[ws] Session ${sessionId} WebSocket error:`, err);+ });++ // Send session info to client+ ws.send(JSON.stringify({ type: "session", id: sessionId, command }));+ });++ server.listen(port, () => {+ console.log(`[server] CuaBot server running on http://localhost:${port}`);+ console.log(`[server] PID: ${process.pid}`);+ console.log(`[server] Server is ready to accept connections`);+ });++ server.on("error", (err: NodeJS.ErrnoException) => {+ console.error(`[server] HTTP server error:`, err);+ if (err.code === "EADDRINUSE") {+ console.error(`[server] Port ${port} is already in use`);+ }+ process.exit(1);+ });++ // Cleanup on exit+ process.on("SIGINT", async () => { await cleanup(); process.exit(0); });+ process.on("SIGTERM", async () => { await cleanup(); process.exit(0); });++ // Initialize container, playwright, and xpra client in background+ (async () => {+ try {+ console.log(`[server] Initializing container...`);+ containerPort = await ensureContainer();++ // Initialize Playwright and connect to xpra first+ console.log(`[server] Initializing Playwright...`);+ await launchPlaywright();+ console.log(`[server] Connecting Playwright to xpra...`);+ await ensurePlaywrightConnected();++ // Launch xpra client after Playwright is connected+ console.log(`[server] Launching xpra client...`);+ const xpraCmd = getXpraBinPath();+ const xpraArgs = getXpraAttachArgs(containerPort, sessionName);+ const xpraClient = spawn(xpraCmd, xpraArgs, {+ detached: true,+ stdio: "ignore",+ windowsHide: true,+ });+ xpraClientPid = xpraClient.pid ?? null;+ xpraClient.unref();++ // Append xpra client PID to PID file+ if (xpraClientPid) {+ appendFileSync(getPidFile(), `\n${xpraClientPid}`);+ }++ serverReady = true;+ console.log(`[server] Ready!`);++ // Start history polling for telemetry (scrapes /home/user/.claude/history.jsonl)+ const historyPath = join(CLAUDE_CONFIG_DIR, "history.jsonl");+ startHistoryPolling(historyPath, 2000);+ } catch (err) {+ console.error(`[server] Initialization failed:`, err);+ process.exit(1);+ }+ })();+}++// Stop server+export async function stopServer(): Promise<boolean> {+ if (!existsSync(getPidFile())) {+ console.log("Server not running");+ return false;+ }++ const pids = readFileSync(getPidFile(), "utf-8").trim().split("\n").map(p => parseInt(p, 10)).filter(p => !isNaN(p));+ const serverPid = pids[0];+ const xpraPid = pids[1];+ const port = existsSync(getPortFile())+ ? parseInt(readFileSync(getPortFile(), "utf-8").trim(), 10)+ : DEFAULT_PORT;++ try {+ // Try graceful shutdown via HTTP+ const res = await fetch(`http://localhost:${port}/stop`, { method: "POST" });+ if (res.ok) {+ console.log("Server stopped");+ return true;+ }+ } catch {+ // HTTP failed, try killing processes directly+ let killed = false;++ // Kill server process+ try {+ process.kill(serverPid, "SIGTERM");+ console.log(`Sent SIGTERM to server (PID ${serverPid})`);+ killed = true;+ } catch { }++ // Kill xpra client process+ if (xpraPid) {+ try {+ process.kill(xpraPid, "SIGKILL");+ console.log(`Sent SIGKILL to xpra client (PID ${xpraPid})`);+ killed = true;+ } catch { }+ }++ // Clean up files+ try { unlinkSync(getPidFile()); } catch { }+ try { unlinkSync(getPortFile()); } catch { }++ if (killed) {+ return true;+ } else {+ console.log("Server not running (stale PID file)");+ return false;+ }+ }+ return false;+}++// Get server info+export function getServerInfo(): { running: boolean; port: number; pid: number } | null {+ if (!existsSync(getPidFile())) return null;++ const pids = readFileSync(getPidFile(), "utf-8").trim().split("\n");+ const pid = parseInt(pids[0], 10);+ const port = existsSync(getPortFile())+ ? parseInt(readFileSync(getPortFile(), "utf-8").trim(), 10)+ : DEFAULT_PORT;++ try {+ process.kill(pid, 0); // Check if process exists+ return { running: true, port, pid };+ } catch {+ return null;+ }+}++// CLI entry point+if (import.meta.main) {+ const port = parseInt(process.argv[2] || String(DEFAULT_PORT), 10);+ startServer(port);+}diff --git a/libs/cuabot/src/masks.png b/libs/cuabot/src/masks.pngnew file mode 100644index 0000000000..3448906b2bBinary files /dev/null and b/libs/cuabot/src/masks.png differdiff --git a/libs/cuabot/src/mcp/computer-use-mcp.py b/libs/cuabot/src/mcp/computer-use-mcp.pynew file mode 100644index 0000000000..963840794d--- /dev/null+++ b/libs/cuabot/src/mcp/computer-use-mcp.py@@ -0,0 +1,236 @@+#!/usr/bin/env -S uv run --script+# /// script+# requires-python = ">=3.10"+# dependencies = ["fastmcp", "httpx"]+# ///+"""+Computer-Use MCP Server (self-contained with uv)+Runs inside the container and connects to host's cuabotd HTTP server+Provides screenshot and input tools for Claude coding agents+"""++import os+import time+import json+import socket+from pathlib import Path+import httpx+from fastmcp import FastMCP+from fastmcp.utilities.types import Image++# Connect to host's cuabotd server+HOST_URL = os.environ.get("CUABOT_HOST", "http://host.docker.internal:7842")+TELEMETRY_ENABLED = os.environ.get("CUABOT_TELEMETRY", "false").lower() == "true"+STARTING_ERROR = "cuabotd is still starting"++# Overlay cursor socket+OVERLAY_SOCKET = "/tmp/cuabot-overlay-cursor.sock"++# Telemetry log path (same location as TypeScript: __dirname/../telemetry.log)+# When running in container, we write to host via cuabotd+TELEMETRY_LOG_PATH = Path(__file__).parent.parent.parent / "telemetry.log"++server = FastMCP("computer-use")++# HTTP client for cuabotd+client = httpx.Client(base_url=HOST_URL, timeout=30.0)++def log_mcp_tool_call(tool_name: str, tool_args: dict) -> None:+ """Log MCP tool call to telemetry.log"""+ if not TELEMETRY_ENABLED:+ return+ try:+ # Filter out large data (like screenshots) from args+ filtered_args = {k: v for k, v in tool_args.items() if not isinstance(v, bytes)}+ event = {+ "type": "mcp_tool_call",+ "timestamp": int(time.time() * 1000),+ "tool_name": tool_name,+ "tool_args": filtered_args,+ }+ with open(TELEMETRY_LOG_PATH, "a") as f:+ f.write(json.dumps(event) + "\n")+ except Exception:+ pass # Silently ignore telemetry errors+++def request(endpoint: str, body: dict | None = None) -> dict:+ """Make HTTP request to cuabotd server with retry on starting error."""+ max_retries = 120 # 2 minutes max wait+ retry_delay = 1.0 # 1 second between retries++ for attempt in range(max_retries):+ res = client.post(f"/{endpoint}", json=body)+ data = res.json()+ if "error" in data:+ # If server is still starting, wait and retry+ if data["error"] == STARTING_ERROR:+ if attempt == 0:+ print("Waiting for cuabotd to finish starting...", flush=True)+ time.sleep(retry_delay)+ continue+ raise Exception(data["error"])+ return data++ raise Exception("Timed out waiting for cuabotd to start")+++def screenshot() -> Image:+ """Take a screenshot of the display. Returns JPEG image."""+ import base64+ log_mcp_tool_call("screenshot", {})+ result = request("screenshot")+ image_bytes = base64.b64decode(result["image"])+ return Image(data=image_bytes, format="jpeg")+++def click(x: int, y: int, button: str = "left") -> str:+ """Click at x,y coordinates.++ Args:+ x: X coordinate+ y: Y coordinate+ button: Mouse button - left, right, or middle (default: left)+ """+ log_mcp_tool_call("click", {"x": x, "y": y, "button": button})+ request("click", {"x": x, "y": y, "button": button})+ return "Clicked"+++def double_click(x: int, y: int) -> str:+ """Double-click at x,y coordinates.++ Args:+ x: X coordinate+ y: Y coordinate+ """+ log_mcp_tool_call("double_click", {"x": x, "y": y})+ request("doubleClick", {"x": x, "y": y})+ return "Double-clicked"+++def type_text(text: str, delay: int = 50) -> str:+ """Type text using the keyboard.++ Args:+ text: Text to type+ delay: Delay between keystrokes in ms (default: 50)+ """+ log_mcp_tool_call("type_text", {"text": text, "delay": delay})+ request("type", {"text": text, "delay": delay})+ return "Typed"+++def mouse_move(x: int, y: int) -> str:+ """Move mouse to x,y coordinates.++ Args:+ x: X coordinate+ y: Y coordinate+ """+ log_mcp_tool_call("mouse_move", {"x": x, "y": y})+ request("mouseMove", {"x": x, "y": y})+ return "Mouse moved"+++def mouse_down(x: int, y: int, button: str = "left") -> str:+ """Press mouse button down at x,y.++ Args:+ x: X coordinate+ y: Y coordinate+ button: Mouse button - left, right, or middle (default: left)+ """+ log_mcp_tool_call("mouse_down", {"x": x, "y": y, "button": button})+ request("mouseDown", {"x": x, "y": y, "button": button})+ return "Mouse down"+++def mouse_up(x: int, y: int, button: str = "left") -> str:+ """Release mouse button at x,y.++ Args:+ x: X coordinate+ y: Y coordinate+ button: Mouse button - left, right, or middle (default: left)+ """+ log_mcp_tool_call("mouse_up", {"x": x, "y": y, "button": button})+ request("mouseUp", {"x": x, "y": y, "button": button})+ return "Mouse up"+++def scroll(x: int, y: int, delta_x: int, delta_y: int) -> str:+ """Scroll at x,y coordinates.++ Args:+ x: X coordinate+ y: Y coordinate+ delta_x: Horizontal scroll amount+ delta_y: Vertical scroll amount (negative = up, positive = down)+ """+ log_mcp_tool_call("scroll", {"x": x, "y": y, "delta_x": delta_x, "delta_y": delta_y})+ request("scroll", {"x": x, "y": y, "deltaX": delta_x, "deltaY": delta_y})+ return "Scrolled"+++def key_down(key: str) -> str:+ """Press a key down (without releasing).++ Args:+ key: Key to press (e.g., 'Shift', 'Control', 'a', 'Enter')+ """+ log_mcp_tool_call("key_down", {"key": key})+ request("keyDown", {"key": key})+ return "Key down"+++def key_up(key: str) -> str:+ """Release a key.++ Args:+ key: Key to release+ """+ log_mcp_tool_call("key_up", {"key": key})+ request("keyUp", {"key": key})+ return "Key up"+++def key_press(key: str) -> str:+ """Press and release a key.++ Args:+ key: Key to press (e.g., 'Enter', 'Tab', 'Escape', 'F1')+ """+ log_mcp_tool_call("key_press", {"key": key})+ request("keyPress", {"key": key})+ return "Key pressed"+++def drag(from_x: int, from_y: int, to_x: int, to_y: int) -> str:+ """Drag from one point to another.++ Args:+ from_x: Start X coordinate+ from_y: Start Y coordinate+ to_x: End X coordinate+ to_y: End Y coordinate+ """+ log_mcp_tool_call("drag", {"from_x": from_x, "from_y": from_y, "to_x": to_x, "to_y": to_y})+ request("drag", {"fromX": from_x, "fromY": from_y, "toX": to_x, "toY": to_y})+ return "Dragged"+++if __name__ == "__main__":+ server.run()diff --git a/libs/cuabot/src/mcp/cursor.png b/libs/cuabot/src/mcp/cursor.pngnew file mode 100644index 0000000000..91625e44d7Binary files /dev/null and b/libs/cuabot/src/mcp/cursor.png differdiff --git a/libs/cuabot/src/mcp/overlay-cursor.py b/libs/cuabot/src/mcp/overlay-cursor.pynew file mode 100644index 0000000000..a7cd149ef7--- /dev/null+++ b/libs/cuabot/src/mcp/overlay-cursor.py@@ -0,0 +1,643 @@+#!/usr/bin/env python3+"""+Overlay Agent Cursor - A transparent floating cursor indicator+Runs inside the container and shows where the agent is clicking++Usage:+ overlay-cursor.py [--name=NAME] [--color=HEX]++Environment variables:+ CUABOT_NAME - Session name (default: cuabot)+ CUABOT_COLOR - Hex color without # (default: derived from name)+"""++import os+import sys+import socket+import threading+import json+import time+import math+import random++import gi+gi.require_version('Gtk', '3.0')+gi.require_version('Gdk', '3.0')+gi.require_version('GdkPixbuf', '2.0')+from gi.repository import Gtk, Gdk, GLib, GdkPixbuf+import cairo++# Configuration+SOCKET_PATH = "/tmp/cuabot-overlay-cursor.sock"+CURSOR_SIZE = 32+FADE_DELAY = 15.0 # seconds before fade starts+FADE_DURATION = 1.0 # seconds to fade out+MOVE_DURATION = 0.1 # seconds to move+SPAWN_DISTANCE = 128 # pixels from initial point++# Debug: show masked value and frame counter as a label+SHOW_MASKED_DEBUG = False+++def name_to_color(name: str) -> str:+ """Generate a consistent hex color from a name (matches TypeScript version)"""+ hash_val = 0+ for char in name:+ hash_val = ((hash_val << 5) - hash_val) + ord(char)+ hash_val = hash_val & 0xFFFFFFFF # Convert to 32-bit integer++ # Use golden ratio for nice hue distribution+ hue = (abs(hash_val) * 0.618033988749895) % 1++ # Convert HSL to RGB (saturation=0.7, lightness=0.5)+ s = 0.7+ l = 0.5++ c = (1 - abs(2 * l - 1)) * s+ x = c * (1 - abs((hue * 6) % 2 - 1))+ m = l - c / 2++ h = hue * 6+ if h < 1:+ r, g, b = c, x, 0+ elif h < 2:+ r, g, b = x, c, 0+ elif h < 3:+ r, g, b = 0, c, x+ elif h < 4:+ r, g, b = 0, x, c+ elif h < 5:+ r, g, b = x, 0, c+ else:+ r, g, b = c, 0, x++ def to_hex(n):+ return format(round((n + m) * 255), '02x')++ return f"{to_hex(r)}{to_hex(g)}{to_hex(b)}"+++def hex_to_rgb(hex_color: str) -> tuple:+ """Convert hex color to RGB tuple (0-1 range)"""+ hex_color = hex_color.lstrip('#')+ return tuple(int(hex_color[i:i+2], 16) / 255.0 for i in (0, 2, 4))+++def generate_path(from_pos: tuple, to_pos: tuple, target_steps: int = 20) -> list:+ """Generate a human-like mouse path with gravity and wind forces."""+ s3 = math.sqrt(3)+ s5 = math.sqrt(5)++ gravity = 9.0+ wind = 3.0+ max_v = 15.0+ damp_dist = 12.0++ x, y = float(from_pos[0]), float(from_pos[1])+ dx, dy = float(to_pos[0]), float(to_pos[1])++ vx = vy = 0.0+ wx = wy = 0.0+ mv = max_v++ path = [(x, y)]++ for _ in range(500):+ dist = math.hypot(dx - x, dy - y)+ if dist < 1:+ break++ wm = min(wind, dist)++ if dist >= damp_dist:+ wx = wx / s3 + (2 * random.random() - 1) * wm / s5+ wy = wy / s3 + (2 * random.random() - 1) * wm / s5+ else:+ wx /= s3+ wy /= s3+ if mv < 3:+ mv = random.random() * 3 + 3+ else:+ mv /= s5++ vx += wx + gravity * (dx - x) / dist+ vy += wy + gravity * (dy - y) / dist++ vm = math.hypot(vx, vy)+ if vm > mv:+ vc = mv / 2 + random.random() * mv / 2+ vx = (vx / vm) * vc+ vy = (vy / vm) * vc++ x += vx+ y += vy+ path.append((x, y))++ path.append((dx, dy))++ if len(path) > target_steps:+ idx = [int(i * (len(path) - 1) / target_steps) for i in range(target_steps + 1)]+ path = [path[i] for i in idx]++ return path+++class OverlayCursor(Gtk.Window):+ def __init__(self, name: str, color: str):+ super().__init__(type=Gtk.WindowType.POPUP)++ self.name = name+ self.color = hex_to_rgb(color)+ self.opacity = 0.0+ self.visible = False+ self.clicking = False+ self.click_anim_progress = 0.0++ self.current_x = 0.0+ self.current_y = 0.0+ self.target_path = []+ self.path_index = 0+ self.move_start_time = 0++ self.last_activity = time.time()+ self.fading = False+ self.masked = False # True when cursor should be hidden (inside a mask region)+ self.frame_counter = 0 # For debug display++ # Load cursor image+ self.cursor_pixbuf = None+ script_dir = os.path.dirname(os.path.abspath(__file__))+ cursor_path = os.path.join(script_dir, 'cursor.png')+ if os.path.exists(cursor_path):+ try:+ self.cursor_pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(+ cursor_path, CURSOR_SIZE, CURSOR_SIZE, True+ )+ print(f"Loaded cursor image from {cursor_path}", file=sys.stderr)+ except Exception as e:+ print(f"Failed to load cursor image: {e}", file=sys.stderr)+ else:+ print(f"Cursor image not found at {cursor_path}", file=sys.stderr)++ # Window setup (wider/taller to fit cursor and debug label)+ self.set_size_request(CURSOR_SIZE * 5, CURSOR_SIZE * 3)+ self.set_decorated(False)+ self.set_skip_taskbar_hint(True)+ self.set_skip_pager_hint(True)+ self.set_accept_focus(False)+ self.set_app_paintable(True)+ self.set_title(f"cuabot-cursor-{name}")++ # Enable transparency+ screen = self.get_screen()+ visual = screen.get_rgba_visual()+ if visual:+ self.set_visual(visual)++ # Make click-through after window is realized+ self.connect("realize", self._on_realize)++ # Drawing area+ self.drawing_area = Gtk.DrawingArea()+ self.drawing_area.connect("draw", self.on_draw)+ self.add(self.drawing_area)++ # Start animation loop+ GLib.timeout_add(16, self.animation_tick) # ~60fps++ # Start fade check+ GLib.timeout_add(1000, self.check_fade)++ def _on_realize(self, widget):+ # Make window click-through by setting empty input region+ gdk_window = self.get_window()+ if gdk_window:+ gdk_window.input_shape_combine_region(cairo.Region(), 0, 0)++ def on_draw(self, widget, cr):+ # Clear background+ cr.set_operator(cairo.OPERATOR_SOURCE)+ cr.set_source_rgba(0, 0, 0, 0)+ cr.paint()++ # Debug label - always show when enabled so we can see updates+ if SHOW_MASKED_DEBUG and self.visible:+ cr.set_operator(cairo.OPERATOR_OVER)+ cr.select_font_face("Sans", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD)+ cr.set_font_size(14)++ debug_text = f"masked:{int(self.masked)} frame:{self.frame_counter % 10}"+ extents = cr.text_extents(debug_text)++ label_x = CURSOR_SIZE * 0.3+ label_y = CURSOR_SIZE * 2.5+ padding = 6++ # Background+ cr.set_source_rgba(0, 0, 0, 0.9)+ cr.rectangle(label_x - padding, label_y - extents.height - padding,+ extents.width + padding * 2, extents.height + padding * 2)+ cr.fill()++ # Text color: red when masked, green when not+ if self.masked:+ cr.set_source_rgba(1, 0.3, 0.3, 1) # Red+ else:+ cr.set_source_rgba(0.3, 1, 0.3, 1) # Green+ cr.move_to(label_x, label_y)+ cr.show_text(debug_text)++ if self.opacity <= 0:+ return++ # Skip rendering cursor if masked (calculation done in cuabotd.ts)+ if self.masked:+ return++ r, g, b = self.color++ # Draw cursor image or fallback circle+ if self.cursor_pixbuf:+ # Create a colorized version of the cursor+ colorized = self._colorize_pixbuf(self.cursor_pixbuf, r, g, b, self.opacity)++ # Click scale effect+ click_scale = 1.0 + 0.2 * math.sin(self.click_anim_progress * math.pi) if self.clicking else 1.0++ cr.set_operator(cairo.OPERATOR_OVER)++ if click_scale != 1.0:+ # Scale around the cursor tip (top-left corner)+ scaled_size = int(CURSOR_SIZE * click_scale)+ scaled = colorized.scale_simple(scaled_size, scaled_size, GdkPixbuf.InterpType.BILINEAR)+ Gdk.cairo_set_source_pixbuf(cr, scaled, CURSOR_SIZE - CURSOR_SIZE * 0.1, CURSOR_SIZE - CURSOR_SIZE * 0.1)+ else:+ Gdk.cairo_set_source_pixbuf(cr, colorized, CURSOR_SIZE - CURSOR_SIZE * 0.1, CURSOR_SIZE - CURSOR_SIZE * 0.1)++ cr.paint()++ # Click ripple+ if self.clicking and self.click_anim_progress > 0:+ cx = CURSOR_SIZE + CURSOR_SIZE * 0.1+ cy = CURSOR_SIZE + CURSOR_SIZE * 0.1+ ripple_radius = CURSOR_SIZE * 0.3 + (CURSOR_SIZE * 0.8 * self.click_anim_progress)+ ripple_alpha = (1 - self.click_anim_progress) * 0.5 * self.opacity+ cr.set_source_rgba(r, g, b, ripple_alpha)+ cr.set_line_width(2)+ cr.arc(cx, cy, ripple_radius, 0, 2 * math.pi)+ cr.stroke()+ else:+ # Fallback: draw circle cursor+ cx = CURSOR_SIZE+ cy = CURSOR_SIZE++ # Outer glow+ cr.set_operator(cairo.OPERATOR_OVER)+ gradient = cairo.RadialGradient(cx, cy, CURSOR_SIZE * 0.3, cx, cy, CURSOR_SIZE)+ gradient.add_color_stop_rgba(0, r, g, b, 0.4 * self.opacity)+ gradient.add_color_stop_rgba(1, r, g, b, 0)+ cr.set_source(gradient)+ cr.arc(cx, cy, CURSOR_SIZE, 0, 2 * math.pi)+ cr.fill()++ # Main circle+ base_radius = CURSOR_SIZE * 0.35+ click_scale = 1.0 + 0.3 * math.sin(self.click_anim_progress * math.pi) if self.clicking else 1.0+ radius = base_radius * click_scale++ cr.set_source_rgba(r, g, b, 0.9 * self.opacity)+ cr.arc(cx, cy, radius, 0, 2 * math.pi)+ cr.fill()++ # Inner highlight+ cr.set_source_rgba(1, 1, 1, 0.3 * self.opacity)+ cr.arc(cx - radius * 0.2, cy - radius * 0.2, radius * 0.4, 0, 2 * math.pi)+ cr.fill()++ # Click ripple+ if self.clicking and self.click_anim_progress > 0:+ ripple_radius = base_radius + (CURSOR_SIZE * 0.8 * self.click_anim_progress)+ ripple_alpha = (1 - self.click_anim_progress) * 0.5 * self.opacity+ cr.set_source_rgba(r, g, b, ripple_alpha)+ cr.set_line_width(2)+ cr.arc(cx, cy, ripple_radius, 0, 2 * math.pi)+ cr.stroke()++ # # Name label (small, below cursor)+ # cx = CURSOR_SIZE+ # cy = CURSOR_SIZE+ # if self.name and self.opacity > 0.5:+ # cr.select_font_face("Sans", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD)+ # cr.set_font_size(10)+ # extents = cr.text_extents(self.name)++ # padding = 3+ # color_bar_w = 4+ # label_x = cx + CURSOR_SIZE * 0.3+ # label_y = cy + CURSOR_SIZE * 0.5+ # label_w = color_bar_w + extents.width + padding * 3+ # label_h = extents.height + padding * 2++ # # Black background+ # cr.set_source_rgba(0, 0, 0, 0.7 * self.opacity)+ # cr.rectangle(label_x, label_y, label_w, label_h)+ # cr.fill()++ # # Colored accent bar+ # cr.set_source_rgba(r, g, b, self.opacity)+ # cr.rectangle(label_x, label_y, color_bar_w, label_h)+ # cr.fill()++ # # Text+ # cr.set_source_rgba(1, 1, 1, self.opacity)+ # cr.move_to(label_x + color_bar_w + padding, label_y + extents.height + padding - 1)+ # cr.show_text(self.name)++ def _colorize_pixbuf(self, pixbuf, r, g, b, opacity):+ """Colorize a greyscale RGBA pixbuf by multiplying with the given color"""+ # Create a copy to modify+ colorized = pixbuf.copy()++ width = colorized.get_width()+ height = colorized.get_height()+ rowstride = colorized.get_rowstride()+ n_channels = colorized.get_n_channels()+ pixels = colorized.get_pixels()++ # Create a new pixel array+ new_pixels = bytearray(pixels)++ for y in range(height):+ for x in range(width):+ idx = y * rowstride + x * n_channels++ # Get greyscale value (use as intensity)+ grey = new_pixels[idx] / 255.0++ # Multiply by color+ new_pixels[idx] = int(grey * r * 255) # R+ new_pixels[idx + 1] = int(grey * g * 255) # G+ new_pixels[idx + 2] = int(grey * b * 255) # B++ # Apply opacity to alpha channel+ if n_channels == 4:+ new_pixels[idx + 3] = int(new_pixels[idx + 3] * opacity)++ # Create new pixbuf from modified pixels+ return GdkPixbuf.Pixbuf.new_from_data(+ bytes(new_pixels),+ GdkPixbuf.Colorspace.RGB,+ n_channels == 4,+ 8,+ width,+ height,+ rowstride+ )++ def animation_tick(self):+ needs_redraw = False+ self.frame_counter += 1++ # Always redraw when debugging to show frame updates+ if SHOW_MASKED_DEBUG:+ needs_redraw = True++ # Handle movement animation+ if self.target_path and self.path_index < len(self.target_path):+ elapsed = time.time() - self.move_start_time+ progress = min(1.0, elapsed / MOVE_DURATION)++ # Map progress to path index+ target_index = int(progress * (len(self.target_path) - 1))+ if target_index > self.path_index:+ self.path_index = target_index+ point = self.target_path[self.path_index]+ self.current_x = point[0]+ self.current_y = point[1]+ self.move(int(self.current_x - CURSOR_SIZE), int(self.current_y - CURSOR_SIZE))+ needs_redraw = True++ if progress >= 1.0:+ # Movement complete+ self.target_path = []+ self.path_index = 0++ # Handle click animation+ if self.clicking:+ self.click_anim_progress += 0.1+ if self.click_anim_progress >= 1.0:+ self.clicking = False+ self.click_anim_progress = 0.0+ needs_redraw = True++ # Handle fade in+ if self.visible and self.opacity < 1.0 and not self.fading:+ self.opacity = min(1.0, self.opacity + 0.1)+ needs_redraw = True++ # Handle fade out+ if self.fading:+ self.opacity = max(0.0, self.opacity - 0.05)+ needs_redraw = True+ if self.opacity <= 0:+ # Reset state so cursor can reappear on next move+ self.fading = False+ self.visible = False+ self.hide()++ if needs_redraw:+ self.drawing_area.queue_draw()++ return True # Continue timer++ def check_fade(self):+ if not self.fading and self.visible:+ idle_time = time.time() - self.last_activity+ if idle_time >= FADE_DELAY:+ self.fading = True+ return True++ def move_to(self, x: int, y: int, click: bool = False):+ """Move cursor to position with smooth animation"""+ self.last_activity = time.time()+ self.fading = False++ if click:+ self.clicking = True+ self.click_anim_progress = 0.0++ target = (float(x), float(y))++ if not self.visible:+ # First move - spawn from random direction+ self.visible = True+ self.show_all()++ angle = random.random() * 2 * math.pi+ spawn_x = x + math.cos(angle) * SPAWN_DISTANCE+ spawn_y = y + math.sin(angle) * SPAWN_DISTANCE++ self.current_x = spawn_x+ self.current_y = spawn_y+ self.move(int(spawn_x - CURSOR_SIZE), int(spawn_y - CURSOR_SIZE))++ # Generate smooth path+ self.target_path = generate_path((self.current_x, self.current_y), target)+ self.path_index = 0+ self.move_start_time = time.time()++ def play_click(self):+ """Play click animation at current position"""+ self.last_activity = time.time()+ self.fading = False+ self.clicking = True+ self.click_anim_progress = 0.0++ def hide_cursor(self):+ """Immediately hide the cursor"""+ self.opacity = 0.0+ self.visible = False+ self.fading = False+ self.hide()++ def set_masked(self, masked: bool):+ """Set whether cursor is masked (should be hidden)."""+ changed = self.masked != masked+ self.masked = masked+ # Always queue redraw to update debug label and cursor visibility+ # Don't call hide()/show_all() - let on_draw handle the rendering+ self.drawing_area.queue_draw()+ if changed:+ print(f"[overlay] masked={masked}", file=sys.stderr)+++class SocketServer(threading.Thread):+ def __init__(self, cursor: OverlayCursor):+ super().__init__(daemon=True)+ self.cursor = cursor+ self.running = True++ def run(self):+ # Remove existing socket+ try:+ os.unlink(SOCKET_PATH)+ except OSError:+ pass++ server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)+ server.bind(SOCKET_PATH)+ server.listen(5)+ os.chmod(SOCKET_PATH, 0o777)++ while self.running:+ try:+ server.settimeout(1.0)+ conn, _ = server.accept()+ data = conn.recv(4096).decode('utf-8')+ conn.close()++ for line in data.strip().split('\n'):+ if not line:+ continue+ try:+ cmd = json.loads(line)+ self.handle_command(cmd)+ except json.JSONDecodeError:+ pass+ except socket.timeout:+ continue+ except Exception as e:+ print(f"Socket error: {e}", file=sys.stderr)++ def handle_command(self, cmd: dict):+ cmd_type = cmd.get('type')++ if cmd_type == 'move':+ x = cmd.get('x', 0)+ y = cmd.get('y', 0)+ click = cmd.get('click', False)+ GLib.idle_add(self.cursor.move_to, x, y, click)++ elif cmd_type == 'click':+ GLib.idle_add(self.cursor.play_click)++ elif cmd_type == 'hide':+ GLib.idle_add(self.cursor.hide_cursor)++ elif cmd_type == 'masked':+ value = cmd.get('value', False)+ GLib.idle_add(self.cursor.set_masked, value)++ elif cmd_type == 'quit':+ GLib.idle_add(Gtk.main_quit)+++def send_command(cmd: dict) -> bool:+ """Send command to running overlay cursor"""+ try:+ sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)+ sock.connect(SOCKET_PATH)+ sock.send((json.dumps(cmd) + '\n').encode('utf-8'))+ sock.close()+ return True+ except:+ return False+++def main():+ # Parse arguments+ name = os.environ.get('CUABOT_NAME', 'cuabot')+ color = os.environ.get('CUABOT_COLOR', '')++ for arg in sys.argv[1:]:+ if arg.startswith('--name='):+ name = arg.split('=', 1)[1]+ elif arg.startswith('--color='):+ color = arg.split('=', 1)[1]++ # Generate color from name if not provided+ if not color:+ color = name_to_color(name)++ color = color.lstrip('#')++ # Check if already running - send move command instead+ if os.path.exists(SOCKET_PATH):+ # Try to connect+ if send_command({'type': 'ping'}):+ print(f"Overlay cursor already running", file=sys.stderr)+ sys.exit(0)+ else:+ # Stale socket, remove it+ try:+ os.unlink(SOCKET_PATH)+ except:+ pass++ print(f"Starting overlay cursor: name={name}, color=#{color}", file=sys.stderr)++ # Initialize GTK+ Gtk.init(sys.argv)++ # Create cursor window+ cursor = OverlayCursor(name, color)++ # Start socket server+ server = SocketServer(cursor)+ server.start()++ # Run GTK main loop+ try:+ Gtk.main()+ except KeyboardInterrupt:+ pass+ finally:+ server.running = False+ try:+ os.unlink(SOCKET_PATH)+ except:+ pass+++if __name__ == '__main__':+ main()diff --git a/libs/cuabot/src/onboarding.tsx b/libs/cuabot/src/onboarding.tsxnew file mode 100644index 0000000000..cdf878c115--- /dev/null+++ b/libs/cuabot/src/onboarding.tsx@@ -0,0 +1,352 @@+#!/usr/bin/env node+/**+ * CuaBot Onboarding UI+ */++import React, { useState, useEffect } from "react";+import { render, Box, Text, useInput, useApp } from "ink";+import { checkDocker, checkXpra, checkPlaywright } from "./utils.js";+import { AGENTS, AgentId, getDefaultAgent, setDefaultAgent, setTelemetryEnabled, loadSettings } from "./settings.js";+import { exec } from "child_process";++type CheckStatus = "ok" | "error" | "loading";++interface Check {+ label: string;+ status: CheckStatus;+ message: string;+}++function StatusLine({ check }: { check: Check }) {+ const icon = check.status === "ok" ? "✓" : check.status === "error" ? "✗" : "○";+ const color = check.status === "ok" ? "green" : check.status === "error" ? "red" : "gray";+ return (+ <Box>+ <Text color={color}>{icon} </Text>+ <Text>{check.label}: </Text>+ <Text dimColor>{check.message}</Text>+ </Box>+ );+}++function AgentSelector({ onSelect, onBack }: { onSelect: (agent: string) => void; onBack: () => void }) {+ const agentList = Object.entries(AGENTS) as [AgentId, typeof AGENTS[AgentId]][];+ const [selectedIndex, setSelectedIndex] = useState(0);++ useInput((input, key) => {+ if (key.upArrow) {+ setSelectedIndex((i) => (i > 0 ? i - 1 : agentList.length - 1));+ } else if (key.downArrow) {+ setSelectedIndex((i) => (i < agentList.length - 1 ? i + 1 : 0));+ } else if (key.return) {+ onSelect(agentList[selectedIndex][0]);+ } else if (key.escape) {+ onBack();+ }+ });++ return (+ <Box flexDirection="column" marginTop={1}>+ <Text dimColor>Select default agent (↑↓ Enter):</Text>+ <Box flexDirection="column" marginTop={1}>+ {agentList.map(([id, agent], index) => (+ <Box key={id}>+ <Text color={index === selectedIndex ? "cyan" : undefined}>+ {index === selectedIndex ? "❯ " : " "}+ {agent.name}+ </Text>+ <Text dimColor> - {agent.description}</Text>+ </Box>+ ))}+ </Box>+ </Box>+ );+}++function OptionSelector({ options, onSelect }: { options: { label: string; action: () => void }[]; onSelect: () => void }) {+ const [selectedIndex, setSelectedIndex] = useState(0);++ useInput((input, key) => {+ if (key.upArrow) {+ setSelectedIndex((i) => (i > 0 ? i - 1 : options.length - 1));+ } else if (key.downArrow) {+ setSelectedIndex((i) => (i < options.length - 1 ? i + 1 : 0));+ } else if (key.return) {+ options[selectedIndex].action();+ onSelect();+ }+ });++ return (+ <Box flexDirection="column" marginTop={1}>+ {options.map((opt, index) => (+ <Box key={index}>+ <Text color={index === selectedIndex ? "cyan" : undefined}>+ {index === selectedIndex ? "❯ " : " "}+ {opt.label}+ </Text>+ </Box>+ ))}+ </Box>+ );+}++function TelemetrySelector({ onSelect }: { onSelect: (enabled: boolean) => void }) {+ const [selectedIndex, setSelectedIndex] = useState(0);+ const options = [+ { label: "Yes, share prompts and usage data", description: "Help improve computer-use technology" },+ { label: "No thanks", description: "Keep prompts private" },+ ];++ useInput((input, key) => {+ if (key.upArrow) {+ setSelectedIndex((i) => (i > 0 ? i - 1 : options.length - 1));+ } else if (key.downArrow) {+ setSelectedIndex((i) => (i < options.length - 1 ? i + 1 : 0));+ } else if (key.return) {+ onSelect(selectedIndex === 0);+ }+ });++ return (+ <Box flexDirection="column" marginTop={1}>+ <Text dimColor>Share prompts to help improve computer-use technology?</Text>+ <Box flexDirection="column" marginTop={1}>+ {options.map((opt, index) => (+ <Box key={index}>+ <Text color={index === selectedIndex ? "cyan" : undefined}>+ {index === selectedIndex ? "❯ " : " "}+ {opt.label}+ </Text>+ </Box>+ ))}+ </Box>+ </Box>+ );+}++function Onboarding() {+ const { exit } = useApp();+ const [checks, setChecks] = useState<Check[]>([+ { label: "Default Agent", status: "loading", message: "checking..." },+ { label: "Docker", status: "loading", message: "checking..." },+ { label: "Xpra Client", status: "loading", message: "checking..." },+ { label: "Playwright", status: "loading", message: "checking..." },+ { label: "Usage Telemetry", status: "loading", message: "checking..." },+ ]);+ const [loading, setLoading] = useState(true);+ const [showAgentSelector, setShowAgentSelector] = useState(false);+ const [showTelemetrySelector, setShowTelemetrySelector] = useState(false);+ const [firstError, setFirstError] = useState<string | null>(null);+ const [xpraQuarantined, setXpraQuarantined] = useState(false);++ const runChecks = async () => {+ setLoading(true);+ const newChecks: Check[] = [];++ // Check default agent+ const defaultAgent = getDefaultAgent();+ newChecks.push({+ label: "Default Agent",+ status: defaultAgent ? "ok" : "error",+ message: defaultAgent ? `${AGENTS[defaultAgent as AgentId]?.name || defaultAgent}` : "not configured",+ });++ // Check Docker+ const docker = await checkDocker();+ newChecks.push({+ label: "Docker",+ status: docker.ok ? "ok" : "error",+ message: docker.ok ? "running" : "not found",+ });++ // Check Xpra+ const xpra = await checkXpra();+ setXpraQuarantined(xpra.quarantined || false);+ newChecks.push({+ label: "Xpra Client",+ status: xpra.ok ? "ok" : "error",+ message: xpra.message,+ });++ // Check Playwright+ const playwright = await checkPlaywright();+ newChecks.push({+ label: "Playwright",+ status: playwright.ok ? "ok" : "error",+ message: playwright.message,+ });++ // Check telemetry+ const settings = loadSettings();+ const telemetryAsked = settings.telemetryEnabled !== undefined;+ newChecks.push({+ label: "Usage Telemetry",+ status: telemetryAsked ? "ok" : "error",+ message: telemetryAsked ? (settings.telemetryEnabled ? "enabled" : "disabled") : "not configured",+ });++ setChecks(newChecks);+ setLoading(false);++ // Find first error+ const first = newChecks.find((c) => c.status === "error");+ setFirstError(first?.label || null);++ // If all good, exit+ if (newChecks.every((c) => c.status === "ok")) {+ console.log("\n✓ Ready! Run 'cuabot' to start.\n");+ exit();+ }+ };++ useEffect(() => {+ runChecks();+ }, []);++ useInput((input, key) => {+ if (key.escape || (key.ctrl && input === "c")) {+ exit();+ }+ });++ const openUrl = (url: string) => {+ const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";+ exec(`${cmd} "${url}"`);+ };++ const copyToClipboard = (text: string) => {+ const cmd = process.platform === "darwin" ? "pbcopy" : process.platform === "win32" ? "clip" : "xclip -selection clipboard";+ exec(`printf '%s' "${text}" | ${cmd}`);+ };++ const getXpraUrl = () => {+ if (process.platform === "darwin") return "https://github.com/Xpra-org/xpra/wiki/Download#-macos";+ if (process.platform === "linux") return "https://github.com/Xpra-org/xpra/wiki/Download#-linux";+ return "https://github.com/Xpra-org/xpra/wiki/Download#full-builds";+ };++ if (loading) {+ return (+ <Box flexDirection="column" padding={1}>+ <Text dimColor>cuabot onboarding</Text>+ <Text>Checking...</Text>+ </Box>+ );+ }++ if (showAgentSelector) {+ return (+ <Box flexDirection="column" padding={1}>+ <Text dimColor>cuabot onboarding</Text>+ <Box flexDirection="column" marginTop={1}>+ {checks.map((check, i) => (+ <StatusLine key={i} check={check} />+ ))}+ </Box>+ <AgentSelector+ onSelect={(agent) => {+ setDefaultAgent(agent);+ setShowAgentSelector(false);+ runChecks();+ }}+ onBack={() => setShowAgentSelector(false)}+ />+ </Box>+ );+ }++ if (showTelemetrySelector) {+ return (+ <Box flexDirection="column" padding={1}>+ <Text dimColor>cuabot onboarding</Text>+ <Box flexDirection="column" marginTop={1}>+ {checks.map((check, i) => (+ <StatusLine key={i} check={check} />+ ))}+ </Box>+ <TelemetrySelector+ onSelect={(enabled) => {+ setTelemetryEnabled(enabled);+ setShowTelemetrySelector(false);+ runChecks();+ }}+ />+ </Box>+ );+ }++ return (+ <Box flexDirection="column" padding={1}>+ <Text dimColor>cuabot onboarding</Text>+ <Box flexDirection="column" marginTop={1}>+ {checks.map((check, i) => (+ <StatusLine key={i} check={check} />+ ))}+ </Box>++ {firstError === "Default Agent" && (+ <OptionSelector+ options={[+ { label: "Configure default agent", action: () => setShowAgentSelector(true) },+ ]}+ onSelect={() => {}}+ />+ )}++ {firstError === "Usage Telemetry" && (+ <OptionSelector+ options={[+ { label: "Configure usage telemetry", action: () => setShowTelemetrySelector(true) },+ ]}+ onSelect={() => {}}+ />+ )}++ {firstError === "Docker" && (+ <OptionSelector+ options={[+ { label: "Open Docker Download", action: () => openUrl("https://www.docker.com/products/docker-desktop/") },+ { label: "Check Again", action: () => runChecks() },+ ]}+ onSelect={() => {}}+ />+ )}++ {firstError === "Xpra Client" && !xpraQuarantined && (+ <OptionSelector+ options={[+ { label: "Open Xpra Download", action: () => openUrl(getXpraUrl()) },+ { label: "Check Again", action: () => runChecks() },+ ]}+ onSelect={() => {}}+ />+ )}++ {firstError === "Xpra Client" && xpraQuarantined && (+ <OptionSelector+ options={[+ { label: "Exit and copy command: \x1b[2msudo xattr -rd com.apple.quarantine /Applications/Xpra.app\x1b[0m", action: () => { copyToClipboard("sudo xattr -rd com.apple.quarantine /Applications/Xpra.app"); exit(); } },+ { label: "Read why", action: () => openUrl("https://github.com/Xpra-org/xpra/wiki/Download#-macos") },+ { label: "Exit", action: () => exit() },+ ]}+ onSelect={() => {}}+ />+ )}++ {firstError === "Playwright" && (+ <OptionSelector+ options={[+ { label: "Exit and copy command: \x1b[2mnpx playwright install\x1b[0m", action: () => { copyToClipboard("npx playwright install"); exit(); } },+ { label: "Exit", action: () => exit() },+ ]}+ onSelect={() => {}}+ />+ )}+ </Box>+ );+}++export function runOnboarding() {+ render(<Onboarding />);+}diff --git a/libs/cuabot/src/prompts/.mcp.json b/libs/cuabot/src/prompts/.mcp.jsonnew file mode 100644index 0000000000..8f91e34fd9--- /dev/null+++ b/libs/cuabot/src/prompts/.mcp.json@@ -0,0 +1,8 @@+{+ "mcpServers": {+ "computer-use": {+ "command": "/home/user/.local/bin/uv",+ "args": ["run", "--script", "/home/user/.cuabot/mcp/computer-use-mcp.py"]+ }+ }+}diff --git a/libs/cuabot/src/prompts/SYSTEM.md b/libs/cuabot/src/prompts/SYSTEM.mdnew file mode 100644index 0000000000..74645e151d--- /dev/null+++ b/libs/cuabot/src/prompts/SYSTEM.md@@ -0,0 +1,175 @@+You are a computer-use agent with your own Ubuntu 22.04 sandbox (xpra). User sees your desktop in real-time. You have sudo privileges.++## Environment+- Node.js 20.x, Python 3.10, pip3, uv (Python package manager)+- Currently installed: chromium, agent-browser, feh, claude-code, x11-apps+- Python libs: matplotlib, numpy, pandas, seaborn, plotly+- uv is available for running self-contained Python scripts with inline dependencies++## Guidelines+- Keep responses brief+- Use agent-browser for browser automation (not chromium-browser)+- Use bash tool to run agent-browser commands+- If asked to open an app that's not installed, install it first using `sudo apt-get install`++## agent-browser++Browser automation CLI for AI agents. Always use `agent-browser` when doing browser tasks, NEVER use `chromium-browser` or `firefox` unless specifically asked.++### Quick Start++```bash+agent-browser open example.com+agent-browser snapshot # Get accessibility tree with refs+agent-browser click @e2 # Click by ref from snapshot+agent-browser fill @e3 "[email protected]" # Fill by ref+agent-browser get text @e1 # Get text by ref+agent-browser screenshot page.png+agent-browser close+```++### Core Commands++```bash+agent-browser open <url> --headed # Navigate to URL (use --headed to show browser)+agent-browser click <sel> # Click element+agent-browser dblclick <sel> # Double-click element+agent-browser type <sel> <text> # Type into element+agent-browser fill <sel> <text> # Clear and fill+agent-browser press <key> # Press key (Enter, Tab, Control+a)+agent-browser keydown <key> # Hold key down+agent-browser keyup <key> # Release key+agent-browser hover <sel> # Hover element+agent-browser select <sel> <val> # Select dropdown option+agent-browser check <sel> # Check checkbox+agent-browser uncheck <sel> # Uncheck checkbox+agent-browser scroll <dir> [px] # Scroll (up/down/left/right)+agent-browser drag <src> <tgt> # Drag and drop+agent-browser screenshot [path] # Take screenshot+agent-browser snapshot # Accessibility tree with refs (best for AI)+agent-browser close # Close browser+```++### Get Info++```bash+agent-browser get text <sel> # Get text content+agent-browser get html <sel> # Get innerHTML+agent-browser get value <sel> # Get input value+agent-browser get attr <sel> <attr> # Get attribute+agent-browser get title # Get page title+agent-browser get url # Get current URL+agent-browser get count <sel> # Count matching elements+```++### Check State++```bash+agent-browser is visible <sel> # Check if visible+agent-browser is enabled <sel> # Check if enabled+agent-browser is checked <sel> # Check if checked+```++### Find Elements (Semantic Locators)++```bash+agent-browser find role <role> <action> [value] # By ARIA role+agent-browser find text <text> <action> # By text content+agent-browser find label <label> <action> [value] # By label+agent-browser find placeholder <ph> <action> [value] # By placeholder+agent-browser find testid <id> <action> [value] # By data-testid+```++**Actions:** `click`, `fill`, `check`, `hover`, `text`++**Examples:**+```bash+agent-browser find role button click --name "Submit"+agent-browser find text "Sign In" click+agent-browser find label "Email" fill "[email protected]"+```++### Wait++```bash+agent-browser wait <selector> # Wait for element to be visible+agent-browser wait <ms> # Wait for time (milliseconds)+agent-browser wait --text "Welcome" # Wait for text to appear+agent-browser wait --url "**/dash" # Wait for URL pattern+agent-browser wait --load networkidle # Wait for load state+```++### Mouse Control++```bash+agent-browser mouse move <x> <y> # Move mouse+agent-browser mouse down [button] # Press button (left/right/middle)+agent-browser mouse up [button] # Release button+agent-browser mouse wheel <dy> [dx] # Scroll wheel+```++### Tabs & Navigation++```bash+agent-browser tab # List tabs+agent-browser tab new [url] # New tab+agent-browser tab <n> # Switch to tab n+agent-browser tab close [n] # Close tab+agent-browser back # Go back+agent-browser forward # Go forward+agent-browser reload # Reload page+```++### Snapshot Options++```bash+agent-browser snapshot # Full accessibility tree+agent-browser snapshot -i # Interactive elements only+agent-browser snapshot -c # Compact (remove empty elements)+agent-browser snapshot -d 3 # Limit depth to 3 levels+agent-browser snapshot -s "#main" # Scope to CSS selector+agent-browser snapshot -i -c -d 5 # Combine options+```++### Selectors++#### Refs (Recommended)++Refs provide deterministic element selection from snapshots:++```bash+# 1. Get snapshot with refs+agent-browser snapshot+# Output:+# - heading "Example Domain" [ref=e1] [level=1]+# - button "Submit" [ref=e2]+# - textbox "Email" [ref=e3]++# 2. Use refs to interact+agent-browser click @e2+agent-browser fill @e3 "[email protected]"+agent-browser get text @e1+```++#### CSS Selectors++```bash+agent-browser click "#id"+agent-browser click ".class"+agent-browser click "div > button"+```++#### Text & XPath++```bash+agent-browser click "text=Submit"+agent-browser click "xpath=//button"+```++### Optimal AI Workflow++1. Open page: `agent-browser open example.com`+2. Get snapshot: `agent-browser snapshot -i`+3. Identify target refs from snapshot+4. Execute actions using refs: `agent-browser click @e2`+5. Re-snapshot after page changesdiff --git a/libs/cuabot/src/settings.ts b/libs/cuabot/src/settings.tsnew file mode 100644index 0000000000..20bee19d08--- /dev/null+++ b/libs/cuabot/src/settings.ts@@ -0,0 +1,106 @@+/**+ * CuaBot Settings Management+ */++import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";+import { join } from "path";+import { homedir } from "os";++const CONFIG_DIR = join(homedir(), ".cuabot");+const SETTINGS_FILE = join(CONFIG_DIR, "settings.json");++export interface Settings {+ defaultAgent?: string;+ telemetryEnabled?: boolean;+}++export const AGENTS = {+ claude: {+ name: "Claude Code",+ description: "Anthropic's Claude AI coding assistant",+ command: "claude",+ },+ gemini: {+ name: "Gemini CLI",+ description: "Google's Gemini AI assistant",+ command: "npx @google/gemini-cli",+ },+ codex: {+ name: "OpenAI Codex",+ description: "OpenAI's Codex coding assistant",+ command: "codex",+ },+ aider: {+ name: "Aider",+ description: "AI pair programming in your terminal",+ command: "aider",+ },+ openclaw: {+ name: "OpenClaw",+ description: "OpenClaw AI assistant",+ command: "openclaw",+ },+ vibe: {+ name: "Vibe",+ description: "Mistral's Vibe coding assistant",+ command: "vibe",+ },+} as const;++export type AgentId = keyof typeof AGENTS;++function ensureConfigDir() {+ if (!existsSync(CONFIG_DIR)) {+ mkdirSync(CONFIG_DIR, { recursive: true });+ }+}++export function loadSettings(): Settings {+ ensureConfigDir();+ if (!existsSync(SETTINGS_FILE)) {+ return {};+ }+ try {+ return JSON.parse(readFileSync(SETTINGS_FILE, "utf-8"));+ } catch {+ return {};+ }+}++export function saveSettings(settings: Settings): void {+ ensureConfigDir();+ writeFileSync(SETTINGS_FILE, JSON.stringify(settings, null, 2));+}++export function getDefaultAgent(): string | undefined {+ return loadSettings().defaultAgent;+}++export function setDefaultAgent(agent: string): void {+ const settings = loadSettings();+ settings.defaultAgent = agent;+ saveSettings(settings);+}++export function getTelemetryEnabled(): boolean {+ const settings = loadSettings();+ const envValue = process.env.CUABOT_TELEMETRY?.toLowerCase() === "true";+ const envFalse = process.env.CUABOT_TELEMETRY?.toLowerCase() === "false";++ // If any source is explicitly false, return false+ if (settings.telemetryEnabled === false || envFalse) {+ return false;+ }+ // If any source is true, return true+ if (settings.telemetryEnabled === true || envValue) {+ return true;+ }+ // Default to false+ return false;+}++export function setTelemetryEnabled(enabled: boolean): void {+ const settings = loadSettings();+ settings.telemetryEnabled = enabled;+ saveSettings(settings);+}diff --git a/libs/cuabot/src/telemetry.ts b/libs/cuabot/src/telemetry.tsnew file mode 100644index 0000000000..6f2036f917--- /dev/null+++ b/libs/cuabot/src/telemetry.ts@@ -0,0 +1,139 @@+/**+ * CuaBot Telemetry+ * Collects usage data to help improve computer-use technology+ */++import { appendFileSync, readFileSync, existsSync } from "fs";+import { join, dirname } from "path";+import { fileURLToPath } from "url";+import { getTelemetryEnabled } from "./settings.js";++const __filename = fileURLToPath(import.meta.url);+const __dirname = dirname(__filename);++// Log file path: __dirname/../telemetry.log+const TELEMETRY_LOG_PATH = join(__dirname, "..", "telemetry.log");++export interface TelemetryEvent {+ type: "mcp_tool_call" | "prompt_change" | "cli_invocation";+ timestamp: number;+ // MCP tool call fields+ tool_name?: string;+ tool_args?: Record<string, unknown>;+ // Prompt change fields+ prompt?: string;+ session_id?: string;+ project?: string;+ // CLI invocation fields+ cli_args?: string[];+ cwd?: string;+}++/**+ * Log a telemetry event to telemetry.log+ */+export function log_event(event: TelemetryEvent): void {+ if (!getTelemetryEnabled()) return;+ try {+ const line = JSON.stringify(event) + "\n";+ appendFileSync(TELEMETRY_LOG_PATH, line);+ } catch (err) {+ console.error("[telemetry] Failed to log event:", err);+ }+}++/**+ * Log an MCP tool call+ */+export function log_mcp_tool_call(tool_name: string, tool_args: Record<string, unknown>): void {+ if (!getTelemetryEnabled()) return;+ log_event({+ type: "mcp_tool_call",+ timestamp: Date.now(),+ tool_name,+ tool_args,+ });+}++/**+ * Log a CLI invocation+ */+export function log_cli_invocation(args: string[]): void {+ if (!getTelemetryEnabled()) return;+ log_event({+ type: "cli_invocation",+ timestamp: Date.now(),+ cli_args: args,+ cwd: process.cwd(),+ });+}++// History scraper state+let lastPrompt: string | null = null;+let historyPollingInterval: ReturnType<typeof setInterval> | null = null;++interface HistoryEntry {+ display: string;+ pastedContents: Record<string, unknown>;+ timestamp: number;+ project: string;+ sessionId: string;+}++/**+ * Scrape Claude history.jsonl and log prompt changes+ */+export function scrapeHistory(historyPath: string): void {+ try {+ if (!existsSync(historyPath)) return;++ const content = readFileSync(historyPath, "utf-8");+ const lines = content.trim().split("\n").filter(Boolean);+ if (lines.length === 0) return;++ // Get the last entry+ const lastLine = lines[lines.length - 1];+ const entry: HistoryEntry = JSON.parse(lastLine);+ const currentPrompt = entry.display;++ // Log if prompt changed+ if (currentPrompt !== lastPrompt) {+ lastPrompt = currentPrompt;+ log_event({+ type: "prompt_change",+ timestamp: Date.now(),+ prompt: currentPrompt,+ session_id: entry.sessionId,+ project: entry.project,+ });+ }+ } catch (err) {+ // Silently ignore errors (file might be in use, etc.)+ }+}++/**+ * Start periodic history scraping+ */+export function startHistoryPolling(historyPath: string, intervalMs: number = 2000): void {+ if (historyPollingInterval) return;+ if (!getTelemetryEnabled()) return;++ // Initial scrape+ scrapeHistory(historyPath);++ // Poll periodically+ historyPollingInterval = setInterval(() => {+ scrapeHistory(historyPath);+ }, intervalMs);+}++/**+ * Stop history polling+ */+export function stopHistoryPolling(): void {+ if (historyPollingInterval) {+ clearInterval(historyPollingInterval);+ historyPollingInterval = null;+ }+}diff --git a/libs/cuabot/src/utils.ts b/libs/cuabot/src/utils.tsnew file mode 100644index 0000000000..6a3242440c--- /dev/null+++ b/libs/cuabot/src/utils.ts@@ -0,0 +1,204 @@+/**+ * CuaBot Utility Functions+ * Shared utilities for Docker and Xpra detection+ */++import { exec } from "child_process";+import { existsSync } from "fs";+import { dirname, join } from "path";+import { fileURLToPath } from "url";+import { promisify } from "util";++const execAsync = promisify(exec);++/**+ * Generate a consistent color from a name using a hash+ */+export function nameToColor(name: string): string {+ let hash = 0;+ for (let i = 0; i < name.length; i++) {+ hash = ((hash << 5) - hash) + name.charCodeAt(i);+ hash = hash & hash;+ }++ // Use golden ratio for nice hue distribution+ const hue = (Math.abs(hash) * 0.618033988749895) % 1;++ // Convert HSL to RGB (saturation=0.7, lightness=0.5 for vibrant colors)+ const s = 0.7;+ const l = 0.5;++ const c = (1 - Math.abs(2 * l - 1)) * s;+ const x = c * (1 - Math.abs((hue * 6) % 2 - 1));+ const m = l - c / 2;++ let r: number, g: number, b: number;+ const h = hue * 6;++ if (h < 1) { r = c; g = x; b = 0; }+ else if (h < 2) { r = x; g = c; b = 0; }+ else if (h < 3) { r = 0; g = c; b = x; }+ else if (h < 4) { r = 0; g = x; b = c; }+ else if (h < 5) { r = x; g = 0; b = c; }+ else { r = c; g = 0; b = x; }++ const toHex = (n: number) => Math.round((n + m) * 255).toString(16).padStart(2, "0").toUpperCase();+ return `#${toHex(r)}${toHex(g)}${toHex(b)}`;+}++// Xpra paths by platform+const XPRA_PATHS = {+ win32: "C:\\Program Files\\Xpra\\xpra_cmd.exe",+ darwin: "/Applications/Xpra.app/Contents/MacOS/Xpra",+ linux: "xpra",+} as const;++/**+ * Get the Xpra binary path for the current platform+ */+export function getXpraBinPath(): string {+ const platform = process.platform as keyof typeof XPRA_PATHS;+ return XPRA_PATHS[platform] || "xpra";+}++/**+ * Get the path to an asset file+ */+function getAssetPath(filename: string): string {+ const currentDir = dirname(fileURLToPath(import.meta.url));+ return join(currentDir, "..", "assets", filename);+}++/**+ * Get the Xpra attach command arguments+ */+export function getXpraAttachArgs(containerPort: number, sessionName?: string | null): string[] {+ const platform = process.platform;+ const iconFile = platform === "win32" ? "icon.ico" : "icon.png";+ const iconPath = getAssetPath(iconFile);+ const name = sessionName || "default";+ const displayName = `cuabot (${name})`;++ // Generate border color from session name to match overlay cursor+ const borderColor = "auto" // TODO: fix this nameToColor(name).substring(1); // remove #++ const args = [+ "attach",+ `tcp://localhost:${containerPort}`,+ "--splash=no",+ "--notifications=no",+ `--border=${borderColor},4`,+ "--sharing=yes",+ `--tray-icon=${iconPath}`,+ `--window-icon=${iconPath}`,+ `--session-name=${displayName}`,+ ];++ // Mac-only dock icon+ if (platform === "darwin") {+ args.push(`--dock-icon=${iconPath}`);+ }++ return args;+}++/**+ * Check if Docker is available and running+ */+export async function checkDocker(): Promise<{ ok: boolean; message: string }> {+ try {+ await execAsync("docker info");+ return { ok: true, message: "Docker is running" };+ } catch {+ try {+ await execAsync("docker --version");+ return { ok: false, message: "Docker is installed but not running. Please start Docker Desktop." };+ } catch {+ return { ok: false, message: "Docker is not installed. Please install Docker Desktop from https://www.docker.com/products/docker-desktop/" };+ }+ }+}++/**+ * Check if Xpra client is available+ */+export async function checkXpra(): Promise<{ ok: boolean; message: string }> {+ const xpraPath = getXpraBinPath();+ const platform = process.platform;++ // Platform-specific install instructions+ const installInstructions = platform === "darwin"+ ? "Please install from https://github.com/Xpra-org/xpra/wiki/Download and ensure it's installed at /Applications/Xpra.app"+ : platform === "linux"+ ? "Please install via your package manager (e.g., 'apt install xpra' or 'brew install xpra')"+ : "Please install from https://github.com/Xpra-org/xpra/wiki/Download";++ // For absolute paths, check if file exists+ if (xpraPath.includes("/") || xpraPath.includes("\\")) {+ if (existsSync(xpraPath)) {+ // On macOS, check for quarantine attribute+ if (platform === "darwin") {+ try {+ const { stdout } = await execAsync("xattr /Applications/Xpra.app");+ if (stdout.includes("com.apple.quarantine")) {+ return { ok: false, message: `Xpra is installed but quarantined. Run: xattr -d com.apple.quarantine /Applications/Xpra.app` };+ }+ } catch {+ // xattr command failed, ignore+ }+ }+ return { ok: true, message: "Xpra client found" };+ }+ return {+ ok: false,+ message: `Xpra client not found. ${installInstructions}`+ };+ }++ // For command names, try to run with --version+ try {+ await execAsync(`${xpraPath} --version`);+ return { ok: true, message: "Xpra client found" };+ } catch {+ return {+ ok: false,+ message: `Xpra client not found. ${installInstructions}`+ };+ }+}++/**+ * Check if Playwright Chromium is installed+ */+export async function checkPlaywright(): Promise<{ ok: boolean; message: string }> {+ try {+ const { chromium } = await import("playwright");+ const browser = await chromium.launch({ headless: true });+ await browser.close();+ return { ok: true, message: "installed" };+ } catch {+ return { ok: false, message: "not installed" };+ }+}++/**+ * Check all dependencies required for cuabot to run+ */+export async function checkDependencies(): Promise<{ ok: boolean; errors: string[] }> {+ const errors: string[] = [];++ const [dockerCheck, xpraCheck] = await Promise.all([+ checkDocker(),+ checkXpra(),+ ]);++ if (!dockerCheck.ok) {+ errors.push(dockerCheck.message);+ }++ if (!xpraCheck.ok) {+ errors.push(xpraCheck.message);+ }++ return { ok: errors.length === 0, errors };+}diff --git a/libs/cuabot/tsconfig.json b/libs/cuabot/tsconfig.jsonnew file mode 100644index 0000000000..9b837dc568--- /dev/null+++ b/libs/cuabot/tsconfig.json@@ -0,0 +1,19 @@+{+ "compilerOptions": {+ "target": "ES2022",+ "module": "ESNext",+ "moduleResolution": "bundler",+ "lib": ["ES2022", "DOM"],+ "jsx": "react-jsx",+ "strict": true,+ "esModuleInterop": true,+ "skipLibCheck": true,+ "forceConsistentCasingInFileNames": true,+ "outDir": "./dist",+ "rootDir": "./src",+ "declaration": true,+ "resolveJsonModule": true+ },+ "include": ["src/**/*"],+ "exclude": ["node_modules", "dist"]+}