From c1d716bb84be47832d8b4aba806388d780f756fe Mon Sep 17 00:00:00 2001 From: Jorge Fernando Date: Wed, 25 Mar 2026 10:16:14 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20MCP=20Browser=20-=20servidor=20MCP=20pa?= =?UTF-8?q?ra=20automa=C3=A7=C3=A3o=20de=20navegador=20com=20Playwright?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 24 + README.md | 254 ++++++++ browser.js | 121 ++++ docs.html | 444 +++++++++++++ package-lock.json | 1184 ++++++++++++++++++++++++++++++++++ package.json | 17 + server.js | 108 ++++ tools/agentFlow.js | 62 ++ tools/agentFlowV2.js | 85 +++ tools/click.js | 19 + tools/closeBrowser.js | 11 + tools/extractElements.js | 36 ++ tools/fillFormAuto.js | 62 ++ tools/getButtons.js | 23 + tools/getForms.js | 32 + tools/getLinks.js | 22 + tools/getText.js | 21 + tools/openUrl.js | 56 ++ tools/screenshot.js | 16 + tools/smartClick.js | 54 ++ tools/smartType.js | 84 +++ tools/smartWaitNavigation.js | 26 + tools/type.js | 20 + tools/waitForSelector.js | 22 + 24 files changed, 2803 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 browser.js create mode 100644 docs.html create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 server.js create mode 100644 tools/agentFlow.js create mode 100644 tools/agentFlowV2.js create mode 100644 tools/click.js create mode 100644 tools/closeBrowser.js create mode 100644 tools/extractElements.js create mode 100644 tools/fillFormAuto.js create mode 100644 tools/getButtons.js create mode 100644 tools/getForms.js create mode 100644 tools/getLinks.js create mode 100644 tools/getText.js create mode 100644 tools/openUrl.js create mode 100644 tools/screenshot.js create mode 100644 tools/smartClick.js create mode 100644 tools/smartType.js create mode 100644 tools/smartWaitNavigation.js create mode 100644 tools/type.js create mode 100644 tools/waitForSelector.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d72184d --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Dependências +node_modules/ + +# Screenshots gerados +*.png + +# Logs +*.log + +# Variáveis de ambiente +.env +.env.local + +# OS +.DS_Store +Thumbs.db +desktop.ini + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ diff --git a/README.md b/README.md new file mode 100644 index 0000000..4c40d46 --- /dev/null +++ b/README.md @@ -0,0 +1,254 @@ +# MCP-Browser + +MCP server que permite a qualquer agente de IA controlar um navegador real usando [Playwright](https://playwright.dev/). + +![Node](https://img.shields.io/badge/Node.js-18+-339933?logo=node.js&logoColor=white) +![MCP](https://img.shields.io/badge/MCP-stdio-blue) +![Platform](https://img.shields.io/badge/Windows%20|%20Linux%20|%20macOS-lightgrey) +![Tools](https://img.shields.io/badge/17%20tools-green) + +## Funcionalidades + +- Controle total de navegador via IA +- 17 tools prontas para uso +- Reuso automático de abas (mesmo domínio) +- Preenchimento automático de formulários +- Fluxos agentísticos com retry +- Compatível com qualquer plataforma MCP + +## Pré-requisitos + +| Dependência | Versão mínima | +|-------------|---------------| +| Node.js | 18+ | +| npm | 9+ | + +## Instalação + +```bash +# 1. Clonar o repositório +git clone https://git.jf.eng.br/jfeng/MCP-Browser.git +cd MCP-Browser + +# 2. Instalar dependências +npm install + +# 3. Instalar Chromium do Playwright +npx playwright install chromium + +# Linux: instalar dependências do sistema +sudo npx playwright install-deps chromium +``` + +## Configuração por plataforma + +Todas as plataformas usam o mesmo padrão: + +``` +Comando: node +Argumento: /caminho/absoluto/MCP-Browser/server.js +Transport: stdio +``` + +### OpenCode + +```bash +opencode mcp add +``` + +- **Nome:** `meu-navegador` +- **Tipo:** `Local` +- **Comando:** `node /caminho/MCP-Browser/server.js` + +### Cursor + +`~/.cursor/mcp.json` (global) ou `.cursor/mcp.json` (projeto): + +```json +{ + "mcpServers": { + "browser": { + "command": "node", + "args": ["/caminho/MCP-Browser/server.js"] + } + } +} +``` + +### Claude Desktop + +`%APPDATA%\Claude\claude_desktop_config.json` (Windows) +`~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) + +```json +{ + "mcpServers": { + "browser": { + "command": "node", + "args": ["/caminho/MCP-Browser/server.js"] + } + } +} +``` + +### Windsurf + +`~/.windsurf/mcp.json`: + +```json +{ + "mcpServers": { + "browser": { + "command": "node", + "args": ["/caminho/MCP-Browser/server.js"] + } + } +} +``` + +### Trae + +Settings → Extensions → MCP → Adicionar server: + +- **Name:** `browser` +- **Command:** `node` +- **Args:** `["/caminho/MCP-Browser/server.js"]` + +### Antigravity + +Configuração de MCP → Novo server: + +- **Name:** `browser` +- **Type:** `stdio` +- **Command:** `node /caminho/MCP-Browser/server.js` + +### VS Code + +`.vscode/mcp.json`: + +```json +{ + "mcpServers": { + "browser": { + "command": "node", + "args": ["/caminho/MCP-Browser/server.js"] + } + } +} +``` + +### Qualquer plataforma MCP + +Se suporta **MCP stdio transport**, use: + +``` +Comando: node +Argumento: /caminho/absoluto/MCP-Browser/server.js +``` + +## Tools disponíveis (17) + +| # | Tool | Descrição | Parâmetros | +|---|------|-----------|------------| +| 1 | `open_url` | Abre uma URL | `url` | +| 2 | `click` | Clica por seletor CSS | `selector` | +| 3 | `type` | Digita texto em campo | `selector`, `text` | +| 4 | `screenshot` | Captura screenshot | `fullPage` (opcional) | +| 5 | `get_text` | Extrai texto da página | `selector` (opcional) | +| 6 | `get_links` | Lista links | `selector` (opcional) | +| 7 | `wait_for_selector` | Espera elemento aparecer | `selector`, `timeout` | +| 8 | `extract_elements` | Extrai elementos com atributos | `selector`, `attributes` | +| 9 | `smart_click` | Clica por texto visível | `text` | +| 10 | `smart_type` | Digita por label/placeholder | `label`, `text` | +| 11 | `get_buttons` | Lista botões disponíveis | — | +| 12 | `smart_wait_navigation` | Espera mudança de URL | `timeout` (opcional) | +| 13 | `get_forms` | Lista formulários e campos | — | +| 14 | `fill_form_auto` | Preenche formulário auto | `data` | +| 15 | `agent_flow` | Fluxo automático simples | `goal`, `data` | +| 16 | `agent_flow_v2` | Fluxo com retry/fallback | `goal`, `data`, `retries` | +| 17 | `close_browser` | Fecha o navegador | — | + +## Exemplos de uso + +### Abrir site e extrair conteúdo + +``` +open_url("https://example.com") +get_text() +get_links() +screenshot() +``` + +### Login automático + +``` +open_url("https://site.com/login") +fill_form_auto({"email": "user@test.com", "password": "1234"}) +smart_click("Entrar") +smart_wait_navigation() +``` + +### Scraping com atributos + +``` +open_url("https://site.com/produtos") +extract_elements(".produto", ["href", "data-id"]) +``` + +## Estrutura do projeto + +``` +MCP-Browser/ +├── server.js # Servidor MCP (entry point) +├── browser.js # Engine Playwright (singleton) +├── package.json +├── docs.html # Documentação detalhada +└── tools/ + ├── openUrl.js + ├── click.js + ├── type.js + ├── screenshot.js + ├── getText.js + ├── getLinks.js + ├── getButtons.js + ├── getForms.js + ├── extractElements.js + ├── waitForSelector.js + ├── smartClick.js + ├── smartType.js + ├── fillFormAuto.js + ├── smartWaitNavigation.js + ├── agentFlow.js + ├── agentFlowV2.js + └── closeBrowser.js +``` + +## Comportamento + +- **Reuso de abas:** mesmo domínio reutiliza aba, domínios diferentes abrem nova aba +- **Headed mode:** navegador abre visível. Para headless, edite `browser.js` e mude `headless: true` +- **Singleton:** uma única instância do navegador compartilhada entre todas as tools + +## Solução de problemas + +| Problema | Solução | +|----------|---------| +| Tools não aparecem | Reiniciar a IDE após configurar MCP | +| `node: not found` | Instalar Node.js 18+ e adicionar ao PATH | +| Chromium não encontrado | `npx playwright install chromium` | +| Erro de permissão (Linux) | `sudo npx playwright install-deps chromium` | +| Caminho com espaços | Usar aspas no caminho | + +## Caminhos por SO + +| Sistema | Exemplo | +|---------|---------| +| Windows | `C:/Users/seuuser/mcp-browser/server.js` | +| macOS | `/Users/seuuser/mcp-browser/server.js` | +| Linux | `/home/seuuser/mcp-browser/server.js` | + +> **Importante:** Nunca usar `\` simples. Sempre `/` ou `\\`. + +## Licença + +MIT diff --git a/browser.js b/browser.js new file mode 100644 index 0000000..d7975c5 --- /dev/null +++ b/browser.js @@ -0,0 +1,121 @@ +const { chromium } = require('playwright'); + +let browser = null; +let context = null; +let page = null; + +async function start() { + if (browser) return; + if (page) return; + + browser = await chromium.launch({ + headless: false, + args: ['--disable-blink-features=AutomationControlled'] + }); + + context = await browser.newContext({ + viewport: { width: 1280, height: 720 }, + userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' + }); + + page = await context.newPage(); + + browser.on('disconnected', () => { + browser = null; + context = null; + page = null; + }); +} + +async function ensurePage() { + if (!browser) { + await start(); + return page; + } + + if (!page || page.isClosed()) { + page = await context.newPage(); + } + + return page; +} + +async function goto(url) { + const p = await ensurePage(); + await p.goto(url, { + waitUntil: 'domcontentloaded', + timeout: 30000 + }); + + await p.waitForTimeout(1500); +} + +async function click(selector) { + const p = await ensurePage(); + await p.waitForSelector(selector, { state: 'visible', timeout: 10000 }); + await p.click(selector); +} + +async function type(selector, text) { + const p = await ensurePage(); + await p.waitForSelector(selector, { state: 'visible', timeout: 10000 }); + await p.fill(selector, text); +} + +async function content() { + const p = await ensurePage(); + return await p.content(); +} + +async function title() { + const p = await ensurePage(); + return await p.title(); +} + +async function screenshot(path, fullPage = true) { + const p = await ensurePage(); + await p.screenshot({ path, fullPage }); +} + +async function newTab() { + const p = await context.newPage(); + page = p; + return p; +} + +async function close() { + if (browser) { + try { + await browser.close(); + } catch (e) { + } + browser = null; + context = null; + page = null; + } +} + +module.exports = { + start, + goto, + click, + type, + content, + title, + screenshot, + close, + newTab, + ensurePage, + + get page() { + return page; + }, + + get browser() { + return browser; + }, + + get context() { + return context; + } +}; diff --git a/docs.html b/docs.html new file mode 100644 index 0000000..5a9093c --- /dev/null +++ b/docs.html @@ -0,0 +1,444 @@ + + + + + + MCP-Browser — Documentação + + + + +

