hivedesk 0.1.1 → 0.2.1

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.
Files changed (66) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/FIRST-RUN.md +14 -0
  3. package/PROTOCOL.md +23 -6
  4. package/README.md +51 -6
  5. package/assets/illustrations/hive-city.svg +113 -0
  6. package/assets/video-poster.webp +0 -0
  7. package/i18n/README.pt-BR.md +50 -6
  8. package/i18n/de.json +178 -0
  9. package/i18n/en.json +178 -0
  10. package/i18n/es.json +178 -0
  11. package/i18n/fr.json +178 -0
  12. package/i18n/it.json +178 -0
  13. package/i18n/ja.json +178 -0
  14. package/i18n/ko.json +178 -0
  15. package/i18n/pt-BR.json +178 -0
  16. package/i18n/ru.json +178 -0
  17. package/i18n/zh-CN.json +178 -0
  18. package/package.json +1 -1
  19. package/src/bus.js +22 -2
  20. package/src/city/demo.js +76 -0
  21. package/src/city/hops.js +95 -0
  22. package/src/city/index.js +1546 -0
  23. package/src/city/router.js +53 -0
  24. package/src/city/state.js +313 -0
  25. package/src/city/store.js +91 -0
  26. package/src/cli.js +44 -5
  27. package/src/collab/index.js +10 -6
  28. package/src/collab/policy.js +48 -0
  29. package/src/crew/engine.js +40 -3
  30. package/src/crew/scheduler.js +4 -0
  31. package/src/crew/worker.js +5 -1
  32. package/src/demo.js +30 -2
  33. package/src/extensions/sandbox.js +81 -56
  34. package/src/index.js +26 -3
  35. package/src/lend/guard.js +115 -7
  36. package/src/lend/index.js +38 -8
  37. package/src/replay/reduce.js +2 -1
  38. package/src/server.js +22 -4
  39. package/src/tools/approvals.js +12 -3
  40. package/src/tools/index.js +46 -2
  41. package/ui/city/city.css +204 -0
  42. package/ui/city/city.js +933 -0
  43. package/ui/city/collab.js +67 -0
  44. package/ui/city/layout.js +142 -0
  45. package/ui/city/mock.js +358 -0
  46. package/ui/city/model.js +195 -0
  47. package/ui/city/scene.js +2033 -0
  48. package/ui/css/hive.css +2 -0
  49. package/ui/js/main.js +3 -1
  50. package/ui/js/widgets/approvals.js +3 -0
  51. package/ui/lend/collab/client.js +1 -1
  52. package/ui/lend/collab/roles.js +21 -12
  53. package/ui/lend/core/bridge.js +18 -5
  54. package/ui/lend/core/frames.js +20 -0
  55. package/ui/office/office.js +51 -21
  56. package/ui/office/scene.js +3 -0
  57. package/ui/screenshots/city-agent-card-1440.png +0 -0
  58. package/ui/screenshots/city-agent-card-1920.png +0 -0
  59. package/ui/screenshots/city-bridge-gpu-borrow-1440.png +0 -0
  60. package/ui/screenshots/city-bridge-gpu-borrow-1920.png +0 -0
  61. package/ui/screenshots/city-friend-rising-1440.png +0 -0
  62. package/ui/screenshots/city-friend-rising-1920.png +0 -0
  63. package/ui/screenshots/city-overview-1440.png +0 -0
  64. package/ui/screenshots/city-overview-1920.png +0 -0
  65. package/ui/screenshots/city-review-room-1440.png +0 -0
  66. package/ui/screenshots/city-review-room-1920.png +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.1 (security) (2026-10-17)
4
+
5
+ A security update for Code together, Lend your PC, Hive City, `--demo` and extensions. Please update.
6
+
7
+ * Guest roles are checked by the engine itself, not only by the host's browser. Every guest command carries the guest's role; a missing role counts as a viewer. A viewer can read and chat; a collaborator can also post tasks and jobs, edit files under the host's approval and bring a building into the city. Hiring agents, changing an agent's tools, rooms, settings, models and providers stay with the host.
8
+ * A building in the city can use only a model its owner lends itself. The host's own models, cloud brains and other guests' models can no longer be tied to a guest's building.
9
+ * A guest's agents join with read and check tools only. Only the host can grant more tools, and an agent from an older version that still holds write tools comes back with the safe set.
10
+ * Work that does not come from the person at this PC always waits for the host's answer, even with approval mode off: writes and saves from a guest (new files included), and every write, run or package script of a task whose model turns ran on a friend's machine. The approval card says where the action comes from, `npm run` and `npm test` show the script they would run, turning approval mode off does not approve these, and a guest cannot answer them.
11
+ * Lend your PC: Cancel now stops the model on the lender. Each pairing is a lease with a maximum duration and number of turns (60 minutes and 200 turns by default) that expires on its own. Lent turns run only on the lender's local models: never on a model the lender itself borrowed, and never on the lender's cloud keys unless the lender allows it for that pairing. A model allowlist can be set per pairing (`lend.grant`). The older `brain.chat` entry goes through the same checks, and very deep or very large remote schemas are refused.
12
+ * `--demo` runs in a temporary folder with its own home, never in a real project: a non empty `--dir` is refused, `--demo-dir <folder>` picks a folder on purpose, and a folder that holds a real hivedesk log is always refused. A demo run in a folder no longer labels later real runs as Demo.
13
+ * Extensions: each extension runs in its own sandbox process, and the engine knows which extension is calling from the process it started, not from what the process says.
14
+
15
+ ## 0.2.0 (2026-10-17)
16
+
17
+ Hive City: hivedesk becomes a small distributed system for AI agents on people's computers. The city is the new home view.
18
+
19
+ ### Hive City, engine side (CITY-PROTOCOL.md)
20
+
21
+ * The city is the state of the system: buildings, rooms, agents, tasks, hops and GPU borrows are `city.*` events in the same append-only log, reduced by `src/city/state.js` (served at `/lib/city.js`) into `state.city` and `hello.state.city`.
22
+ * Persistent agents: every crew worker is an agent with a home room, a level and XP from finished work (work 10, review 4, test 3, plus 5 for a task done without a loop), stats, tools and a private memory (at most 40 entries of 300 characters, editable and pinnable). Agents are saved per machine in `~/.hivedesk/city/agents/`, so they keep their level and memory across projects; pinned entries, facts, preferences and decisions go into their prompts.
23
+ * Rooms with rules: Lobby, Design, Code, Review, Test, Ops and Library, each with its allowed tools (an agent's tools are cut to the room's while it works there), what it accepts, an optional approval gate and a host only flag (Ops). Extensions add rooms with `city.room.add`.
24
+ * The task bus: tasks are created by you (in a room or on an agent), by Mel (a Lobby task is planned into crew tasks; every planner task of a job appears on the board) or by the agents (a failed review or test sends work back). Idle agents bid by skill, level and machine load; claims, hops, verdicts, loops and approvals are events.
25
+ * The pipeline: Design writes a spec and criteria, Code runs a crew job with one task, Review reads the diff against the criteria (a model turn for city tasks; the checks of the changed files for planner tasks), Test runs the static checks (for planner tasks, the crew QA report). Failures loop back to the author with the issues, at most 3 times, then the task is blocked. You can approve or send back a task at any hop.
26
+ * Machines: your PC is a building with a stable id, its GPU, model and load. A Code together guest can bring their machine and agents (`city.machine.join`); a friend's agent thinks on its own machine's lent brain, and that brain serves only that friend's agents and accepted borrows.
27
+ * GPU borrowing: an agent asks another machine for a number of turns and minutes, the lender accepts (and may lower the limits) or refuses, every turn is counted, and either side can stop it. It rides the existing lend relay and the lender's guard; only prompts and answers travel.
28
+ * Ownership and safety: the owner of a machine, agent or task wins. Guest commands are signed by the host's browser (`roles.js`), limited to 40 per 10 seconds, and a guest's tasks run with approval mode on, without `run` and `delete_file`, and never in Ops. The full memory of an agent never goes into the log.
29
+ * Replication and persistence: late joiners get a snapshot plus the tail (`city.sync`); after a restart the same agents come back and unfinished tasks open again in their room.
30
+ * `--demo` plays a city scenario (a friend joins with six words, Dev borrows her GPU for three turns, a task goes Design, Code, Review, Test, done), every event labeled demo. `--no-city` turns the city off.
31
+ * The 0.1 APIs are unchanged; PROTOCOL.md gains `hello.city`, `state.city`, `Job.cityTaskId`, the `forbidden` error code and the `city.*` event and command families.
32
+
3
33
  ## 0.1.1 (2026-10-17)
