# TAR Installation Guide

## Overview
TAR (Tamiyoz Agent Runtime) is a headless browser automation environment built on Midscene.js and Playwright, designed for GUI testing, visual QA, and browser control on a Linux server.

## Prerequisites (Pre-installed on Server)
- Node.js v24.19.0
- pnpm 10.26.0
- Python 3.12.3
- Docker 29.7.2 (not used by TAR directly)
- FFmpeg 6.1.1 (installed for video recording)
- Xvfb (installed for virtual display fallback)

## What Was Installed

### 1. UI-TARS (Action Parser)
- **Source:** https://github.com/bytedance/UI-TARS.git
- **Branch:** main (commit 582f3a7)
- **Path:** /var/www/TAR/source/UI-TARS/
- **Purpose:** Python library for parsing VLM-generated GUI actions into pyautogui code
- **Install:** pip install ui-tars (available but not required for browser automation)

### 2. Midscene.js (Browser Automation Runtime)
- **Source:** https://github.com/web-infra-dev/Midscene.git
- **Branch:** main (commit 64575ef)
- **Path:** /var/www/TAR/source/midscene/
- **Purpose:** AI-powered GUI agent for E2E testing with Playwright integration
- **Install:** pnpm install --frozen-lockfile (28 packages built)

### 3. Playwright + Chromium
- **Version:** 1.58.1
- **Path:** /var/www/TAR/node_modules/playwright/
- **Browser:** Chromium Headless Shell 145.0.7632.6
- **Cache:** /root/.cache/ms-playwright/
- **Install:** npm install playwright@1.58.1 && npx playwright install chromium --with-deps

### 4. System Dependencies
- **FFmpeg:** apt-get install ffmpeg (for video encoding)
- **Xvfb:** apt-get install xvfb (virtual framebuffer for non-headless fallback)

## Directory Structure


## No Other Projects Modified
All installations are contained within /var/www/TAR/. No system-wide Node, Python, Docker, or Nginx configurations were changed.