MCP-Browser

+

+ MCP server que permite a qualquer agente de IA controlar um navegador real via Playwright. + 17 tools + Windows / Linux / macOS +

+ + +
+

Pré-requisitos

+ + + + + + +
DependênciaVersão mínimaVerificar
Node.js18+node -v
npm9+npm -v
Playwright1.50+npx playwright --version
+
+ + +
+

Instalação

+ +

1. Clonar ou copiar o projeto

+
# Opção A — git clone
+git clone https://git.jf.eng.br/jfeng/MCP-Browser.git
+cd MCP-Browser
+
+# Opção B — copiar a pasta manualmente para qualquer diretório
+ +

2. Instalar dependências

+
npm install
+ +

3. Instalar navegadores do Playwright

+
npx playwright install chromium
+ +
+ Linux: Pode precisar instalar dependências do sistema:
+ sudo npx playwright install-deps chromium +
+ +

4. Testar se funciona

+
node server.js
+

O servidor inicia e aguarda conexão via stdin/stdout (MCP stdio transport). Não aparece nada no terminal — isso é normal.

+
+ + +
+

Estrutura do projeto

+
MCP-Browser/
+├── server.js              ← servidor MCP (entry point)
+├── browser.js             ← engine Playwright (singleton)
+├── package.json
+├── package-lock.json
+├── docs.html              ← esta documentação
+├── node_modules/
+└── tools/
+    ├── openUrl.js         ← abre URL (reusa aba se mesmo domínio)
+    ├── click.js           ← clica por seletor CSS
+    ├── type.js            ← digita texto em campo
+    ├── screenshot.js      ← captura screenshot
+    ├── getText.js         ← extrai texto da página
+    ├── getLinks.js        ← lista todos os links
+    ├── getButtons.js      ← lista botões disponíveis
+    ├── getForms.js        ← lista formulários e campos
+    ├── extractElements.js ← extrai elementos com atributos
+    ├── waitForSelector.js ← espera elemento aparecer
+    ├── smartClick.js      ← clica por texto visível
+    ├── smartType.js       ← digita por label/placeholder
+    ├── fillFormAuto.js    ← preenche formulário automaticamente
+    ├── smartWaitNavigation.js ← espera navegação
+    ├── agentFlow.js       ← fluxo automático simples
+    ├── agentFlowV2.js     ← fluxo com retry e fallback
+    └── closeBrowser.js    ← fecha o navegador
+
+ + +
+

