hypeframe 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +255 -217
- package/bin/hypeframe.js +7 -133
- package/dist/index.js +2449 -0
- package/package.json +15 -10
- package/src/konfig.js +0 -83
- package/src/pasang.js +0 -74
- package/src/penangan.js +0 -17
- package/src/render/chrome.js +0 -99
- package/src/render/halaman.js +0 -74
- package/src/render/kerja.js +0 -133
- package/src/render/layanan.js +0 -371
- package/src/sambungan.js +0 -105
package/README.md
CHANGED
|
@@ -1,297 +1,335 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<b>◆ hypeframe</b><br>
|
|
3
|
+
The local engine for <a href="https://hype-frame.com">HypeFrame Web</a>.<br>
|
|
4
|
+
Code clips, video renders and (soon) AI assistants run on your own machine. The web is just the screen.
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/hypeframe"><img alt="npm" src="https://img.shields.io/npm/v/hypeframe?color=3DD6C3&label=npm"></a>
|
|
9
|
+
<a href="LICENSE"><img alt="MIT" src="https://img.shields.io/badge/license-MIT-3DD6C3"></a>
|
|
10
|
+
<a href="README.id.md"><img alt="Bahasa Indonesia" src="https://img.shields.io/badge/baca-Bahasa%20Indonesia-B49CFF"></a>
|
|
11
|
+
</p>
|
|
5
12
|
|
|
6
13
|
```bash
|
|
7
14
|
npx hypeframe
|
|
8
15
|
```
|
|
9
16
|
|
|
10
|
-
> **
|
|
11
|
-
> versi 1.0.
|
|
17
|
+
> **Preview.** HypeFrame Web is opening in stages. The protocol and commands may still change before 1.0.
|
|
12
18
|
|
|
13
|
-
##
|
|
19
|
+
## Contents
|
|
14
20
|
|
|
15
|
-
- [
|
|
16
|
-
- [
|
|
17
|
-
- [
|
|
18
|
-
- [
|
|
19
|
-
- [
|
|
20
|
-
- [
|
|
21
|
-
- [
|
|
22
|
-
- [
|
|
23
|
-
- [
|
|
24
|
-
- [
|
|
25
|
-
- [Lisensi](#lisensi)
|
|
21
|
+
- [How it works](#how-it-works)
|
|
22
|
+
- [Install](#install)
|
|
23
|
+
- [Quick start](#quick-start)
|
|
24
|
+
- [Commands](#commands)
|
|
25
|
+
- [Rendering](#rendering)
|
|
26
|
+
- [Security and privacy](#security-and-privacy)
|
|
27
|
+
- [Data folder](#data-folder)
|
|
28
|
+
- [Troubleshooting](#troubleshooting)
|
|
29
|
+
- [Development](#development)
|
|
30
|
+
- [License](#license)
|
|
26
31
|
|
|
27
|
-
##
|
|
32
|
+
## How it works
|
|
28
33
|
|
|
29
34
|
```
|
|
30
|
-
|
|
35
|
+
Your browser (phone / PC) HypeFrame servers Your machine
|
|
31
36
|
┌──────────────────────────┐ ┌──────────────────────────┐ ┌──────────────────────────────┐
|
|
32
|
-
│ HypeFrame Web │◄───►│ Gateway │◄────│ hypeframe (
|
|
33
|
-
│ editor,
|
|
34
|
-
│
|
|
35
|
-
│ browser │ └──────────────────────────┘ │ Chrome
|
|
36
|
-
│ │◄────────── http://127.0.0.1 ─────────│
|
|
37
|
-
└──────────────────────────┘
|
|
38
|
-
|
|
37
|
+
│ HypeFrame Web │◄───►│ Gateway │◄────│ hypeframe (local engine) │
|
|
38
|
+
│ editor, preview, │ WS │ accounts, device list, │ WS │ (connects out to the gateway,│
|
|
39
|
+
│ projects saved in the │ │ relays control messages │ │ never opens a port) │
|
|
40
|
+
│ browser │ └──────────────────────────┘ │ headless Chrome + ffmpeg │
|
|
41
|
+
│ │◄────────── http://127.0.0.1 ─────────│ local render service │
|
|
42
|
+
└──────────────────────────┘ project files and finished video └──────────────────────────────┘
|
|
43
|
+
go direct, never through a server
|
|
39
44
|
```
|
|
40
45
|
|
|
41
|
-
- **
|
|
42
|
-
|
|
43
|
-
- **
|
|
44
|
-
|
|
45
|
-
- **
|
|
46
|
-
|
|
47
|
-
- **Mesin motion yang sama.** Render memakai mesin motion yang sama dengan aplikasi HypeFrame di HP dan render
|
|
48
|
-
server, jadi hasilnya sama.
|
|
46
|
+
- **Connection.** The engine opens an outgoing connection to the HypeFrame gateway. No port forwarding, no router setup.
|
|
47
|
+
- **Only small messages pass the gateway**, such as "status" and "give me a render key".
|
|
48
|
+
- **Files never touch a server.** Projects and results move between the browser and the engine over `127.0.0.1` on
|
|
49
|
+
the same machine.
|
|
50
|
+
- **Same motion engine everywhere.** Renders use the same motion engine as the HypeFrame phone app and the render
|
|
51
|
+
server, so the output matches.
|
|
49
52
|
|
|
50
|
-
##
|
|
53
|
+
## Install
|
|
51
54
|
|
|
52
55
|
| | |
|
|
53
56
|
|---|---|
|
|
54
|
-
| Node.js | 20.3
|
|
55
|
-
|
|
|
56
|
-
| Android |
|
|
57
|
-
| iPhone / iPad |
|
|
58
|
-
| Chrome |
|
|
59
|
-
| RAM |
|
|
60
|
-
|
|
61
|
-
## Mulai cepat
|
|
62
|
-
|
|
63
|
-
1. Buka HypeFrame Web lalu masuk dengan akun Google.
|
|
64
|
-
2. Di komputer yang akan dipakai, buka Terminal (Windows: PowerShell) dan jalankan:
|
|
57
|
+
| Node.js | 20.3 or newer ([download](https://nodejs.org)) |
|
|
58
|
+
| System | Windows 10/11, macOS, Linux (x64 or arm64) |
|
|
59
|
+
| Android | Through Termux (`pkg install nodejs`). Rendering needs Chromium; the HypeFrame app (APK) is the easier route. |
|
|
60
|
+
| iPhone / iPad | Cannot run the engine. Use HypeFrame Web with "In this browser" rendering. |
|
|
61
|
+
| Chrome | Uses the installed Chrome or Edge. Without one, Chrome for Testing is downloaded once (about 150 MB). |
|
|
62
|
+
| RAM | 8 GB or more for 1080p video. 4 GB is enough for small videos. |
|
|
65
63
|
|
|
66
|
-
|
|
67
|
-
npx hypeframe
|
|
68
|
-
```
|
|
64
|
+
Run it once without installing:
|
|
69
65
|
|
|
70
|
-
|
|
66
|
+
```bash
|
|
67
|
+
npx hypeframe
|
|
68
|
+
```
|
|
71
69
|
|
|
72
|
-
|
|
73
|
-
HypeFrame mesin 0.1.0 (windows, LAPTOP-RAFI)
|
|
74
|
-
Buka https://hype-frame.com/sambung?kode=KJ4M-7QXP lalu tekan Sambungkan. Kode: KJ4M-7QXP
|
|
75
|
-
```
|
|
70
|
+
Or install it so `hypeframe` is always there (needed for **Start automatically**):
|
|
76
71
|
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
```bash
|
|
73
|
+
npm i -g hypeframe
|
|
74
|
+
```
|
|
79
75
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
```
|
|
76
|
+
```powershell
|
|
77
|
+
# Windows, with a check for Node.js first
|
|
78
|
+
irm https://raw.githubusercontent.com/sairidev/hypeframe/main/install.ps1 | iex
|
|
79
|
+
```
|
|
85
80
|
|
|
86
|
-
|
|
81
|
+
```bash
|
|
82
|
+
# macOS / Linux, with a check for Node.js first
|
|
83
|
+
curl -fsSL https://raw.githubusercontent.com/sairidev/hypeframe/main/install | bash
|
|
84
|
+
```
|
|
87
85
|
|
|
88
|
-
|
|
86
|
+
## Quick start
|
|
89
87
|
|
|
90
|
-
|
|
88
|
+
1. Open [HypeFrame Web](https://hype-frame.com) and sign in with Google.
|
|
89
|
+
2. On the machine that will do the work, open a terminal and run `hypeframe` (or `npx hypeframe`).
|
|
91
90
|
|
|
92
91
|
```
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
◆ hypeframe v0.2.0
|
|
93
|
+
local engine for HypeFrame Web
|
|
94
|
+
|
|
95
|
+
Account ▲ not connected
|
|
96
|
+
Engine stopped
|
|
97
|
+
Device LAPTOP-RAFI (windows)
|
|
98
|
+
Render Chrome · GPU off
|
|
99
|
+
24 hours -
|
|
100
|
+
Version 0.2.0 · Node 22.15.0
|
|
101
|
+
|
|
102
|
+
◆ What would you like to do?
|
|
103
|
+
│ ● Start the engine (connects your account first)
|
|
104
|
+
│ ○ Open HypeFrame Web
|
|
105
|
+
│ ○ Render speed test
|
|
106
|
+
│ ○ Render history
|
|
107
|
+
│ ○ ✦ AI assistant on this machine (coming soon)
|
|
108
|
+
│ ○ Start automatically
|
|
109
|
+
│ ○ Settings
|
|
110
|
+
│ ○ Check this machine
|
|
111
|
+
│ ○ Free up space
|
|
112
|
+
│ ○ Create a problem report
|
|
113
|
+
│ ○ Update hypeframe
|
|
114
|
+
│ ○ Connect to an account
|
|
115
|
+
│ ○ Exit
|
|
116
|
+
└
|
|
95
117
|
```
|
|
96
118
|
|
|
97
|
-
|
|
98
|
-
|---|---|
|
|
99
|
-
| `--nama NAMA` | Nama perangkat yang tampil di web (bawaan: nama komputer, paling panjang 40 huruf). Bisa diganti juga dari web. |
|
|
100
|
-
| `--gpu` | Render memakai GPU perangkat: lebih cepat untuk efek WebGL berat. Tanpa pilihan ini, render memakai SwiftShader seperti server render, supaya hasilnya sama persis. |
|
|
101
|
-
| `--tanpa-browser` | Tidak membuka browser saat menyambungkan. Tautannya tetap dicetak. Berguna untuk server tanpa layar. |
|
|
102
|
-
| `--gateway URL` | Alamat gateway (bawaan `https://api.sairipedia.com`). |
|
|
103
|
-
| `--web URL` | Alamat HypeFrame Web (bawaan `https://hype-frame.com`). Halaman render diambil dari sini, dan hanya alamat ini yang boleh memakai layanan render lokal. |
|
|
104
|
-
| `logout` (atau `keluar`) | Menghapus token perangkat dari komputer ini. Untuk memutus dari sisi akun, pakai **Putuskan** di web. |
|
|
105
|
-
|
|
106
|
-
Variabel lingkungan:
|
|
119
|
+
3. Pick **Start the engine**. It prints a code and a link and opens your browser:
|
|
107
120
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
| `HYPEFRAME_WEB_URL` | Sama dengan `--web`. |
|
|
112
|
-
| `HYPEFRAME_DIR` | Folder data (bawaan `~/.hypeframe`). |
|
|
113
|
-
| `HYPEFRAME_CHROME` | Jalur Chrome tertentu, menggantikan pencarian otomatis. |
|
|
121
|
+
```
|
|
122
|
+
16:03:20 ● Open https://hype-frame.com/sambung?kode=KJ4M-7QXP and press Connect. Code: KJ4M-7QXP
|
|
123
|
+
```
|
|
114
124
|
|
|
115
|
-
|
|
116
|
-
berjalan di terminal lain."
|
|
125
|
+
4. Check the device name on that page and press **Connect**.
|
|
117
126
|
|
|
118
|
-
|
|
127
|
+
```
|
|
128
|
+
16:03:31 ✔ Connected to account r***@gmail.com
|
|
129
|
+
16:03:32 ✔ Engine ready. Keep this window open while you use HypeFrame Web.
|
|
130
|
+
16:03:32 ↳ Press Ctrl+C to stop.
|
|
131
|
+
16:03:36 ✔ Render ready (Chrome 131.0.6778.86).
|
|
132
|
+
```
|
|
119
133
|
|
|
120
|
-
|
|
134
|
+
Keep the window open. HypeFrame Web shows **"Engine: LAPTOP-RAFI · connected"** in the corner. Next time just run
|
|
135
|
+
`hypeframe` again; a connected device does not need a new code.
|
|
121
136
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
- status (tersambung / terputus);
|
|
125
|
-
- versi mesin;
|
|
126
|
-
- kesiapan render.
|
|
137
|
+
The terminal speaks Indonesian when your system does and English otherwise. Pin it with
|
|
138
|
+
`hypeframe config --language id|en|auto` or `HYPEFRAME_LANG`.
|
|
127
139
|
|
|
128
|
-
|
|
140
|
+
## Commands
|
|
129
141
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
- **Putuskan.** Token perangkat dicabut, dan mesin di komputer itu langsung berhenti dengan pesan "Perangkat ini sudah
|
|
133
|
-
diputus dari akun".
|
|
142
|
+
`hypeframe` with no command opens the menu in a terminal. Outside a terminal (services, autostart, CI) it starts the
|
|
143
|
+
engine directly. Every menu item is also a command:
|
|
134
144
|
|
|
135
|
-
|
|
145
|
+
| Command | What it does |
|
|
146
|
+
|---|---|
|
|
147
|
+
| `hypeframe start` | Start the engine; connects the account first when needed |
|
|
148
|
+
| `hypeframe login` | Connect this device to a HypeFrame account |
|
|
149
|
+
| `hypeframe logout` | Remove the device token from this machine (`keluar` also works). To revoke it from the account side, use **Disconnect** on the web |
|
|
150
|
+
| `hypeframe status` | Account, engine, render, version |
|
|
151
|
+
| `hypeframe open` | Open HypeFrame Web in the browser |
|
|
152
|
+
| `hypeframe doctor` | Check Node, disk space, ffmpeg, Chrome and its encoders, gateway and web |
|
|
153
|
+
| `hypeframe bench` | Measure H.264 encoding at 720p and 1080p in the render Chrome; estimates a 60-second video |
|
|
154
|
+
| `hypeframe history` | Renders from the last 24 hours, with file paths |
|
|
155
|
+
| `hypeframe autostart on\|off` | Start the engine when you sign in (Startup folder / LaunchAgent / systemd user unit) |
|
|
156
|
+
| `hypeframe config` | Device name, GPU, language; interactive in a terminal |
|
|
157
|
+
| `hypeframe clean` | Remove the downloaded Chrome, cached render pages, old logs and failed renders. Finished videos stay |
|
|
158
|
+
| `hypeframe report` | Write a problem report (versions, settings, recent log) with tokens masked |
|
|
159
|
+
| `hypeframe update` | `npm i -g hypeframe@latest` |
|
|
160
|
+
|
|
161
|
+
| Option | Meaning |
|
|
162
|
+
|---|---|
|
|
163
|
+
| `--gpu` / `--no-gpu` | Render with the device GPU: faster for heavy WebGL. Without it, renders use SwiftShader like the render server, so output matches exactly |
|
|
164
|
+
| `--name <name>` | Device name shown on the web (default: computer name, up to 40 characters) |
|
|
165
|
+
| `--no-browser` | Do not open a browser while connecting; the link is still printed. For headless servers |
|
|
166
|
+
| `--language id\|en\|auto` | Terminal language (with `config`) |
|
|
167
|
+
| `--gateway <url>` | Gateway address (default `https://api.sairipedia.com`) |
|
|
168
|
+
| `--web <url>` | HypeFrame Web address (default `https://hype-frame.com`). The render page comes from here, and only this origin may use the local render service |
|
|
136
169
|
|
|
137
|
-
|
|
138
|
-
- Mesin yang versinya terlalu lama ditandai **Perlu diperbarui**. Perbarui dengan:
|
|
170
|
+
The 0.1.0 spellings `--nama` and `--tanpa-browser` still work.
|
|
139
171
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
172
|
+
| Environment variable | Meaning |
|
|
173
|
+
|---|---|
|
|
174
|
+
| `HYPEFRAME_GATEWAY_URL`, `HYPEFRAME_WEB_URL` | Same as `--gateway`, `--web` |
|
|
175
|
+
| `HYPEFRAME_DIR` | Data folder (default `~/.hypeframe`) |
|
|
176
|
+
| `HYPEFRAME_CHROME` | A specific Chrome binary instead of the automatic search |
|
|
177
|
+
| `HYPEFRAME_LANG` | `id` or `en` |
|
|
178
|
+
| `NO_COLOR`, `FORCE_COLOR` | Turn terminal colors off or on |
|
|
143
179
|
|
|
144
|
-
|
|
180
|
+
One data folder runs one engine at a time. A second copy stops with "The engine is already running in another
|
|
181
|
+
terminal."
|
|
145
182
|
|
|
146
|
-
|
|
147
|
-
- Simpan video, bila "Di mesin" dipilih.
|
|
148
|
-
- Klip dari kode, dengan urutan: mesin dulu, lalu render server untuk paket Max, lalu browser.
|
|
183
|
+
### Managing devices
|
|
149
184
|
|
|
150
|
-
**
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
dari HypeFrame Web, disimpan per versi, dan berkas yang jarang dipakai seperti huruf dan efek diambil saat
|
|
155
|
-
dibutuhkan.
|
|
156
|
-
3. Hasil MP4 (H.264) diunduh kembali ke browser. Klip transparan menjadi WebM.
|
|
185
|
+
**Settings → My devices** on HypeFrame Web lists each device with its name, system, status, engine version and render
|
|
186
|
+
readiness. You can **rename** it, **make it primary** (used when several are connected) or **disconnect** it (the token
|
|
187
|
+
is revoked and the engine on that machine stops at once). An account can have up to **5 devices**. Engines that are too
|
|
188
|
+
old are marked **Needs update**: run `hypeframe update` or `npx hypeframe@latest`.
|
|
157
189
|
|
|
158
|
-
|
|
159
|
-
- Satu render dalam satu waktu; render lain menunggu di antrean.
|
|
160
|
-
- Satu render paling lama 30 menit.
|
|
161
|
-
- Hasil disimpan 24 jam di folder mesin.
|
|
162
|
-
- **Klip transparan** butuh Chrome yang bisa membuat VP9 dengan alpha. Chrome tanpa layar di Windows tidak bisa,
|
|
163
|
-
jadi mesin menolaknya dengan cepat dan web membuatnya di tempat lain. Terminal memberi tahu hal ini saat mesin
|
|
164
|
-
menyala.
|
|
190
|
+
## Rendering
|
|
165
191
|
|
|
166
|
-
|
|
192
|
+
**What runs on the engine:** saving videos when "On my engine" is selected, and code clips (engine first, then the
|
|
193
|
+
render server on the Max plan, then the browser).
|
|
167
194
|
|
|
168
|
-
**
|
|
169
|
-
- Mesin hanya menerima jenis pesan yang diizinkan (`status`, `kunci`). Gateway dan mesin sama-sama menolak jenis lain,
|
|
170
|
-
jadi server tidak bisa menyuruh mesin menjalankan perintah sembarangan.
|
|
171
|
-
- Terminal jarak jauh tidak ada.
|
|
195
|
+
**One render, step by step**
|
|
172
196
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
197
|
+
1. The web asks the engine for a render key through the gateway, then sends the project straight to
|
|
198
|
+
`http://127.0.0.1:<port>` in 8 MB parts, each with a sha256 digest.
|
|
199
|
+
2. The engine starts headless Chrome with a fresh profile and loads the HypeFrame render page. The page comes from
|
|
200
|
+
HypeFrame Web and is cached per version; rarely used files such as fonts and effects are fetched on demand.
|
|
201
|
+
3. The MP4 (H.264) goes back to the browser. Transparent clips become WebM.
|
|
178
202
|
|
|
179
|
-
**
|
|
180
|
-
|
|
181
|
-
|
|
203
|
+
**Limits:** one render at a time (others queue), 30 minutes per render, results kept 24 hours. **Transparent clips**
|
|
204
|
+
need a Chrome that can encode VP9 with alpha. Headless Chrome on Windows cannot, so the engine refuses those quickly and
|
|
205
|
+
the web makes them elsewhere; the terminal says so when the engine starts.
|
|
182
206
|
|
|
183
|
-
|
|
184
|
-
- Token (`hfm_…`) tersimpan di `~/.hypeframe/akun.json`, hanya bisa dibaca pemilik.
|
|
185
|
-
- Token tidak pernah dicetak.
|
|
186
|
-
- Gateway hanya menyimpan sidiknya (sha256).
|
|
207
|
+
## Security and privacy
|
|
187
208
|
|
|
188
|
-
**
|
|
189
|
-
|
|
190
|
-
|
|
209
|
+
- **Allowed messages only.** The engine accepts `status` and `kunci` (render key) and nothing else. The gateway filters
|
|
210
|
+
too, but the engine never relies on that, so a server cannot make the engine run arbitrary commands. There is no
|
|
211
|
+
remote terminal.
|
|
212
|
+
- **Local render service** listens on `127.0.0.1` only. CORS is limited to the HypeFrame Web origin, with Chrome's
|
|
213
|
+
local network access permission. Every render needs a ticket signed (HMAC-SHA256) with a random key made each time
|
|
214
|
+
the engine starts; the key is only handed, through the gateway, to tabs signed in as the engine's owner.
|
|
215
|
+
- **The render Chrome has no internet.** Every host name resolves to nothing except `127.0.0.1`, so code inside a clip
|
|
216
|
+
cannot send data out.
|
|
217
|
+
- **Device token** (`hfm_…`) lives in `~/.hypeframe/akun.json`, readable by the owner only. It is never printed, and is
|
|
218
|
+
masked in the log file and problem reports. The gateway stores only its sha256.
|
|
219
|
+
- **Phishing codes.** Never approve a code you did not run yourself. When a code was requested from a different
|
|
220
|
+
network than your browser, the approval page shows a warning.
|
|
221
|
+
- **Sent to the server:** device name, operating system, engine version, render capabilities and the local port.
|
|
222
|
+
Projects and videos are not.
|
|
191
223
|
|
|
192
|
-
|
|
193
|
-
- Nama perangkat, sistem operasi, versi mesin, kemampuan render, dan port lokal.
|
|
194
|
-
- Project dan hasil video tidak dikirim ke server.
|
|
224
|
+
Found a vulnerability? See [SECURITY.md](SECURITY.md).
|
|
195
225
|
|
|
196
|
-
##
|
|
226
|
+
## Data folder
|
|
197
227
|
|
|
198
228
|
```
|
|
199
229
|
~/.hypeframe/
|
|
200
|
-
├── akun.json token
|
|
201
|
-
├──
|
|
230
|
+
├── akun.json device token (owner-readable only)
|
|
231
|
+
├── settings.json name, GPU, language, addresses
|
|
232
|
+
├── mesin.kunci one engine per folder
|
|
233
|
+
├── log/hypeframe.log plain-text log, tokens masked (rotated at 1 MB)
|
|
202
234
|
├── cache/
|
|
203
|
-
│ ├── chrome/ Chrome for Testing (
|
|
204
|
-
│ └── halaman/<
|
|
205
|
-
└── kerja/render/
|
|
235
|
+
│ ├── chrome/ Chrome for Testing (when downloaded)
|
|
236
|
+
│ └── halaman/<ver>/ render page from HypeFrame Web (last 2 versions)
|
|
237
|
+
└── kerja/render/ render jobs and results (removed automatically)
|
|
206
238
|
```
|
|
207
239
|
|
|
208
|
-
|
|
240
|
+
To remove everything: press **Disconnect** on the web, then delete `~/.hypeframe`.
|
|
209
241
|
|
|
210
|
-
|
|
211
|
-
2. hapus folder `~/.hypeframe`.
|
|
242
|
+
## Troubleshooting
|
|
212
243
|
|
|
213
|
-
|
|
244
|
+
Start with `hypeframe doctor`: it checks everything the engine needs and says what blocks rendering.
|
|
214
245
|
|
|
215
|
-
|
|
|
246
|
+
| Symptom | Cause and fix |
|
|
216
247
|
|---|---|
|
|
217
|
-
| `npx`
|
|
218
|
-
| "Gateway
|
|
219
|
-
| "
|
|
220
|
-
| "
|
|
221
|
-
|
|
|
222
|
-
| "
|
|
223
|
-
| Web: "
|
|
224
|
-
| "
|
|
225
|
-
| "
|
|
226
|
-
| "
|
|
227
|
-
|
|
|
228
|
-
|
|
229
|
-
|
|
248
|
+
| `npx` not found | Node.js is missing or too old. Install Node.js 20.3+ |
|
|
249
|
+
| "Gateway unreachable. Retrying..." | Internet or server trouble. The engine keeps retrying |
|
|
250
|
+
| "The code expired" | Codes last 10 minutes. Run `hypeframe` again |
|
|
251
|
+
| "This account already has 5 devices" | Disconnect one under **My devices** |
|
|
252
|
+
| The web shows "disconnected" | The engine window closed, the computer slept or the internet dropped. Run it again; it also reconnects by itself |
|
|
253
|
+
| "Rendering is not available yet: …" | Chrome or the render page is not ready. The engine retries every 10 minutes. Check the internet or set `HYPEFRAME_CHROME` |
|
|
254
|
+
| Web: "the engine cannot be reached from this browser" | The web is open on another device, or local network access was denied. Open the web on the same machine and allow access. The video is made in the browser meanwhile |
|
|
255
|
+
| "Transparent clips are made elsewhere" | This Chrome has no VP9 alpha. Transparent clips are made on the server or in the browser |
|
|
256
|
+
| "This engine is too old" | `hypeframe update` or `npx hypeframe@latest` |
|
|
257
|
+
| "already connected from another window or computer" | The same token is in use elsewhere. Close one of them |
|
|
258
|
+
| A 1080p render fails with "Encoding error." | Not enough memory. Close other apps, or choose the **Saver** quality |
|
|
259
|
+
|
|
260
|
+
Still stuck? Run `hypeframe report` and send the file to the HypeFrame team.
|
|
261
|
+
|
|
262
|
+
## Development
|
|
263
|
+
|
|
264
|
+
This repository is a small monorepo in the style of [OpenCode](https://opencode.ai): TypeScript, Bun for
|
|
265
|
+
tooling, and a package that runs on plain Node.js.
|
|
230
266
|
|
|
231
267
|
```
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
src/
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
268
|
+
packages/
|
|
269
|
+
├── hypeframe/ the npm package
|
|
270
|
+
│ ├── bin/hypeframe.js entry: checks the Node version, loads dist/index.js
|
|
271
|
+
│ ├── src/
|
|
272
|
+
│ │ ├── index.ts arguments → command or menu
|
|
273
|
+
│ │ ├── cli/ menu.ts, args.ts, commands/*.ts
|
|
274
|
+
│ │ ├── engine/ pairing.ts, connection.ts, handler.ts
|
|
275
|
+
│ │ ├── render/ service.ts, job.ts, chrome.ts, page.ts
|
|
276
|
+
│ │ ├── config/ paths, account, lock, settings, version
|
|
277
|
+
│ │ ├── ui/ theme (colors), log, banner, locale (id/en)
|
|
278
|
+
│ │ └── util/ open, format
|
|
279
|
+
│ └── test/ node:test suites (run through tsx)
|
|
280
|
+
└── protocol/ message shapes, close codes, ticket format, error texts shared with the web
|
|
281
|
+
script/build.ts Bun.build → packages/hypeframe/dist/index.js
|
|
282
|
+
script/release.ts typecheck, test, build, npm publish (dry run unless --publish)
|
|
283
|
+
install, install.ps1 installers
|
|
242
284
|
```
|
|
243
285
|
|
|
244
|
-
|
|
286
|
+
```bash
|
|
287
|
+
npm install # or: bun install
|
|
288
|
+
npm run dev -- status # run from source (tsx)
|
|
289
|
+
npm run typecheck
|
|
290
|
+
npm test # unit tests + the render service with a fake renderer
|
|
291
|
+
HF_TEST_CHROME=1 npm test # plus a real render in Chrome (needs HF_DIST_RENDER=<dist-render folder>)
|
|
292
|
+
npm run build # Bun bundles src into dist (bun comes as a dev dependency)
|
|
293
|
+
```
|
|
245
294
|
|
|
246
|
-
|
|
295
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) and [AGENTS.md](AGENTS.md).
|
|
247
296
|
|
|
248
|
-
|
|
297
|
+
### Protocol (version 1)
|
|
298
|
+
|
|
299
|
+
Engine ↔ gateway over `wss://<gateway>/mesin/ws`. Wire names are Indonesian because that is what the deployed gateway
|
|
300
|
+
and web speak; [`packages/protocol`](packages/protocol/src/index.ts) documents them in English.
|
|
301
|
+
|
|
302
|
+
| Direction | Message |
|
|
249
303
|
|---|---|
|
|
250
|
-
|
|
|
251
|
-
| gateway →
|
|
252
|
-
| gateway →
|
|
253
|
-
|
|
|
304
|
+
| engine → gateway | `{t:'halo', token, protokol:1, versi, os, nama, kemampuan:{render, chrome, transparan}, portLokal}` |
|
|
305
|
+
| gateway → engine | `{t:'ok', id}`, or close `4001` (bad hello), `4011` (token revoked), `4012` (other protocol), `4002` (replaced) |
|
|
306
|
+
| gateway → engine | `{t:'perintah', dari, id, jenis, ...}` |
|
|
307
|
+
| engine → gateway | `{t:'balas', ke, id, ok, ...}` to the asking tab, or `{t:'kabar', jenis, ...}` to every tab of the account |
|
|
254
308
|
|
|
255
|
-
|
|
256
|
-
- Mesin mengirim paling banyak 300 pesan per menit.
|
|
309
|
+
Messages are at most 256 KB; an engine sends at most 300 messages a minute.
|
|
257
310
|
|
|
258
|
-
**
|
|
311
|
+
**Local render API** (`http://127.0.0.1:<port>`, `Authorization: Bearer v1.<body>.<HMAC>`)
|
|
259
312
|
|
|
260
|
-
|
|
|
313
|
+
| Route | Purpose |
|
|
261
314
|
|---|---|
|
|
262
|
-
| `POST /tugas` |
|
|
263
|
-
| `PUT /tugas/:job/potongan/:n` |
|
|
315
|
+
| `POST /tugas` | create a job |
|
|
316
|
+
| `PUT /tugas/:job/potongan/:n` | a ZIP package part, header `x-sha256` |
|
|
264
317
|
| `POST /tugas/:job/mulai` | `{jumlah, ukuran, sha256}` |
|
|
265
318
|
| `GET /tugas/:job` | status |
|
|
266
|
-
| `GET /tugas/:job/hasil` |
|
|
267
|
-
| `DELETE /tugas/:job` |
|
|
268
|
-
|
|
269
|
-
Paket ZIP berisi `klip.json` (`{klip}`) atau `proyek.json` (`{proyek, setelan}`), ditambah `aset/<id>`.
|
|
270
|
-
|
|
271
|
-
### Menjalankan uji
|
|
319
|
+
| `GET /tugas/:job/hasil` | the MP4/WebM, supports `Range` |
|
|
320
|
+
| `DELETE /tugas/:job` | cancel |
|
|
272
321
|
|
|
273
|
-
|
|
274
|
-
npm install
|
|
275
|
-
npm test # unit + layanan render dengan perender tiruan
|
|
276
|
-
HF_UJI_CHROME=1 npm test # ditambah render sungguhan dengan Chrome
|
|
277
|
-
# butuh halaman render: HF_DIST_RENDER=<folder dist-render>
|
|
278
|
-
```
|
|
322
|
+
A package holds `klip.json` (`{klip}`) or `proyek.json` (`{proyek, setelan}`), plus `aset/<id>`.
|
|
279
323
|
|
|
280
|
-
##
|
|
324
|
+
## License
|
|
281
325
|
|
|
282
|
-
[MIT](LICENSE)
|
|
326
|
+
[MIT](LICENSE) for the code in this repository. Installed dependencies carry their own licenses:
|
|
283
327
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
| Paket | Lisensi |
|
|
328
|
+
| Package | License |
|
|
287
329
|
|---|---|
|
|
288
|
-
| `ws` | MIT |
|
|
289
|
-
| `
|
|
290
|
-
| `
|
|
291
|
-
| `@puppeteer/browsers` | Apache-2.0 |
|
|
292
|
-
| `ffmpeg-static` | GPL-3.0-or-later (paket dan biner ffmpeg yang diunduhnya) |
|
|
293
|
-
|
|
294
|
-
Chrome for Testing diunduh dari Google dengan ketentuan Google.
|
|
330
|
+
| `ws`, `yauzl`, `picocolors`, `@clack/prompts` | MIT |
|
|
331
|
+
| `puppeteer-core`, `@puppeteer/browsers` | Apache-2.0 |
|
|
332
|
+
| `ffmpeg-static` | GPL-3.0-or-later (the package and the ffmpeg binary it downloads) |
|
|
295
333
|
|
|
296
|
-
|
|
297
|
-
HypeFrame Web
|
|
334
|
+
Chrome for Testing is downloaded from Google under Google's terms. The HypeFrame render page (including Remotion and
|
|
335
|
+
GSAP) is **not** in this package; it is fetched from HypeFrame Web when used and follows its own licenses.
|