File size: 2,105 Bytes
71e19b4
296a173
 
 
 
82fdec7
296a173
 
71e19b4
296a173
 
 
 
 
 
 
71e19b4
6d5d51b
b536efb
 
 
 
 
 
 
 
 
6d5d51b
b536efb
6d5d51b
b536efb
5bb62c3
 
6d5d51b
 
 
 
948e744
 
 
6d5d51b
 
 
948e744
 
 
5bb62c3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71e19b4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
title: Rebrowse
emoji: 🔄
tags:
- Agents-MCP-Hackathon
- agent-demo-track
colorFrom: indigo
colorTo: blue
sdk: gradio
python_version: '3.11'
license: apache-2.0
huggingface_hub_cache: false
pinned: true
thumbnail: >-
  https://cdn-uploads.huggingface.co/production/uploads/66244188ea4f4ed06659f20c/TWb3-6PET-odlg8dDUldO.png
sdk_version: 5.33.1
---
## Quick start

1. Install Chrome extension
- install extension zip
  ```bash
  curl -O https://huggingface.co/spaces/zk1tty/rebrowse/resolve/main/rebrowse_extension.zip
  ```
- unzip rebrowse_extension.zip
- chrome://extensions → “Load unpacked” → select the extracted folder

2. Install Host app
    ```bash
    /bin/bash -c "$(curl -fsSL https://huggingface.co/spaces/zk1tty/rebrowse/resolve/main/install_host.sh)"
    ```
3. connect Space page to Chrome extension(Recorder and Replayer) 

4. more detials: go to [rebrowse repo](https://github.com/zk1tty/rebrowse-app)

## Demo video

- Record:

<video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/66244188ea4f4ed06659f20c/qSRwgI_fGvYce8ySiI9Eq.qt"></video>

- Replay

![image/png](https://cdn-uploads.huggingface.co/production/uploads/66244188ea4f4ed06659f20c/2Co0bKqFaNgXdz7kFnvZx.png)
watch more from [Youtube🔗](https://youtu.be/CjxfwRO0TC8)

## Space-driven Flow

1. ⏺️ Recording
    Exetension(Content-script) → background.js → host.py → local file → /api/trace/upload

2. 🖱️ User clicks “Replay” in Gradio UI
    UI hits `POST /api/trace/{id}/replay_request`

3. 👂🏻 host.py long-polls `/api/trace/.requests/{id}`
    host.py detects semaphore via long-poll, re-sends each step to the extension with IDs, waits for ACKs.

4. 👁️ Status (optional)
    POST log lines back to /api/trace/{id}/status; UI textbox polls & streams inside replay() for UI streaming.
    `await s.post(f"{SPACE_URL}/api/trace/{trace_id}/status", data={"line": "..."} )`

Push app.py to the Space, ship the extension + host installer, and you have a complete record → Space → replay loop without any headless browser or extra servers. 🚀