Configuração por plataforma

+ + +
+

OpenCode

+
    +
  1. Abra o terminal e execute:
    + opencode mcp add +
  2. +
  3. Preencha os campos: +
      +
    • Nome: meu-navegador
    • +
    • Tipo: Local
    • +
    • Comando: node /caminho/absoluto/MCP-Browser/server.js
    • +
    +
  4. +
  5. Reinicie o OpenCode.
  6. +
  7. Verifique: opencode mcp list
  8. +
+
+ + +
+

Cursor

+
    +
  1. Abra Settings → MCP (ou .cursor/mcp.json no projeto).
  2. +
  3. Adicione ao arquivo ~/.cursor/mcp.json (global) ou .cursor/mcp.json (projeto):
  4. +
+
{
+  "mcpServers": {
+    "browser": {
+      "command": "node",
+      "args": ["/caminho/absoluto/MCP-Browser/server.js"]
+    }
+  }
+}
+
    +
  1. Reinicie o Cursor. As tools aparecerão no chat do Composer.
  2. +
+
+ + +
+

Claude Desktop

+
    +
  1. Abra o arquivo de configuração: +
      +
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • +
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • +
    • Linux: ~/.config/Claude/claude_desktop_config.json
    • +
    +
  2. +
  3. Adicione:
  4. +
+
{
+  "mcpServers": {
+    "browser": {
+      "command": "node",
+      "args": ["/caminho/absoluto/MCP-Browser/server.js"]
+    }
+  }
+}
+
    +
  1. Reinicie o Claude Desktop.
  2. +
+
+ + +
+

Windsurf (Codeium)

+
    +
  1. Abra Settings → Cascade → MCP Servers.
  2. +
  3. Ou edite ~/.windsurf/mcp.json:
  4. +
+
{
+  "mcpServers": {
+    "browser": {
+      "command": "node",
+      "args": ["/caminho/absoluto/MCP-Browser/server.js"]
+    }
+  }
+}
+
    +
  1. Reinicie o Windsurf.
  2. +
+
+ + +
+

Trae

+
    +
  1. Abra Settings → Extensions → MCP.
  2. +
  3. Adicione server manualmente: +
      +
    • Name: browser
    • +
    • Command: node
    • +
    • Args: ["/caminho/absoluto/MCP-Browser/server.js"]
    • +
    +
  4. +
  5. Ou edite o arquivo de configuração do Trae equivalente ao mcp.json.
  6. +
+
+ + +
+

Antigravity

+
    +
  1. Abra a configuração de MCP do Antigravity.
  2. +
  3. Adicione um novo server com: +
      +
    • Name: browser
    • +
    • Type: stdio
    • +
    • Command: node /caminho/absoluto/MCP-Browser/server.js
    • +
    +
  4. +
  5. Salve e reinicie.
  6. +
+
+ + +
+

VS Code (com extensão MCP)

+
    +
  1. Instale a extensão MCP no VS Code.
  2. +
  3. Abra .vscode/mcp.json no workspace ou settings.json global.
  4. +
  5. Adicione:
  6. +
+
{
+  "mcpServers": {
+    "browser": {
+      "command": "node",
+      "args": ["/caminho/absoluto/MCP-Browser/server.js"]
+    }
+  }
+}
+
+ + +
+

Qualquer outra plataforma MCP

+

Se a plataforma suporta MCP stdio transport, use:

+
Comando:   node
+Argumento: /caminho/absoluto/MCP-Browser/server.js
+Transport: stdio
+

O servidor comunica via stdin/stdout — não precisa porta, não precisa daemon.

+
+ +
+ + +
+

Caminhos por sistema operacional

+ + + + + + +
SistemaFormato do caminhoExemplo
WindowsUse / ou \\C:/Users/seuuser/mcp-browser/server.js
macOSUnix path/Users/seuuser/mcp-browser/server.js
LinuxUnix path/home/seuuser/mcp-browser/server.js
+ +
+ Importante: Nunca use \ simples nos caminhos. Sempre / ou \\. +
+
+ + +
+

Lista de tools (17)

