catalyst-smartbrowz

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Prerequisites

前提条件

Before using SmartBrowz, activate it once per project in the console:
Console → your project → SmartBrowz (left sidebar) → click "Start Exploring"
Skipping this step prevents access to Headless, Browser Logic, PDF & Screenshot, Templates, Browser Grid, and Dataverse components.
For Browser Logic functions: Requires Catalyst CLI installation. Initialize and deploy Browser Logic functions via CLI (cannot be created directly in console, but can be uploaded).

在使用SmartBrowz之前,需在控制台中为每个项目激活一次:
控制台 → 你的项目 → SmartBrowz(左侧边栏) → 点击**"Start Exploring"**
跳过此步骤将无法访问Headless、Browser Logic、PDF & Screenshot、Templates、Browser Grid和Dataverse组件。
针对Browser Logic函数: 需要安装Catalyst CLI。需通过CLI初始化并部署Browser Logic函数(无法直接在控制台创建,但可上传)。

How It Works

工作原理

  1. Multi-component service — SmartBrowz offers 6 independent components in one unified platform:
    • Headless: Connect to remote Chrome/Firefox in Catalyst cloud with automation libraries
    • Browser Logic: Serverless functions (Java/Node.js) containing browser automation logic
    • PDF & Screenshot: Generate visual documents programmatically
    • Templates: Design and store templates for dynamic content
    • Browser Grid (Early Access): Parallel headless browsers with auto-scaling
    • Dataverse: Data scraping APIs
  2. Choose your workflow:
    • Headless mode: Copy console-provided endpoints and code snippets to connect with Puppeteer/Playwright/Selenium
    • Browser Logic: Initialize via CLI, code in IDE, deploy to console — for persistent browser automation tasks
    • PDF & Screenshot: Use console Playground, SDKs (Java/Node.js/Python), or API to generate documents
    • Browser Grid: Configure node/browser count, connect via CDP/Webdriver endpoints, process requests in parallel
  3. Load
    references/smartbrowz-basics.md
    — for component details, automation library setup, Browser Logic structure, PDF/Screenshot SDK usage, Browser Grid configurations, and troubleshooting
  4. SDK-first rule — When writing implementation code, always prefer SDK methods over raw REST API calls:
    • Node.js:
      app.SmartBrowz()
      smartbrowz.convertToPdf()
      ,
      smartbrowz.generateFromTemplate()
      ,
      app.SmartBrowz().browserGrid()
      grid.getGrid()
      ,
      grid.stopGrid()
    • Python:
      app.smart_browz()
      smart_browz.convert_to_pdf()
      ,
      smart_browz.generate_from_template()
      ,
      app.smart_browz().browser_grid()
      grid.get_all_grid()
    • Java:
      ZCSmartBrowz.getInstance()
      smartBrowz.convertToPdf()
      ,
      smartBrowz.generateFromTemplate()
    • Use REST API only when no SDK equivalent exists (e.g., checking
      free_sessions
      on Browser Grid live stats)
  5. Key concepts:
    • Remote browsers run in Catalyst cloud — not local. Endpoints are auto-generated by console.
    • No api-key in connection code — Puppeteer/Playwright/Selenium connect using only the endpoint URL. The
      api-key
      is only used for Browser Grid REST API calls (e.g., live stats).
    • Chrome browser only (currently) — Firefox support in Browser Grid (Early Access)
    • Browser Logic functions = Serverless function type — created with CLI, not console UI
    • Browser Grid = auto-scaling — nodes and browsers spawn on demand based on configuration
    • Code Recipes available in console for testing automation library use cases
  6. Security note — Any browser automation or web scraping is at your own risk. Only use on domains that permit such actions or with proper approval.
  1. 多组件服务 — SmartBrowz在统一平台中提供6个独立组件:
    • Headless:通过自动化库连接Catalyst云端的远程Chrome/Firefox
    • Browser Logic:包含浏览器自动化逻辑的无服务器函数(Java/Node.js)
    • PDF & Screenshot:以编程方式生成可视化文档
    • Templates:设计并存储动态内容模板
    • Browser Grid(抢先体验版):支持自动扩缩容的并行无头浏览器
    • Dataverse:数据抓取API
  2. 选择你的工作流:
    • Headless模式:复制控制台提供的端点和代码片段,与Puppeteer/Playwright/Selenium建立连接
    • Browser Logic:通过CLI初始化,在IDE中编写代码,部署到控制台 — 适用于持久化浏览器自动化任务
    • PDF & Screenshot:使用控制台Playground、SDK(Java/Node.js/Python)或API生成文档
    • Browser Grid:配置节点/浏览器数量,通过CDP/Webdriver端点连接,并行处理请求
  3. 加载
    references/smartbrowz-basics.md
    — 获取组件详情、自动化库设置、Browser Logic结构、PDF/Screenshot SDK用法、Browser Grid配置以及故障排查信息
  4. 优先使用SDK规则 — 编写实现代码时,始终优先使用SDK方法而非原生REST API调用:
    • Node.js
      app.SmartBrowz()
      smartbrowz.convertToPdf()
      ,
      smartbrowz.generateFromTemplate()
      ,
      app.SmartBrowz().browserGrid()
      grid.getGrid()
      ,
      grid.stopGrid()
    • Python
      app.smart_browz()
      smart_browz.convert_to_pdf()
      ,
      smart_browz.generate_from_template()
      ,
      app.smart_browz().browser_grid()
      grid.get_all_grid()
    • Java
      ZCSmartBrowz.getInstance()
      smartBrowz.convertToPdf()
      ,
      smartBrowz.generateFromTemplate()
    • 仅在无对应SDK方法时使用REST API(例如:查看Browser Grid实时统计中的
      free_sessions
  5. 核心概念:
    • 远程浏览器运行在Catalyst云端 — 而非本地。端点由控制台自动生成。
    • 连接代码中无需api-key — Puppeteer/Playwright/Selenium仅通过端点URL建立连接。
      api-key
      仅用于Browser Grid的REST API调用(例如:实时统计)。
    • 目前仅支持Chrome浏览器 — Browser Grid(抢先体验版)支持Firefox
    • Browser Logic函数 = 无服务器函数类型 — 通过CLI创建,而非控制台UI
    • Browser Grid = 自动扩缩容 — 根据配置按需生成节点和浏览器
    • 控制台提供代码示例 — 用于测试自动化库的使用场景
  6. 安全说明 — 任何浏览器自动化或网页抓取行为风险自负。仅在允许此类操作的域名上使用,或获得适当授权。

Security Checklist

安全检查清单

  • API Key protection: Endpoints for Headless and Browser Grid are secured with auto-generated API keys. Regenerate keys if compromised (note: this resets grid stats).
  • Browser Logic logs: All function activity is logged in Console → DevOps → Logs. Review logs for debugging and security audits.
  • Browser Grid queue limits: Selenium requests queue for 30 seconds, Puppeteer/Playwright for 5 minutes. After timeout, requests are killed.
  • Browser Grid alerts: Monitor Dashboard for alerts (Browser Creation Rejected, 90% Disk Exhausted, 80% Memory/CPU Exhausted, Nodes Crashed).
  • Default storage: Browser Grid nodes have 10GB disk limit. Monitor disk usage to prevent failures.
  • Rate considerations: Browser automation can generate high network traffic. Be mindful of target website rate limits and terms of service.
  • API密钥保护:Headless和Browser Grid的端点由自动生成的API密钥保护。若密钥泄露请重新生成(注意:这会重置网格统计数据)。
  • Browser Logic日志:所有函数活动均记录在控制台 → DevOps → 日志中。查看日志以进行调试和安全审计。
  • Browser Grid队列限制:Selenium请求排队时长为30秒,Puppeteer/Playwright为5分钟。超时后请求将被终止。
  • Browser Grid告警:监控仪表盘获取告警信息(浏览器创建被拒绝、磁盘使用率达90%、内存/CPU使用率达80%、节点崩溃)。
  • 默认存储:Browser Grid节点的磁盘限制为10GB。监控磁盘使用率以避免故障。
  • 速率考量:浏览器自动化可能产生大量网络流量。请注意目标网站的速率限制和服务条款。

Triggers

触发场景

Use this skill for: "SmartBrowz", "headless browser", "Headless Browser", "remote browser", "Puppeteer", "Playwright", "Selenium", "browser automation", "Browser Logic", "PDF generation", "screenshot webpage", "HTML to PDF", "URL to PDF", "template PDF", "PDF/Screenshot generation", "PDF & Screenshot", "SmartBrowz templates", "Browser Grid", "parallel browsers", "web scraping", "Dataverse", "CDP endpoint", "Webdriver endpoint", "headless Chrome", "headless Firefox", "browser testing", or "automation library".
当涉及以下内容时使用此技能:"SmartBrowz"、"headless browser"、"Headless Browser"、"remote browser"、"Puppeteer"、"Playwright"、"Selenium"、"browser automation"、"Browser Logic"、"PDF generation"、"screenshot webpage"、"HTML to PDF"、"URL to PDF"、"template PDF"、"PDF/Screenshot generation"、"PDF & Screenshot"、"SmartBrowz templates"、"Browser Grid"、"parallel browsers"、"web scraping"、"Dataverse"、"CDP endpoint"、"Webdriver endpoint"、"headless Chrome"、"headless Firefox"、"browser testing"或"automation library"。

References

参考资料

ReferenceLoad when the query is about…
references/smartbrowz-basics.md
Headless setup (Puppeteer/Playwright/Selenium code snippets), Browser Logic (CLI commands, function structure, deployment), PDF & Screenshot (console Playground, SDK usage in Java/Node.js/Python, API calls, input formats HTML/URL/Template), Templates (design, storage, dynamic content), Browser Grid (configurations Basic/Light/Moderate/Heavy, node/browser setup, CDP/Webdriver endpoints, workflow, alerts, states Active/Inactive/Idle, dashboard, ideal practices), Dataverse (data scraping APIs), troubleshooting
参考资料当查询以下内容时加载…
references/smartbrowz-basics.md
Headless设置(Puppeteer/Playwright/Selenium代码片段)、Browser Logic(CLI命令、函数结构、部署)、PDF & Screenshot(控制台Playground、Java/Node.js/Python中的SDK用法、API调用、HTML/URL/模板输入格式)、Templates(设计、存储、动态内容)、Browser Grid(基础/轻量/中等/重型配置、节点/浏览器设置、CDP/Webdriver端点、工作流、告警、活跃/非活跃/空闲状态、仪表盘、最佳实践)、Dataverse(数据抓取API)、故障排查