hivedesk 1.0.1 → 1.0.2

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 CHANGED
@@ -1,303 +1,307 @@
1
- <p align="center">
2
- <img src="assets/banner-1.0.png" width="900" alt="hivedesk 1.0. Your agents. Your machines. Your city. Your PC and a friend's PC as two buildings on floating islands, joined by a bridge.">
3
- </p>
4
-
5
- <p align="center"><a href="https://kwy404.github.io/hivedesk/#film"><img src="docs/media/hivedesk-1.0-poster.webp" width="900" alt="Watch the hivedesk 1.0 launch film (3:50)"></a><br><sub><a href="https://kwy404.github.io/hivedesk/#film">Watch the 1.0 film, 3:50</a></sub></p>
6
-
7
- <h3 align="center">Your agents. Your machines. Your city.</h3>
8
-
9
- <p align="center"><b>hivedesk is a peer-to-peer operating environment where AI agents, people and machines work together as one City.</b></p>
10
-
11
- <p align="center">
12
- <a href="https://kwy404.github.io/hivedesk/"><b>Website</b></a> &middot;
13
- <a href="#quick-start">Quick Start</a> &middot;
14
- <a href="#desktop-app-or-browser">App or browser</a> &middot;
15
- <a href="#security">Security</a> &middot;
16
- <a href="#honest-limits">Limits</a> &middot;
17
- <a href="i18n/README.pt-BR.md">Português</a>
18
- </p>
19
-
20
- <p align="center">
21
- <a href="https://www.npmjs.com/package/hivedesk"><img src="https://img.shields.io/npm/v/hivedesk?color=F2A93B&label=npm" alt="npm version"></a>
22
- <a href="https://github.com/kwy404/hivedesk/releases/latest"><img src="https://img.shields.io/github/v/release/kwy404/hivedesk?color=F2A93B&label=release" alt="latest release"></a>
23
- <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-F2A93B" alt="MIT license"></a>
24
- <img src="https://img.shields.io/badge/node-%3E%3D20-F2A93B" alt="Node.js 20 or newer">
25
- </p>
26
-
27
- Your PC is the first building of your City. Friends join with six words and bring their machines. Agents live in the rooms, take the tasks, and think on whichever machine the scheduler picks: your GPU, a friend's GPU they chose to share, or your CPU, always within what each owner allowed, with a reason you can read. Models run on your own machines; no account, no API key.
28
-
29
- | | |
30
- | --- | --- |
31
- | **Your PC** | The engine, your workspace, your agents and your own model. |
32
- | **A friend's PC** | A building in your City, with its agents. Shares nothing until its owner says so. |
33
- | **Agents** | Architect, Developer, QA and Reviewer by default, each with a room, tools, a level and a memory. |
34
- | **GPU and CPU** | Lent per job with a lease, limits and a Stop button, separately for the GPU and the CPU. |
35
- | **P2P** | Ed25519 identities, six word invites, check words, end to end encryption, an audit log. |
36
-
37
- <table>
38
- <tr><td align="center" width="16%"><img src="assets/icons/1.0/tiles/crew.svg" width="48" height="48" alt=""><br><sub>A crew of agents</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/city.svg" width="48" height="48" alt=""><br><sub>Your City</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/machines.svg" width="48" height="48" alt=""><br><sub>Machines</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/p2p-invite.svg" width="48" height="48" alt=""><br><sub>Six word invites</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/gpu-share.svg" width="48" height="48" alt=""><br><sub>Share a GPU</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/cpu-share.svg" width="48" height="48" alt=""><br><sub>Share a CPU</sub></td></tr>
39
- <tr><td align="center" width="16%"><img src="assets/icons/1.0/tiles/remote-desktop.svg" width="48" height="48" alt=""><br><sub>Remote screen</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/file-send.svg" width="48" height="48" alt=""><br><sub>Clipboard and files</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/voice.svg" width="48" height="48" alt=""><br><sub>Say it</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/editor.svg" width="48" height="48" alt=""><br><sub>Code editor</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/playbooks.svg" width="48" height="48" alt=""><br><sub>Playbooks</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/security-audit.svg" width="48" height="48" alt=""><br><sub>Audit log</sub></td></tr>
40
- </table>
41
-
42
- <p align="center">
43
- <img src="assets/illustrations/1.0/how-it-works.svg" width="900" alt="How it works in three steps: create your City, invite a friend with six words, and the agents take the tasks.">
44
- </p>
45
-
46
- <a id="quick-start"></a>
47
- ## Quick Start
48
-
49
- ```bash
50
- npx hivedesk # the engine on your machine, the window in your browser
51
- npx hivedesk --demo # look around first: a City in a temporary folder, every event labeled
52
- ```
53
-
54
- Or download the desktop app (recommended, below): it carries its own Node.js and gives you the full experience.
55
-
56
- <a id="desktop-app-or-browser"></a>
57
- ### Desktop app or browser
58
-
59
- The desktop app and `npx hivedesk` run the same engine on your machine; the difference is the window. A web page on its own runs inside the browser's sandbox, so it cannot do any of this.
60
-
61
- | Feature | Desktop app (recommended) | Browser tab with `npx hivedesk` | Browser only, nothing installed |
62
- | --- | --- | --- | --- |
63
- | The local model on your GPU | Yes | Yes. The engine runs in Node.js on your machine; the tab only shows it. | No. A web page cannot start a native program or load a model file of several GB from your disk. |
64
- | Sharing your GPU and CPU | Yes, also with the window closed: it keeps running in the tray. | Yes, while the tab stays open. The peer link runs in the window, and browsers slow down or freeze background tabs. | No. There is no engine to share. |
65
- | Remote control | Windows, and Linux on X11. macOS is view only until the app is signed. | Viewing works in Chromium based browsers. Control, the native clipboard and pasted files come from the input helper, the same as in the app. | No. A page cannot move the mouse or press keys on your system. |
66
- | Switching monitors | Yes. The viewer asks, the host picks the screen. | Yes, but the browser asks the host to pick the screen in its own dialog each time: a page may never choose a screen by itself. | No |
67
- | Terminal (PTY) | Yes on Windows and macOS. On Linux when its native part builds, else a basic labeled terminal. | The same: the terminal runs in the engine. | No. A page cannot start a shell. |
68
- | File system access | The folders you add, with a native folder picker. | The same folders. You type the path, because a page gets no native folder picker. | Only files you pick or drop one at a time, as the browser rules say. |
69
- | <kbd>Ctrl</kbd> <kbd>Alt</kbd> <kbd>Del</kbd> | Never sent to a remote machine. Windows reserves it for the secure sign in screen, so hivedesk drops it, and Win+L, on purpose. | Never sent. Your own system also catches it before any page sees it. | No |
70
- | Notifications | System notifications from the app. | After you allow them in the browser, and only while the tab is open; otherwise in the page. | No |
71
- | Running in the background | Yes. Close the window and it stays in the tray, with Open, Pause and Quit. | The engine keeps running in its terminal, but peers need the tab open, and a sleeping tab may stall a lent job. | No. Closing the tab ends it. |
72
-
73
- On macOS and Linux a screen share opens in your Chromium based browser, because those system web views cannot capture the screen reliably.
74
-
75
- ### Download
76
-
77
- | | File | Start |
78
- | --- | --- | --- |
79
- | Windows 10 and 11, x64 | [hivedesk-setup.exe](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-setup.exe) | run it: it installs for your user, without administrator rights, and downloads the app |
80
- | Windows, offline | [hivedesk-setup-offline.exe](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-setup-offline.exe) | the same installer with the app inside, for a machine without a network |
81
- | macOS, Apple Silicon and Intel | [hivedesk-macos.dmg](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-macos.dmg) | open it, drag hivedesk to Applications, open |
82
- | Linux x64, one file | [hivedesk-linux-x86_64.AppImage](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-linux-x86_64.AppImage) | `chmod +x`, then run it |
83
- | Linux x64, install script | [hivedesk-linux-install.sh](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-linux-install.sh) | `sh hivedesk-linux-install.sh`: checks the SHA-256 against `SHA256SUMS.txt`, then installs into `~/.local` without root |
84
- | Debian and Ubuntu | `hivedesk_<version>_amd64.deb` on the [releases page](https://github.com/kwy404/hivedesk/releases/latest) | `sudo apt install ./hivedesk_<version>_amd64.deb` |
85
- | Fedora and other RPM systems | `hivedesk-<version>-1.x86_64.rpm` on the [releases page](https://github.com/kwy404/hivedesk/releases/latest) | `sudo dnf install ./hivedesk-<version>-1.x86_64.rpm` |
86
- | Any system with Node.js 20+ | `npx hivedesk` | the window opens in your browser |
87
-
88
- Installed apps update themselves. They check the Ed25519 signature of the update manifest first, then ask: Update now, When I close or Remind me later. The `.deb` and `.rpm` packages show the update command instead, and `npx hivedesk@latest` gets the newest version. The installers are not code signed with paid certificates, so Windows SmartScreen ("More info", then "Run anyway") and macOS Gatekeeper (System Settings, Privacy and Security, "Open Anyway") ask once. A model is downloaded only after you say yes. Sizes and `SHA256SUMS.txt` are on the [releases page](https://github.com/kwy404/hivedesk/releases).
89
-
90
- <p align="center">
91
- <img src="assets/illustrations/1.0/installers.svg" width="900" alt="The hivedesk desktop app being installed on Windows, macOS and Linux.">
92
- </p>
93
-
94
- ## The City
95
-
96
- <p align="center">
97
- <img src="assets/screenshots/1.0/city.webp" width="900" alt="The City in demo mode: your building on a floating island with the Design, Code, Review, Test, Ops, Library and Lobby rooms, a friend's tower across a bridge with a borrowed GPU, the task board and the event feed.">
98
- </p>
99
-
100
- <table>
101
- <tr>
102
- <td width="33%"><img src="assets/screenshots/1.0/city-room.webp" alt="Inside the Code room: the room panel with its rules, the tools allowed inside and the agent working there."><br><sub><b>Rooms with rules:</b> the tools allowed inside, who is there, the tasks.</sub></td>
103
- <td width="33%"><img src="assets/screenshots/1.0/office.webp" alt="The Office view: the crew at their desks around Mel, the current job and its progress."><br><sub><b>The Office:</b> the same events indoors, with a count of finished tasks.</sub></td>
104
- <td width="33%"><img src="assets/screenshots/1.0/machines.webp" alt="The Machines panel next to the City: GPU, VRAM, CPU and RAM of this PC, each with the source of its number."><br><sub><b>Machines:</b> every number has a source, or says not measured.</sub></td>
105
- </tr>
106
- <tr>
107
- <td width="33%"><img src="assets/screenshots/1.0/chat.webp" alt="The #general channel: the crew reports what it finished and what waits for you."><br><sub><b>Chat:</b> the crew reports in #general and in direct messages.</sub></td>
108
- <td width="33%"><img src="assets/screenshots/1.0/editor.webp" alt="The code editor with the explorer, an open file and the run log."><br><sub><b>Code editor:</b> explorer, tabs, format, save and the run log.</sub></td>
109
- <td width="33%"><img src="assets/screenshots/1.0/remote.webp" alt="The Remote screen window: how it works, your address, the partner address and what to ask for."><br><sub><b>Remote screen:</b> nothing is allowed until it is ticked.</sub></td>
110
- </tr>
111
- <tr>
112
- <td width="33%"><img src="assets/screenshots/1.0/profile.webp" alt="The Profile window: your address, statistics counted from the engine's own logs and tasks by domain."><br><sub><b>Profile:</b> statistics counted from your own logs, nothing estimated.</sub></td>
113
- <td width="33%"><img src="assets/screenshots/1.0/city-mobile.webp" alt="The City on a phone sized screen."><br><sub><b>On a phone:</b> the City in a 390 px wide window.</sub></td>
114
- <td width="33%"><img src="assets/screenshots/1.0/office-mobile.webp" alt="The Office on a phone sized screen."><br><sub><b>The Office</b> on the same narrow screen.</sub></td>
115
- </tr>
116
- </table>
117
-
118
- The City is the state of the system: buildings are machines, rooms are places with their own tools, and every task walks through the rooms on its way to done. Every number on it is measured, or the panel says it is not measured.
119
-
120
- ## Create a City
121
-
122
- 1. Start hivedesk (the app, or `npx hivedesk`). The first screen lets you name your City and choose: look around the demo, use a model you already run, or download one for your hardware, with its size, license and time estimate before anything starts.
123
- 2. Your PC becomes the first building, with the rooms Lobby, Design, Code, Review, Test, Ops and Library, and the default crew.
124
- 3. `hivedesk city` prints the City from a terminal: buildings, agents, tasks by state and the peers online.
125
-
126
- ## Invite a Friend
127
-
128
- 1. Click **Invite a friend** in the City, or run `hivedesk invite`. You get six words. They work once, for 10 minutes.
129
- 2. Your friend opens **Join** and types the words (or `hivedesk join "six words"`). The words meet through a relay and set up an encrypted session.
130
- 3. Both screens show the same **check words**. If they match, you choose what your friend may do: only **See the City** is ticked by default; bringing a building and agents, using your GPU, or reading the workspace are separate boxes.
131
- 4. Accept. Their building rises next to yours. `hivedesk peers` lists known peers and their grants, with `--revoke` and `--block`.
132
-
133
- A wrong word burns the invite on the first handshake: make a new one. The terminal pairs over the LAN (`hivedesk invite --lan`); across the internet a window is needed.
134
-
135
- ## Borrow a GPU
136
-
137
- 1. The owner turns sharing on, separately for the GPU and the CPU, with limits, in the app or with `hivedesk share --gpu on --max-vram 8GB --max-jobs 1 --max-seconds 120`. Sharing is off by default.
138
- 2. The owner grants you compute (the **Use my GPU** box when you join, or later).
139
- 3. When a model does not fit on your machine, the scheduler offers the job to your friend's GPU, explains the choice in one sentence, and holds a 15 second lease renewed by heartbeats. The owner's own turns always go first.
140
- 4. Either side can stop it. A stopped job keeps its partial answer, and the job card offers Retry locally, Retry another peer, Use partial or Cancel.
141
-
142
- <p align="center">
143
- <img src="assets/illustrations/1.0/p2p-gpu.svg" width="900" alt="Two PCs linked peer to peer and end to end encrypted: a task goes to the friend's GPU under a 15 second lease and the answer comes back.">
144
- </p>
145
-
146
- ## Create an Agent
147
-
148
- Open **Hire** in the dock, give the agent a name, a role and, if you like, a prompt and a specialization. It gets a home room for its role, a level that grows with finished work, the tools of the room it works in, and a private memory you can read, edit and pin. Agents are saved on your machine and come back tomorrow. A friend's agents start with read only tools and think on their own machine.
149
-
150
- ## Run a Task
151
-
152
- Type what you want in the request box, the City box, `#general` or a direct message to an agent, or hold <kbd>Ctrl</kbd> <kbd>Space</kbd> and say it. Mel turns it into a brief and a task graph; each task walks the pipeline: Design, Code, Test, Review. QA runs your project's own `npm test` when there is a test script, and the static checks otherwise. A failure goes back to the author with the issues, at most 3 times. Commands, deletes and remote answers wait for your approval.
153
-
154
- <table>
155
- <tr>
156
- <td width="40%"><img src="assets/illustrations/1.0/voice-orb.svg" alt="The voice orb: Mel listening, with the speech level drawn as a ring."><br><sub>Hold <kbd>Ctrl</kbd> <kbd>Space</kbd> and say it.</sub></td>
157
- <td width="60%"><img src="assets/illustrations/1.0/remote-desktop.svg" alt="A friend's screen in a window, reached with a 10 digit address, view only until control is ticked."><br><sub>A 10 digit address, view only until control is ticked.</sub></td>
158
- </tr>
159
- </table>
160
-
161
- <p align="center">
162
- <img src="assets/illustrations/1.0/phone-remote.svg" width="900" alt="A phone paired with the hivedesk window by a QR code, showing a row of keys and an End button for the computer it reaches."><br>
163
- <sub><b>Phone remote:</b> scan the QR code in the hivedesk window, then approve, chat and follow jobs from your phone. Each phone has its own grants.</sub>
164
- </p>
165
-
166
- ## How it works
167
-
168
- <details>
169
- <summary><b>Architecture</b></summary>
170
-
171
- ```text
172
- window (app or browser tab) <-> hivedesk engine (Node.js 20, 127.0.0.1, secret token)
173
- core: one event log per project, domain reducers, command router with checks
174
- tasks: one task engine, nine states, history, retry, cancel, reassign
175
- crew and City: agents, rooms, pipeline
176
- p2p: identity, invites, sessions, grants, audit log
177
- compute: probes, share settings, scheduler, leases, worker
178
- workbench: files, search, terminal, source control
179
- remote: screen view and control, clipboard, files
180
- | encrypted frames: in process, LAN, or through the window
181
- other hivedesk engines
182
- ```
183
-
184
- The engine is the authority: identity keys, sessions, grants, jobs and the audit log live in Node.js, never in a browser tab. Protocols: [PROTOCOL.md](PROTOCOL.md), [CITY-PROTOCOL.md](CITY-PROTOCOL.md) and [docs/1.0/protocol/](docs/1.0/protocol/).
185
- </details>
186
-
187
- <details>
188
- <summary><b>P2P</b></summary>
189
-
190
- - One Ed25519 identity per install in `~/.hivedesk/identity/`. The peer id comes from the public key, shown to people as six fingerprint words.
191
- - Invites: six words (66 bits), one use, 10 minutes, burned by the first handshake that starts on them. The handshake uses X25519 with the invite as a pre shared key, both identities sign the transcript, and both screens show six check words before the host accepts.
192
- - Sessions: ChaCha20-Poly1305 with separate streams for control, compute and media, rekeyed every 2^20 messages or 60 minutes, a replay window, and a ping every 5 seconds.
193
- - Transports: LAN (off until you turn it on), and the window's data channel through public relays that only carry ciphertext. Known peers reconnect without words.
194
- - `hivedesk doctor --p2p` checks the identity, the relays, the ports and your network type (open, cone, symmetric or blocked).
195
- </details>
196
-
197
- <a id="security"></a>
198
- <details>
199
- <summary><b>Security</b></summary>
200
-
201
- <img src="assets/illustrations/1.0/security.svg" width="900" alt="An identity per install in a shield, every grant off by default except seeing the City, and an audit log where each line is chained to the last.">
202
-
203
- - **Default deny.** When a friend joins, only See the City is on. City membership, compute (GPU, CPU, RAM, storage), the workspace, terminal sharing, the screen, the clipboard and files are separate grants with limits. Screen and terminal grants live only for the session, at most 60 minutes.
204
- - **The owner's engine decides.** Every peer command is checked in the engine of the machine that owns the resource. A guest cannot pick your model, open a shell or read a file you did not share.
205
- - **Remote answers are untrusted.** Any tool call that comes from a turn a friend's GPU served needs your approval in every approval mode, new files included.
206
- - **Leases and deadlines.** A lent job has a 15 second lease, a hard deadline, a token limit and runs only on the lender's local model, never on their cloud key or another peer.
207
- - **Audit log.** `~/.hivedesk/audit/`, one hash chained line per join, grant, revoke, job and remote session. It never stores words, keys, prompts or answers.
208
- - Report a vulnerability: [SECURITY.md](SECURITY.md).
209
- </details>
210
-
211
- <details>
212
- <summary><b>GPU and CPU workers</b></summary>
213
-
214
- - Probes on each machine: the GPU vendor's tool, Windows performance counters, the Linux kernel's files, and on macOS unified memory (utilization is shown as not measured). Every number carries its source; a friend's numbers are labeled as reported by them.
215
- - Share settings, off by default: GPU (most VRAM, jobs at once 1 to 4, longest job, remote inference, model download) and CPU (threads, most RAM), plus hours, a model list and which peers.
216
- - A worker serves only the model it has loaded, never swaps the owner's model, never downloads one for a peer, and refuses anything but an inference job.
217
- </details>
218
-
219
- <details>
220
- <summary><b>Scheduler</b></summary>
221
-
222
- For each job it lists the candidates (your GPU, your CPU, each friend that granted you compute), drops the ones that fail a hard rule (grant, sharing, model, memory, capacity, time) with the reason, estimates the time from measured speeds, prefers local work, and picks the lowest. The reason is one sentence on the job card and the City bridge, for example: "Ana's PC, GPU: the 7B model fits in the 8 GB she shares, about 14 s. Your GPU has 3.2 GB free and the model needs 5.4 GB; your CPU would take about 52 s." With no candidate the task waits for a resource and lists the reasons.
223
- </details>
224
-
225
- <details>
226
- <summary><b>Agents and the City</b></summary>
227
-
228
- - Agents: a role (Architect, Developer, QA, Reviewer, Planner, Writer, Designer or your own), a home room, where they think (local, a peer or a cloud key), tools and permissions, a level and history from finished work, and a memory of short entries.
229
- - Rooms cut an agent's tools to the room's while it works there. Ops is for the host only. Extensions can add rooms.
230
- - Tasks have nine states (queued, assigned, working, waiting, review, testing, completed, failed, cancelled) with a history of every change and a deadline on every wait.
231
- - The Machines panel, the Activity stream and the job, task and peer panels read the same store. Office mode shows the same events as a honeycomb office.
232
- </details>
233
-
234
- <details>
235
- <summary><b>Workbench</b></summary>
236
-
237
- Folders you add next to the crew's workspace (each one a grant you can remove), an explorer with create, rename, move and delete, tabs in up to three split groups, diagnostics and symbols for JavaScript and TypeScript, search and replace across files with a diff preview, a real terminal (Windows and macOS; on Linux when its native part builds, else a labeled basic terminal), source control (status, diff, stage, commit, branches, stashes, log), terminal sharing for 5, 15 or 60 minutes, and Code together over the encrypted session. Agents never get a terminal.
238
- </details>
239
-
240
- <details>
241
- <summary><b>Remote desktop</b></summary>
242
-
243
- A 10 digit address (not a password) finds a machine while "Let partners reach this computer" is on, which is off by default. The host sees the caller's name and check words with a 60 second countdown; every box starts unticked (view, control, clipboard, files) and grants last 5, 15 or 60 minutes. A banner with Stop, <kbd>Ctrl</kbd> <kbd>Alt</kbd> <kbd>Shift</kbd> <kbd>K</kbd> on Windows, no input while the screen is locked, several screens, quality presets, chat, clipboard text and images, files up to 2 GB with resume, and unattended access for known peers with a password (5 wrong tries lock it for 15 minutes). Control works on Windows and on Linux X11 with xdotool and loginctl; macOS and Wayland are view only in 1.0.
244
-
245
- A phone can be a remote too: pair it with the QR code in the hivedesk window, accept it on the desktop, then approve, chat and follow jobs from the phone. Every phone has its own grants (only the status is on at first), a removal applies at once, and the hivedesk window must stay open.
246
- </details>
247
-
248
- <details>
249
- <summary><b>Models</b></summary>
250
-
251
- A catalog of 57 open source models from 0.5B to 72B parameters, for coding, reasoning and chat, each in quantized files from 2 to 8 bits, with their licenses. hivedesk recommends one for your hardware and asks before any download. A pool meter shows how close your City is to running a giant model with friends' shared memory, and an experimental switch, off by default, runs one model across the machines of friends who granted it, over the encrypted p2p link. Its speed depends on the network link between the machines. About 500 expert playbooks (pages, components, data, tests, reviews, git and docs) are picked per task by relevance, and their checks run in QA.
252
-
253
- | Your hardware | Model it runs | Speed | Good for |
254
- | --- | --- | --- | --- |
255
- | No GPU | A 0.5B or 1.5B coding model, or 3B with 16 GB of RAM | Slow, a few tokens per second | Small, single file tasks. Expect to wait. |
256
- | GPU with 4 to 7 GB | A 3B coding model, fully on the GPU | Usable | Small tasks, components, scripts, copy. |
257
- | GPU with 7 to 10 GB, or a friend's | A 7B coding model | Good | Small and medium tasks, with you steering. |
258
- | 10 GB or more, or a key | A 14B coding model, a bigger one in a local runtime you already use, or a cloud model with your own key | Faster | Bigger jobs and longer plans. |
259
- </details>
260
-
261
- <details>
262
- <summary><b>Development</b></summary>
263
-
264
- ```bash
265
- git clone https://github.com/kwy404/hivedesk && cd hivedesk
266
- npm install
267
- npm run demo # the engine with a scripted City
268
- npx vitest run --pool=threads --maxWorkers=2 # the tests
269
- npm run lint && npm run rules && npm run site # the checks
270
- python docs/_i18n/check.py # the site in 10 languages
271
- ```
272
-
273
- Ownership, contracts and the test plan are in [docs/1.0/PLAN.md](docs/1.0/PLAN.md); [CONTRIBUTING.md](CONTRIBUTING.md) has the rest.
274
- </details>
275
-
276
- <a id="honest-limits"></a>
277
- ## Honest about the limits
278
-
279
- - **Peers need a window.** Across the internet the peer link runs in the app window or a browser tab; a headless peer needs a native WebRTC part that is not built yet. On the same network, `hivedesk invite --lan` works from a terminal.
280
- - **No TURN relay.** Two very strict networks may not connect; `hivedesk doctor --p2p` tells which side is the problem.
281
- - **Not signed yet.** The downloads are not code signed or notarized, so macOS remote control is view only and your system warns before the first run.
282
- - **One model per lender.** A friend's machine serves only the model it has loaded and never downloads one for a peer.
283
- - **Giant models are experimental.** Pooling one model across friends' machines over the encrypted p2p link is in 1.0, off by default, and its speed depends on the network link between the machines.
284
- - **Small models are slow.** Workers take turns on one model, so a job takes minutes; on the CPU only, a few tokens per second.
285
-
286
- ## FAQ
287
-
288
- <details><summary><b>Do I need an account or an API key?</b></summary>No. Models run on your own machines and friends connect to you directly. A key is optional, only for a cloud model of your choice; it stays in a key store on your machine.</details>
289
- <details><summary><b>Can a friend see my files?</b></summary>Only if you tick Read the workspace for them. Edits they propose wait for your approval, new files included.</details>
290
- <details><summary><b>What does a friend's GPU see when I borrow it?</b></summary>The prompts and answers of the jobs sent to it, nothing else: no files, tools or memory.</details>
291
- <details><summary><b>Do I need the desktop app?</b></summary>No. <code>npx hivedesk</code> runs the same engine; the <a href="#desktop-app-or-browser">table above</a> lists every difference.</details>
292
- <details><summary><b>Can someone take over my screen?</b></summary>Not without your click: off by default, view only by default, every grant expires, a locked screen takes no input, and one hotkey or Stop ends it all.</details>
293
- <details><summary><b>How do I remove it?</b></summary>Delete <code>~/.hivedesk/</code> (identity, known peers, runtime, models, settings) and the <code>.hivedesk/</code> folder in your project; if you installed it with npm, run <code>npm rm -g hivedesk</code>.</details>
294
-
295
- ## Docs
296
-
297
- [FIRST-RUN.md](FIRST-RUN.md) &middot; [PROTOCOL.md](PROTOCOL.md) &middot; [CITY-PROTOCOL.md](CITY-PROTOCOL.md) &middot; [docs/1.0/protocol/](docs/1.0/protocol/) &middot; [CHANGELOG.md](CHANGELOG.md) &middot; [SECURITY.md](SECURITY.md)
298
-
299
- ## Author
300
-
301
- Made by **Alexandre Kohler** &middot; <a href="https://github.com/kwy404" rel="me noopener"><img src="assets/icons/1.0/github.svg" width="16" height="16" alt=""> GitHub</a> &middot; <a href="https://www.linkedin.com/in/alexandre-silva-173687256/" rel="me noopener"><img src="assets/icons/1.0/linkedin.svg" width="16" height="16" alt=""> LinkedIn</a>
302
-
303
- [MIT](LICENSE). The desktop window uses [Neutralinojs](https://neutralino.js.org/) (MIT).
1
+ <p align="center">
2
+ <img src="assets/banner-1.0.png" width="900" alt="hivedesk 1.0. Your agents. Your machines. Your city. Your PC and a friend's PC as two buildings on floating islands, joined by a bridge.">
3
+ </p>
4
+
5
+ <p align="center"><a href="https://kwy404.github.io/hivedesk/#film"><img src="docs/media/hivedesk-1.0-poster.webp" width="900" alt="Watch the hivedesk 1.0 launch film (3:50)"></a><br><sub><a href="https://kwy404.github.io/hivedesk/#film">Watch the 1.0 film, 3:50</a></sub></p>
6
+
7
+ <h3 align="center">Your agents. Your machines. Your city.</h3>
8
+
9
+ <p align="center"><b>hivedesk is a peer-to-peer operating environment where AI agents, people and machines work together as one City.</b></p>
10
+
11
+ <p align="center">
12
+ <a href="https://kwy404.github.io/hivedesk/"><b>Website</b></a> &middot;
13
+ <a href="#quick-start">Quick Start</a> &middot;
14
+ <a href="#desktop-app-or-browser">App or browser</a> &middot;
15
+ <a href="#security">Security</a> &middot;
16
+ <a href="#honest-limits">Limits</a> &middot;
17
+ <a href="i18n/README.pt-BR.md">Português</a>
18
+ </p>
19
+
20
+ <p align="center">
21
+ <a href="https://www.npmjs.com/package/hivedesk"><img src="https://img.shields.io/npm/v/hivedesk?color=F2A93B&label=npm" alt="npm version"></a>
22
+ <a href="https://github.com/kwy404/hivedesk/releases/latest"><img src="https://img.shields.io/github/v/release/kwy404/hivedesk?color=F2A93B&label=release" alt="latest release"></a>
23
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-F2A93B" alt="MIT license"></a>
24
+ <img src="https://img.shields.io/badge/node-%3E%3D20-F2A93B" alt="Node.js 20 or newer">
25
+ </p>
26
+
27
+ Your PC is the first building of your City. Friends join with six words and bring their machines. Agents live in the rooms, take the tasks, and think on whichever machine the scheduler picks: your GPU, a friend's GPU they chose to share, or your CPU, always within what each owner allowed, with a reason you can read. Models run on your own machines; no account, no API key.
28
+
29
+ | | |
30
+ | --- | --- |
31
+ | **Your PC** | The engine, your workspace, your agents and your own model. |
32
+ | **A friend's PC** | A building in your City, with its agents. Shares nothing until its owner says so. |
33
+ | **Agents** | Architect, Developer, QA and Reviewer by default, each with a room, tools, a level and a memory. |
34
+ | **GPU and CPU** | Lent per job with a lease, limits and a Stop button, separately for the GPU and the CPU. |
35
+ | **P2P** | Ed25519 identities, six word invites, check words, end to end encryption, an audit log. |
36
+
37
+ <table>
38
+ <tr><td align="center" width="16%"><img src="assets/icons/1.0/tiles/crew.svg" width="48" height="48" alt=""><br><sub>A crew of agents</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/city.svg" width="48" height="48" alt=""><br><sub>Your City</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/machines.svg" width="48" height="48" alt=""><br><sub>Machines</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/p2p-invite.svg" width="48" height="48" alt=""><br><sub>Six word invites</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/gpu-share.svg" width="48" height="48" alt=""><br><sub>Share a GPU</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/cpu-share.svg" width="48" height="48" alt=""><br><sub>Share a CPU</sub></td></tr>
39
+ <tr><td align="center" width="16%"><img src="assets/icons/1.0/tiles/remote-desktop.svg" width="48" height="48" alt=""><br><sub>Remote screen</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/file-send.svg" width="48" height="48" alt=""><br><sub>Clipboard and files</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/voice.svg" width="48" height="48" alt=""><br><sub>Say it</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/editor.svg" width="48" height="48" alt=""><br><sub>Code editor</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/playbooks.svg" width="48" height="48" alt=""><br><sub>Playbooks</sub></td><td align="center" width="16%"><img src="assets/icons/1.0/tiles/security-audit.svg" width="48" height="48" alt=""><br><sub>Audit log</sub></td></tr>
40
+ </table>
41
+
42
+ <p align="center">
43
+ <img src="assets/illustrations/1.0/how-it-works.svg" width="900" alt="How it works in three steps: create your City, invite a friend with six words, and the agents take the tasks.">
44
+ </p>
45
+
46
+ <a id="quick-start"></a>
47
+ ## Quick Start
48
+
49
+ ```bash
50
+ npx hivedesk # the engine on your machine, the window in your browser
51
+ npx hivedesk --demo # look around first: a City in a temporary folder, every event labeled
52
+ ```
53
+
54
+ Or download the desktop app (recommended, below): it carries its own Node.js and gives you the full experience.
55
+
56
+ <a id="desktop-app-or-browser"></a>
57
+ ### Desktop app or browser
58
+
59
+ The desktop app and `npx hivedesk` run the same engine on your machine; the difference is the window. A web page on its own runs inside the browser's sandbox, so it cannot do any of this.
60
+
61
+ | Feature | Desktop app (recommended) | Browser tab with `npx hivedesk` | Browser only, nothing installed |
62
+ | --- | --- | --- | --- |
63
+ | The local model on your GPU | Yes | Yes. The engine runs in Node.js on your machine; the tab only shows it. | No. A web page cannot start a native program or load a model file of several GB from your disk. |
64
+ | Sharing your GPU and CPU | Yes, also with the window closed: it keeps running in the tray. | Yes, while the tab stays open. The peer link runs in the window, and browsers slow down or freeze background tabs. | No. There is no engine to share. |
65
+ | Remote control | Windows, and Linux on X11. macOS is view only until the app is signed. | Viewing works in Chromium based browsers. Control, the native clipboard and pasted files come from the input helper, the same as in the app. | No. A page cannot move the mouse or press keys on your system. |
66
+ | Switching monitors | Yes. The viewer asks, the host picks the screen. | Yes, but the browser asks the host to pick the screen in its own dialog each time: a page may never choose a screen by itself. | No |
67
+ | Terminal (PTY) | Yes on Windows and macOS. On Linux when its native part builds, else a basic labeled terminal. | The same: the terminal runs in the engine. | No. A page cannot start a shell. |
68
+ | File system access | The folders you add, with a native folder picker. | The same folders. You type the path, because a page gets no native folder picker. | Only files you pick or drop one at a time, as the browser rules say. |
69
+ | <kbd>Ctrl</kbd> <kbd>Alt</kbd> <kbd>Del</kbd> | Never sent to a remote machine. Windows reserves it for the secure sign in screen, so hivedesk drops it, and Win+L, on purpose. | Never sent. Your own system also catches it before any page sees it. | No |
70
+ | Notifications | System notifications from the app. | After you allow them in the browser, and only while the tab is open; otherwise in the page. | No |
71
+ | Running in the background | Yes. Close the window and it stays in the tray, with Open, Pause and Quit. | The engine keeps running in its terminal, but peers need the tab open, and a sleeping tab may stall a lent job. | No. Closing the tab ends it. |
72
+
73
+ On macOS and Linux a screen share opens in your Chromium based browser, because those system web views cannot capture the screen reliably.
74
+
75
+ ### Download
76
+
77
+ | | File | Start |
78
+ | --- | --- | --- |
79
+ | Windows 10 and 11, x64 | [hivedesk-setup.exe](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-setup.exe) | run it: it installs for your user, without administrator rights, and downloads the app |
80
+ | Windows, offline | [hivedesk-setup-offline.exe](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-setup-offline.exe) | the same installer with the app inside, for a machine without a network |
81
+ | macOS, Apple Silicon and Intel | [hivedesk-macos.dmg](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-macos.dmg) | open it, drag hivedesk to Applications, open |
82
+ | Linux x64, one file | [hivedesk-linux-x86_64.AppImage](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-linux-x86_64.AppImage) | `chmod +x`, then run it |
83
+ | Linux x64, install script | [hivedesk-linux-install.sh](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-linux-install.sh) | `sh hivedesk-linux-install.sh`: checks the SHA-256 against `SHA256SUMS.txt`, then installs into `~/.local` without root |
84
+ | Debian and Ubuntu | `hivedesk_<version>_amd64.deb` on the [releases page](https://github.com/kwy404/hivedesk/releases/latest) | `sudo apt install ./hivedesk_<version>_amd64.deb` |
85
+ | Fedora and other RPM systems | `hivedesk-<version>-1.x86_64.rpm` on the [releases page](https://github.com/kwy404/hivedesk/releases/latest) | `sudo dnf install ./hivedesk-<version>-1.x86_64.rpm` |
86
+ | Any system with Node.js 20+ | `npx hivedesk` | the window opens in your browser |
87
+
88
+ Installed apps update themselves. They check the Ed25519 signature of the update manifest first, then ask: Update now, When I close or Remind me later. The `.deb` and `.rpm` packages show the update command instead, and `npx hivedesk@latest` gets the newest version. The installers are not code signed with paid certificates, so Windows SmartScreen ("More info", then "Run anyway") and macOS Gatekeeper (System Settings, Privacy and Security, "Open Anyway") ask once. A model is downloaded only after you say yes. Sizes and `SHA256SUMS.txt` are on the [releases page](https://github.com/kwy404/hivedesk/releases).
89
+
90
+ <p align="center">
91
+ <img src="assets/illustrations/1.0/installers.svg" width="900" alt="The hivedesk desktop app being installed on Windows, macOS and Linux.">
92
+ </p>
93
+
94
+ ## The City
95
+
96
+ <p align="center">
97
+ <img src="assets/screenshots/1.0/city.webp" width="900" alt="The City in demo mode: your building on a floating island with the Design, Code, Review, Test, Ops, Library and Lobby rooms, a friend's tower across a bridge with a borrowed GPU, the task board and the event feed.">
98
+ </p>
99
+
100
+ <table>
101
+ <tr>
102
+ <td width="33%"><img src="assets/screenshots/1.0/city-room.webp" alt="Inside the Code room: the room panel with its rules, the tools allowed inside and the agent working there."><br><sub><b>Rooms with rules:</b> the tools allowed inside, who is there, the tasks.</sub></td>
103
+ <td width="33%"><img src="assets/screenshots/1.0/office.webp" alt="The Office view: the crew at their desks around Mel, the current job and its progress."><br><sub><b>The Office:</b> the same events indoors, with a count of finished tasks.</sub></td>
104
+ <td width="33%"><img src="assets/screenshots/1.0/machines.webp" alt="The Machines panel next to the City: GPU, VRAM, CPU and RAM of this PC, each with the source of its number."><br><sub><b>Machines:</b> every number has a source, or says not measured.</sub></td>
105
+ </tr>
106
+ <tr>
107
+ <td width="33%"><img src="assets/screenshots/1.0/chat.webp" alt="The #general channel: the crew reports what it finished and what waits for you."><br><sub><b>Chat:</b> the crew reports in #general and in direct messages.</sub></td>
108
+ <td width="33%"><img src="assets/screenshots/1.0/editor.webp" alt="The code editor with the explorer, an open file and the run log."><br><sub><b>Code editor:</b> explorer, tabs, format, save and the run log.</sub></td>
109
+ <td width="33%"><img src="assets/screenshots/1.0/remote.webp" alt="The Remote screen window: how it works, your address, the partner address and what to ask for."><br><sub><b>Remote screen:</b> nothing is allowed until it is ticked.</sub></td>
110
+ </tr>
111
+ <tr>
112
+ <td width="33%"><img src="assets/screenshots/1.0/profile.webp" alt="The Profile window: your address, statistics counted from the engine's own logs and tasks by domain."><br><sub><b>Profile:</b> statistics counted from your own logs, nothing estimated.</sub></td>
113
+ <td width="33%"><img src="assets/screenshots/1.0/city-mobile.webp" alt="The City on a phone sized screen."><br><sub><b>On a phone:</b> the City in a 390 px wide window.</sub></td>
114
+ <td width="33%"><img src="assets/screenshots/1.0/office-mobile.webp" alt="The Office on a phone sized screen."><br><sub><b>The Office</b> on the same narrow screen.</sub></td>
115
+ </tr>
116
+ </table>
117
+
118
+ The City is the state of the system: buildings are machines, rooms are places with their own tools, and every task walks through the rooms on its way to done. Every number on it is measured, or the panel says it is not measured.
119
+
120
+ ## Create a City
121
+
122
+ 1. Start hivedesk (the app, or `npx hivedesk`). The first screen lets you name your City and choose: look around the demo, use a model you already run, or download one for your hardware, with its size, license and time estimate before anything starts.
123
+ 2. Your PC becomes the first building, with the rooms Lobby, Design, Code, Review, Test, Ops and Library, and the default crew.
124
+ 3. `hivedesk city` prints the City from a terminal: buildings, agents, tasks by state and the peers online.
125
+
126
+ ## Invite a Friend
127
+
128
+ 1. Click **Invite a friend** in the City, or run `hivedesk invite`. You get six words. They work once, for 10 minutes.
129
+ 2. Your friend opens **Join** and types the words (or `hivedesk join "six words"`). The words meet through a relay and set up an encrypted session.
130
+ 3. Both screens show the same **check words**. If they match, you choose what your friend may do: only **See the City** is ticked by default; bringing a building and agents, using your GPU, or reading the workspace are separate boxes.
131
+ 4. Accept. Their building rises next to yours. `hivedesk peers` lists known peers and their grants, with `--revoke` and `--block`.
132
+
133
+ A wrong word burns the invite on the first handshake: make a new one. The terminal pairs over the LAN (`hivedesk invite --lan`); across the internet a window is needed.
134
+
135
+ ## Borrow a GPU
136
+
137
+ 1. The owner turns sharing on, separately for the GPU and the CPU, with limits, in the app or with `hivedesk share --gpu on --max-vram 8GB --max-jobs 1 --max-seconds 120`. Sharing is off by default.
138
+ 2. The owner grants you compute (the **Use my GPU** box when you join, or later).
139
+ 3. When a model does not fit on your machine, the scheduler offers the job to your friend's GPU, explains the choice in one sentence, and holds a 15 second lease renewed by heartbeats. The owner's own turns always go first.
140
+ 4. Either side can stop it. A stopped job keeps its partial answer, and the job card offers Retry locally, Retry another peer, Use partial or Cancel.
141
+
142
+ <p align="center">
143
+ <img src="assets/illustrations/1.0/p2p-gpu.svg" width="900" alt="Two PCs linked peer to peer and end to end encrypted: a task goes to the friend's GPU under a 15 second lease and the answer comes back.">
144
+ </p>
145
+
146
+ ## Create an Agent
147
+
148
+ Open **Hire** in the dock, give the agent a name, a role and, if you like, a prompt and a specialization. It gets a home room for its role, a level that grows with finished work, the tools of the room it works in, and a private memory you can read, edit and pin. Agents are saved on your machine and come back tomorrow. A friend's agents start with read only tools and think on their own machine.
149
+
150
+ ## Run a Task
151
+
152
+ Type what you want in the request box, the City box, `#general` or a direct message to an agent, or hold <kbd>Ctrl</kbd> <kbd>Space</kbd> and say it. Mel turns it into a brief and a task graph; each task walks the pipeline: Design, Code, Test, Review. QA runs your project's own `npm test` when there is a test script, and the static checks otherwise. A failure goes back to the author with the issues, at most 3 times. Commands, deletes and remote answers wait for your approval.
153
+
154
+ <table>
155
+ <tr>
156
+ <td width="40%"><img src="assets/illustrations/1.0/voice-orb.svg" alt="The voice orb: Mel listening, with the speech level drawn as a ring."><br><sub>Hold <kbd>Ctrl</kbd> <kbd>Space</kbd> and say it.</sub></td>
157
+ <td width="60%"><img src="assets/illustrations/1.0/remote-desktop.svg" alt="A friend's screen in a window, reached with a 10 digit address, view only until control is ticked."><br><sub>A 10 digit address, view only until control is ticked.</sub></td>
158
+ </tr>
159
+ </table>
160
+
161
+ <p align="center">
162
+ <img src="assets/illustrations/1.0/phone-remote.svg" width="900" alt="A phone paired with the hivedesk window by a QR code, showing a row of keys and an End button for the computer it reaches."><br>
163
+ <sub><b>Phone remote:</b> scan the QR code in the hivedesk window, then approve, chat and follow jobs from your phone. Each phone has its own grants.</sub>
164
+ </p>
165
+
166
+ ## How it works
167
+
168
+ <details>
169
+ <summary><b>Architecture</b></summary>
170
+
171
+ ```text
172
+ window (app or browser tab) <-> hivedesk engine (Node.js 20, 127.0.0.1, secret token)
173
+ core: one event log per project, domain reducers, command router with checks
174
+ tasks: one task engine, nine states, history, retry, cancel, reassign
175
+ crew and City: agents, rooms, pipeline
176
+ p2p: identity, invites, sessions, grants, audit log
177
+ compute: probes, share settings, scheduler, leases, worker
178
+ workbench: files, search, terminal, source control
179
+ remote: screen view and control, clipboard, files
180
+ | encrypted frames: in process, LAN, or through the window
181
+ other hivedesk engines
182
+ ```
183
+
184
+ The engine is the authority: identity keys, sessions, grants, jobs and the audit log live in Node.js, never in a browser tab. Protocols: [PROTOCOL.md](PROTOCOL.md), [CITY-PROTOCOL.md](CITY-PROTOCOL.md) and [docs/1.0/protocol/](docs/1.0/protocol/).
185
+ </details>
186
+
187
+ <details>
188
+ <summary><b>P2P</b></summary>
189
+
190
+ - One Ed25519 identity per install in `~/.hivedesk/identity/`. The peer id comes from the public key, shown to people as six fingerprint words.
191
+ - Invites: six words (66 bits), one use, 10 minutes, burned by the first handshake that starts on them. The handshake uses X25519 with the invite as a pre shared key, both identities sign the transcript, and both screens show six check words before the host accepts.
192
+ - Sessions: ChaCha20-Poly1305 with separate streams for control, compute and media, rekeyed every 2^20 messages or 60 minutes, a replay window, and a ping every 5 seconds.
193
+ - Transports: LAN (off until you turn it on), and the window's data channel through public relays that only carry ciphertext. Known peers reconnect without words.
194
+ - `hivedesk doctor --p2p` checks the identity, the relays, the ports and your network type (open, cone, symmetric or blocked).
195
+ </details>
196
+
197
+ <a id="security"></a>
198
+ <details>
199
+ <summary><b>Security</b></summary>
200
+
201
+ <img src="assets/illustrations/1.0/security.svg" width="900" alt="An identity per install in a shield, every grant off by default except seeing the City, and an audit log where each line is chained to the last.">
202
+
203
+ - **Default deny.** When a friend joins, only See the City is on. City membership, compute (GPU, CPU, RAM, storage), the workspace, terminal sharing, the screen, the clipboard and files are separate grants with limits. Screen and terminal grants live only for the session, at most 60 minutes.
204
+ - **The owner's engine decides.** Every peer command is checked in the engine of the machine that owns the resource. A guest cannot pick your model, open a shell or read a file you did not share.
205
+ - **Remote answers are untrusted.** Any tool call that comes from a turn a friend's GPU served needs your approval in every approval mode, new files included.
206
+ - **Leases and deadlines.** A lent job has a 15 second lease, a hard deadline, a token limit and runs only on the lender's local model, never on their cloud key or another peer.
207
+ - **Audit log.** `~/.hivedesk/audit/`, one hash chained line per join, grant, revoke, job and remote session. It never stores words, keys, prompts or answers.
208
+ - Report a vulnerability: [SECURITY.md](SECURITY.md).
209
+ </details>
210
+
211
+ <details>
212
+ <summary><b>GPU and CPU workers</b></summary>
213
+
214
+ - Probes on each machine: the GPU vendor's tool, Windows performance counters, the Linux kernel's files, and on macOS unified memory (utilization is shown as not measured). Every number carries its source; a friend's numbers are labeled as reported by them.
215
+ - Share settings, off by default: GPU (most VRAM, jobs at once 1 to 4, longest job, remote inference, model download) and CPU (threads, most RAM), plus hours, a model list and which peers.
216
+ - A worker serves only the model it has loaded, never swaps the owner's model, never downloads one for a peer, and refuses anything but an inference job.
217
+ </details>
218
+
219
+ <details>
220
+ <summary><b>Scheduler</b></summary>
221
+
222
+ For each job it lists the candidates (your GPU, your CPU, each friend that granted you compute), drops the ones that fail a hard rule (grant, sharing, model, memory, capacity, time) with the reason, estimates the time from measured speeds, prefers local work, and picks the lowest. The reason is one sentence on the job card and the City bridge, for example: "Ana's PC, GPU: the 7B model fits in the 8 GB she shares, about 14 s. Your GPU has 3.2 GB free and the model needs 5.4 GB; your CPU would take about 52 s." With no candidate the task waits for a resource and lists the reasons.
223
+ </details>
224
+
225
+ <details>
226
+ <summary><b>Agents and the City</b></summary>
227
+
228
+ - Agents: a role (Architect, Developer, QA, Reviewer, Planner, Writer, Designer or your own), a home room, where they think (local, a peer or a cloud key), tools and permissions, a level and history from finished work, and a memory of short entries.
229
+ - Rooms cut an agent's tools to the room's while it works there. Ops is for the host only. Extensions can add rooms.
230
+ - Tasks have nine states (queued, assigned, working, waiting, review, testing, completed, failed, cancelled) with a history of every change and a deadline on every wait.
231
+ - The Machines panel, the Activity stream and the job, task and peer panels read the same store. Office mode shows the same events as a honeycomb office.
232
+ </details>
233
+
234
+ <details>
235
+ <summary><b>Workbench</b></summary>
236
+
237
+ Folders you add next to the crew's workspace (each one a grant you can remove), an explorer with create, rename, move and delete, tabs in up to three split groups, diagnostics and symbols for JavaScript and TypeScript, search and replace across files with a diff preview, a real terminal (Windows and macOS; on Linux when its native part builds, else a labeled basic terminal), source control (status, diff, stage, commit, branches, stashes, log), terminal sharing for 5, 15 or 60 minutes, and Code together over the encrypted session. Agents never get a terminal.
238
+ </details>
239
+
240
+ <details>
241
+ <summary><b>Remote desktop</b></summary>
242
+
243
+ A 10 digit address (not a password) finds a machine while "Let partners reach this computer" is on, which is off by default. The host sees the caller's name and check words with a 60 second countdown; every box starts unticked (view, control, clipboard, files) and grants last 5, 15 or 60 minutes. A banner with Stop, <kbd>Ctrl</kbd> <kbd>Alt</kbd> <kbd>Shift</kbd> <kbd>K</kbd> on Windows, no input while the screen is locked, several screens, quality presets, chat, clipboard text and images, files up to 2 GB with resume, and unattended access for known peers with a password (5 wrong tries lock it for 15 minutes). Control works on Windows and on Linux X11 with xdotool and loginctl; macOS and Wayland are view only in 1.0.
244
+
245
+ A phone can be a remote too: pair it with the QR code in the hivedesk window, accept it on the desktop, then approve, chat and follow jobs from the phone. Every phone has its own grants (only the status is on at first), a removal applies at once, and the hivedesk window must stay open.
246
+ </details>
247
+
248
+ <details>
249
+ <summary><b>Models</b></summary>
250
+
251
+ A catalog of 57 open source models from 0.5B to 72B parameters, for coding, reasoning and chat, each in quantized files from 2 to 8 bits, with their licenses. hivedesk recommends one for your hardware and asks before any download. A pool meter shows how close your City is to running a giant model with friends' shared memory, and an experimental switch, off by default, runs one model across the machines of friends who granted it, over the encrypted p2p link. Its speed depends on the network link between the machines. About 500 expert playbooks (pages, components, data, tests, reviews, git and docs) are picked per task by relevance, and their checks run in QA.
252
+
253
+ | Your hardware | Model it runs | Speed | Good for |
254
+ | --- | --- | --- | --- |
255
+ | No GPU | A 0.5B or 1.5B coding model, or 3B with 16 GB of RAM | Slow, a few tokens per second | Small, single file tasks. Expect to wait. |
256
+ | GPU with 4 to 7 GB | A 3B coding model, fully on the GPU | Usable | Small tasks, components, scripts, copy. |
257
+ | GPU with 7 to 10 GB, or a friend's | A 7B coding model | Good | Small and medium tasks, with you steering. |
258
+ | 10 GB or more, or a key | A 14B coding model, a bigger one in a local runtime you already use, or a cloud model with your own key | Faster | Bigger jobs and longer plans. |
259
+ </details>
260
+
261
+ <details>
262
+ <summary><b>Development</b></summary>
263
+
264
+ ```bash
265
+ git clone https://github.com/kwy404/hivedesk && cd hivedesk
266
+ npm install
267
+ npm run demo # the engine with a scripted City
268
+ npx vitest run --pool=threads --maxWorkers=2 # the tests
269
+ npm run lint && npm run rules && npm run site # the checks
270
+ python docs/_i18n/check.py # the site in 10 languages
271
+ ```
272
+
273
+ What each part does and its contracts are in [docs/1.0/protocol/](docs/1.0/protocol/); [CONTRIBUTING.md](CONTRIBUTING.md) has the rest.
274
+ </details>
275
+
276
+ <a id="honest-limits"></a>
277
+ ## Honest about the limits
278
+
279
+ - **Peers need a window.** Across the internet the peer link runs in the app window or a browser tab; a headless peer needs a native WebRTC part that is not built yet. On the same network, `hivedesk invite --lan` works from a terminal.
280
+ - **No TURN relay.** Two very strict networks may not connect; `hivedesk doctor --p2p` tells which side is the problem.
281
+ - **Not signed yet.** The downloads are not code signed or notarized, so macOS remote control is view only and your system warns before the first run.
282
+ - **One model per lender.** A friend's machine serves only the model it has loaded and never downloads one for a peer.
283
+ - **Giant models are experimental.** Pooling one model across friends' machines over the encrypted p2p link is in 1.0, off by default, and its speed depends on the network link between the machines.
284
+ - **Small models are slow.** Workers take turns on one model, so a job takes minutes; on the CPU only, a few tokens per second.
285
+
286
+ ## FAQ
287
+
288
+ <details><summary><b>Do I need an account or an API key?</b></summary>No. Models run on your own machines and friends connect to you directly. A key is optional, only for a cloud model of your choice; it stays in a key store on your machine.</details>
289
+ <details><summary><b>Can a friend see my files?</b></summary>Only if you tick Read the workspace for them. Edits they propose wait for your approval, new files included.</details>
290
+ <details><summary><b>What does a friend's GPU see when I borrow it?</b></summary>The prompts and answers of the jobs sent to it, nothing else: no files, tools or memory.</details>
291
+ <details><summary><b>Do I need the desktop app?</b></summary>No. <code>npx hivedesk</code> runs the same engine; the <a href="#desktop-app-or-browser">table above</a> lists every difference.</details>
292
+ <details><summary><b>Can someone take over my screen?</b></summary>Not without your click: off by default, view only by default, every grant expires, a locked screen takes no input, and one hotkey or Stop ends it all.</details>
293
+ <details><summary><b>How do I remove it?</b></summary>Delete <code>~/.hivedesk/</code> (identity, known peers, runtime, models, settings) and the <code>.hivedesk/</code> folder in your project; if you installed it with npm, run <code>npm rm -g hivedesk</code>.</details>
294
+
295
+ ## Website
296
+
297
+ [kwy404.github.io/hivedesk](https://kwy404.github.io/hivedesk/) is a static page in `docs/`, in 10 languages, with a light and a dark theme. Built with [Monsoon](https://github.com/kwy404/monsoon), [Voodoo.js](https://github.com/kwy404/Voodoo.js) and [glyphfox](https://github.com/kwy404/glyphfox). `python docs/_i18n/build.py` writes the language pages and `python docs/_i18n/check.py` fails on any missing translation; the art direction is in [docs/1.0/SITE-DESIGN.md](docs/1.0/SITE-DESIGN.md).
298
+
299
+ ## Docs
300
+
301
+ [FIRST-RUN.md](FIRST-RUN.md) &middot; [PROTOCOL.md](PROTOCOL.md) &middot; [CITY-PROTOCOL.md](CITY-PROTOCOL.md) &middot; [docs/1.0/protocol/](docs/1.0/protocol/) &middot; [CHANGELOG.md](CHANGELOG.md) &middot; [SECURITY.md](SECURITY.md)
302
+
303
+ ## Author
304
+
305
+ Made by **Alexandre Kohler** &middot; <a href="https://github.com/kwy404" rel="me noopener"><img src="assets/icons/1.0/github.svg" width="16" height="16" alt=""> GitHub</a> &middot; <a href="https://www.linkedin.com/in/alexandre-silva-173687256/" rel="me noopener"><img src="assets/icons/1.0/linkedin.svg" width="16" height="16" alt=""> LinkedIn</a>
306
+
307
+ [MIT](LICENSE). The desktop window uses [Neutralinojs](https://neutralino.js.org/) (MIT).