hypeframe 0.1.0 → 0.3.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 +273 -219
- package/bin/hypeframe.js +7 -133
- package/dist/index.js +2600 -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,351 @@
|
|
|
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
|
+
curl -fsSL https://hype-frame.com/install | bash
|
|
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.
|
|
49
|
-
|
|
50
|
-
## Kebutuhan
|
|
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.
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|---|---|
|
|
54
|
-
| Node.js | 20.3 atau lebih baru ([unduh](https://nodejs.org/id/download)) |
|
|
55
|
-
| Sistem | Windows 10/11, macOS, Linux (x64 atau arm64) |
|
|
56
|
-
| Android | Lewat Termux (`pkg install nodejs`). Asisten bisa jalan; render hanya bila Chromium tersedia. Untuk Android, aplikasi HypeFrame (APK) tetap cara termudah. |
|
|
57
|
-
| iPhone / iPad | Tidak bisa menjalankan mesin. Pakai HypeFrame Web dengan render "Di browser ini". |
|
|
58
|
-
| Chrome | Memakai Chrome atau Edge yang sudah terpasang. Kalau tidak ada, Chrome for Testing diunduh sekali (± 150 MB). |
|
|
59
|
-
| RAM | Disarankan 8 GB atau lebih untuk video 1080p. 4 GB cukup untuk video kecil. |
|
|
53
|
+
## Install
|
|
60
54
|
|
|
61
|
-
|
|
55
|
+
**macOS and Linux**
|
|
62
56
|
|
|
63
|
-
|
|
64
|
-
|
|
57
|
+
```bash
|
|
58
|
+
curl -fsSL https://hype-frame.com/install | bash
|
|
59
|
+
```
|
|
65
60
|
|
|
66
|
-
|
|
67
|
-
npx hypeframe
|
|
68
|
-
```
|
|
61
|
+
**Windows** (PowerShell)
|
|
69
62
|
|
|
70
|
-
|
|
63
|
+
```powershell
|
|
64
|
+
irm https://hype-frame.com/install.ps1 | iex
|
|
65
|
+
```
|
|
71
66
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
67
|
+
The installer downloads a single `hypeframe` program from
|
|
68
|
+
[GitHub Releases](https://github.com/sairidev/hypeframe/releases), checks it against `SHA256SUMS`, puts it in
|
|
69
|
+
`~/.hypeframe/bin` and adds that folder to your `PATH`. **No Node.js needed.** Open a new terminal afterwards and type
|
|
70
|
+
`hypeframe`. To pick a version: `HYPEFRAME_VERSION=0.3.0` (bash: `curl … | HYPEFRAME_VERSION=0.3.0 bash`). To update
|
|
71
|
+
later: `hypeframe update`.
|
|
76
72
|
|
|
77
|
-
|
|
78
|
-
5. Terminal menampilkan:
|
|
73
|
+
**With Node.js** (20.3 or newer), the npm package works the same:
|
|
79
74
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
```
|
|
75
|
+
```bash
|
|
76
|
+
npx hypeframe # run once, nothing installed
|
|
77
|
+
npm i -g hypeframe # keep it installed
|
|
78
|
+
```
|
|
85
79
|
|
|
86
|
-
|
|
80
|
+
| | |
|
|
81
|
+
|---|---|
|
|
82
|
+
| System | Windows 10/11 (x64; ARM64 through emulation), macOS (Apple Silicon or Intel), Linux x64 or arm64 (glibc or musl/Alpine) |
|
|
83
|
+
| Android | Through Termux with Node.js (`pkg install nodejs`, then `npx hypeframe`); the installer switches to npm there. Rendering needs Chromium; the HypeFrame app (APK) is the easier route. |
|
|
84
|
+
| iPhone / iPad | Cannot run the engine. Use HypeFrame Web with "In this browser" rendering. |
|
|
85
|
+
| Chrome | Uses the installed Chrome or Edge. Without one, Chrome for Testing is downloaded once (about 150 MB). |
|
|
86
|
+
| ffmpeg | Comes with the npm package. The standalone program downloads the same build once (about 28 MB) and checks its sha256. |
|
|
87
|
+
| RAM | 8 GB or more for 1080p video. 4 GB is enough for small videos. |
|
|
88
|
+
| Disk | About 120 MB for the program, plus Chrome and ffmpeg when they are downloaded. |
|
|
87
89
|
|
|
88
|
-
|
|
90
|
+
## Quick start
|
|
89
91
|
|
|
90
|
-
|
|
92
|
+
1. Open [HypeFrame Web](https://hype-frame.com) and sign in with Google.
|
|
93
|
+
2. On the machine that will do the work, [install](#install) hypeframe, open a new terminal and run `hypeframe`.
|
|
91
94
|
|
|
92
95
|
```
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
◆ hypeframe v0.3.0
|
|
97
|
+
local engine for HypeFrame Web
|
|
98
|
+
|
|
99
|
+
Account ▲ not connected
|
|
100
|
+
Engine stopped
|
|
101
|
+
Device LAPTOP-RAFI (windows)
|
|
102
|
+
Render Chrome · GPU off
|
|
103
|
+
24 hours -
|
|
104
|
+
Version 0.3.0 · Bun 1.4.4 (standalone)
|
|
105
|
+
|
|
106
|
+
◆ What would you like to do?
|
|
107
|
+
│ ● Start the engine (connects your account first)
|
|
108
|
+
│ ○ Open HypeFrame Web
|
|
109
|
+
│ ○ Render speed test
|
|
110
|
+
│ ○ Render history
|
|
111
|
+
│ ○ ✦ AI assistant on this machine (coming soon)
|
|
112
|
+
│ ○ Start automatically
|
|
113
|
+
│ ○ Settings
|
|
114
|
+
│ ○ Check this machine
|
|
115
|
+
│ ○ Free up space
|
|
116
|
+
│ ○ Create a problem report
|
|
117
|
+
│ ○ Update hypeframe
|
|
118
|
+
│ ○ Connect to an account
|
|
119
|
+
│ ○ Exit
|
|
120
|
+
└
|
|
95
121
|
```
|
|
96
122
|
|
|
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:
|
|
123
|
+
3. Pick **Start the engine**. It prints a code and a link and opens your browser:
|
|
107
124
|
|
|
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. |
|
|
125
|
+
```
|
|
126
|
+
16:03:20 ● Open https://hype-frame.com/sambung?kode=KJ4M-7QXP and press Connect. Code: KJ4M-7QXP
|
|
127
|
+
```
|
|
114
128
|
|
|
115
|
-
|
|
116
|
-
berjalan di terminal lain."
|
|
129
|
+
4. Check the device name on that page and press **Connect**.
|
|
117
130
|
|
|
118
|
-
|
|
131
|
+
```
|
|
132
|
+
16:03:31 ✔ Connected to account r***@gmail.com
|
|
133
|
+
16:03:32 ✔ Engine ready. Keep this window open while you use HypeFrame Web.
|
|
134
|
+
16:03:32 ↳ Press Ctrl+C to stop.
|
|
135
|
+
16:03:36 ✔ Render ready (Chrome 131.0.6778.86).
|
|
136
|
+
```
|
|
119
137
|
|
|
120
|
-
|
|
138
|
+
Keep the window open. HypeFrame Web shows **"Engine: LAPTOP-RAFI · connected"** in the corner. Next time just run
|
|
139
|
+
`hypeframe` again; a connected device does not need a new code.
|
|
121
140
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
- status (tersambung / terputus);
|
|
125
|
-
- versi mesin;
|
|
126
|
-
- kesiapan render.
|
|
141
|
+
The terminal speaks Indonesian when your system does and English otherwise. Pin it with
|
|
142
|
+
`hypeframe config --language id|en|auto` or `HYPEFRAME_LANG`.
|
|
127
143
|
|
|
128
|
-
|
|
144
|
+
## Commands
|
|
129
145
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
- **Putuskan.** Token perangkat dicabut, dan mesin di komputer itu langsung berhenti dengan pesan "Perangkat ini sudah
|
|
133
|
-
diputus dari akun".
|
|
146
|
+
`hypeframe` with no command opens the menu in a terminal. Outside a terminal (services, autostart, CI) it starts the
|
|
147
|
+
engine directly. Every menu item is also a command:
|
|
134
148
|
|
|
135
|
-
|
|
149
|
+
| Command | What it does |
|
|
150
|
+
|---|---|
|
|
151
|
+
| `hypeframe start` | Start the engine; connects the account first when needed |
|
|
152
|
+
| `hypeframe login` | Connect this device to a HypeFrame account |
|
|
153
|
+
| `hypeframe logout` | Remove the device token from this machine (`keluar` also works). To revoke it from the account side, use **Disconnect** on the web |
|
|
154
|
+
| `hypeframe status` | Account, engine, render, version |
|
|
155
|
+
| `hypeframe open` | Open HypeFrame Web in the browser |
|
|
156
|
+
| `hypeframe doctor` | Check Node, disk space, ffmpeg, Chrome and its encoders, gateway and web |
|
|
157
|
+
| `hypeframe bench` | Measure H.264 encoding at 720p and 1080p in the render Chrome; estimates a 60-second video |
|
|
158
|
+
| `hypeframe history` | Renders from the last 24 hours, with file paths |
|
|
159
|
+
| `hypeframe autostart on\|off` | Start the engine when you sign in (Startup folder / LaunchAgent / systemd user unit) |
|
|
160
|
+
| `hypeframe config` | Device name, GPU, language; interactive in a terminal |
|
|
161
|
+
| `hypeframe clean` | Remove the downloaded Chrome, cached render pages, old logs and failed renders. Finished videos stay |
|
|
162
|
+
| `hypeframe report` | Write a problem report (versions, settings, recent log) with tokens masked |
|
|
163
|
+
| `hypeframe update` | Update to the latest version (runs the installer again, or `npm i -g hypeframe@latest` for an npm install) |
|
|
164
|
+
|
|
165
|
+
| Option | Meaning |
|
|
166
|
+
|---|---|
|
|
167
|
+
| `--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 |
|
|
168
|
+
| `--name <name>` | Device name shown on the web (default: computer name, up to 40 characters) |
|
|
169
|
+
| `--no-browser` | Do not open a browser while connecting; the link is still printed. For headless servers |
|
|
170
|
+
| `--language id\|en\|auto` | Terminal language (with `config`) |
|
|
171
|
+
| `--gateway <url>` | Gateway address (default `https://api.sairipedia.com`) |
|
|
172
|
+
| `--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
173
|
|
|
137
|
-
|
|
138
|
-
- Mesin yang versinya terlalu lama ditandai **Perlu diperbarui**. Perbarui dengan:
|
|
174
|
+
The 0.1.0 spellings `--nama` and `--tanpa-browser` still work.
|
|
139
175
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
176
|
+
| Environment variable | Meaning |
|
|
177
|
+
|---|---|
|
|
178
|
+
| `HYPEFRAME_GATEWAY_URL`, `HYPEFRAME_WEB_URL` | Same as `--gateway`, `--web` |
|
|
179
|
+
| `HYPEFRAME_DIR` | Data folder (default `~/.hypeframe`) |
|
|
180
|
+
| `HYPEFRAME_CHROME` | A specific Chrome binary instead of the automatic search |
|
|
181
|
+
| `HYPEFRAME_LANG` | `id` or `en` |
|
|
182
|
+
| `NO_COLOR`, `FORCE_COLOR` | Turn terminal colors off or on |
|
|
143
183
|
|
|
144
|
-
|
|
184
|
+
One data folder runs one engine at a time. A second copy stops with "The engine is already running in another
|
|
185
|
+
terminal."
|
|
145
186
|
|
|
146
|
-
|
|
147
|
-
- Simpan video, bila "Di mesin" dipilih.
|
|
148
|
-
- Klip dari kode, dengan urutan: mesin dulu, lalu render server untuk paket Max, lalu browser.
|
|
187
|
+
### Managing devices
|
|
149
188
|
|
|
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.
|
|
189
|
+
**Settings → My devices** on HypeFrame Web lists each device with its name, system, status, engine version and render
|
|
190
|
+
readiness. You can **rename** it, **make it primary** (used when several are connected) or **disconnect** it (the token
|
|
191
|
+
is revoked and the engine on that machine stops at once). An account can have up to **5 devices**. Engines that are too
|
|
192
|
+
old are marked **Needs update**: run `hypeframe update` or `npx hypeframe@latest`.
|
|
157
193
|
|
|
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.
|
|
194
|
+
## Rendering
|
|
165
195
|
|
|
166
|
-
|
|
196
|
+
**What runs on the engine:** saving videos when "On my engine" is selected, and code clips (engine first, then the
|
|
197
|
+
render server on the Max plan, then the browser).
|
|
167
198
|
|
|
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.
|
|
199
|
+
**One render, step by step**
|
|
172
200
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
201
|
+
1. The web asks the engine for a render key through the gateway, then sends the project straight to
|
|
202
|
+
`http://127.0.0.1:<port>` in 8 MB parts, each with a sha256 digest.
|
|
203
|
+
2. The engine starts headless Chrome with a fresh profile and loads the HypeFrame render page. The page comes from
|
|
204
|
+
HypeFrame Web and is cached per version; rarely used files such as fonts and effects are fetched on demand.
|
|
205
|
+
3. The MP4 (H.264) goes back to the browser. Transparent clips become WebM.
|
|
178
206
|
|
|
179
|
-
**
|
|
180
|
-
|
|
181
|
-
|
|
207
|
+
**Limits:** one render at a time (others queue), 30 minutes per render, results kept 24 hours. **Transparent clips**
|
|
208
|
+
need a Chrome that can encode VP9 with alpha. Headless Chrome on Windows cannot, so the engine refuses those quickly and
|
|
209
|
+
the web makes them elsewhere; the terminal says so when the engine starts.
|
|
182
210
|
|
|
183
|
-
|
|
184
|
-
- Token (`hfm_…`) tersimpan di `~/.hypeframe/akun.json`, hanya bisa dibaca pemilik.
|
|
185
|
-
- Token tidak pernah dicetak.
|
|
186
|
-
- Gateway hanya menyimpan sidiknya (sha256).
|
|
211
|
+
## Security and privacy
|
|
187
212
|
|
|
188
|
-
**
|
|
189
|
-
|
|
190
|
-
|
|
213
|
+
- **Allowed messages only.** The engine accepts `status` and `kunci` (render key) and nothing else. The gateway filters
|
|
214
|
+
too, but the engine never relies on that, so a server cannot make the engine run arbitrary commands. There is no
|
|
215
|
+
remote terminal.
|
|
216
|
+
- **Local render service** listens on `127.0.0.1` only. CORS is limited to the HypeFrame Web origin, with Chrome's
|
|
217
|
+
local network access permission. Every render needs a ticket signed (HMAC-SHA256) with a random key made each time
|
|
218
|
+
the engine starts; the key is only handed, through the gateway, to tabs signed in as the engine's owner.
|
|
219
|
+
- **The render Chrome has no internet.** Every host name resolves to nothing except `127.0.0.1`, so code inside a clip
|
|
220
|
+
cannot send data out.
|
|
221
|
+
- **Device token** (`hfm_…`) lives in `~/.hypeframe/akun.json`, readable by the owner only. It is never printed, and is
|
|
222
|
+
masked in the log file and problem reports. The gateway stores only its sha256.
|
|
223
|
+
- **Phishing codes.** Never approve a code you did not run yourself. When a code was requested from a different
|
|
224
|
+
network than your browser, the approval page shows a warning.
|
|
225
|
+
- **Sent to the server:** device name, operating system, engine version, render capabilities and the local port.
|
|
226
|
+
Projects and videos are not.
|
|
191
227
|
|
|
192
|
-
|
|
193
|
-
- Nama perangkat, sistem operasi, versi mesin, kemampuan render, dan port lokal.
|
|
194
|
-
- Project dan hasil video tidak dikirim ke server.
|
|
228
|
+
Found a vulnerability? See [SECURITY.md](SECURITY.md).
|
|
195
229
|
|
|
196
|
-
##
|
|
230
|
+
## Data folder
|
|
197
231
|
|
|
198
232
|
```
|
|
199
233
|
~/.hypeframe/
|
|
200
|
-
├──
|
|
201
|
-
├──
|
|
234
|
+
├── bin/hypeframe the standalone program (curl installer)
|
|
235
|
+
├── akun.json device token (owner-readable only)
|
|
236
|
+
├── settings.json name, GPU, language, addresses
|
|
237
|
+
├── mesin.kunci one engine per folder
|
|
238
|
+
├── log/hypeframe.log plain-text log, tokens masked (rotated at 1 MB)
|
|
202
239
|
├── cache/
|
|
203
|
-
│ ├── chrome/ Chrome for Testing (
|
|
204
|
-
│
|
|
205
|
-
└──
|
|
240
|
+
│ ├── chrome/ Chrome for Testing (when downloaded)
|
|
241
|
+
│ ├── ffmpeg/ ffmpeg for the standalone program (checked download)
|
|
242
|
+
│ └── halaman/<ver>/ render page from HypeFrame Web (last 2 versions)
|
|
243
|
+
└── kerja/render/ render jobs and results (removed automatically)
|
|
206
244
|
```
|
|
207
245
|
|
|
208
|
-
|
|
246
|
+
To remove everything: press **Disconnect** on the web, run `hypeframe autostart off`, delete `~/.hypeframe` and remove
|
|
247
|
+
the `# hypeframe` line the installer added to your shell profile (Windows: the `.hypeframe\bin` entry in the user
|
|
248
|
+
`PATH`). An npm install goes with `npm rm -g hypeframe`.
|
|
209
249
|
|
|
210
|
-
|
|
211
|
-
2. hapus folder `~/.hypeframe`.
|
|
250
|
+
## Troubleshooting
|
|
212
251
|
|
|
213
|
-
|
|
252
|
+
Start with `hypeframe doctor`: it checks everything the engine needs and says what blocks rendering.
|
|
214
253
|
|
|
215
|
-
|
|
|
254
|
+
| Symptom | Cause and fix |
|
|
216
255
|
|---|---|
|
|
217
|
-
| `
|
|
218
|
-
|
|
|
219
|
-
| "
|
|
220
|
-
| "
|
|
221
|
-
|
|
|
222
|
-
|
|
|
223
|
-
|
|
|
224
|
-
| "
|
|
225
|
-
| "
|
|
226
|
-
| "
|
|
227
|
-
|
|
|
228
|
-
|
|
229
|
-
|
|
256
|
+
| `hypeframe` not found right after installing | Open a new terminal so it picks up the new `PATH` |
|
|
257
|
+
| `npx` not found | Node.js is missing or too old. Use the curl/PowerShell installer instead, or install Node.js 20.3+ |
|
|
258
|
+
| "Gateway unreachable. Retrying..." | Internet or server trouble. The engine keeps retrying |
|
|
259
|
+
| "The code expired" | Codes last 10 minutes. Run `hypeframe` again |
|
|
260
|
+
| "This account already has 5 devices" | Disconnect one under **My devices** |
|
|
261
|
+
| The web shows "disconnected" | The engine window closed, the computer slept or the internet dropped. Run it again; it also reconnects by itself |
|
|
262
|
+
| "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` |
|
|
263
|
+
| 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 |
|
|
264
|
+
| "Transparent clips are made elsewhere" | This Chrome has no VP9 alpha. Transparent clips are made on the server or in the browser |
|
|
265
|
+
| "This engine is too old" | `hypeframe update` or `npx hypeframe@latest` |
|
|
266
|
+
| "already connected from another window or computer" | The same token is in use elsewhere. Close one of them |
|
|
267
|
+
| A 1080p render fails with "Encoding error." | Not enough memory. Close other apps, or choose the **Saver** quality |
|
|
268
|
+
|
|
269
|
+
Still stuck? Run `hypeframe report` and send the file to the HypeFrame team.
|
|
270
|
+
|
|
271
|
+
## Development
|
|
272
|
+
|
|
273
|
+
This repository is a small monorepo in the style of [OpenCode](https://opencode.ai): TypeScript, Bun for
|
|
274
|
+
tooling, an npm package that runs on plain Node.js, and standalone binaries (Bun runtime with the code built in) for
|
|
275
|
+
the curl installer.
|
|
230
276
|
|
|
231
277
|
```
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
src/
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
278
|
+
packages/
|
|
279
|
+
├── hypeframe/ the npm package
|
|
280
|
+
│ ├── bin/hypeframe.js entry: checks the Node version, loads dist/index.js
|
|
281
|
+
│ ├── src/
|
|
282
|
+
│ │ ├── index.ts arguments → command or menu
|
|
283
|
+
│ │ ├── cli/ menu.ts, args.ts, commands/*.ts
|
|
284
|
+
│ │ ├── engine/ pairing.ts, connection.ts, handler.ts
|
|
285
|
+
│ │ ├── render/ service.ts, job.ts, chrome.ts, page.ts, ffmpeg.ts
|
|
286
|
+
│ │ ├── config/ paths, account, lock, settings, version
|
|
287
|
+
│ │ ├── ui/ theme (colors), log, banner, locale (id/en)
|
|
288
|
+
│ │ └── util/ open, format, runtime
|
|
289
|
+
│ └── test/ node:test suites (run through tsx)
|
|
290
|
+
└── protocol/ message shapes, close codes, ticket format, error texts shared with the web
|
|
291
|
+
script/build.ts npm bundle, or --compile <targets> for standalone binaries + archives
|
|
292
|
+
script/release.ts typecheck, test, build, npm publish (dry run unless --publish)
|
|
293
|
+
install, install.ps1 the installers served at hype-frame.com/install and /install.ps1
|
|
294
|
+
.github/workflows/ ci.yml (every push), release.yml (tag v*: binaries, GitHub Release, installer test)
|
|
242
295
|
```
|
|
243
296
|
|
|
244
|
-
|
|
297
|
+
```bash
|
|
298
|
+
npm install # or: bun install
|
|
299
|
+
npm run dev -- status # run from source (tsx)
|
|
300
|
+
npm run typecheck
|
|
301
|
+
npm test # unit tests + the render service with a fake renderer
|
|
302
|
+
HF_TEST_CHROME=1 npm test # plus a real render in Chrome (needs HF_DIST_RENDER=<dist-render folder>)
|
|
303
|
+
npm run build # Bun bundles src into dist (bun comes as a dev dependency)
|
|
304
|
+
npx bun run script/build.ts --compile host # standalone binary for this machine in dist/standalone/
|
|
305
|
+
```
|
|
245
306
|
|
|
246
|
-
|
|
307
|
+
Binary targets: `linux-x64`, `linux-x64-baseline` (CPUs without AVX2), `linux-arm64`, `linux-x64-musl`,
|
|
308
|
+
`linux-arm64-musl`, `darwin-x64`, `darwin-arm64`, `windows-x64`, `windows-x64-baseline`.
|
|
247
309
|
|
|
248
|
-
|
|
249
|
-
|---|---|
|
|
250
|
-
| mesin → gateway | `{t:'halo', token, protokol:1, versi, os, nama, kemampuan:{render, chrome, transparan}, portLokal}` |
|
|
251
|
-
| gateway → mesin | `{t:'ok', id}` atau tutup `4001` (halo tidak valid), `4011` (token dicabut), `4012` (protokol lain), `4002` (digantikan) |
|
|
252
|
-
| gateway → mesin | `{t:'perintah', dari, id, jenis, ...}` |
|
|
253
|
-
| mesin → gateway | `{t:'balas', ke: dari, id, ok, ...}` (hanya ke tab yang meminta) / `{t:'kabar', jenis, ...}` (ke semua tab akun) |
|
|
310
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) and [AGENTS.md](AGENTS.md).
|
|
254
311
|
|
|
255
|
-
|
|
256
|
-
- Mesin mengirim paling banyak 300 pesan per menit.
|
|
312
|
+
### Protocol (version 1)
|
|
257
313
|
|
|
258
|
-
|
|
314
|
+
Engine ↔ gateway over `wss://<gateway>/mesin/ws`. Wire names are Indonesian because that is what the deployed gateway
|
|
315
|
+
and web speak; [`packages/protocol`](packages/protocol/src/index.ts) documents them in English.
|
|
259
316
|
|
|
260
|
-
|
|
|
317
|
+
| Direction | Message |
|
|
261
318
|
|---|---|
|
|
262
|
-
|
|
|
263
|
-
| `
|
|
264
|
-
|
|
|
265
|
-
| `
|
|
266
|
-
| `GET /tugas/:job/hasil` | hasil MP4/WebM, mendukung `Range` |
|
|
267
|
-
| `DELETE /tugas/:job` | batalkan |
|
|
319
|
+
| engine → gateway | `{t:'halo', token, protokol:1, versi, os, nama, kemampuan:{render, chrome, transparan}, portLokal}` |
|
|
320
|
+
| gateway → engine | `{t:'ok', id}`, or close `4001` (bad hello), `4011` (token revoked), `4012` (other protocol), `4002` (replaced) |
|
|
321
|
+
| gateway → engine | `{t:'perintah', dari, id, jenis, ...}` |
|
|
322
|
+
| engine → gateway | `{t:'balas', ke, id, ok, ...}` to the asking tab, or `{t:'kabar', jenis, ...}` to every tab of the account |
|
|
268
323
|
|
|
269
|
-
|
|
324
|
+
Messages are at most 256 KB; an engine sends at most 300 messages a minute.
|
|
270
325
|
|
|
271
|
-
|
|
326
|
+
**Local render API** (`http://127.0.0.1:<port>`, `Authorization: Bearer v1.<body>.<HMAC>`)
|
|
272
327
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
328
|
+
| Route | Purpose |
|
|
329
|
+
|---|---|
|
|
330
|
+
| `POST /tugas` | create a job |
|
|
331
|
+
| `PUT /tugas/:job/potongan/:n` | a ZIP package part, header `x-sha256` |
|
|
332
|
+
| `POST /tugas/:job/mulai` | `{jumlah, ukuran, sha256}` |
|
|
333
|
+
| `GET /tugas/:job` | status |
|
|
334
|
+
| `GET /tugas/:job/hasil` | the MP4/WebM, supports `Range` |
|
|
335
|
+
| `DELETE /tugas/:job` | cancel |
|
|
279
336
|
|
|
280
|
-
|
|
337
|
+
A package holds `klip.json` (`{klip}`) or `proyek.json` (`{proyek, setelan}`), plus `aset/<id>`.
|
|
281
338
|
|
|
282
|
-
|
|
339
|
+
## License
|
|
283
340
|
|
|
284
|
-
|
|
341
|
+
[MIT](LICENSE) for the code in this repository. Installed dependencies carry their own licenses:
|
|
285
342
|
|
|
286
|
-
|
|
|
343
|
+
| Package | License |
|
|
287
344
|
|---|---|
|
|
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.
|
|
345
|
+
| `ws`, `yauzl`, `picocolors`, `@clack/prompts` | MIT |
|
|
346
|
+
| `puppeteer-core`, `@puppeteer/browsers` | Apache-2.0 |
|
|
347
|
+
| `ffmpeg-static` | GPL-3.0-or-later (the package and the ffmpeg binary it downloads; the standalone program downloads the same ffmpeg build) |
|
|
295
348
|
|
|
296
|
-
|
|
297
|
-
|
|
349
|
+
The standalone program also contains the [Bun](https://bun.sh) runtime (MIT; it includes JavaScriptCore, LGPL-2.1).
|
|
350
|
+
Chrome for Testing is downloaded from Google under Google's terms. The HypeFrame render page (including Remotion and
|
|
351
|
+
GSAP) is **not** in this package; it is fetched from HypeFrame Web when used and follows its own licenses.
|