Skip to main content
Glama
README.md
<p align="center">
  <img src="assets/logo.svg" alt="HyperFrames Control Logo" width="76">
</p>

# HyperFrames Control (`hyperframes-control`)

**Phiên bản 3.0.0** · MIT · Antigravity · Claude Code · Codex · Gemini CLI · Universal MCP (`npx`)

Plugin đa agent và **MCP Server không cần cài phụ thuộc (`mcp/dist/server.cjs`)** giúp AI agent điều khiển trực tiếp **HyperFrames Desktop trên macOS** (tương thích `b1221+` / CLI `0.9.79–0.9.87+`): quản lý dự án, đọc/sửa code có live reload theo turn undo, trích xuất khung hình PNG tức thì, tách nền/xóa vật thể cục bộ miễn phí (SAM 2.1 + MI-GAN), chạy đầy đủ 22 lệnh CLI sản xuất & đo lường video, và **tự động đồng bộ toàn bộ 54+ skill + 54+ plugin Framey** từ `/Applications/HyperFrames.app` đang cài trên máy người dùng.

---

## Cài đặt nhanh cho từng Agent

Hướng dẫn chi tiết cài đặt, cập nhật, gỡ bỏ và kiểm tra: [docs/install.md](docs/install.md).

| Agent / Host | Lệnh cài đặt | Thành phần được nạp |
| --- | --- | --- |
| **Antigravity** (App, CLI, IDE) | `agy plugin install https://github.com/abm-dungtq/hyperframes-control` | MCP (`65` tools) + `4` skills + `rules/AGENTS.md` |
| **Claude Code** | `/plugin marketplace add abm-dungtq/hyperframes-control` rồi `/plugin install hyperframes-control@tqd-studio` | MCP (`65` tools) + `4` skills |
| **Codex** (CLI & Desktop) | `codex plugin marketplace add abm-dungtq/hyperframes-control` rồi `codex plugin add hyperframes-control@tqd-studio` | MCP (`npx`) + `4` skills |
| **Gemini CLI** | `gemini extensions install https://github.com/abm-dungtq/hyperframes-control` | MCP (`65` tools) + `4` skills + `rules/AGENTS.md` |
| **Cursor / Windsurf / OpenCode** | Cấu hình stdio MCP chạy `npx -y github:abm-dungtq/hyperframes-control` | MCP (`65` tools) + tự đồng bộ skill |

---

## Vì sao cần `hyperframes-control`?

1. **Không bị HyperFrames Desktop ghi đè cấu hình**: Khi khởi động, `HyperFrames.app` tự ghi 2 khóa `"hyperframes"` và `"hf_computer"` vào `~/.gemini/config/mcp_config.json` vốn phụ thuộc biến môi trường nội bộ chỉ tồn tại khi app tự spawn tiến trình con. Plugin này dùng định danh riêng `"hyperframes-control"` kết nối thẳng tới Streamable HTTP MCP (`/mcp`) và Desktop Bridge (`/desktop-bridge/invoke`) của HyperFrames Studio.
2. **Đóng gói zero-dependency**: Tệp thực thi `mcp/dist/server.cjs` đã đóng gói sẵn `@modelcontextprotocol/sdk` và `zod` bằng `esbuild`. Người dùng không cần chạy `npm install` khi cài plugin qua `agy`, `claude`, `codex` hay `npx`.
3. **Không nhúng tài nguyên độc quyền vào repo Git**: Toàn bộ Desktop skills, Vendor skills và Framey agent plugins được `skillSync.mjs` tự động đồng bộ từ `/Applications/HyperFrames.app` trên máy bạn vào `~/.cache/hyperframes-control/skills/` ngay lần đầu gọi `hf_skills_list` / `hf_skills_read` / `hf_skills_sync` (hoặc qua cờ `--sync-skills`), và tự cập nhật lại mỗi khi `HyperFrames.app` nâng build mới.

---

## Kiến trúc 65 MCP Tools + 4 Resources

1. **App Lifecycle & Desktop Bridge (`3` tools)**: `hf_app_status`, `hf_app_launch`, `hf_desktop_bridge` (57 kênh IPC cho phép trên `b1221`).
2. **HyperFrames Desktop & Studio Live (`36` tools)**:
   - Dự án: `hf_project_list`, `hf_project_open`, `hf_project_create`, `hf_project_files`, `hf_project_rename`, `hf_project_duplicate`.
   - Đọc/ghi & Preview: `hf_file_read`, `hf_file_write`, `hf_preview_frame`, `hf_ui_navigate` (hỗ trợ `?code=` an toàn).
   - Lịch sử Undo: `hf_history_begin`, `hf_history_end`, `hf_history_list`, `hf_history_undo`.
   - Media & AI cục bộ: `hf_media_list`, `hf_media_import`, `hf_media_library`, `hf_media_library_import`, `hf_media_cut_out` (SAM 2.1), `hf_image_erase` (MI-GAN), `hf_image_propose_selection`.
   - Xuất video, Comment & Framey Agent: `hf_render_start`, `hf_render_wait`, `hf_comments_*` (6 tools), `hf_agent_*` (5 tools), `hf_skill_guide_read`, `hf_style_read`.
3. **HyperFrames CLI & Production Engine (`22` tools)**:
   - Dựng & Quản lý: `hf_cli_init`, `hf_cli_check`, `hf_cli_snapshot`, `hf_cli_timeline`, `hf_cli_registry`, `hf_cli_capture_url`, `hf_cli_render`, `hf_cli_info`, `hf_cli_models`, `hf_cli_templates`, `hf_cli_history`, `hf_cli_catch_up`, `hf_cli_exec`.
   - Âm thanh, Màu sắc & So sánh: `hf_cli_measure` (`probe`..`hands`..`sync`), `hf_cli_diff`, `hf_cli_audio`, `hf_cli_normalize_audio`, `hf_cli_beats`, `hf_cli_media_treatment`, `hf_cli_compare`, `hf_cli_grade_compare`, `hf_cli_keyframes`.
4. **Skills & Sync (`4` tools)**: `hf_skills_list`, `hf_skills_read`, `hf_skill_gate`, `hf_skills_sync`.
5. **MCP Resources (`2` static + `2` templates)**: `hyperframes://projects`, `hyperframes://skills/catalog`, `hyperframes://project/{id}/media`, `hyperframes://project/{id}/comments`.

---

## Yêu cầu hệ thống & Kiểm thử

- **Hệ điều hành**: macOS (Apple Silicon hoặc Intel) đã cài [HyperFrames Desktop](https://hyperframes.studio/studio/download) tại `/Applications/HyperFrames.app` (chạy app ít nhất 1 lần để giải nén runtimes tại `~/Library/Application Support/HyperFrames/runtimes/`).
- **Node.js**: >= `20.0.0` (Antigravity dùng sẵn `agy-node` tích hợp).
- Kiểm thử E2E tại repo:
  ```bash
  npm run build
  npm run verify
  ```

---

## Giấy phép

Phát hành theo giấy phép **MIT** — xem [LICENSE.txt](LICENSE.txt) và [NOTICE.txt](NOTICE.txt).