@robinpath/browser
Advanced tools
| import type { BuiltinHandler, FunctionMetadata, ModuleHost, ModuleMetadata } from "@robinpath/core"; | ||
| export declare function configureBrowser(h: ModuleHost): void; | ||
| export declare const BrowserFunctions: Record<string, BuiltinHandler>; | ||
| export declare const BrowserFunctionMetadata: Record<string, FunctionMetadata>; | ||
| export declare const BrowserModuleMetadata: ModuleMetadata; | ||
| //# sourceMappingURL=browser.d.ts.map |
| {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,cAAc,EAEf,MAAM,iBAAiB,CAAC;AAIzB,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAAoB;AAyNzE,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAA6L,CAAC;AAkC1P,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAsZpE,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,cAwBnC,CAAC"} |
+679
| import puppeteer from "puppeteer"; | ||
| const state = {}; | ||
| export function configureBrowser(h) { state.host = h; } | ||
| const browsers = new Map(); | ||
| const pages = new Map(); | ||
| const launch = async (args) => { | ||
| const id = String(args[0] ?? "default"); | ||
| const opts = (typeof args[1] === "object" && args[1] !== null ? args[1] : {}); | ||
| const browser = await puppeteer.launch({ headless: opts.headless !== false, args: Array.isArray(opts.args) ? opts.args.map(String) : [] }); | ||
| browsers.set(id, browser); | ||
| return { id }; | ||
| }; | ||
| const newPage = async (args) => { | ||
| const browserId = String(args[0] ?? "default"); | ||
| const pageId = String(args[1] ?? "page-" + Date.now()); | ||
| const browser = browsers.get(browserId); | ||
| if (!browser) | ||
| throw new Error(`Browser "${browserId}" not found`); | ||
| const page = await browser.newPage(); | ||
| pages.set(pageId, page); | ||
| return { pageId }; | ||
| }; | ||
| const goto = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const url = String(args[1] ?? ""); | ||
| const opts = (typeof args[2] === "object" && args[2] !== null ? args[2] : {}); | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| const response = await page.goto(url, { waitUntil: opts.waitUntil ?? "load" }); | ||
| return { url: page.url(), status: response?.status() ?? null }; | ||
| }; | ||
| const click = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const selector = String(args[1] ?? ""); | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| await page.click(selector); | ||
| return true; | ||
| }; | ||
| const type = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const selector = String(args[1] ?? ""); | ||
| const text = String(args[2] ?? ""); | ||
| const opts = (typeof args[3] === "object" && args[3] !== null ? args[3] : {}); | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| await page.type(selector, text, { delay: opts.delay ? Number(opts.delay) : undefined }); | ||
| return true; | ||
| }; | ||
| const select = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const selector = String(args[1] ?? ""); | ||
| const values = Array.isArray(args[2]) ? args[2].map(String) : [String(args[2] ?? "")]; | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| const selected = await page.select(selector, ...values); | ||
| return { selected }; | ||
| }; | ||
| const screenshot = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const opts = (typeof args[1] === "object" && args[1] !== null ? args[1] : {}); | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| const screenshotOpts = { fullPage: Boolean(opts.fullPage), type: String(opts.type ?? "png") }; | ||
| if (opts.path) { | ||
| screenshotOpts.path = String(opts.path); | ||
| await page.screenshot(screenshotOpts); | ||
| return { path: screenshotOpts.path }; | ||
| } | ||
| screenshotOpts.encoding = "base64"; | ||
| const base64 = await page.screenshot(screenshotOpts); | ||
| return { base64 }; | ||
| }; | ||
| const pdf = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const opts = (typeof args[1] === "object" && args[1] !== null ? args[1] : {}); | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| const pdfOpts = {}; | ||
| if (opts.path) | ||
| pdfOpts.path = String(opts.path); | ||
| if (opts.format) | ||
| pdfOpts.format = String(opts.format); | ||
| const buffer = await page.pdf(pdfOpts); | ||
| if (opts.path) | ||
| return { path: String(opts.path) }; | ||
| return { base64: Buffer.from(buffer).toString("base64") }; | ||
| }; | ||
| const evaluate = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const script = String(args[1] ?? ""); | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| const result = await page.evaluate(new Function(script)); | ||
| return result; | ||
| }; | ||
| const content = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| return await page.content(); | ||
| }; | ||
| const title = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| return await page.title(); | ||
| }; | ||
| const url = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| return page.url(); | ||
| }; | ||
| const waitFor = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const selector = String(args[1] ?? ""); | ||
| const opts = (typeof args[2] === "object" && args[2] !== null ? args[2] : {}); | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| await page.waitForSelector(selector, { timeout: opts.timeout ? Number(opts.timeout) : undefined }); | ||
| return true; | ||
| }; | ||
| const querySelector = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const selector = String(args[1] ?? ""); | ||
| const attribute = args[2] != null ? String(args[2]) : undefined; | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| const result = await page.evaluate((sel, attr) => { | ||
| const el = document.querySelector(sel); | ||
| if (!el) | ||
| return null; | ||
| if (attr) | ||
| return el.getAttribute(attr); | ||
| return el.textContent; | ||
| }, selector, attribute); | ||
| return result; | ||
| }; | ||
| const querySelectorAll = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const selector = String(args[1] ?? ""); | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| const results = await page.evaluate((sel) => { | ||
| return Array.from(document.querySelectorAll(sel)).map((el) => el.textContent ?? ""); | ||
| }, selector); | ||
| return results; | ||
| }; | ||
| const cookies = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| return await page.cookies(); | ||
| }; | ||
| const setCookie = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const cookie = (typeof args[1] === "object" && args[1] !== null ? args[1] : {}); | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| await page.setCookie(cookie); | ||
| return true; | ||
| }; | ||
| const close = async (args) => { | ||
| const pageId = String(args[0] ?? ""); | ||
| const page = pages.get(pageId); | ||
| if (!page) | ||
| throw new Error(`Page "${pageId}" not found`); | ||
| await page.close(); | ||
| pages.delete(pageId); | ||
| return true; | ||
| }; | ||
| const closeBrowser = async (args) => { | ||
| const browserId = String(args[0] ?? "default"); | ||
| const browser = browsers.get(browserId); | ||
| if (!browser) | ||
| throw new Error(`Browser "${browserId}" not found`); | ||
| await browser.close(); | ||
| browsers.delete(browserId); | ||
| return true; | ||
| }; | ||
| const scrape = async (args) => { | ||
| const targetUrl = String(args[0] ?? ""); | ||
| const selectors = (typeof args[1] === "object" && args[1] !== null ? args[1] : {}); | ||
| const opts = (typeof args[2] === "object" && args[2] !== null ? args[2] : {}); | ||
| const browser = await puppeteer.launch({ headless: true, args: Array.isArray(opts.args) ? opts.args.map(String) : ["--no-sandbox"] }); | ||
| try { | ||
| const page = await browser.newPage(); | ||
| await page.goto(targetUrl, { waitUntil: opts.waitUntil ?? "networkidle2" }); | ||
| const data = {}; | ||
| for (const [key, selector] of Object.entries(selectors)) { | ||
| const elements = await page.evaluate((sel) => { | ||
| const els = document.querySelectorAll(sel); | ||
| return Array.from(els).map((el) => el.textContent?.trim() ?? ""); | ||
| }, selector); | ||
| data[key] = elements.length === 1 ? elements[0] : elements.length === 0 ? null : elements; | ||
| } | ||
| return { url: targetUrl, data }; | ||
| } | ||
| finally { | ||
| await browser.close(); | ||
| } | ||
| }; | ||
| export const BrowserFunctions = { launch, newPage, goto, click, type, select, screenshot, pdf, evaluate, content, title, url, waitFor, querySelector, querySelectorAll, cookies, setCookie, close, closeBrowser, scrape }; | ||
| // ── Shared parameter descriptors ────────────────────────────────────── | ||
| const pageIdParam = { | ||
| name: "pageId", | ||
| title: "Page ID", | ||
| description: "Identifier passed to `browser.newPage`. Uniquely names a tab.", | ||
| dataType: "string", | ||
| formInputType: "text", | ||
| required: true, | ||
| allowExpression: true, | ||
| placeholder: "page1", | ||
| }; | ||
| const selectorParam = { | ||
| name: "selector", | ||
| title: "Selector", | ||
| description: "CSS selector.", | ||
| dataType: "string", | ||
| formInputType: "text", | ||
| required: true, | ||
| allowExpression: true, | ||
| placeholder: "#submit", | ||
| }; | ||
| const commonErrors = { | ||
| page_not_found: "No page with that id exists — did you call `browser.newPage` first?", | ||
| browser_not_found: "No browser with that id exists — call `browser.launch` first.", | ||
| launch_failed: "Puppeteer could not launch Chromium (missing system libs or sandbox permission).", | ||
| navigation_failed: "Navigation timed out or the server returned an error.", | ||
| selector_not_found: "The selector did not match any element within the timeout.", | ||
| }; | ||
| export const BrowserFunctionMetadata = { | ||
| launch: { | ||
| title: "Launch browser", | ||
| summary: "Start a headless Chromium instance", | ||
| description: "Launches Puppeteer with the given headless/args settings and registers it under `id`.", | ||
| group: "lifecycle", | ||
| action: "write", | ||
| icon: "rocket", | ||
| capability: "upload_files", | ||
| sideEffects: ["spawns_process"], | ||
| idempotent: false, | ||
| since: "1.0.0", | ||
| tags: ["browser", "launch"], | ||
| parameters: [ | ||
| { name: "id", title: "Instance ID", description: "Name used to reference this browser later.", dataType: "string", formInputType: "text", required: true, allowExpression: true, defaultValue: "default" }, | ||
| { name: "options", title: "Options", description: "{ headless: bool, args: string[] }", dataType: "object", formInputType: "json", required: false, allowExpression: true, language: "json", rows: 3, advanced: true }, | ||
| ], | ||
| returnType: "object", | ||
| returnDescription: "{ id }", | ||
| errors: commonErrors, | ||
| example: 'browser.launch "main" {headless: true}', | ||
| }, | ||
| newPage: { | ||
| title: "New page", | ||
| summary: "Open a fresh tab in a running browser", | ||
| description: "Creates a new page and registers it under `pageId`.", | ||
| group: "lifecycle", | ||
| action: "write", | ||
| icon: "plus-square", | ||
| capability: "upload_files", | ||
| sideEffects: [], | ||
| idempotent: false, | ||
| since: "1.0.0", | ||
| tags: ["browser", "page"], | ||
| parameters: [ | ||
| { name: "browserId", title: "Browser ID", description: "Identifier of a launched browser.", dataType: "string", formInputType: "text", required: true, allowExpression: true, defaultValue: "default" }, | ||
| { name: "pageId", title: "Page ID", description: "Name to assign the new page.", dataType: "string", formInputType: "text", required: true, allowExpression: true }, | ||
| ], | ||
| returnType: "object", | ||
| returnDescription: "{ pageId }", | ||
| errors: commonErrors, | ||
| example: 'browser.newPage "main" "page1"', | ||
| }, | ||
| goto: { | ||
| title: "Navigate", | ||
| summary: "Load a URL in the given page", | ||
| description: "Equivalent to `page.goto`. Waits on the selected `waitUntil` event.", | ||
| group: "navigate", | ||
| action: "write", | ||
| icon: "globe", | ||
| capability: "upload_files", | ||
| sideEffects: ["makes_http_call"], | ||
| idempotent: false, | ||
| since: "1.0.0", | ||
| tags: ["browser", "navigate"], | ||
| parameters: [ | ||
| pageIdParam, | ||
| { name: "url", title: "URL", description: "Target URL.", dataType: "string", formInputType: "text", required: true, allowExpression: true, placeholder: "https://example.com" }, | ||
| { name: "options", title: "Options", description: "{ waitUntil: 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2' }", dataType: "object", formInputType: "json", required: false, allowExpression: true, language: "json", rows: 2, advanced: true }, | ||
| ], | ||
| returnType: "object", | ||
| returnDescription: "{ url, status }", | ||
| errors: commonErrors, | ||
| example: 'browser.goto "page1" "https://example.com" {waitUntil: "networkidle2"}', | ||
| }, | ||
| click: { | ||
| title: "Click element", | ||
| summary: "Click the first element matching a selector", | ||
| description: "Requires the element to be visible and hit-testable.", | ||
| group: "interact", | ||
| action: "write", | ||
| icon: "mouse-pointer", | ||
| capability: "upload_files", | ||
| sideEffects: [], | ||
| idempotent: false, | ||
| since: "1.0.0", | ||
| tags: ["browser", "click"], | ||
| parameters: [pageIdParam, selectorParam], | ||
| returnType: "boolean", | ||
| returnDescription: "true on success.", | ||
| errors: commonErrors, | ||
| example: 'browser.click "page1" "#submit-btn"', | ||
| }, | ||
| type: { | ||
| title: "Type text", | ||
| summary: "Focus an input and type a string", | ||
| description: "Dispatches real key events with an optional per-key delay.", | ||
| group: "interact", | ||
| action: "write", | ||
| icon: "type", | ||
| capability: "upload_files", | ||
| sideEffects: [], | ||
| idempotent: false, | ||
| since: "1.0.0", | ||
| tags: ["browser", "type"], | ||
| parameters: [ | ||
| pageIdParam, | ||
| selectorParam, | ||
| { name: "text", title: "Text", description: "What to type.", dataType: "string", formInputType: "text", required: true, allowExpression: true }, | ||
| { name: "options", title: "Options", description: "{ delay: ms between keystrokes }", dataType: "object", formInputType: "json", required: false, allowExpression: true, language: "json", rows: 2, advanced: true }, | ||
| ], | ||
| returnType: "boolean", | ||
| returnDescription: "true on success.", | ||
| errors: commonErrors, | ||
| example: 'browser.type "page1" "#search" "hello" {delay: 50}', | ||
| }, | ||
| select: { | ||
| title: "Select option", | ||
| summary: "Pick a value in a <select>", | ||
| description: "Supports single or multiple values.", | ||
| group: "interact", | ||
| action: "write", | ||
| icon: "list", | ||
| capability: "upload_files", | ||
| sideEffects: [], | ||
| idempotent: false, | ||
| since: "1.0.0", | ||
| tags: ["browser", "select"], | ||
| parameters: [ | ||
| pageIdParam, | ||
| selectorParam, | ||
| { name: "values", title: "Values", description: "Single string or array of strings.", dataType: "any", formInputType: "json", required: true, allowExpression: true, language: "json", rows: 2 }, | ||
| ], | ||
| returnType: "object", | ||
| returnDescription: "{ selected: string[] }", | ||
| errors: commonErrors, | ||
| example: 'browser.select "page1" "#country" "US"', | ||
| }, | ||
| screenshot: { | ||
| title: "Screenshot", | ||
| summary: "Capture a PNG / JPEG of the page", | ||
| description: "Returns `{ path }` if `options.path` is set; otherwise `{ base64 }`.", | ||
| group: "capture", | ||
| action: "write", | ||
| icon: "camera", | ||
| capability: "upload_files", | ||
| sideEffects: ["modifies_filesystem"], | ||
| idempotent: false, | ||
| since: "1.0.0", | ||
| tags: ["browser", "screenshot"], | ||
| parameters: [ | ||
| pageIdParam, | ||
| { name: "options", title: "Options", description: "{ path, fullPage, type: 'png' | 'jpeg' }", dataType: "object", formInputType: "json", required: false, allowExpression: true, language: "json", rows: 3, advanced: true }, | ||
| ], | ||
| returnType: "object", | ||
| returnDescription: "{ path } or { base64 }", | ||
| errors: commonErrors, | ||
| example: 'browser.screenshot "page1" {path: "./shot.png", fullPage: true}', | ||
| }, | ||
| pdf: { | ||
| title: "Save as PDF", | ||
| summary: "Render the page to a PDF", | ||
| description: "Only works in headless mode. Returns `{ path }` or `{ base64 }`.", | ||
| group: "capture", | ||
| action: "write", | ||
| icon: "file-text", | ||
| capability: "upload_files", | ||
| sideEffects: ["modifies_filesystem"], | ||
| idempotent: false, | ||
| since: "1.0.0", | ||
| tags: ["browser", "pdf"], | ||
| parameters: [ | ||
| pageIdParam, | ||
| { name: "options", title: "Options", description: "{ path, format: 'A4' | 'Letter' | ... }", dataType: "object", formInputType: "json", required: false, allowExpression: true, language: "json", rows: 3, advanced: true }, | ||
| ], | ||
| returnType: "object", | ||
| returnDescription: "{ path } or { base64 }", | ||
| errors: commonErrors, | ||
| example: 'browser.pdf "page1" {path: "./page.pdf", format: "A4"}', | ||
| }, | ||
| evaluate: { | ||
| title: "Evaluate script", | ||
| summary: "Run JavaScript in the page context", | ||
| description: "The script string is wrapped in a function body and executed inside the page. Return a value to pass back.", | ||
| group: "query", | ||
| action: "write", | ||
| icon: "terminal", | ||
| capability: "upload_files", | ||
| sideEffects: [], | ||
| idempotent: false, | ||
| since: "1.0.0", | ||
| tags: ["browser", "evaluate"], | ||
| parameters: [ | ||
| pageIdParam, | ||
| { name: "script", title: "Script", description: "Body of the function to run in the page.", dataType: "string", formInputType: "textarea", required: true, allowExpression: true, language: "javascript", rows: 6 }, | ||
| ], | ||
| returnType: "any", | ||
| returnDescription: "Whatever the script returns.", | ||
| errors: commonErrors, | ||
| example: 'browser.evaluate "page1" "return document.title"', | ||
| }, | ||
| content: { | ||
| title: "Get HTML", | ||
| summary: "Return the full HTML of the page", | ||
| description: "Equivalent to `page.content()`.", | ||
| group: "query", | ||
| action: "read", | ||
| icon: "code", | ||
| capability: "read", | ||
| sideEffects: [], | ||
| idempotent: true, | ||
| since: "1.0.0", | ||
| tags: ["browser", "html"], | ||
| parameters: [pageIdParam], | ||
| returnType: "string", | ||
| returnDescription: "The serialized HTML string.", | ||
| errors: commonErrors, | ||
| example: 'browser.content "page1"', | ||
| }, | ||
| title: { | ||
| title: "Get title", | ||
| summary: "Return the <title>", | ||
| description: "Equivalent to `page.title()`.", | ||
| group: "query", | ||
| action: "read", | ||
| icon: "heading", | ||
| capability: "read", | ||
| sideEffects: [], | ||
| idempotent: true, | ||
| since: "1.0.0", | ||
| tags: ["browser", "title"], | ||
| parameters: [pageIdParam], | ||
| returnType: "string", | ||
| returnDescription: "The page title.", | ||
| errors: commonErrors, | ||
| example: 'browser.title "page1"', | ||
| }, | ||
| url: { | ||
| title: "Get URL", | ||
| summary: "Return the current page URL", | ||
| description: "Equivalent to `page.url()`.", | ||
| group: "query", | ||
| action: "read", | ||
| icon: "link", | ||
| capability: "read", | ||
| sideEffects: [], | ||
| idempotent: true, | ||
| since: "1.0.0", | ||
| tags: ["browser", "url"], | ||
| parameters: [pageIdParam], | ||
| returnType: "string", | ||
| returnDescription: "The current URL.", | ||
| errors: commonErrors, | ||
| example: 'browser.url "page1"', | ||
| }, | ||
| waitFor: { | ||
| title: "Wait for selector", | ||
| summary: "Block until an element appears", | ||
| description: "Throws on timeout.", | ||
| group: "query", | ||
| action: "read", | ||
| icon: "clock", | ||
| capability: "read", | ||
| sideEffects: [], | ||
| idempotent: true, | ||
| since: "1.0.0", | ||
| tags: ["browser", "wait"], | ||
| parameters: [ | ||
| pageIdParam, | ||
| selectorParam, | ||
| { name: "options", title: "Options", description: "{ timeout: ms }", dataType: "object", formInputType: "json", required: false, allowExpression: true, language: "json", rows: 2, advanced: true }, | ||
| ], | ||
| returnType: "boolean", | ||
| returnDescription: "true once the element exists.", | ||
| errors: commonErrors, | ||
| example: 'browser.waitFor "page1" ".loaded" {timeout: 5000}', | ||
| }, | ||
| querySelector: { | ||
| title: "Query selector", | ||
| summary: "Read text or an attribute of the first matching element", | ||
| description: "Returns null if there is no match.", | ||
| group: "query", | ||
| action: "read", | ||
| icon: "search", | ||
| capability: "read", | ||
| sideEffects: [], | ||
| idempotent: true, | ||
| since: "1.0.0", | ||
| tags: ["browser", "query"], | ||
| parameters: [ | ||
| pageIdParam, | ||
| selectorParam, | ||
| { name: "attribute", title: "Attribute", description: "If omitted, returns textContent.", dataType: "string", formInputType: "text", required: false, allowExpression: true, placeholder: "href" }, | ||
| ], | ||
| returnType: "string", | ||
| returnDescription: "Text or attribute value (or null).", | ||
| errors: commonErrors, | ||
| example: 'browser.querySelector "page1" "h1"', | ||
| }, | ||
| querySelectorAll: { | ||
| title: "Query selector all", | ||
| summary: "Read text for every matching element", | ||
| description: "Returns an array of strings.", | ||
| group: "query", | ||
| action: "read", | ||
| icon: "list", | ||
| capability: "read", | ||
| sideEffects: [], | ||
| idempotent: true, | ||
| since: "1.0.0", | ||
| tags: ["browser", "query"], | ||
| parameters: [pageIdParam, selectorParam], | ||
| returnType: "array", | ||
| returnDescription: "Array of textContent strings.", | ||
| errors: commonErrors, | ||
| example: 'browser.querySelectorAll "page1" "li.item"', | ||
| }, | ||
| cookies: { | ||
| title: "Get cookies", | ||
| summary: "Return all cookies for the current page", | ||
| description: "Equivalent to `page.cookies()`.", | ||
| group: "cookies", | ||
| action: "read", | ||
| icon: "cookie", | ||
| capability: "read", | ||
| sideEffects: [], | ||
| idempotent: true, | ||
| since: "1.0.0", | ||
| tags: ["browser", "cookies"], | ||
| parameters: [pageIdParam], | ||
| returnType: "array", | ||
| returnDescription: "Array of cookie objects.", | ||
| errors: commonErrors, | ||
| example: 'browser.cookies "page1"', | ||
| }, | ||
| setCookie: { | ||
| title: "Set cookie", | ||
| summary: "Install a cookie on the page", | ||
| description: "Cookie shape: `{ name, value, domain?, path?, expires?, httpOnly?, secure? }`.", | ||
| group: "cookies", | ||
| action: "write", | ||
| icon: "cookie", | ||
| capability: "upload_files", | ||
| sideEffects: [], | ||
| idempotent: false, | ||
| since: "1.0.0", | ||
| tags: ["browser", "cookies"], | ||
| parameters: [ | ||
| pageIdParam, | ||
| { name: "cookie", title: "Cookie", description: "Puppeteer CookieParam object.", dataType: "object", formInputType: "json", required: true, allowExpression: true, language: "json", rows: 4 }, | ||
| ], | ||
| returnType: "boolean", | ||
| returnDescription: "true on success.", | ||
| errors: commonErrors, | ||
| example: 'browser.setCookie "page1" {name: "session", value: "abc123", domain: "example.com"}', | ||
| }, | ||
| close: { | ||
| title: "Close page", | ||
| summary: "Close a single tab", | ||
| description: "The registered pageId is removed. The browser remains open.", | ||
| group: "lifecycle", | ||
| action: "delete", | ||
| icon: "x-square", | ||
| capability: "upload_files", | ||
| sideEffects: [], | ||
| idempotent: true, | ||
| since: "1.0.0", | ||
| tags: ["browser", "close"], | ||
| parameters: [pageIdParam], | ||
| returnType: "boolean", | ||
| returnDescription: "true on success.", | ||
| errors: commonErrors, | ||
| example: 'browser.close "page1"', | ||
| }, | ||
| closeBrowser: { | ||
| title: "Close browser", | ||
| summary: "Shut down a browser and all its pages", | ||
| description: "Frees memory and ends the Chromium process.", | ||
| group: "lifecycle", | ||
| action: "delete", | ||
| icon: "x", | ||
| capability: "upload_files", | ||
| sideEffects: [], | ||
| idempotent: true, | ||
| since: "1.0.0", | ||
| tags: ["browser", "close"], | ||
| parameters: [ | ||
| { name: "browserId", title: "Browser ID", description: "Identifier passed to `browser.launch`.", dataType: "string", formInputType: "text", required: true, allowExpression: true, defaultValue: "default" }, | ||
| ], | ||
| returnType: "boolean", | ||
| returnDescription: "true on success.", | ||
| errors: commonErrors, | ||
| example: 'browser.closeBrowser "main"', | ||
| }, | ||
| scrape: { | ||
| title: "One-shot scrape", | ||
| summary: "Launch a browser, navigate to a URL, extract data, and clean up", | ||
| description: "Convenience wrapper: spawns a headless browser, opens the URL, runs each selector in `selectors`, then closes everything.", | ||
| group: "navigate", | ||
| action: "write", | ||
| icon: "download", | ||
| capability: "upload_files", | ||
| sideEffects: ["makes_http_call", "spawns_process"], | ||
| idempotent: true, | ||
| since: "1.0.0", | ||
| tags: ["browser", "scrape"], | ||
| parameters: [ | ||
| { name: "url", title: "URL", description: "Page to scrape.", dataType: "string", formInputType: "text", required: true, allowExpression: true, placeholder: "https://example.com" }, | ||
| { name: "selectors", title: "Selectors", description: "Map of name → CSS selector.", dataType: "object", formInputType: "json", required: true, allowExpression: true, language: "json", rows: 4, placeholder: '{"title": "h1", "links": "a"}' }, | ||
| { name: "options", title: "Options", description: "{ waitUntil, args }", dataType: "object", formInputType: "json", required: false, allowExpression: true, language: "json", rows: 3, advanced: true }, | ||
| ], | ||
| returnType: "object", | ||
| returnDescription: "{ url, data: { name: string | string[] | null } }", | ||
| errors: commonErrors, | ||
| example: 'browser.scrape "https://example.com" {title: "h1", links: "a"}', | ||
| }, | ||
| }; | ||
| export const BrowserModuleMetadata = { | ||
| slug: "browser", | ||
| title: "Browser (Puppeteer)", | ||
| summary: "Headless Chromium automation — launch, navigate, click, type, screenshot, PDF, scrape", | ||
| description: "Drive a real Chromium browser via Puppeteer. Launch one or more browser instances, open pages, click / type / select, capture screenshots or PDFs, and read the DOM. Use the `scrape` shortcut for single-shot data extraction.\n\nNote: requires Chromium to be downloadable or present on the machine. Runs Node-only — not available in the cloud sandbox.", | ||
| category: "web", | ||
| icon: "icon.svg", | ||
| color: "#1F2937", | ||
| version: "0.2.0", | ||
| docsUrl: "https://docs.robinpath.com/modules/browser", | ||
| status: "stable", | ||
| requires: [], | ||
| minNodeVersion: "18.0.0", | ||
| credentialsType: null, | ||
| operationGroups: { | ||
| lifecycle: { title: "Lifecycle", description: "Launch, open pages, close.", order: 1 }, | ||
| navigate: { title: "Navigate", description: "URL loading and one-shot scrape.", order: 2 }, | ||
| interact: { title: "Interact", description: "Click, type, select.", order: 3 }, | ||
| query: { title: "Query", description: "Read content / DOM / evaluate JS.", order: 4 }, | ||
| capture: { title: "Capture", description: "Screenshots and PDF.", order: 5 }, | ||
| cookies: { title: "Cookies", description: "Read and write cookies.", order: 6 }, | ||
| }, | ||
| methods: Object.keys(BrowserFunctions), | ||
| }; | ||
| //# sourceMappingURL=browser.js.map |
| {"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAQA,OAAO,SAAsC,MAAM,WAAW,CAAC;AAE/D,MAAM,KAAK,GAA0B,EAAE,CAAC;AACxC,MAAM,UAAU,gBAAgB,CAAC,CAAa,IAAU,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;AAEzE,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAC;AAC5C,MAAM,KAAK,GAAG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AE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,sBAAsB,EAAE,KAAK,EAAE,CAAC,EAAE;QAC5E,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,yBAAyB,EAAE,KAAK,EAAE,CAAC,EAAE;KAChF;IACD,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC;CACvC,CAAC"} |
| import type { ModuleAdapter } from "@robinpath/core"; | ||
| declare const BrowserModule: ModuleAdapter; | ||
| export default BrowserModule; | ||
| export { BrowserModule }; | ||
| export { BrowserFunctions, BrowserFunctionMetadata, BrowserModuleMetadata, configureBrowser, } from "./browser.js"; | ||
| //# sourceMappingURL=index.d.ts.map |
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQrD,QAAA,MAAM,aAAa,EAAE,aASpB,CAAC;AAEF,eAAe,aAAa,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,cAAc,CAAC"} |
| import { BrowserFunctions, BrowserFunctionMetadata, BrowserModuleMetadata, configureBrowser, } from "./browser.js"; | ||
| const BrowserModule = { | ||
| name: "browser", | ||
| functions: BrowserFunctions, | ||
| functionMetadata: BrowserFunctionMetadata, | ||
| moduleMetadata: BrowserModuleMetadata, | ||
| // No credentials — browser automation is local. | ||
| credentialTypes: [], | ||
| configure: configureBrowser, | ||
| global: false, | ||
| }; | ||
| export default BrowserModule; | ||
| export { BrowserModule }; | ||
| export { BrowserFunctions, BrowserFunctionMetadata, BrowserModuleMetadata, configureBrowser, } from "./browser.js"; | ||
| //# sourceMappingURL=index.js.map |
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,MAAM,aAAa,GAAkB;IACnC,IAAI,EAAE,SAAS;IACf,SAAS,EAAE,gBAAgB;IAC3B,gBAAgB,EAAE,uBAAuB;IACzC,cAAc,EAAE,qBAAqB;IACrC,gDAAgD;IAChD,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE,gBAAgB;IAC3B,MAAM,EAAE,KAAK;CACd,CAAC;AAEF,eAAe,aAAa,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,cAAc,CAAC"} |
+13
-6
| { | ||
| "name": "@robinpath/browser", | ||
| "version": "0.1.2", | ||
| "version": "0.3.0", | ||
| "publishConfig": { | ||
@@ -24,3 +24,3 @@ "access": "public" | ||
| "peerDependencies": { | ||
| "@robinpath/core": ">=0.20.0" | ||
| "@robinpath/core": ">=0.40.0" | ||
| }, | ||
@@ -31,10 +31,12 @@ "dependencies": { | ||
| "devDependencies": { | ||
| "@robinpath/core": "^0.30.1", | ||
| "@robinpath/core": "^0.40.0", | ||
| "tsx": "^4.19.0", | ||
| "typescript": "^5.6.0" | ||
| }, | ||
| "description": "Headless browser automation with Puppeteer: launch browsers, navigate pages, interact with elements, take screenshots, generate PDFs, and scrape data", | ||
| "description": "Headless browser automation with Puppeteer: launch, navigate, click, type, screenshot, PDF, scrape", | ||
| "keywords": [ | ||
| "browser", | ||
| "web" | ||
| "web", | ||
| "puppeteer", | ||
| "scrape" | ||
| ], | ||
@@ -48,4 +50,9 @@ "license": "MIT", | ||
| "runtime": "node", | ||
| "runtimeReason": "Requires Puppeteer (native binary — Chromium download)" | ||
| "runtimeReason": "Requires Puppeteer (bundled Chromium binary).", | ||
| "language": "nodejs", | ||
| "platforms": [ | ||
| "cli", | ||
| "desktop" | ||
| ] | ||
| } | ||
| } |
+1
-1
@@ -22,3 +22,3 @@ # @robinpath/browser | ||
| ```bash | ||
| npm install @robinpath/browser | ||
| robinpath add @robinpath/browser | ||
| ``` | ||
@@ -25,0 +25,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
60368
1298.38%10
400%703
Infinity%2
100%