4
34
 
5
35
  * Node.js 20 or newer is required (Node 18 has reached end of life and lacks the global Web Crypto API that pairing uses). The doctor check, the launchers and the docs say so.
package/FIRST-RUN.md CHANGED
@@ -71,6 +71,18 @@ The runtime and the model are cached in `~/.hivedesk/`, so a second run asks one
71
71
  3. **The crew works** from the approved brief: one task per worker at a time, read before edit, small patches, checks after every change, QA against the acceptance criteria with findings by severity, at most 3 fix rounds, then an honest report. The crew writes its prompts and replies in English.
72
72
  4. **The report** lists what was built, the files changed, the checks and their results, and what is still missing, plus an **improved prompt** that would rebuild or extend the result next time and 2 or 3 suggested next prompts. Both can be copied with one click and saved as a playbook.
73
73
 
74
+ ## 6. Hive City (0.2.0, not released yet)
75
+
76
+ On start the engine also opens the city (CITY-PROTOCOL.md). Nothing is downloaded and no model turn is spent for it.
77
+
78
+ 1. **This machine** gets a stable id and a building: `~/.hivedesk/city/machine.json` holds the id (`m_` and 8 hex characters) and the name, "My PC" until you rename it. The building shows the GPU, the model and the load.
79
+ 2. **The crew become agents.** Each worker gets a file in `~/.hivedesk/city/agents/` with its level, XP, stats and private memory. An agent saved by another project on the same machine comes back with its level and memory. Only pinned entries and facts, preferences and decisions go into its prompts; the "finished a task" entries do not.
80
+ 3. **The rooms** (Lobby, Design, Code, Review, Test, Ops, Library) are added with their rules. A task put in a room is claimed by an idle agent who works there; a Lobby task goes to Mel, who plans it into crew tasks. A job typed in the top bar runs as before, and its planned tasks also appear on the board and go through Review (the checks of the changed files) and Test (the crew QA report).
81
+ 4. **After a restart** the tasks that were in progress open again in their room and are claimed again, borrows are ended, and friends' buildings stay dark until they join again. `.hivedesk/city/snapshot.json` is a cache for friends who join late; deleting it is fine.
82
+ 5. **With a friend** (Code together): the friend's browser sends its machine and agents to your engine through your browser, which signs every city command with the guest's name. Guests never get a shell: their tasks run with approval mode on and without the `run` and `delete_file` tools, Ops is closed to them, and they can change only their own machine, agents and tasks.
83
+
84
+ `--demo` also plays a city scenario: during the bakery job Rita joins with the six words and Dev borrows her GPU for three turns; after it, a task goes Design, Code, Review (by Rita's agent Pip), Test, done. No model runs and every event is labeled demo.
85
+
74
86
  ## Opting out
75
87
 
76
88
  | Flag | Effect |
@@ -83,6 +95,7 @@ The runtime and the model are cached in `~/.hivedesk/`, so a second run asks one
83
95
  | `--demo` | no model at all: a scripted job replays; every event is labeled as a demo |
84
96
  | `--doctor` | prints the checks (Node, GPU, RAM, disk, models found) and exits |
85
97
  | `--no-open`, `--browser` | open nothing, or the normal browser instead of an app window |
98
+ | `--no-city` | no Hive City: no agents, rooms, task bus or city files |
86
99
 
87
100
  `HIVEDESK_HOME` moves the cache folder.
88
101
 
@@ -105,4 +118,5 @@ Every failure prints a plain message and a suggestion, in the terminal and in th
105
118
 
106
119
  * Without a model nothing is generated. The first run needs a download of 0.5 to 9.0 GB unless a model server is already running or you use a cloud key.
107
120
  * Measured on a GTX 1060 6 GB with the 3B fully on the GPU: 17 to 39 tokens per second while writing, a tiny static page in about 2 to 2.5 minutes after loading. On the CPU only, expect a few tokens per second.
121
+ * Hive City Test runs the static checks, not your test suite, and a friend's agent works only while that friend lends a model.
108
122
  * Workers take turns on one model, so a job takes minutes, not seconds, and small models still make mistakes: read the report, it says what is missing.
package/PROTOCOL.md CHANGED
@@ -33,6 +33,8 @@ Every frame is a JSON object with a `kind`.
33
33
 
34
34
  After `hello`, a client that reconnects can ask for missed events with the `events.since` command.
35
35
 
36
+ `hello` also carries `city: 1` when the engine runs Hive City, and `state.city` is then the city (CITY-PROTOCOL.md).
37
+
36
38
  ### UI to server
37
39
 
38
40
  ```json
@@ -72,13 +74,17 @@ Worker { id, name, role, color, avatar, prompt, tools: string[], builtin: bool
72
74
  Task { id, jobId, title, detail, assignee, dependsOn: string[], status, attempts, kind }
73
75
  status: "pending" | "ready" | "running" | "review" | "done" | "failed" | "blocked" | "skipped"
74
76
  kind: "build" | "qa" | "fix" | "docs"
75
- Job { id, request, status, approval, refine, createdAt, finishedAt?, taskIds: string[], playbookId?, summary?,
77
+ Job { id, request, status, approval, refine, createdAt, finishedAt?, taskIds: string[], playbookId?, summary?, cityTaskId?,
76
78
  briefProposed?: Brief, brief?: { text, source }, report?: Report & { improvedPrompt, nextPrompts } }
77
79
  status: "refining" | "awaiting_brief" | "planning" | "running" | "done" | "failed" | "cancelled"
80
+ cityTaskId: set on a job that runs one hop of a Hive City task (one given task, no brief, no planner, no QA rounds, no report)
78
81
  Brief { goal, build: string[], constraints: string[], acceptance: string[], questions: [{ question, options: string[], answer }], text }
79
82
  text is the Markdown the user sees and edits; acceptance items are "- [ ] ..." lines in it.
80
83
  Report { built, files: [{ path, op, added, removed }], checks: [{ name, ok, detail }], missing: string[], turns, seconds }
81
- Approval { id, jobId, taskId, workerId, tool, args, summary, diff?, createdAt }
84
+ Approval { id, jobId, taskId, workerId, tool, args, summary, diff?, createdAt, origin?, strict?, script? }
85
+ origin: { kind: "guest" | "remote", label, id?, brainId? } the action comes from a guest or a friend's model
86
+ strict: true waits for the host whatever the approval mode; a guest cannot answer it (0.2.1)
87
+ script: { name, body } for npm test and npm run: the package.json script that would run
82
88
  Playbook { id, title, request, prompt?, keywords: string[], tasks: [{ title, detail, assignee, dependsOn: number[] , kind }], createdAt, uses }
83
89
  Message { role: "system" | "user" | "assistant", content: string }
84
90
  ```
@@ -139,6 +145,7 @@ Message { role: "system" | "user" | "assistant", content: string }
139
145
  | `playbook.used` | `{ playbookId, score }` |
140
146
  | `playbook.deleted` | `{ playbookId }` |
141
147
  | `lend.*` | reserved for `src/lend/`; the engine logs and forwards them untouched |
148
+ | `city.*` | Hive City (`src/city/`): machines, rooms, agents, tasks, hops, borrows; see CITY-PROTOCOL.md |
142
149
 
143
150
  ### Live frames (not logged)
144
151
 
@@ -186,7 +193,7 @@ Message { role: "system" | "user" | "assistant", content: string }
186
193
  | `brain.probe` | `{}` | `{ hardware, options: BrainOption[], recommended }` |
187
194
  | `brain.select` | `BrainChoice` | `{ status }` |
188
195
  | `brain.download` | `{ model? }` start (or retry) the automatic model download; needed only after `--no-download` or a failure | `{}` |
189
- | `brain.attach` | `{ label, model?, ctx? }` this WebSocket becomes a remote brain (section 6) | `{ brainId }` |
196
+ | `brain.attach` | `{ label, model?, ctx?, guest? }` this WebSocket becomes a remote brain (section 6); `guest` is the Code together guest id that lends it (only that guest's building may use it) | `{ brainId }` |
190
197
  | `brain.respond` | `{ requestId, ok, result?: ChatResult, error?: string }` | `{}` |
191
198
  | `brain.token` | `{ requestId, text }` optional streaming for a pending request | none (no reply) |
192
199
  | `brain.detach` | `{ brainId }` | `{}` |
@@ -199,6 +206,7 @@ Message { role: "system" | "user" | "assistant", content: string }
199
206
  | `playbook.list` | `{}` | `{ playbooks }` |
200
207
  | `playbook.delete` | `{ playbookId }` | `{}` |
201
208
  | `doctor` | `{}` | `DoctorReport` |
209
+ | `city.*` | Hive City commands, see CITY-PROTOCOL.md section 6 | |
202
210
 
203
211
  ```text
204
212
  BrainChoice { backend: "local" | "ollama" | "lmstudio" | "openai" | "fake", model?, url?, key? }
@@ -211,7 +219,7 @@ DoctorReport { ok, checks: [{ id, label, ok, detail, hint? }], hardware, models:
211
219
  MemoryEntry { id, scope: "project" | "user", kind: "fact" | "preference" | "rejected" | "session" | "decision", text, pinned, uses, createdAt, updatedAt? }
212
220
  ```
213
221
 
214
- Error codes in a failed `reply`: `bad_request`, `not_found`, `conflict`, `unauthorized`, `not_lending`, `busy`, `internal`, plus short snake_case codes from plug-ins (for example `rate_limited`). An unknown command answers `bad_request` with the message `unknown command: <type>`.
222
+ Error codes in a failed `reply`: `bad_request`, `not_found`, `conflict`, `unauthorized`, `not_lending`, `busy`, `internal`, `forbidden` (Hive City ownership and guest rules, HTTP 403), plus short snake_case codes from plug-ins (for example `rate_limited`). An unknown command answers `bad_request` with the message `unknown command: <type>`.
215
223
 
216
224
  ## 5. REST
217
225
 
@@ -223,6 +231,7 @@ All JSON unless noted. Same token rule as section 1.
223
231
  | `GET /<path>` | static file from `ui/` |
224
232
  | `GET /assets/<path>` | static file from `assets/` |
225
233
  | `GET /lib/reduce.js` | the engine reducer as an ES module, so the UI can rebuild state for the replay scrubber without a round trip |
234
+ | `GET /lib/city.js` | the Hive City reducer (`initialCity`, `reduceCity`, `replayCity`), pure like `reduce.js` |
226
235
  | `GET /api/health` | `{ ok: true, version, protocol, demo, lend }` |
227
236
  | `GET /api/state` | `State` |
228
237
  | `GET /api/events?since=0&limit=500` | `{ events, lastSeq }` |
@@ -257,7 +266,8 @@ State {
257
266
  providers: { [id]: { label, configured, model } }, never keys
258
267
  notes: { [workerId]: [{ text, taskId, ts }] }, worker scratchpads
259
268
  choice: brain.choice data, memoryCount: number,
260
- tokens: { prompt, completion }
269
+ tokens: { prompt, completion },
270
+ city: CityState Hive City (CITY-PROTOCOL.md section 3); also in replay.at
261
271
  }
262
272
  ```
263
273
 
@@ -315,7 +325,8 @@ scheduler.removeBrain(brainId) // emits brain.detached; a running turn on
315
325
 
316
326
  1. A client (the lend UI on the host) sends `brain.attach { label, model, ctx }` and gets `{ brainId }`.
317
327
  2. The engine adds a relay brain to the scheduler. When it gets a turn, the engine sends `brain.request` to that same WebSocket.
318
- 3. The client carries the request to the friend (WebRTC), the friend's browser sends `brain.chat` to the friend's own hivedesk started with `--lend`, and the answer goes back the same way.
328
+ 3. The client carries the request to the friend (WebRTC), the friend's browser sends `lend.chat` (or the older `brain.chat`, which goes through the same guard) to the friend's own hivedesk started with `--lend`, and the answer goes back the same way. A `cancel` frame becomes `lend.cancel { requestId }` and aborts the turn there. The friend's engine runs lent turns only on its local models (cloud keys only when the friend allows it with `lend.grant { minutes, turns, models, cloud }`) and within a lease of minutes and turns.
329
+ Tool calls of a task whose turns a remote brain answered always wait for the host's approval (`origin.kind: "remote"`).
319
330
  4. The client answers with `brain.respond { requestId, ok, result }` (it may stream `brain.token` before). Timeout: 180 s, then the turn is re-queued on another brain.
320
331
  5. `brain.detach` or closing the WebSocket removes the brain.
321
332
 
@@ -345,6 +356,9 @@ Shared cache for every project (override with the env var `HIVEDESK_HOME`):
345
356
  ~/.hivedesk/
346
357
  runtime/ node-llama-cpp installed here on first use (not a dependency of the package)
347
358
  models/ downloaded GGUF files (partial downloads end in .part and resume)
359
+ city/
360
+ machine.json this machine's stable id (m_ + 8 hex) and name
361
+ agents/ one <agentId>.json per persistent agent: level, xp, stats and its private memory
348
362
  ```
349
363
 
350
364
  Per project:
@@ -356,8 +370,11 @@ Per project:
356
370
  state.json snapshot, rewritten at most every 2 s and on exit (a cache; deleted is fine)
357
371
  playbooks/ one <id>.json per playbook
358
372
  workspace/ the files the crew builds (preview serves this)
373
+ city/snapshot.json the last Hive City snapshot and its seq (a cache for city.sync)
359
374
  ```
360
375
 
361
376
  ## 8. Demo mode
362
377
 
363
378
  `hivedesk --demo` uses a scripted fake brain, so the whole loop runs with no model. Every event carries `"demo": true`, `session.started.data.demo` is true, `hello.demo` is true, and Mel posts a first `chat.message` in `general`: "This is a demo. No model is running; the crew follows a script."
379
+
380
+ The demo also plays the Hive City scenario (CITY-PROTOCOL.md section 9), with `city.demo.step` captions.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  <img src="assets/banner.svg" width="900" alt="hivedesk: a whole crew of AI workers, running on your own machine. A honeycomb desktop with a timeline, a crew chat, a code window and a live preview, with Mel the bee foreman.">
3
3
  </p>
4
4
 
5
- <p align="center"><b>Your own AI crew. One command away.</b></p>
5
+ <p align="center"><b>Your own AI crew. One command away.</b><br>New in 0.2.0: <a href="#hive-city-new-in-020">Hive City</a>, where your agents live, work through rooms and borrow a friend's GPU.</p>
6
6
 
7
7
  <p align="center">
8
8
  <a href="https://kwy404.github.io/hivedesk/">Website</a> &middot;
@@ -21,10 +21,49 @@
21
21
 
22
22
  Run `npx hivedesk` and a short wizard sets everything up: it reads your hardware, installs the local runtime, downloads the right model with a progress bar and opens the Hive in your browser. The Hive is a desktop where a crew of AI workers plans, talks and builds real files in a folder on your computer, with a model that runs on your own machine. No account, no API key.
23
23
 
24
+ <p align="center">
25
+ <a href="https://kwy404.github.io/hivedesk/#film"><img src="assets/video-poster.webp" width="320" alt="Watch the 75 second hivedesk film: Mel the bee foreman and the words Um comando so."></a><br>
26
+ <a href="https://kwy404.github.io/hivedesk/#film"><b>Watch the 75 second film</b></a> (or <a href="docs/media/hivedesk.mp4">the MP4</a>, with captions in <a href="docs/media/hivedesk.en.vtt">English</a> and <a href="docs/media/hivedesk.pt-BR.vtt">Portuguese</a>)
27
+ </p>
28
+
24
29
  <p align="center">
25
30
  <img src="docs/assets/shots/hive.webp" width="900" alt="The Hive in demo mode: the timeline of a bakery landing page job, the crew chat, a live preview of the page, the Files window with a diff and the Dev worker after a turn, with the worker dock at the bottom.">
26
31
  </p>
27
32
 
33
+ ## Hive City (new in 0.2.0)
34
+
35
+ <p align="center">
36
+ <img src="docs/assets/shots/city-overview.webp" width="900" alt="Hive 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, the task board and the event feed.">
37
+ </p>
38
+
39
+ <p align="center">
40
+ <img src="docs/assets/shots/city-bridge-gpu-borrow.webp" width="440" alt="Dev borrows the friend's GPU across the lit bridge; the Machines panel shows 2 of 3 turns and a Stop the borrow button.">
41
+ <img src="docs/assets/shots/city-agent-card.webp" width="440" alt="An agent card with the level, XP, tools and private memory.">
42
+ </p>
43
+
44
+ hivedesk now opens on a small city, and the city is the state of the system: every building, room, agent and task you see is an event in the same log the crew writes ([CITY-PROTOCOL.md](CITY-PROTOCOL.md)). `npx hivedesk --demo` plays the city scenario: a friend joins, her building rises, Dev borrows her GPU across the bridge, and a task goes through every room to done.
45
+
46
+ - **Agents that stay.** Each crew worker is an agent with a home room, a level and XP from finished work, tools, and a private memory you can read, edit and pin. Agents are saved per machine in `~/.hivedesk/city/agents/`, so the same Dev keeps its level in every project, and pinned facts, preferences and decisions go into its prompts.
47
+ - **Rooms with rules.** Lobby, Design, Code, Review, Test, Ops and Library. A room decides which tools an agent has while it works there (Review only reads and checks, Ops waits for your approval and is closed to guests). Extensions can add rooms.
48
+ - **A task bus.** You put a task in a room or on an agent; idle agents in that room bid for it by skill, level and machine load, and every claim and hop is an event. A task in the Lobby goes to Mel, who plans it into crew tasks. The jobs you type in the top bar work as before, and Mel's planned tasks show up on the board too.
49
+ - **Code, Review, Test, with loops.** Design writes a spec, Code runs the crew on it, another agent reviews the diff against the criteria, Test runs the checks. A failed review or test sends the task back to its author with the issues, at most 3 times, then it is blocked. You can approve or send back a task at any hop, and a room can wait for you.
50
+ - **Machines and friends.** Your PC is a building with its GPU, model and load. A friend who joins through Code together (six words, QR or link) gets a building of their own and can bring agents that think on their machine. An agent can borrow a friend's GPU for a few turns; the friend accepts, sets the limits, sees every turn and can stop it. Only prompts and answers travel, through the existing lend relay and its limits.
51
+ - **It comes back.** Close hivedesk and open it tomorrow: the same agents, levels and memories, and the tasks that were in progress open again in their room.
52
+
53
+ What it does not do yet: Test runs the static checks (HTML, links, JS syntax, CSS, JSON), not your test suite; for tasks planned by Mel the review is those checks and the crew QA report is the test, so no extra model turns are spent; a friend's agent needs that friend's model to be lent; borrowing has no standing "lend 30 percent" setting, only limits per request; the crew job can finish a moment before the city hops of its last task. `--no-city` turns the city off and keeps the 0.1 desktop.
54
+
55
+ ## Download
56
+
57
+ | | File | Size | Start |
58
+ | --- | --- | --- | --- |
59
+ | Windows 10 and 11, x64 | [hivedesk-windows-x64.zip](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-windows-x64.zip) | 47 MB | unzip, double click `hivedesk.exe` |
60
+ | macOS, Apple Silicon and Intel | [hivedesk-macos-universal.zip](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-macos-universal.zip) | 89 MB | unzip, move to Applications, open |
61
+ | Linux x64 | [hivedesk-linux-x64.tar.gz](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-linux-x64.tar.gz) | 55 MB | `tar -xzf`, then `./hivedesk/hivedesk` |
62
+ | Linux x64, one file | [hivedesk-linux-x86_64.AppImage](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-linux-x86_64.AppImage) | 52 MB | `chmod +x`, then run it |
63
+ | Any system with Node.js 20+ | `npx hivedesk` | small | the wizard does the rest |
64
+
65
+ The desktop app opens hivedesk in its own window and carries its own Node.js. It is not signed yet, so Windows SmartScreen ("More info", then "Run anyway") and macOS Gatekeeper (System Settings, Privacy and Security, "Open Anyway") ask once, and it does not update itself. The local model is still downloaded on the first run. All files, with `SHA256SUMS.txt`, are on the [releases page](https://github.com/kwy404/hivedesk/releases); [desktop/README.md](desktop/README.md) lists what each package contains.
66
+
28
67
  ## Install
29
68
 
30
69
  ```bash
@@ -33,7 +72,7 @@ npx hivedesk
33
72
 
34
73
  The wizard asks for the language, the project folder, which brain to use, how the crew should work and who is on it. Every question has a recommended default, so pressing Enter all the way works. Run it again and it offers to reuse the same setup; `--yes` skips the questions.
35
74
 
36
- Prefer the desktop app? The [download page](https://kwy404.github.io/hivedesk/#download) has `hivedesk-windows-x64.zip` (about 42 MB), `hivedesk-macos-universal.zip` (about 80 MB) and `hivedesk-linux-x64.tar.gz` (about 35 MB, also as an AppImage) from the [latest release](https://github.com/kwy404/hivedesk/releases/latest). Each one carries its own Node.js, so there is nothing to install first; it opens hivedesk in its own window. They are not signed yet, so Windows SmartScreen and macOS Gatekeeper ask once, and they do not update themselves. The local model is still downloaded on the first run. [desktop/README.md](desktop/README.md) lists what each package contains and the exact first launch steps. There are also tiny launcher scripts that check for Node.js 20 or newer and run `npx hivedesk@latest`.
75
+ Prefer the desktop app? The [download page](https://kwy404.github.io/hivedesk/#download) has `hivedesk-windows-x64.zip` (47 MB), `hivedesk-macos-universal.zip` (89 MB) and `hivedesk-linux-x64.tar.gz` (55 MB, or the 52 MB AppImage) from the [latest release](https://github.com/kwy404/hivedesk/releases/latest). Each one carries its own Node.js, so there is nothing to install first; it opens hivedesk in its own window. They are not signed yet, so Windows SmartScreen and macOS Gatekeeper ask once, and they do not update themselves. The local model is still downloaded on the first run. [desktop/README.md](desktop/README.md) lists what each package contains and the exact first launch steps. There are also tiny launcher scripts that check for Node.js 20 or newer and run `npx hivedesk@latest`.
37
76
 
38
77
  ### What the first run does
39
78
 
@@ -79,6 +118,7 @@ The choice and the reason are shown in one line, for example "NVIDIA GeForce GTX
79
118
  | `--port <n>`, `--no-open` | Pick the port; do not open the browser. |
80
119
  | `--lend`, `--join <link or words>` | Lend your model to a friend, or join one (see below). |
81
120
  | `--doctor` | Check Node, the GPU, RAM, disk and the models, then exit. |
121
+ | `--no-city` | Run without Hive City: no agents, rooms or task bus; the rest works the same. |
82
122
 
83
123
  `HIVEDESK_HOME` moves the cache folder `~/.hivedesk/`.
84
124
 
@@ -131,10 +171,14 @@ The default crew is **Mel** (foreman and planner), **Dev**, **Designer**, **QA**
131
171
  </p>
132
172
 
133
173
  - **Office mode.** Toggle it in the top bar and the desktop becomes a small honeycomb office drawn from real engine events. Drag a sticky note from Mel's board onto a bee to hand it a task.
134
- - **Code together.** Invite a friend into the Code window: you edit the same files and see each other's cursors. Their saves go through approval mode, as a diff.
135
- - **Voice.** Push to talk with <kbd>Ctrl</kbd> <kbd>Space</kbd>; Mel answers out loud in the UI language.
136
- - **Themes.** Eight built in, a visual editor with a contrast report, import and export, or ask the crew to design one.
137
- - **Extensions.** Install from a folder, a zip or a URL. Each one asks for its permissions and runs in a sandbox.
174
+ - **Code together.** Invite a friend into the Code window with six words: you edit the same files and see each other's cursors. Their saves go through approval mode, as a diff.
175
+ - **Voice.** Push to talk with <kbd>Ctrl</kbd> <kbd>Space</kbd>; Mel answers out loud in the UI language. Before anything that acts, like a commit or a push, Mel reads the plan and waits for a clear yes. Recognition is the browser's, which may send audio to the browser maker's service.
176
+ - **Themes.** Eight built in, a visual editor with a contrast report, import and export, or describe one and the crew designs it.
177
+ - **Extensions.** Install from a folder, a zip or a URL, or ask the crew to create one. Each one asks for its permissions and runs in a sandbox.
178
+ - **Session memory.** Small, capped notes per project and per person, plus one session file per job. A few relevant entries go into the next prompt; pin, edit or forget any of them in the Memory window, or turn memory off.
179
+ - **Brief and report.** The refined brief before the job, and at the end a report with what was built and an improved prompt for next time.
180
+ - **Cloud brains, optional.** Local by default. Add a cloud provider or any OpenAI compatible endpoint with your own key, per worker if you like. Keys stay in `~/.hivedesk/keys.json`; prompts and file contents sent to that provider leave your machine.
181
+ - **Desktop app.** The downloads open hivedesk in its own window, with a tray icon, notifications and a single instance; `npx hivedesk` can open the same window.
138
182
  - **10 languages.** English, Português, Español, Français, Deutsch, Italiano, 日本語, 한국어, 简体中文 and Русский. The Hive follows your browser and switches live.
139
183
  - **A guided tour** with Mel on the first open; replay it from Help or the command palette.
140
184
  - **Replay** any moment from the append-only event log, a <kbd>Ctrl</kbd> <kbd>K</kbd> command palette, windows that snap, and a phone layout with stacked cards.
@@ -182,6 +226,7 @@ Open the **GitHub** window from the dock, or just ask: "connect my GitHub", "cre
182
226
 
183
227
  - [FIRST-RUN.md](FIRST-RUN.md): what the first run does, step by step, and what happens when something fails.
184
228
  - [PROTOCOL.md](PROTOCOL.md): the contract between the engine, the UI and the plug-ins.
229
+ - [CITY-PROTOCOL.md](CITY-PROTOCOL.md): Hive City, its events, commands, ownership rules and safety rules.
185
230
  - [CHANGELOG.md](CHANGELOG.md), [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md).
186
231
 
187
232
  ## More from kwy404
@@ -0,0 +1,113 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1200" height="620" viewBox="0 0 1200 620" role="img" aria-labelledby="t d">
2
+ <title id="t">Hive City, coming in hivedesk 0.2.0</title>
3
+ <desc id="d">A sketch of Hive City: your building with rooms for Design, Code, Review, Test, Ops, Library and the Lobby, a friend's building that joined with six words, and a glowing bridge where a bee carries model turns between the machines.</desc>
4
+ <style>
5
+ .cable { stroke-dasharray: 6 8; animation: flow 1.6s linear infinite; }
6
+ @keyframes flow { to { stroke-dashoffset: -28; } }
7
+ .cross { animation: cross 6s ease-in-out infinite; }
8
+ @keyframes cross { 0% { transform: translate(0, 0); } 50% { transform: translate(150px, -14px); } 100% { transform: translate(0, 0); } }
9
+ .glow { animation: glow 3s ease-in-out infinite; }
10
+ @keyframes glow { 50% { opacity: .45; } }
11
+ @media (prefers-reduced-motion: reduce) { .cable, .cross, .glow { animation: none; } }
12
+ </style>
13
+ <defs>
14
+ <radialGradient id="g1" cx="50%" cy="45%" r="60%"><stop offset="0" stop-color="#FFB531" stop-opacity=".18"/><stop offset="1" stop-color="#FFB531" stop-opacity="0"/></radialGradient>
15
+ <pattern id="hex" width="28" height="48.5" patternUnits="userSpaceOnUse" patternTransform="matrix(0.866 0.5 -0.866 0.5 0 0)"><path d="M14 0l14 8.1v16.2L14 32.3 0 24.2V8.1zM14 32.3v16.2" fill="none" stroke="#FFB531" stroke-opacity=".16"/></pattern>
16
+ <linearGradient id="win" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#FFE29E"/><stop offset="1" stop-color="#FFB531"/></linearGradient>
17
+ </defs>
18
+ <rect width="1200" height="620" rx="18" fill="#100E0C"/>
19
+ <rect width="1200" height="620" rx="18" fill="url(#g1)"/>
20
+ <polygon points="520.0,100.0 1108.9,440.0 520.0,780.0 -68.9,440.0" fill="#1A1611" stroke="#3A2E20" stroke-width="1.5" stroke-linejoin="round" />
21
+ <polygon points="520.0,100.0 1108.9,440.0 520.0,780.0 -68.9,440.0" fill="url(#hex)" stroke="none" stroke-width="0" stroke-linejoin="round" />
22
+ <polygon points="346.8,310.0 476.7,385.0 476.7,359.0 346.8,284.0" fill="#3A2E20" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
23
+ <polygon points="476.7,385.0 580.6,325.0 580.6,299.0 476.7,359.0" fill="#30271C" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
24
+ <polygon points="450.7,224.0 580.6,299.0 476.7,359.0 346.8,284.0" fill="#2A2219" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
25
+ <rect x="360.8" y="293.8" width="14" height="10" rx="2" fill="url(#win)" opacity="0.35" class="glow"/>
26
+ <rect x="390.8" y="311.1" width="14" height="10" rx="2" fill="url(#win)" opacity="0.85" class=""/>
27
+ <rect x="420.8" y="328.4" width="14" height="10" rx="2" fill="url(#win)" opacity="0.85" class=""/>
28
+ <text x="528.7" y="346.7" font-family="system-ui,Segoe UI,sans-serif" font-size="11" font-weight="650" fill="#F2E9DA" text-anchor="middle" >Lobby</text>
29
+ <polygon points="346.8,284.0 476.7,359.0 476.7,333.0 346.8,258.0" fill="#3D3850" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
30
+ <polygon points="476.7,359.0 580.6,299.0 580.6,273.0 476.7,333.0" fill="#352F45" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
31
+ <polygon points="450.7,198.0 580.6,273.0 476.7,333.0 346.8,258.0" fill="#2E2A3A" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
32
+ <rect x="360.8" y="267.8" width="14" height="10" rx="2" fill="url(#win)" opacity="0.85" class=""/>
33
+ <rect x="390.8" y="285.1" width="14" height="10" rx="2" fill="url(#win)" opacity="0.85" class=""/>
34
+ <rect x="420.8" y="302.4" width="14" height="10" rx="2" fill="url(#win)" opacity="0.35" class=""/>
35
+ <text x="528.7" y="320.7" font-family="system-ui,Segoe UI,sans-serif" font-size="11" font-weight="650" fill="#F2E9DA" text-anchor="middle" >Library</text>
36
+ <polygon points="346.8,258.0 476.7,333.0 476.7,307.0 346.8,232.0" fill="#2B3A46" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
37
+ <polygon points="476.7,333.0 580.6,273.0 580.6,247.0 476.7,307.0" fill="#25323D" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
38
+ <polygon points="450.7,172.0 580.6,247.0 476.7,307.0 346.8,232.0" fill="#1F2A33" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
39
+ <rect x="360.8" y="241.8" width="14" height="10" rx="2" fill="url(#win)" opacity="0.85" class=""/>
40
+ <rect x="390.8" y="259.1" width="14" height="10" rx="2" fill="url(#win)" opacity="0.35" class=""/>
41
+ <rect x="420.8" y="276.4" width="14" height="10" rx="2" fill="url(#win)" opacity="0.85" class="glow"/>
42
+ <text x="528.7" y="294.7" font-family="system-ui,Segoe UI,sans-serif" font-size="11" font-weight="650" fill="#F2E9DA" text-anchor="middle" >Ops</text>
43
+ <polygon points="346.8,232.0 476.7,307.0 476.7,281.0 346.8,206.0" fill="#2A4633" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
44
+ <polygon points="476.7,307.0 580.6,247.0 580.6,221.0 476.7,281.0" fill="#24402D" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
45
+ <polygon points="450.7,146.0 580.6,221.0 476.7,281.0 346.8,206.0" fill="#1F3326" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
46
+ <rect x="360.8" y="215.8" width="14" height="10" rx="2" fill="url(#win)" opacity="0.35" class=""/>
47
+ <rect x="390.8" y="233.1" width="14" height="10" rx="2" fill="url(#win)" opacity="0.85" class="glow"/>
48
+ <rect x="420.8" y="250.4" width="14" height="10" rx="2" fill="url(#win)" opacity="0.85" class=""/>
49
+ <text x="528.7" y="268.7" font-family="system-ui,Segoe UI,sans-serif" font-size="11" font-weight="650" fill="#F2E9DA" text-anchor="middle" >Test</text>
50
+ <polygon points="346.8,206.0 476.7,281.0 476.7,255.0 346.8,180.0" fill="#4A3A28" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
51
+ <polygon points="476.7,281.0 580.6,221.0 580.6,195.0 476.7,255.0" fill="#3F3123" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
52
+ <polygon points="450.7,120.0 580.6,195.0 476.7,255.0 346.8,180.0" fill="#33291F" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
53
+ <rect x="360.8" y="189.8" width="14" height="10" rx="2" fill="url(#win)" opacity="0.85" class="glow"/>
54
+ <rect x="390.8" y="207.1" width="14" height="10" rx="2" fill="url(#win)" opacity="0.85" class=""/>
55
+ <rect x="420.8" y="224.4" width="14" height="10" rx="2" fill="url(#win)" opacity="0.35" class=""/>
56
+ <text x="528.7" y="242.7" font-family="system-ui,Segoe UI,sans-serif" font-size="11" font-weight="650" fill="#F2E9DA" text-anchor="middle" >Review</text>
57
+ <polygon points="346.8,180.0 476.7,255.0 476.7,229.0 346.8,154.0" fill="#2A3646" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
58
+ <polygon points="476.7,255.0 580.6,195.0 580.6,169.0 476.7,229.0" fill="#24303D" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
59
+ <polygon points="450.7,94.0 580.6,169.0 476.7,229.0 346.8,154.0" fill="#1F2733" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
60
+ <rect x="360.8" y="163.8" width="14" height="10" rx="2" fill="url(#win)" opacity="0.85" class=""/>
61
+ <rect x="390.8" y="181.1" width="14" height="10" rx="2" fill="url(#win)" opacity="0.35" class=""/>
62
+ <rect x="420.8" y="198.4" width="14" height="10" rx="2" fill="url(#win)" opacity="0.85" class=""/>
63
+ <text x="528.7" y="216.7" font-family="system-ui,Segoe UI,sans-serif" font-size="11" font-weight="650" fill="#F2E9DA" text-anchor="middle" >Code</text>
64
+ <polygon points="346.8,154.0 476.7,229.0 476.7,203.0 346.8,128.0" fill="#503046" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
65
+ <polygon points="476.7,229.0 580.6,169.0 580.6,143.0 476.7,203.0" fill="#45293C" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
66
+ <polygon points="450.7,68.0 580.6,143.0 476.7,203.0 346.8,128.0" fill="#3A2233" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
67
+ <rect x="360.8" y="137.8" width="14" height="10" rx="2" fill="url(#win)" opacity="0.35" class=""/>
68
+ <rect x="390.8" y="155.1" width="14" height="10" rx="2" fill="url(#win)" opacity="0.85" class=""/>
69
+ <rect x="420.8" y="172.4" width="14" height="10" rx="2" fill="url(#win)" opacity="0.85" class="glow"/>
70
+ <text x="528.7" y="190.7" font-family="system-ui,Segoe UI,sans-serif" font-size="11" font-weight="650" fill="#F2E9DA" text-anchor="middle" >Design</text>
71
+ <polygon points="346.8,128.0 476.7,203.0 476.7,193.0 346.8,118.0" fill="#C9861F" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
72
+ <polygon points="476.7,203.0 580.6,143.0 580.6,133.0 476.7,193.0" fill="#E09A28" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
73
+ <polygon points="450.7,58.0 580.6,133.0 476.7,193.0 346.8,118.0" fill="#FFB531" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
74
+ <text x="463.7" y="28.0" font-family="system-ui,Segoe UI,sans-serif" font-size="15" font-weight="700" fill="#FFD27A" text-anchor="middle" >your machine</text>
75
+ <polygon points="563.3,525.0 667.2,585.0 667.2,551.0 563.3,491.0" fill="#2A3646" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
76
+ <polygon points="667.2,585.0 753.8,535.0 753.8,501.0 667.2,551.0" fill="#24303D" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
77
+ <polygon points="649.9,441.0 753.8,501.0 667.2,551.0 563.3,491.0" fill="#1F2733" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
78
+ <text x="710.5" y="548.0" font-family="system-ui,Segoe UI,sans-serif" font-size="12" font-weight="650" fill="#F2E9DA" text-anchor="middle" >GPU</text>
79
+ <polygon points="563.3,491.0 667.2,551.0 667.2,517.0 563.3,457.0" fill="#3A2E20" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
80
+ <polygon points="667.2,551.0 753.8,501.0 753.8,467.0 667.2,517.0" fill="#30271C" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
81
+ <polygon points="649.9,407.0 753.8,467.0 667.2,517.0 563.3,457.0" fill="#2A2219" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
82
+ <text x="710.5" y="514.0" font-family="system-ui,Segoe UI,sans-serif" font-size="12" font-weight="650" fill="#F2E9DA" text-anchor="middle" >Agents</text>
83
+ <polygon points="563.3,457.0 667.2,517.0 667.2,483.0 563.3,423.0" fill="#2A4633" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
84
+ <polygon points="667.2,517.0 753.8,467.0 753.8,433.0 667.2,483.0" fill="#24402D" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
85
+ <polygon points="649.9,373.0 753.8,433.0 667.2,483.0 563.3,423.0" fill="#1F3326" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
86
+ <text x="710.5" y="480.0" font-family="system-ui,Segoe UI,sans-serif" font-size="12" font-weight="650" fill="#F2E9DA" text-anchor="middle" >Model</text>
87
+ <polygon points="563.3,423.0 667.2,483.0 667.2,475.0 563.3,415.0" fill="#5E9E72" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
88
+ <polygon points="667.2,483.0 753.8,433.0 753.8,425.0 667.2,475.0" fill="#79BC8E" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
89
+ <polygon points="649.9,365.0 753.8,425.0 667.2,475.0 563.3,415.0" fill="#9BD9AE" stroke="#24160C" stroke-width="1.5" stroke-linejoin="round" />
90
+ <text x="658.6" y="335.0" font-family="system-ui,Segoe UI,sans-serif" font-size="15" font-weight="700" fill="#9BD9AE" text-anchor="middle" >a friend's machine</text>
91
+ <path d="M520,210 Q 589,100 659,418" fill="none" stroke="#FFB531" stroke-opacity=".25" stroke-width="10"/>
92
+ <path class="cable" d="M520,210 Q 589,100 659,418" fill="none" stroke="#FFD27A" stroke-width="3" stroke-linecap="round"/>
93
+ <g class="cross"><g transform="translate(550 168)"><ellipse cx="-2" cy="-10" rx="6" ry="9" fill="#FFF4DC" fill-opacity=".8" stroke="#24160C" stroke-width="1.2"/><ellipse cx="0" cy="0" rx="11" ry="8" fill="#FFC444" stroke="#24160C" stroke-width="1.6"/><path d="M-4,-7 L-4,7 M2,-7.6 L2,7.6" stroke="#24160C" stroke-width="2.6"/><circle cx="10" cy="-1" r="5.4" fill="#2B1B10"/><circle cx="11.6" cy="-2.4" r="1.5" fill="#FFF4DC"/><rect x="-26" y="-8" width="14" height="12" rx="2" fill="#F4EEE4" stroke="#24160C" stroke-width="1.2"/></g></g>
94
+ <text x="700.0" y="170.0" font-family="system-ui,Segoe UI,sans-serif" font-size="13" font-weight="600" fill="#FFD27A" text-anchor="start" >borrowed GPU turns</text>
95
+ <g transform="translate(900 470)"><rect width="180" height="54" rx="10" fill="#161411" stroke="#5A4520"/><text x="90" y="-10" font-family="system-ui,Segoe UI,sans-serif" font-size="12" fill="#9C9282" text-anchor="middle">joined with six words</text>
96
+ <text x="90" y="22" font-family="ui-monospace,Consolas,monospace" font-size="12" fill="#FFD27A" text-anchor="middle">honey orbit lamp</text><text x="90" y="40" font-family="ui-monospace,Consolas,monospace" font-size="12" fill="#FFD27A" text-anchor="middle">river garden copper</text></g>
97
+ <rect x="40" y="574" width="92" height="32" rx="16" fill="#1D1A16" stroke="#3A2E20"/>
98
+ <text x="86.0" y="595.0" font-family="system-ui,Segoe UI,sans-serif" font-size="13" font-weight="600" fill="#EDE6DA" text-anchor="middle" >Design</text>
99
+ <path d="M133,590 h10" stroke="#FFB531" stroke-width="2" marker-end="none"/>
100
+ <rect x="144" y="574" width="92" height="32" rx="16" fill="#1D1A16" stroke="#3A2E20"/>
101
+ <text x="190.0" y="595.0" font-family="system-ui,Segoe UI,sans-serif" font-size="13" font-weight="600" fill="#EDE6DA" text-anchor="middle" >Code</text>
102
+ <path d="M237,590 h10" stroke="#FFB531" stroke-width="2" marker-end="none"/>
103
+ <rect x="248" y="574" width="92" height="32" rx="16" fill="#1D1A16" stroke="#3A2E20"/>
104
+ <text x="294.0" y="595.0" font-family="system-ui,Segoe UI,sans-serif" font-size="13" font-weight="600" fill="#EDE6DA" text-anchor="middle" >Review</text>
105
+ <path d="M341,590 h10" stroke="#FFB531" stroke-width="2" marker-end="none"/>
106
+ <rect x="352" y="574" width="92" height="32" rx="16" fill="#1D1A16" stroke="#3A2E20"/>
107
+ <text x="398.0" y="595.0" font-family="system-ui,Segoe UI,sans-serif" font-size="13" font-weight="600" fill="#EDE6DA" text-anchor="middle" >Test</text>
108
+ <path d="M445,590 h10" stroke="#FFB531" stroke-width="2" marker-end="none"/>
109
+ <rect x="456" y="574" width="92" height="32" rx="16" fill="#173323" stroke="#5E9E72"/>
110
+ <text x="502.0" y="595.0" font-family="system-ui,Segoe UI,sans-serif" font-size="13" font-weight="600" fill="#9BD9AE" text-anchor="middle" >Done</text>
111
+ <text x="40.0" y="560.0" font-family="system-ui,Segoe UI,sans-serif" font-size="12" font-weight="500" fill="#9C9282" text-anchor="start" >every task flows through rooms</text>
112
+ <g transform="translate(960 36)"><rect width="200" height="36" rx="18" fill="#FFB531"/><text x="100" y="23" font-family="system-ui,Segoe UI,sans-serif" font-size="14" font-weight="700" fill="#17110A" text-anchor="middle">Coming in 0.2.0</text></g>
113
+ </svg>
Binary file
@@ -2,7 +2,7 @@
2
2
  <img src="../assets/banner.svg" width="900" alt="hivedesk: uma equipe inteira de agentes de IA rodando na sua própria máquina. Uma área de trabalho em favo de mel com linha do tempo, chat da equipe, janela de código e prévia ao vivo, com Mel, a abelha mestre de obras.">
3
3
  </p>
4
4
 
5
- <p align="center"><b>Sua própria equipe de IA. A um comando de distância.</b></p>
5
+ <p align="center"><b>Sua própria equipe de IA. A um comando de distância.</b><br>Novo na 0.2.0: a <a href="#hive-city-novo-na-020">Hive City</a>, onde os seus agentes vivem, passam por salas e pegam emprestada a GPU de um amigo.</p>
6
6
 
7
7
  <p align="center">
8
8
  <a href="https://kwy404.github.io/hivedesk/">Site</a> &middot;
@@ -21,10 +21,49 @@
21
21
 
22
22
  Rode `npx hivedesk` e um assistente curto prepara tudo: lê o seu hardware, instala o runtime local, baixa o modelo certo com uma barra de progresso e abre a Colmeia no navegador. A Colmeia é uma área de trabalho onde uma equipe de agentes de IA planeja, conversa e cria arquivos de verdade numa pasta do seu computador, com um modelo que roda na sua própria máquina. Sem conta e sem chave de API.
23
23
 
24
+ <p align="center">
25
+ <a href="https://kwy404.github.io/hivedesk/#film"><img src="../assets/video-poster.webp" width="320" alt="Assista ao filme de 75 segundos do hivedesk: Mel, a abelha mestre de obras, e a frase Um comando só."></a><br>
26
+ <a href="https://kwy404.github.io/hivedesk/#film"><b>Assista ao filme de 75 segundos</b></a> (ou <a href="../docs/media/hivedesk.mp4">o MP4</a>, com legendas em <a href="../docs/media/hivedesk.pt-BR.vtt">português</a> e <a href="../docs/media/hivedesk.en.vtt">inglês</a>)
27
+ </p>
28
+
24
29
  <p align="center">
25
30
  <img src="../docs/assets/shots/hive.webp" width="900" alt="A Colmeia em modo demo: a linha do tempo de uma landing page para uma padaria, o chat da equipe, a prévia ao vivo, a janela de arquivos com diff e o Dev depois de um turno, com o dock da equipe embaixo.">
26
31
  </p>
27
32
 
33
+ ## Hive City (novo na 0.2.0)
34
+
35
+ <p align="center">
36
+ <img src="../docs/assets/shots/city-overview.webp" width="900" alt="A Hive City em modo demo: o seu prédio numa ilha flutuante com as salas Design, Code, Review, Test, Ops, Library e Lobby, a torre de um amigo do outro lado da ponte, o quadro de tarefas e o feed de eventos.">
37
+ </p>
38
+
39
+ <p align="center">
40
+ <img src="../docs/assets/shots/city-bridge-gpu-borrow.webp" width="440" alt="O Dev pega emprestada a GPU da amiga pela ponte acesa; o painel Machines mostra 2 de 3 turnos e o botão para parar o empréstimo.">
41
+ <img src="../docs/assets/shots/city-agent-card.webp" width="440" alt="O cartão de um agente com nível, XP, ferramentas e memória própria.">
42
+ </p>
43
+
44
+ O hivedesk agora abre numa pequena cidade, e a cidade é o estado do sistema: cada prédio, sala, agente e tarefa que você vê é um evento no mesmo log que a equipe escreve ([CITY-PROTOCOL.md](../CITY-PROTOCOL.md), em inglês). `npx hivedesk --demo` mostra o cenário: uma amiga entra, o prédio dela sobe, o Dev pega a GPU dela emprestada pela ponte e uma tarefa passa por todas as salas até o fim.
45
+
46
+ - **Agentes que ficam.** Cada membro da equipe é um agente com sala de origem, nível e XP ganhos com trabalho concluído, ferramentas e uma memória própria (até 40 entradas curtas) que você lê, edita e fixa. Eles ficam salvos por máquina em `~/.hivedesk/city/agents/`, então o mesmo Dev mantém o nível em todos os projetos.
47
+ - **Salas com regras.** Lobby, Design, Code, Review, Test, Ops e Library. Enquanto um agente trabalha numa sala, as ferramentas dele se limitam às da sala (Review só lê e confere, Ops espera a sua aprovação e é fechada para convidados). Extensões podem criar salas.
48
+ - **Um barramento de tarefas.** Você coloca uma tarefa numa sala ou num agente; agentes livres disputam por especialidade, nível e carga da máquina, e cada passo vira um evento. Uma tarefa no Lobby vai para a Mel, que a divide em tarefas da equipe.
49
+ - **Code, Review, Test, com voltas.** Design escreve a especificação, Code roda a equipe, outro agente revisa o diff contra os critérios e Test roda as verificações. Uma revisão ou teste que falha devolve a tarefa ao autor com os problemas, no máximo 3 vezes; depois ela fica bloqueada. Você pode aprovar ou devolver em qualquer etapa.
50
+ - **Máquinas e amigos.** O seu PC é um prédio com GPU, modelo e carga. Um amigo que entra pelo Code together (seis palavras, QR ou link) ganha um prédio e pode trazer agentes que pensam na máquina dele. Um agente pode pegar a GPU de um amigo emprestada por alguns turnos; o amigo aceita, define os limites, vê cada turno e pode parar. Só prompts e respostas viajam.
51
+ - **Tudo volta.** Feche o hivedesk e abra amanhã: os mesmos agentes, níveis e memórias, e as tarefas em andamento reabrem na sala delas.
52
+
53
+ O que ainda não faz: o Test roda as verificações estáticas (HTML, links, sintaxe de JS, CSS, JSON), não a sua suíte de testes; o agente de um amigo precisa do modelo desse amigo emprestado; o empréstimo não tem uma porcentagem fixa, só limites por pedido. `--no-city` desliga a cidade e mantém a área de trabalho da 0.1.
54
+
55
+ ## Baixar
56
+
57
+ | | Arquivo | Tamanho | Como abrir |
58
+ | --- | --- | --- | --- |
59
+ | Windows 10 e 11, x64 | [hivedesk-windows-x64.zip](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-windows-x64.zip) | 47 MB | descompacte e clique duas vezes em `hivedesk.exe` |
60
+ | macOS, Apple Silicon e Intel | [hivedesk-macos-universal.zip](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-macos-universal.zip) | 89 MB | descompacte, mova para Aplicativos e abra |
61
+ | Linux x64 | [hivedesk-linux-x64.tar.gz](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-linux-x64.tar.gz) | 55 MB | `tar -xzf`, depois `./hivedesk/hivedesk` |
62
+ | Linux x64, um arquivo só | [hivedesk-linux-x86_64.AppImage](https://github.com/kwy404/hivedesk/releases/latest/download/hivedesk-linux-x86_64.AppImage) | 52 MB | `chmod +x` e rode |
63
+ | Qualquer sistema com Node.js 20+ | `npx hivedesk` | pequeno | o assistente faz o resto |
64
+
65
+ O app de desktop abre o hivedesk na própria janela e traz o próprio Node.js. Ainda não é assinado, então o SmartScreen do Windows ("Mais informações", depois "Executar assim mesmo") e o Gatekeeper do macOS (Ajustes do Sistema, Privacidade e Segurança, "Abrir Mesmo Assim") perguntam uma vez, e ele não se atualiza sozinho. O modelo local continua sendo baixado na primeira execução. Todos os arquivos, com o `SHA256SUMS.txt`, estão na [página de versões](https://github.com/kwy404/hivedesk/releases).
66
+
28
67
  ## Instalar
29
68
 
30
69
  ```bash
@@ -33,7 +72,7 @@ npx hivedesk
33
72
 
34
73
  O assistente pergunta o idioma, a pasta do projeto, qual cérebro usar, como a equipe deve trabalhar e quem faz parte dela. Toda pergunta tem um padrão recomendado, então apertar Enter até o fim funciona. Na próxima vez ele oferece a mesma configuração; `--yes` pula as perguntas.
35
74
 
36
- Prefere o app de desktop? A [página de download](https://kwy404.github.io/hivedesk/#download) tem `hivedesk-windows-x64.zip` (uns 42 MB), `hivedesk-macos-universal.zip` (uns 80 MB) e `hivedesk-linux-x64.tar.gz` (uns 35 MB, também como AppImage) da [última versão](https://github.com/kwy404/hivedesk/releases/latest). Cada um traz o próprio Node.js, então não há nada para instalar antes; o hivedesk abre na própria janela. Eles ainda não são assinados, então o SmartScreen do Windows e o Gatekeeper do macOS perguntam uma vez, e não se atualizam sozinhos. O modelo local continua sendo baixado na primeira execução. O [desktop/README.md](../desktop/README.md) (em inglês) lista o conteúdo de cada pacote e os passos exatos da primeira abertura. Também há scripts pequenos que conferem o Node.js 20 ou mais novo e rodam `npx hivedesk@latest`.
75
+ Prefere o app de desktop? A [página de download](https://kwy404.github.io/hivedesk/#download) tem `hivedesk-windows-x64.zip` (47 MB), `hivedesk-macos-universal.zip` (89 MB) e `hivedesk-linux-x64.tar.gz` (55 MB, ou o AppImage de 52 MB) da [última versão](https://github.com/kwy404/hivedesk/releases/latest). Cada um traz o próprio Node.js, então não há nada para instalar antes; o hivedesk abre na própria janela. Eles ainda não são assinados, então o SmartScreen do Windows e o Gatekeeper do macOS perguntam uma vez, e não se atualizam sozinhos. O modelo local continua sendo baixado na primeira execução. O [desktop/README.md](../desktop/README.md) (em inglês) lista o conteúdo de cada pacote e os passos exatos da primeira abertura. Também há scripts pequenos que conferem o Node.js 20 ou mais novo e rodam `npx hivedesk@latest`.
37
76
 
38
77
  ### O que a primeira execução faz
39
78
 
@@ -78,6 +117,7 @@ A escolha e o motivo aparecem numa linha. Mude em Settings ou com `--model 14b|7
78
117
  | `--dir <pasta>` | A pasta do projeto. Os arquivos vão para `<pasta>/.hivedesk/`. |
79
118
  | `--port <n>`, `--no-open` | Escolhe a porta; não abre o navegador. |
80
119
  | `--lend`, `--join <link ou palavras>` | Empresta o seu modelo a um amigo, ou usa o de um amigo. |
120
+ | `--no-city` | Roda sem a Hive City: sem agentes, salas ou barramento de tarefas; o resto funciona igual. |
81
121
  | `--doctor` | Confere Node, GPU, RAM, disco e modelos, e sai. |
82
122
 
83
123
  ## Sincero sobre os limites
@@ -127,10 +167,14 @@ A equipe padrão é **Mel** (mestre de obras), **Dev**, **Designer**, **QA** e *
127
167
  </p>
128
168
 
129
169
  - **Modo escritório.** Ligue na barra do topo e a área de trabalho vira um pequeno escritório em favo de mel, desenhado a partir dos eventos reais. Arraste um post-it do quadro da Mel até uma abelha para passar a tarefa.
130
- - **Code together.** Convide um amigo para a janela de código: vocês editam os mesmos arquivos e veem o cursor um do outro. Os salvamentos dele passam pelo modo de aprovação, como diff.
131
- - **Voz.** Aperte e fale com <kbd>Ctrl</kbd> <kbd>Space</kbd>; a Mel responde em voz alta no idioma da interface.
132
- - **Temas.** Oito prontos, um editor visual com relatório de contraste, importar e exportar, ou peça para a equipe criar um.
133
- - **Extensões.** Instale de uma pasta, um zip ou uma URL. Cada uma pede as suas permissões e roda num sandbox.
170
+ - **Code together.** Convide um amigo para a janela de código com seis palavras: vocês editam os mesmos arquivos e veem o cursor um do outro. Os salvamentos dele passam pelo modo de aprovação, como diff.
171
+ - **Voz.** Aperte e fale com <kbd>Ctrl</kbd> <kbd>Space</kbd>; a Mel responde em voz alta no idioma da interface. Antes de qualquer coisa que age, como um commit ou um push, a Mel lê o plano e espera um sim claro. O reconhecimento é o do navegador, que pode enviar o áudio para o serviço do fabricante.
172
+ - **Temas.** Oito prontos, um editor visual com relatório de contraste, importar e exportar, ou descreva um e a equipe cria.
173
+ - **Extensões.** Instale de uma pasta, um zip ou uma URL, ou peça para a equipe criar uma. Cada uma pede as suas permissões e roda num sandbox.
174
+ - **Memória da sessão.** Notas pequenas e limitadas por projeto e por pessoa, mais um arquivo de sessão por trabalho. Algumas entradas relevantes entram no próximo prompt; fixe, edite ou esqueça qualquer uma na janela Memory, ou desligue a memória.
175
+ - **Briefing e relatório.** O briefing refinado antes do trabalho e, no fim, um relatório com o que foi feito e um prompt melhor para a próxima vez.
176
+ - **Cérebros na nuvem, opcionais.** Local por padrão. Adicione um provedor na nuvem ou um endpoint compatível com a OpenAI com a sua chave, até por agente. As chaves ficam em `~/.hivedesk/keys.json`; prompts e arquivos enviados a esse provedor saem da sua máquina.
177
+ - **App de desktop.** Os downloads abrem o hivedesk na própria janela, com ícone na bandeja, notificações e instância única; o `npx hivedesk` pode abrir a mesma janela.
134
178
  - **10 idiomas.** English, Português, Español, Français, Deutsch, Italiano, 日本語, 한국어, 简体中文 e Русский. A Colmeia segue o seu navegador e troca na hora.
135
179
  - **Um tour guiado** com a Mel na primeira abertura; repita pelo Help ou pela paleta de comandos.
136
180
  - **Replay** de qualquer momento a partir do log de eventos, paleta de comandos com <kbd>Ctrl</kbd> <kbd>K</kbd>, janelas que se encaixam e um layout de celular com cartões empilhados.