+ + + + + + + + + + + + + + + + + + + + +
#ToolDescriçãoParâmetros
1open_urlAbre uma URL no navegadorurl (string, obrigatório)
2clickClica em elemento por seletor CSSselector (string, obrigatório)
3typeDigita texto em um camposelector, text
4screenshotCaptura screenshot da páginafullPage (bool, opcional)
5get_textExtrai texto da páginaselector (opcional, padrão: body)
6get_linksLista todos os linksselector (opcional, padrão: a)
7wait_for_selectorEspera elemento aparecer no DOMselector, timeout
8extract_elementsExtrai elementos com atributosselector, attributes (array)
9smart_clickClica pelo texto visíveltext (string, obrigatório)
10smart_typeDigita buscando por label/placeholderlabel, text
11get_buttonsLista botões disponíveis
12smart_wait_navigationEspera mudança de URLtimeout (opcional)
13get_formsLista formulários e seus campos
14fill_form_autoPreenche formulário automaticamentedata (objeto, obrigatório)
15agent_flowFluxo automático simplesgoal, data (opcional)
16agent_flow_v2Fluxo com retry e fallbackgoal, data, retries
17close_browserFecha o navegador
+
+ + +
+

Exemplos de uso

+ +

Abrir site e extrair conteúdo

+
open_url("https://example.com")
+get_text()
+get_links()
+screenshot()
+ +

Login automático

+
open_url("https://site.com/login")
+fill_form_auto({"email": "user@test.com", "password": "1234"})
+smart_click("Entrar")
+smart_wait_navigation()
+get_text()
+ +

Scraping com atributos

+
open_url("https://site.com/produtos")
+extract_elements(".produto", ["href", "data-id", "class"])
+ +

Preencher formulário complexo

+
open_url("https://site.com/contato")
+smart_type("nome", "João Silva")
+type("#email", "joao@email.com")
+smart_type("mensagem", "Olá, quero mais informações")
+smart_click("Enviar")
+
+ + +
+

Comportamento do navegador

+ +
+ + +
+

Problemas comuns

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ProblemaSolução
Tools não aparecem na plataformaReiniciar a IDE/plataforma após configurar o MCP.
node: command not foundInstalar Node.js 18+ e garantir que está no PATH.
Playwright não encontra Chromiumnpx playwright install chromium
Erro de permissão no Linuxsudo npx playwright install-deps chromium
Página não carrega (conteúdo vazio)O servidor aguarda domcontentloaded + 1.5s. Se a página usa JS pesado, aumente o timeout em browser.js.
Erro ECONNREFUSEDO servidor MCP usa stdio (stdin/stdout), não HTTP. Verifique se o comando está correto.
Caminho com espaços no WindowsUse aspas: "C:/Users/Meu Usuario/mcp/server.js"
+
+ + +
+

Licença

+

MIT — uso livre.

