LAB429/ Cheetah product page ↗

Cheetah / Cheetah documentation

Browser capture in one process

Capture Mini is a small browser-oriented product under products/testProduct_Capture. A single Python process hosts all three Cheetah roles, a capture manager, and an optional terminal UI. A Chrome MV3 extension supplies the browser runtime, popup, and content script.

It demonstrates two directions of communication without claiming that both use the same protocol operation:

  • the application role sends list_tabs to the extension through the Cheetah command path;
  • the extension popup posts a screenshot and DOM document to a product-owned capture route.

Prepare and run

Prepare the capture product from the repository root:

bootstrap.cmd --capture

Build the extension:

cd products\testProduct_Capture\plugin
npm run build

Open chrome://extensions, enable Developer mode, select Load unpacked, and choose products/testProduct_Capture/plugin/dist.

Start the product from the repository root:

products\testProduct_Capture\start.bat

Use --headless to replace the Textual interface with ordinary console output. The server prints its selected endpoints and waits for the extension to connect.

Capture a page

Open a page in Chrome, open the Capture Mini extension popup, wait for Connected, and select Capture. The popup captures the visible tab image through the Chrome API, requests the DOM through its content-script bridge, and posts both to /api/capture.

The product's CaptureManager stores a URL-based directory containing screenshot.png, dom.html, and meta.json. Selecting New Stream starts a new ordered sequence for the same URL. The terminal interface observes capture events and shows connection and artifact status.

The product route is custom application behavior. Standard Cheetah returned messages still enter through /api/ingest, and client state reports use /api/state_report.

What the example teaches

All server roles can share one coherent in-memory component set while preserving their meanings. The browser runtime can receive an application command while a product-specific UI also initiates data flow. Connection hooks can feed an operator interface without becoming the durable source of capture truth.

It also illustrates ownership: Cheetah delivers list_tabs; the product defines the capture route and folder organization; Chrome owns permission to capture the visible tab; the user initiates the capture from the popup.

Distinguish the reusable Browser Capture feature

Cheetah also includes a higher-level Browser Capture feature. That runtime acquires a worker context, performs ordered states against one target, returns command evidence through history, writes artifacts and a manifest through replaceable stores, and releases the worker.

The retained demonstration run contains top-of-page and scrolled states from one real browser context, with screenshot, DOM, metadata, and a clean worker release. The current reusable implementation is synchronous and sequential and ships local-first stores; it does not supply a distributed background queue or public artifact service.

Choose Capture Mini to study a small product integration. Choose the reusable feature when the product needs repeatable, policy-governed runs with an explicit run and artifact model.

Development boundary

The sample uses localhost, fixed development credentials, in-memory Cheetah state, and local files. Its capture route accepts large sensitive payloads and therefore needs product authentication, limits, retention, and cleanup before any external exposure.

Explore the integration workbench