+
+ + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..5225d20 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1184 @@ +{ + "name": "opencode-mcp-browser", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "opencode-mcp-browser", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@modelcontextprotocol/sdk": "^1.27.1", + "playwright": "^1.58.2" + } + }, + "node_modules/@hono/node-server": { + "version": "1.19.11", + "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.11.tgz", + "integrity": "sha512-dr8/3zEaB+p0D2n/IUrlPF1HZm586qgJNXK1a9fhg/PzdtkK7Ksd5l312tJX2yBuALqDYBlG20QEbayqPyxn+g==", + "license": "MIT", + "engines": { + "node": ">=18.14.1" + }, + "peerDependencies": { + "hono": "^4" + } + }, + "node_modules/@modelcontextprotocol/sdk": { + "version": "1.27.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.27.1.tgz", + "integrity": "sha512-sr6GbP+4edBwFndLbM60gf07z0FQ79gaExpnsjMGePXqFcSSb7t6iscpjk9DhFhwd+mTEQrzNafGP8/iGGFYaA==", + "license": "MIT", + "dependencies": { + "@hono/node-server": "^1.19.9", + "ajv": "^8.17.1", + "ajv-formats": "^3.0.1", + "content-type": "^1.0.5", + "cors": "^2.8.5", + "cross-spawn": "^7.0.5", + "eventsource": "^3.0.2", + "eventsource-parser": "^3.0.0", + "express": "^5.2.1", + "express-rate-limit": "^8.2.1", + "hono": "^4.11.4", + "jose": "^6.1.3", + "json-schema-typed": "^8.0.2", + "pkce-challenge": "^5.0.0", + "raw-body": "^3.0.0", + "zod": "^3.25 || ^4.0", + "zod-to-json-schema": "^3.25.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@cfworker/json-schema": "^4.1.1", + "zod": "^3.25 || ^4.0" + }, + "peerDependenciesMeta": { + "@cfworker/json-schema": { + "optional": true + }, + "zod": { + "optional": false + } + } + }, + "node_modules/accepts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "license": "MIT", + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ajv": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", + "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/body-parser": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz", + "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==", + "license": "MIT", + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.3", + "http-errors": "^2.0.0", + "iconv-lite": "^0.7.0", + "on-finished": "^2.4.1", + "qs": "^6.14.1", + "raw-body": "^3.0.1", + "type-is": "^2.0.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/content-disposition": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz", + "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } + }, + "node_modules/cors": { + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz", + "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventsource": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz", + "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==", + "license": "MIT", + "dependencies": { + "eventsource-parser": "^3.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/eventsource-parser": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz", + "integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/express": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", + "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", + "license": "MIT", + "dependencies": { + "accepts": "^2.0.0", + "body-parser": "^2.2.1", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "depd": "^2.0.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express-rate-limit": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.3.1.tgz", + "integrity": "sha512-D1dKN+cmyPWuvB+G2SREQDzPY1agpBIcTa9sJxOPMCNeH3gwzhqJRDWCXW3gg0y//+LQ/8j52JbMROWyrKdMdw==", + "license": "MIT", + "dependencies": { + "ip-address": "10.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/express-rate-limit" + }, + "peerDependencies": { + "express": ">= 4.11" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/finalhandler": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", + "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "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" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hono": { + "version": "4.12.9", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.9.tgz", + "integrity": "sha512-wy3T8Zm2bsEvxKZM5w21VdHDDcwVS1yUFFY6i8UobSsKfFceT7TOwhbhfKsDyx7tYQlmRM5FLpIuYvNFyjctiA==", + "license": "MIT", + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/iconv-lite": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ip-address": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz", + "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/jose": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.2.tgz", + "integrity": "sha512-d7kPDd34KO/YnzaDOlikGpOurfF0ByC2sEV4cANCtdqLlTfBlw2p14O/5d/zv40gJPbIQxfES3nSx1/oYNyuZQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/json-schema-typed": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.2.tgz", + "integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==", + "license": "BSD-2-Clause" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/merge-descriptors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-to-regexp": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/pkce-challenge": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz", + "integrity": "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==", + "license": "MIT", + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/playwright": { + "version": "1.58.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.2.tgz", + "integrity": "sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==", + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.58.2" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.58.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.2.tgz", + "integrity": "sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==", + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.0.tgz", + "integrity": "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", + "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.7.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/send": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz", + "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==", + "license": "MIT", + "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" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/serve-static": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz", + "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "license": "MIT", + "dependencies": { + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/zod": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", + "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-json-schema": { + "version": "3.25.1", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz", + "integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==", + "license": "ISC", + "peerDependencies": { + "zod": "^3.25 || ^4" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..3303846 --- /dev/null +++ b/package.json @@ -0,0 +1,17 @@ +{ + "name": "opencode-mcp-browser", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "type": "commonjs", + "dependencies": { + "@modelcontextprotocol/sdk": "^1.27.1", + "playwright": "^1.58.2" + } +} diff --git a/server.js b/server.js new file mode 100644 index 0000000..0ea7ed4 --- /dev/null +++ b/server.js @@ -0,0 +1,108 @@ +const { Server } = require('@modelcontextprotocol/sdk/server/index.js'); +const { StdioServerTransport } = require('@modelcontextprotocol/sdk/server/stdio.js'); + +const { + ListToolsRequestSchema, + CallToolRequestSchema +} = require('@modelcontextprotocol/sdk/types.js'); + +// TOOLS +const openUrl = require('./tools/openUrl'); +const click = require('./tools/click'); +const type = require('./tools/type'); +const screenshot = require('./tools/screenshot'); +const getText = require('./tools/getText'); +const getLinks = require('./tools/getLinks'); +const waitForSelector = require('./tools/waitForSelector'); +const extractElements = require('./tools/extractElements'); +const smartClick = require('./tools/smartClick'); +const smartType = require('./tools/smartType'); +const getButtons = require('./tools/getButtons'); +const smartWaitNavigation = require('./tools/smartWaitNavigation'); +const getForms = require('./tools/getForms'); +const fillFormAuto = require('./tools/fillFormAuto'); +const agentFlow = require('./tools/agentFlow'); +const agentFlowV2 = require('./tools/agentFlowV2'); +const closeBrowser = require('./tools/closeBrowser'); + +// SERVER MCP +const server = new Server( + { + name: "browser", + version: "2.0.0" + }, + { + capabilities: { + tools: {} + } + } +); + +// LISTAR TOOLS +server.setRequestHandler(ListToolsRequestSchema, async () => { + return { + tools: [ + { name: "open_url", description: "Abre uma URL", inputSchema: { type: "object", properties: { url: { type: "string" } }, required: ["url"] } }, + { name: "click", description: "Clica por seletor", inputSchema: { type: "object", properties: { selector: { type: "string" } }, required: ["selector"] } }, + { name: "type", description: "Digita texto", inputSchema: { type: "object", properties: { selector: { type: "string" }, text: { type: "string" } }, required: ["selector", "text"] } }, + { name: "screenshot", description: "Screenshot", inputSchema: { type: "object", properties: { fullPage: { type: "boolean" } } } }, + { name: "get_text", description: "Extrai texto", inputSchema: { type: "object", properties: { selector: { type: "string" } } } }, + { name: "get_links", description: "Lista links", inputSchema: { type: "object", properties: { selector: { type: "string" } } } }, + { name: "wait_for_selector", description: "Espera elemento", inputSchema: { type: "object", properties: { selector: { type: "string" }, timeout: { type: "number" } }, required: ["selector"] } }, + { name: "extract_elements", description: "Extrai elementos", inputSchema: { type: "object", properties: { selector: { type: "string" }, attributes: { type: "array", items: { type: "string" } } }, required: ["selector"] } }, + { name: "smart_click", description: "Clica por texto visível", inputSchema: { type: "object", properties: { text: { type: "string" } }, required: ["text"] } }, + { name: "smart_type", description: "Digita por label/placeholder", inputSchema: { type: "object", properties: { label: { type: "string" }, text: { type: "string" } }, required: ["label", "text"] } }, + { name: "get_buttons", description: "Lista botões disponíveis", inputSchema: { type: "object", properties: {} } }, + { name: "smart_wait_navigation", description: "Espera mudança de página", inputSchema: { type: "object", properties: { timeout: { type: "number" } } } }, + { name: "get_forms", description: "Lista formulários da página", inputSchema: { type: "object", properties: {} } }, + { name: "fill_form_auto", description: "Preenche formulário automaticamente", inputSchema: { type: "object", properties: { data: { type: "object" } }, required: ["data"] } }, + { name: "agent_flow", description: "Fluxo automático simples", inputSchema: { type: "object", properties: { goal: { type: "string" }, data: { type: "object" } }, required: ["goal"] } }, + { name: "agent_flow_v2", description: "Fluxo automático avançado com retry e fallback", inputSchema: { type: "object", properties: { goal: { type: "string" }, data: { type: "object" }, retries: { type: "number" } }, required: ["goal"] } }, + { name: "close_browser", description: "Fecha o navegador", inputSchema: { type: "object", properties: {} } } + ] + }; +}); + +// EXECUTAR TOOL +server.setRequestHandler(CallToolRequestSchema, async (request) => { + const { name, arguments: args } = request.params; + + const tools = { + open_url: openUrl, + click, + type, + screenshot, + get_text: getText, + get_links: getLinks, + wait_for_selector: waitForSelector, + extract_elements: extractElements, + smart_click: smartClick, + smart_type: smartType, + get_buttons: getButtons, + smart_wait_navigation: smartWaitNavigation, + get_forms: getForms, + fill_form_auto: fillFormAuto, + agent_flow: agentFlow, + agent_flow_v2: agentFlowV2, + close_browser: closeBrowser + }; + + if (!tools[name]) { + throw new Error("Tool não encontrada"); + } + + const result = await tools[name](args || {}); + + return { + content: [ + { + type: "text", + text: JSON.stringify(result) + } + ] + }; +}); + +// START SERVER +const transport = new StdioServerTransport(); +server.connect(transport); \ No newline at end of file diff --git a/tools/agentFlow.js b/tools/agentFlow.js new file mode 100644 index 0000000..48454d3 --- /dev/null +++ b/tools/agentFlow.js @@ -0,0 +1,62 @@ +const openUrl = require('./openUrl'); +const smartClick = require('./smartClick'); +const smartType = require('./smartType'); +const fillFormAuto = require('./fillFormAuto'); +const smartWaitNavigation = require('./smartWaitNavigation'); +const getButtons = require('./getButtons'); +const getForms = require('./getForms'); + +module.exports = async ({ goal, data = {} }) => { + if (!goal) { + throw new Error('Goal é obrigatório'); + } + + let log = []; + + try { + if (goal.includes('http')) { + await openUrl({ url: goal }); + log.push("Abriu URL"); + } + + if (Object.keys(data).length > 0) { + const forms = await getForms(); + + if (forms.count > 0) { + await fillFormAuto({ data }); + log.push("Formulário preenchido automaticamente"); + } + } + + const buttons = await getButtons(); + + const keywords = ['login', 'entrar', 'continuar', 'enviar', 'buscar', 'submit', 'ok', 'confirmar']; + + for (const btn of buttons.buttons) { + const match = keywords.find(k => + btn.text.toLowerCase().includes(k) + ); + + if (match) { + await smartClick({ text: btn.text }); + await smartWaitNavigation({}); + log.push(`Clicou em: ${btn.text}`); + break; + } + } + + return { + success: true, + action: "agent_flow", + goal, + steps: log + }; + + } catch (error) { + return { + success: false, + error: error.message, + steps: log + }; + } +}; diff --git a/tools/agentFlowV2.js b/tools/agentFlowV2.js new file mode 100644 index 0000000..4e2cca6 --- /dev/null +++ b/tools/agentFlowV2.js @@ -0,0 +1,85 @@ +const openUrl = require('./openUrl'); +const smartClick = require('./smartClick'); +const smartType = require('./smartType'); +const fillFormAuto = require('./fillFormAuto'); +const smartWaitNavigation = require('./smartWaitNavigation'); +const getButtons = require('./getButtons'); +const getForms = require('./getForms'); + +const delay = (ms) => new Promise(res => setTimeout(res, ms)); + +module.exports = async ({ goal, data = {}, retries = 3 }) => { + if (!goal) { + throw new Error('Goal é obrigatório'); + } + + let log = []; + let attempt = 0; + + const keywords = ['login', 'entrar', 'continuar', 'enviar', 'buscar', 'submit', 'ok', 'confirmar']; + + while (attempt < retries) { + try { + log.push(`Tentativa ${attempt + 1}`); + + if (goal.includes('http')) { + await openUrl({ url: goal }); + log.push("Abriu URL"); + await delay(1500); + } + + if (Object.keys(data).length > 0) { + const forms = await getForms(); + + if (forms.count > 0) { + await fillFormAuto({ data }); + log.push("Formulário preenchido"); + } + } + + const buttons = await getButtons(); + + let clicked = false; + + for (const btn of buttons.buttons) { + const match = keywords.find(k => + btn.text.toLowerCase().includes(k) + ); + + if (match) { + await smartClick({ text: btn.text }); + await smartWaitNavigation({}); + log.push(`Clicou em: ${btn.text}`); + clicked = true; + break; + } + } + + if (!clicked && buttons.buttons.length > 0) { + await smartClick({ text: buttons.buttons[0].text }); + await smartWaitNavigation({}); + log.push(`Fallback click: ${buttons.buttons[0].text}`); + } + + return { + success: true, + action: "agent_flow_v2", + attempts: attempt + 1, + steps: log + }; + + } catch (error) { + log.push(`Erro: ${error.message}`); + attempt++; + + await delay(1000); + } + } + + return { + success: false, + action: "agent_flow_v2", + attempts: attempt, + steps: log + }; +}; diff --git a/tools/click.js b/tools/click.js new file mode 100644 index 0000000..ff25473 --- /dev/null +++ b/tools/click.js @@ -0,0 +1,19 @@ +const browser = require('../browser'); + +module.exports = async ({ selector }) => { + if (!selector) { + throw new Error('Selector é obrigatório'); + } + + await browser.start(); + const p = await browser.ensurePage(); + + await p.waitForSelector(selector, { state: 'visible', timeout: 10000 }); + await p.click(selector); + + return { + success: true, + action: "click", + selector + }; +}; diff --git a/tools/closeBrowser.js b/tools/closeBrowser.js new file mode 100644 index 0000000..8a12197 --- /dev/null +++ b/tools/closeBrowser.js @@ -0,0 +1,11 @@ +const browser = require('../browser'); + +module.exports = async () => { + await browser.close(); + + return { + success: true, + action: "close_browser", + message: "Navegador fechado com sucesso" + }; +}; diff --git a/tools/extractElements.js b/tools/extractElements.js new file mode 100644 index 0000000..f93a3dd --- /dev/null +++ b/tools/extractElements.js @@ -0,0 +1,36 @@ +const browser = require('../browser'); + +module.exports = async ({ selector, attributes = [] }) => { + if (!selector) { + throw new Error('Selector é obrigatório'); + } + + await browser.start(); + const p = await browser.ensurePage(); + + const attrsStr = JSON.stringify(Array.isArray(attributes) ? attributes : []); + + const elements = await p.evaluate((sel) => { + const attrs = JSON.parse(sel.__attrs); + const els = Array.from(document.querySelectorAll(sel.__sel)); + + return els.map(el => { + const data = { + text: (el.innerText || el.textContent || '').trim() + }; + + for (let i = 0; i < attrs.length; i++) { + data[attrs[i]] = el.getAttribute(attrs[i]); + } + + return data; + }); + }, { __sel: selector, __attrs: attrsStr }); + + return { + success: true, + action: "extract_elements", + count: elements.length, + elements + }; +}; diff --git a/tools/fillFormAuto.js b/tools/fillFormAuto.js new file mode 100644 index 0000000..df5ec95 --- /dev/null +++ b/tools/fillFormAuto.js @@ -0,0 +1,62 @@ +const browser = require('../browser'); + +module.exports = async ({ data }) => { + if (!data) { + throw new Error('Data é obrigatória'); + } + + await browser.start(); + const p = await browser.ensurePage(); + + const result = await p.evaluate((formData) => { + const inputs = Array.from(document.querySelectorAll('input, textarea, select')); + + let filled = []; + + inputs.forEach(input => { + const key = Object.keys(formData).find(k => + (input.name && input.name.toLowerCase().includes(k.toLowerCase())) || + (input.placeholder && input.placeholder.toLowerCase().includes(k.toLowerCase())) || + (input.id && input.id.toLowerCase().includes(k.toLowerCase())) || + (input.getAttribute('aria-label') || '').toLowerCase().includes(k.toLowerCase()) + ); + + if (key) { + const value = formData[key]; + + const nativeInputValueSetter = Object.getOwnPropertyDescriptor( + window.HTMLInputElement.prototype, 'value' + )?.set; + + const nativeTextAreaValueSetter = Object.getOwnPropertyDescriptor( + window.HTMLTextAreaElement.prototype, 'value' + )?.set; + + if (input.tagName === 'INPUT' && nativeInputValueSetter) { + nativeInputValueSetter.call(input, value); + } else if (input.tagName === 'TEXTAREA' && nativeTextAreaValueSetter) { + nativeTextAreaValueSetter.call(input, value); + } else { + input.value = value; + } + + input.dispatchEvent(new Event('input', { bubbles: true })); + input.dispatchEvent(new Event('change', { bubbles: true })); + + filled.push({ + field: input.name || input.id || input.placeholder || 'unknown', + value: value + }); + } + }); + + return filled; + }, data); + + return { + success: true, + action: "fill_form_auto", + filled: result, + count: result.length + }; +}; diff --git a/tools/getButtons.js b/tools/getButtons.js new file mode 100644 index 0000000..9ad9711 --- /dev/null +++ b/tools/getButtons.js @@ -0,0 +1,23 @@ +const browser = require('../browser'); + +module.exports = async () => { + await browser.start(); + const p = await browser.ensurePage(); + + const buttons = await p.evaluate(() => { + const elements = Array.from(document.querySelectorAll('button, input[type="submit"], input[type="button"], [role="button"], a.btn, a.button')); + + return elements.map(el => ({ + text: (el.innerText || el.value || el.getAttribute('aria-label') || '').trim(), + type: el.tagName.toLowerCase(), + id: el.id || null + })).filter(b => b.text !== ''); + }); + + return { + success: true, + action: "get_buttons", + count: buttons.length, + buttons + }; +}; diff --git a/tools/getForms.js b/tools/getForms.js new file mode 100644 index 0000000..f000d72 --- /dev/null +++ b/tools/getForms.js @@ -0,0 +1,32 @@ +const browser = require('../browser'); + +module.exports = async () => { + await browser.start(); + const p = await browser.ensurePage(); + + const forms = await p.evaluate(() => { + const formElements = Array.from(document.querySelectorAll('form')); + + return formElements.map(form => { + const inputs = Array.from(form.querySelectorAll('input, textarea, select')); + + return { + action: form.action || null, + method: form.method || 'GET', + fields: inputs.map(input => ({ + name: input.name || null, + type: input.type || input.tagName.toLowerCase(), + placeholder: input.placeholder || '', + id: input.id || null + })) + }; + }); + }); + + return { + success: true, + action: "get_forms", + count: forms.length, + forms + }; +}; diff --git a/tools/getLinks.js b/tools/getLinks.js new file mode 100644 index 0000000..eb18554 --- /dev/null +++ b/tools/getLinks.js @@ -0,0 +1,22 @@ +const browser = require('../browser'); + +module.exports = async ({ selector = 'a' }) => { + await browser.start(); + const p = await browser.ensurePage(); + + const links = await p.evaluate((sel) => { + const elements = Array.from(document.querySelectorAll(sel)); + + return elements.map(el => ({ + text: (el.innerText || el.textContent || '').trim(), + href: el.href || el.getAttribute('href') || '' + })).filter(link => link.href && link.href !== ''); + }, selector); + + return { + success: true, + action: "get_links", + count: links.length, + links + }; +}; diff --git a/tools/getText.js b/tools/getText.js new file mode 100644 index 0000000..0bed5b9 --- /dev/null +++ b/tools/getText.js @@ -0,0 +1,21 @@ +const browser = require('../browser'); + +module.exports = async ({ selector = 'body' }) => { + await browser.start(); + const p = await browser.ensurePage(); + + const text = await p.evaluate((sel) => { + const el = document.querySelector(sel); + if (!el) return null; + + const t = el.innerText || el.textContent || ''; + return t.trim() || null; + }, selector); + + return { + success: true, + action: "get_text", + selector, + text + }; +}; diff --git a/tools/openUrl.js b/tools/openUrl.js new file mode 100644 index 0000000..6adcafc --- /dev/null +++ b/tools/openUrl.js @@ -0,0 +1,56 @@ +const browser = require('../browser'); + +module.exports = async ({ url }) => { + if (!url) { + throw new Error('URL é obrigatória'); + } + + await browser.start(); + const p = await browser.ensurePage(); + + const currentUrl = p.url(); + + if (currentUrl && currentUrl !== 'about:blank') { + if (currentUrl.includes(new URL(url).hostname)) { + await p.goto(url, { + waitUntil: 'domcontentloaded', + timeout: 30000 + }); + await p.waitForTimeout(1500); + + return { + success: true, + url, + title: await p.title(), + tab: 'reused' + }; + } + + const newPage = await browser.newTab(); + await newPage.goto(url, { + waitUntil: 'domcontentloaded', + timeout: 30000 + }); + await newPage.waitForTimeout(1500); + + return { + success: true, + url, + title: await newPage.title(), + tab: 'new' + }; + } + + await p.goto(url, { + waitUntil: 'domcontentloaded', + timeout: 30000 + }); + await p.waitForTimeout(1500); + + return { + success: true, + url, + title: await p.title(), + tab: 'existing' + }; +}; diff --git a/tools/screenshot.js b/tools/screenshot.js new file mode 100644 index 0000000..0bb7d5f --- /dev/null +++ b/tools/screenshot.js @@ -0,0 +1,16 @@ +const browser = require('../browser'); + +module.exports = async ({ fullPage = true }) => { + await browser.start(); + const p = await browser.ensurePage(); + + const path = `screenshot-${Date.now()}.png`; + + await p.screenshot({ path, fullPage }); + + return { + success: true, + action: "screenshot", + file: path + }; +}; diff --git a/tools/smartClick.js b/tools/smartClick.js new file mode 100644 index 0000000..5c66da4 --- /dev/null +++ b/tools/smartClick.js @@ -0,0 +1,54 @@ +const browser = require('../browser'); + +module.exports = async ({ text }) => { + if (!text) { + throw new Error('Texto é obrigatório'); + } + + await browser.start(); + const p = await browser.ensurePage(); + + const clicked = await p.evaluate((targetText) => { + const elements = Array.from(document.querySelectorAll( + 'a, button, input[type="submit"], input[type="button"], [role="button"], [onclick]' + )); + + const el = elements.find(e => { + const txt = (e.innerText || e.textContent || e.value || e.getAttribute('aria-label') || '').trim().toLowerCase(); + return txt.includes(targetText.toLowerCase()); + }); + + if (el) { + el.scrollIntoView({ behavior: 'smooth', block: 'center' }); + el.click(); + + if (el.tagName === 'A' && el.href) { + return { clicked: true, href: el.href }; + } + + return { clicked: true, href: null }; + } + + return { clicked: false, href: null }; + }, text); + + if (!clicked.clicked) { + throw new Error(`Elemento não encontrado pelo texto: "${text}"`); + } + + if (clicked.href) { + try { + await p.waitForNavigation({ timeout: 5000, waitUntil: 'domcontentloaded' }); + } catch (e) { + } + } else { + await p.waitForTimeout(1000); + } + + return { + success: true, + action: "smart_click", + text, + navigatedTo: clicked.href || null + }; +}; diff --git a/tools/smartType.js b/tools/smartType.js new file mode 100644 index 0000000..2438339 --- /dev/null +++ b/tools/smartType.js @@ -0,0 +1,84 @@ +const browser = require('../browser'); + +module.exports = async ({ label, text }) => { + if (!label || !text) { + throw new Error('Label e text são obrigatórios'); + } + + await browser.start(); + const p = await browser.ensurePage(); + + const success = await p.evaluate(({ labelText, inputText }) => { + function setInputValue(input, value) { + const nativeSetter = Object.getOwnPropertyDescriptor( + window.HTMLInputElement.prototype, 'value' + )?.set; + + const nativeTextAreaSetter = Object.getOwnPropertyDescriptor( + window.HTMLTextAreaElement.prototype, 'value' + )?.set; + + if (input.tagName === 'INPUT' && nativeSetter) { + nativeSetter.call(input, value); + } else if (input.tagName === 'TEXTAREA' && nativeTextAreaSetter) { + nativeTextAreaSetter.call(input, value); + } else { + input.value = value; + } + + input.dispatchEvent(new Event('input', { bubbles: true })); + input.dispatchEvent(new Event('change', { bubbles: true })); + } + + const labels = Array.from(document.querySelectorAll('label')); + + const foundLabel = labels.find(l => + (l.innerText || l.textContent || '').toLowerCase().includes(labelText.toLowerCase()) + ); + + if (foundLabel) { + const forAttr = foundLabel.getAttribute('for'); + + if (forAttr) { + const input = document.getElementById(forAttr); + if (input) { + setInputValue(input, inputText); + return true; + } + } + + const input = foundLabel.querySelector('input, textarea'); + if (input) { + setInputValue(input, inputText); + return true; + } + } + + const inputs = Array.from(document.querySelectorAll('input, textarea')); + + const foundInput = inputs.find(i => + (i.placeholder || '').toLowerCase().includes(labelText.toLowerCase()) || + (i.name || '').toLowerCase().includes(labelText.toLowerCase()) || + (i.id || '').toLowerCase().includes(labelText.toLowerCase()) || + (i.getAttribute('aria-label') || '').toLowerCase().includes(labelText.toLowerCase()) + ); + + if (foundInput) { + setInputValue(foundInput, inputText); + return true; + } + + return false; + }, { labelText: label, inputText: text }); + + if (!success) { + throw new Error('Campo não encontrado'); + } + + return { + success: true, + action: "smart_type", + label, + text + }; +}; diff --git a/tools/smartWaitNavigation.js b/tools/smartWaitNavigation.js new file mode 100644 index 0000000..1323fc5 --- /dev/null +++ b/tools/smartWaitNavigation.js @@ -0,0 +1,26 @@ +const browser = require('../browser'); + +module.exports = async ({ timeout = 15000 }) => { + await browser.start(); + const p = await browser.ensurePage(); + + const oldUrl = p.url(); + + try { + await Promise.race([ + p.waitForNavigation({ timeout, waitUntil: 'domcontentloaded' }), + p.waitForLoadState('domcontentloaded', { timeout }) + ]); + } catch (e) { + } + + const newUrl = p.url(); + + return { + success: true, + action: "smart_wait_navigation", + oldUrl, + newUrl, + changed: oldUrl !== newUrl + }; +}; diff --git a/tools/type.js b/tools/type.js new file mode 100644 index 0000000..cfb9ead --- /dev/null +++ b/tools/type.js @@ -0,0 +1,20 @@ +const browser = require('../browser'); + +module.exports = async ({ selector, text }) => { + if (!selector || !text) { + throw new Error('Selector e text são obrigatórios'); + } + + await browser.start(); + const p = await browser.ensurePage(); + + await p.waitForSelector(selector, { state: 'visible', timeout: 10000 }); + await p.fill(selector, text); + + return { + success: true, + action: "type", + selector, + text + }; +}; diff --git a/tools/waitForSelector.js b/tools/waitForSelector.js new file mode 100644 index 0000000..1349c7f --- /dev/null +++ b/tools/waitForSelector.js @@ -0,0 +1,22 @@ +const browser = require('../browser'); + +module.exports = async ({ selector, timeout = 15000 }) => { + if (!selector) { + throw new Error('Selector é obrigatório'); + } + + await browser.start(); + const p = await browser.ensurePage(); + + const el = await p.waitForSelector(selector, { + timeout, + state: 'attached' + }); + + return { + success: true, + action: "wait_for_selector", + selector, + found: !!el + }; +};