hivedesk 1.0.0 → 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.
Files changed (93) hide show
  1. package/CHANGELOG.md +143 -111
  2. package/README.md +307 -303
  3. package/desktop/controller.js +85 -7
  4. package/desktop/native.js +4 -1
  5. package/desktop/release-notes/1.0.1.json +12 -0
  6. package/desktop/release-notes/1.0.2.json +12 -0
  7. package/desktop/scripts/package.mjs +11 -0
  8. package/desktop/shell.html +5 -2
  9. package/desktop/workarea.js +440 -0
  10. package/i18n/README.pt-BR.md +308 -304
  11. package/i18n/de.json +247 -4
  12. package/i18n/en.json +247 -4
  13. package/i18n/es.json +247 -4
  14. package/i18n/fr.json +247 -4
  15. package/i18n/it.json +247 -4
  16. package/i18n/ja.json +247 -4
  17. package/i18n/ko.json +247 -4
  18. package/i18n/parts/downloads.de.json +29 -0
  19. package/i18n/parts/downloads.en.json +29 -0
  20. package/i18n/parts/downloads.es.json +29 -0
  21. package/i18n/parts/downloads.fr.json +29 -0
  22. package/i18n/parts/downloads.it.json +29 -0
  23. package/i18n/parts/downloads.ja.json +29 -0
  24. package/i18n/parts/downloads.ko.json +29 -0
  25. package/i18n/parts/downloads.pt-BR.json +29 -0
  26. package/i18n/parts/downloads.ru.json +29 -0
  27. package/i18n/parts/downloads.zh-CN.json +29 -0
  28. package/i18n/parts/office.de.json +184 -0
  29. package/i18n/parts/office.en.json +184 -0
  30. package/i18n/parts/office.es.json +184 -0
  31. package/i18n/parts/office.fr.json +184 -0
  32. package/i18n/parts/office.it.json +184 -0
  33. package/i18n/parts/office.ja.json +184 -0
  34. package/i18n/parts/office.ko.json +184 -0
  35. package/i18n/parts/office.pt-BR.json +184 -0
  36. package/i18n/parts/office.ru.json +184 -0
  37. package/i18n/parts/office.zh-CN.json +184 -0
  38. package/i18n/pt-BR.json +247 -4
  39. package/i18n/ru.json +247 -4
  40. package/i18n/zh-CN.json +247 -4
  41. package/package.json +3 -2
  42. package/src/brain/manager.js +23 -7
  43. package/src/brain/models.js +146 -30
  44. package/src/brain/runtime.js +61 -13
  45. package/src/crew/domains/flow.js +2 -1
  46. package/src/crew/engine.js +172 -22
  47. package/src/crew/legacy.js +72 -0
  48. package/src/crew/planner.js +14 -1
  49. package/src/crew/talk.js +110 -3
  50. package/src/crew/taskgraph.js +12 -2
  51. package/src/crew/worker.js +60 -2
  52. package/src/index.js +4 -1
  53. package/src/p2p/doctor.js +4 -1
  54. package/src/phone/hub.js +15 -3
  55. package/src/phone/port.js +1 -1
  56. package/src/replay/reduce.js +1 -0
  57. package/src/tools/check.js +2 -0
  58. package/src/voice/index.js +1 -1
  59. package/src/voice/piper.js +10 -4
  60. package/src/voice/store.js +2 -1
  61. package/src/voice/whisper.js +63 -25
  62. package/ui/city/activity.js +4 -1
  63. package/ui/city/city.js +5 -5
  64. package/ui/city/scene.js +2 -1
  65. package/ui/css/hive.css +20 -0
  66. package/ui/js/dock.js +2 -2
  67. package/ui/js/dom.js +23 -18
  68. package/ui/js/i18n.js +12 -0
  69. package/ui/js/main.js +43 -3
  70. package/ui/js/md.js +130 -0
  71. package/ui/js/net.js +6 -0
  72. package/ui/js/palette.js +2 -2
  73. package/ui/js/store.js +20 -2
  74. package/ui/js/topbar.js +2 -2
  75. package/ui/js/voice/index.js +3 -2
  76. package/ui/js/widgets/brief.js +28 -10
  77. package/ui/js/widgets/chat.js +16 -4
  78. package/ui/js/widgets/files.js +3 -3
  79. package/ui/js/widgets/memory.js +3 -3
  80. package/ui/js/widgets/replay.js +3 -3
  81. package/ui/js/widgets/settings.js +2 -2
  82. package/ui/js/widgets/timeline.js +2 -2
  83. package/ui/js/widgets/worker.js +17 -6
  84. package/ui/models/index.js +3 -2
  85. package/ui/models/window.js +2 -2
  86. package/ui/office/office.js +145 -106
  87. package/ui/office/popout.js +4 -3
  88. package/ui/office/scene.js +47 -28
  89. package/ui/phone/core/client.js +11 -5
  90. package/ui/phone/desktop.js +2 -1
  91. package/ui/widget.html +8 -8
  92. package/ui/widget.js +35 -20
  93. package/ui/workbench/searchview.js +3 -3
package/CHANGELOG.md CHANGED
@@ -1,111 +1,143 @@
1
- # Changelog
2
-
3
- ## 1.0.0 (2026-10-18)
4
-
5
- hivedesk becomes a peer to peer environment where AI agents, people and machines work together as one City. Your agents. Your machines. Your City.
6
-
7
- ### P2P and the City
8
- * Every install has an Ed25519 identity. A friend joins with a six word invite, both screens show the same check words, and nothing is shared until you accept. Sessions are end to end encrypted, every grant is explicit, off by default, has an expiry and can be revoked at once, and every grant, refusal and revoke goes to a hash chained audit log.
9
- * The City reads the real state: machines, agents, tasks, jobs and peers, with the Machines panel and the Activity stream. Demo data is labeled and never mixed with real data.
10
-
11
- ### Compute: GPU and CPU with friends
12
- * Borrow a friend's GPU or CPU as remote inference jobs with a lease, limits, heartbeats, cancel and revoke. A whole crew job can think on a friend's machine; every write or run that comes from there waits for your approval.
13
- * The scheduler picks local GPU, local CPU or a friend's machine and says why, with an honest speed estimate. A failed job offers Retry locally, Retry another peer, Use partial or Cancel.
14
- * Pooled giant models (experimental, off by default): a model too big for one PC runs split across friends' GPUs and CPUs over the encrypted session, only when the granted memory really fits it.
15
-
16
- ### Models
17
- * A catalog of 57 models with quantized variants, pinned by SHA-256, with the memory each one needs. hivedesk reads your GPU, RAM and disk, recommends one and asks before any download. Works on CPU only machines too.
18
- * Automatic model rotation: the router picks an installed model for each role and task and keeps a few loaded within your memory budget.
19
-
20
- ### The crew
21
- * Not only websites: mobile apps (installable PWA plus a Capacitor project), desktop apps, APIs, CLI tools, browser extensions, games and data scripts, with tested offline skeletons and specialists for mobile, desktop, backend, security, data and DevOps.
22
- * When a request is unclear, Mel asks: at most four questions with two to five options, the recommended one first with its reason, Other, and Decide for me.
23
- * Security mode audits a project read only: exposed secrets (masked), risky code and risky dependencies, with severity, file and line. Fixes run only after your approval.
24
- * A library of 672 playbooks, picked per request, and an improved prompt at the end of every job.
25
-
26
- ### Remote desktop, phone and voice
27
- * Remote desktop with a 10 digit address: copy, paste, connect. The person who is called decides what to allow (view, control, clipboard, files) and sees a red Stop button. All monitors, file send, and copy here, paste there. The key behind an address is pinned on first use. On macOS, view only for now.
28
- * Phone remote: scan a QR code, check the six words, accept, and follow jobs, answer approvals, chat with the crew and see the screen from your phone.
29
- * Voice mode: a hands free conversation with Mel, speech to text on your own PC, barge in, and every action read back before it runs.
30
-
31
- ### Workbench, installers and the rest
32
- * A code workbench with editor groups, explorer, search, a real terminal (shareable with a friend), source control and GitHub.
33
- * Installers for Windows (a small online setup and an offline one, per user, no admin), macOS (DMG) and Linux (AppImage, deb, rpm and an install script), with signed automatic updates and rollback.
34
- * A local profile with a name and an avatar from a gallery, real stats and achievements. Only the name and avatar are shared with friends.
35
- * A more serious 1.0 design, 10 languages everywhere, and a new site.
36
-
37
- ### Security
38
- * A full review before release: local commands need the app's own origin, peer and phone approvals are strict, plans and chat from guests or peers never act as the owner, the .git folder is closed to the crew, node flags are allowlisted, the uninstaller removes only what it installed, and model downloads need a hash and a size cap.
39
-
40
- ## 0.2.1 (security) (2026-10-17)
41
-
42
- A security update for Code together, Lend your PC, Hive City, `--demo` and extensions. Please update.
43
-
44
- * 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.
45
- * 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.
46
- * 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.
47
- * 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.
48
- * 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.
49
- * `--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.
50
- * 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.
51
-
52
- ## 0.2.0 (2026-10-17)
53
-
54
- Hive City: hivedesk becomes a small distributed system for AI agents on people's computers. The city is the new home view.
55
-
56
- ### Hive City, engine side (CITY-PROTOCOL.md)
57
-
58
- * 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`.
59
- * 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.
60
- * 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`.
61
- * 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.
62
- * 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.
63
- * 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.
64
- * 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.
65
- * 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.
66
- * 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.
67
- * `--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.
68
- * 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.
69
-
70
- ## 0.1.1 (2026-10-17)
71
-
72
- * 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.
73
- * The website shows the real Office mode and the desktop downloads for Windows, macOS and Linux.
74
- * The README on npm matches the current requirements.
75
-
76
- ## 0.1.0 (2026-10-17)
77
-
78
- First release.
79
-
80
- ### Start
81
-
82
- * `npx hivedesk` asks a few questions in a terminal wizard (language, folder, brain, download, working mode, crew), each with a recommended default; later runs ask only "Use the same setup?". `--yes`, or no terminal, skips the questions. See FIRST-RUN.md.
83
- * The model is chosen from the hardware (Qwen2.5-Coder 0.5B to 14B, Q4_K_M) and the reason is shown in one line. Free disk and free RAM are checked first; the runtime (node-llama-cpp) is installed into `~/.hivedesk` on first use; the download resumes and is checked against its SHA-256.
84
- * Loading is GPU first: as many layers as fit next to the context, no memory map on the GPU (0.45 GB resident for the 3B instead of 2.4 GB), a refusal to load when free RAM is short, and the 1.5B on the CPU when the GPU cannot take the model.
85
- * Other local runtimes and cloud providers with your own key work behind the same brain interface. Keys stay in `~/.hivedesk/keys.json`; the browser only sees "configured". A brain can be chosen per worker; tokens are counted per brain.
86
- * hivedesk opens as a native desktop window (from `desktop/`), as an app style browser window, or in the browser; the desktop is installable as an app and shows a "start hivedesk" page when the server is not running.
87
- * `--demo` runs a scripted job with no model; every event is labeled as a demo. `--doctor` checks Node, the GPU, RAM, disk and the models present.
88
-
89
- ### The crew
90
-
91
- * Mel, Dev, Designer, QA and Writer, plus workers you hire with a role, a color and a list of tools.
92
- * The prompt refiner: Mel turns the request into a brief (goal, files and features, constraints, acceptance criteria, open questions with defaults). Vague requests get up to 3 multiple choice questions. The job waits until you use the brief, edit it or keep your own words.
93
- * The loop: brief, plan, task graph, workers taking turns on one model through a fair scheduler, tools, QA against the acceptance criteria with findings by severity, at most 3 fix rounds, done.
94
- * Quality for small local models: one task per worker, read before edit, small search and replace patches, checks after every change, "done" checked against the checks, a short scratchpad of decisions, loops stopped by Mel.
95
- * Every model call is assembled from tagged sections (role, objective, context, tools, rules, process, output) within a token budget per model family; the Prompts window shows the exact prompt, the answer and the budget of each turn.
96
- * At the end, a report (what was built, files, checks, what is missing) and an improved prompt with 2 or 3 next prompts, copyable and savable as a playbook.
97
- * Every tool call is a JSON action checked by a schema; the local model is grammar constrained.
98
- * Workspace tools: list, read, write, edit, delete, run (allow list, timeout, output cap, Node permission flags when available), static checks and preview.
99
- * Approval mode (on by default) for commands, deletes and changes to files that existed before the job. Task retry, reassign and cancel, and pausing a worker.
100
-
101
- ### Memory and history
102
-
103
- * Local memory: project facts, decisions, preferences and session summaries, small and capped, in `.hivedesk/memory.json` and `~/.hivedesk/memory.json`, with search, pin, edit, delete, "forget this" and an off switch.
104
- * One session file per job in `.hivedesk/sessions/`; any session can be reopened and continued.
105
- * Playbooks: a job that ends well is saved and reused for similar requests.
106
- * Replay: `events.jsonl` is the source of truth; any moment can be rebuilt.
107
-
108
- ### Other
109
-
110
- * Lend your PC: a paired friend's model can take turns for your crew (see the README).
111
- * The protocol for the UI and plug-ins is in PROTOCOL.md.
1
+ # Changelog
2
+
3
+ ## 1.0.2 (2026-12-04)
4
+
5
+ ### Website
6
+ * A new art direction: the City as a solarpunk arcology, painted like an old science fiction paperback cover, in a light (day) and a dark (night) theme with one switch in the header. It follows the system until you choose, and keeps your choice in browsers that force a dark mode. The design note is in docs/1.0/SITE-DESIGN.md.
7
+ * The eight site themes are replaced by that one light and dark switch; an old saved theme maps to the nearest one.
8
+ * No native form controls: the demo permissions, the model size and the pool slider are custom controls that work with the keyboard and screen readers, and the launch film has its own player.
9
+ * Icons come from glyphfox (scripts/site-icons.mjs rebuilds the sprite). Built with Monsoon, Voodoo.js and glyphfox, credited in the footer and the README.
10
+ * Every page fits from 320 to 1920 pixels wide with no sideways scroll, and a hyphenated word never splits across lines. Long labels fold the header into the menu.
11
+ * A new social image (og.png), and the JSON-LD describes the source code too.
12
+ * The playbook section says about 670 playbooks and lists all 18 categories, matching the library (it still said about 500).
13
+ * The lend page reads Code together links (#cw=) as well as Lend links, and says which screen to open. The lend page and the 404 page use the new look, show the right version and link to sections that exist.
14
+
15
+ ### Fixes
16
+ * hivedesk doctor --p2p no longer prints a Node.js deprecation warning when a relay is given as an IP address (SNI is sent only for host names).
17
+ * A download whose part file turned into a folder ends in locked with a clear message on every system, and a part file that cannot be removed is reported instead of thrown.
18
+ * A server test awaited its rejected WebSocket assertion, so a failure can no longer slip past.
19
+ * README: the development section linked to a plan file that is not in the repository; it now points to docs/1.0/protocol/.
20
+
21
+ ### Project
22
+ * CI uses the current majors of checkout, setup-node and the artifact actions (the old ones ran on the deprecated Node 20 runtime) and tests on Node 20, 22 and 24.
23
+
24
+ ## 1.0.1 (2026-10-20)
25
+
26
+ * Downloading a model works in the desktop app again. The packages bring the npm of their bundled Node.js, so a PC without Node.js can install the local runtime; npm runs without a shell, so a user folder with spaces stays one path; a broken runtime folder is retried fresh; and a failed install says why.
27
+ * Downloads of models and voices recover from a crash (a finished part file is verified and kept), report a full disk, a locked file, 404, 403, 429 and server errors with their own message and the real host, share one file when the same model is asked twice, and honor a short Retry-After. Voice works in a user folder with accents, a missing or blocked speech program fails at once with a clear message, and a busy port picks another.
28
+ * The brief no longer blocks a job: "ok", "pode continuar", "sim" and the like in the chat approve it in 10 languages, the brief has buttons in the chat, the status says it waits for you, and a brief survives a restart. Questions like "where is my page?" are answered from the real job state, and a chat reply never claims work that did not start.
29
+ * Model text is rendered as safe markdown in the windows and chats, and stripped in bubbles and notifications.
30
+ * The Office view, the mini widget, the worker roles and the crew's chat lines are translated in 10 languages.
31
+ * On Windows, a maximized window keeps the taskbar visible, and a window saved off screen comes back. The loading screen shows a Retry button instead of spinning forever.
32
+ * The crew finishes more jobs on a local model: QA runs after a partly failed build so its fix rounds can repair it, a worker's history is trimmed to fit a 4096 token context, and a local model's plan gives each worker its own task so two workers never edit the same file at once.
33
+ * A phone that connects no longer shows a "null" line, and the computer name it sees falls back to the profile name and the system name.
34
+
35
+ ## 1.0.0 (2026-10-18)
36
+
37
+ hivedesk becomes a peer to peer environment where AI agents, people and machines work together as one City. Your agents. Your machines. Your City.
38
+
39
+ ### P2P and the City
40
+ * Every install has an Ed25519 identity. A friend joins with a six word invite, both screens show the same check words, and nothing is shared until you accept. Sessions are end to end encrypted, every grant is explicit, off by default, has an expiry and can be revoked at once, and every grant, refusal and revoke goes to a hash chained audit log.
41
+ * The City reads the real state: machines, agents, tasks, jobs and peers, with the Machines panel and the Activity stream. Demo data is labeled and never mixed with real data.
42
+
43
+ ### Compute: GPU and CPU with friends
44
+ * Borrow a friend's GPU or CPU as remote inference jobs with a lease, limits, heartbeats, cancel and revoke. A whole crew job can think on a friend's machine; every write or run that comes from there waits for your approval.
45
+ * The scheduler picks local GPU, local CPU or a friend's machine and says why, with an honest speed estimate. A failed job offers Retry locally, Retry another peer, Use partial or Cancel.
46
+ * Pooled giant models (experimental, off by default): a model too big for one PC runs split across friends' GPUs and CPUs over the encrypted session, only when the granted memory really fits it.
47
+
48
+ ### Models
49
+ * A catalog of 57 models with quantized variants, pinned by SHA-256, with the memory each one needs. hivedesk reads your GPU, RAM and disk, recommends one and asks before any download. Works on CPU only machines too.
50
+ * Automatic model rotation: the router picks an installed model for each role and task and keeps a few loaded within your memory budget.
51
+
52
+ ### The crew
53
+ * Not only websites: mobile apps (installable PWA plus a Capacitor project), desktop apps, APIs, CLI tools, browser extensions, games and data scripts, with tested offline skeletons and specialists for mobile, desktop, backend, security, data and DevOps.
54
+ * When a request is unclear, Mel asks: at most four questions with two to five options, the recommended one first with its reason, Other, and Decide for me.
55
+ * Security mode audits a project read only: exposed secrets (masked), risky code and risky dependencies, with severity, file and line. Fixes run only after your approval.
56
+ * A library of 672 playbooks, picked per request, and an improved prompt at the end of every job.
57
+
58
+ ### Remote desktop, phone and voice
59
+ * Remote desktop with a 10 digit address: copy, paste, connect. The person who is called decides what to allow (view, control, clipboard, files) and sees a red Stop button. All monitors, file send, and copy here, paste there. The key behind an address is pinned on first use. On macOS, view only for now.
60
+ * Phone remote: scan a QR code, check the six words, accept, and follow jobs, answer approvals, chat with the crew and see the screen from your phone.
61
+ * Voice mode: a hands free conversation with Mel, speech to text on your own PC, barge in, and every action read back before it runs.
62
+
63
+ ### Workbench, installers and the rest
64
+ * A code workbench with editor groups, explorer, search, a real terminal (shareable with a friend), source control and GitHub.
65
+ * Installers for Windows (a small online setup and an offline one, per user, no admin), macOS (DMG) and Linux (AppImage, deb, rpm and an install script), with signed automatic updates and rollback.
66
+ * A local profile with a name and an avatar from a gallery, real stats and achievements. Only the name and avatar are shared with friends.
67
+ * A more serious 1.0 design, 10 languages everywhere, and a new site.
68
+
69
+ ### Security
70
+ * A full review before release: local commands need the app's own origin, peer and phone approvals are strict, plans and chat from guests or peers never act as the owner, the .git folder is closed to the crew, node flags are allowlisted, the uninstaller removes only what it installed, and model downloads need a hash and a size cap.
71
+
72
+ ## 0.2.1 (security) (2026-10-17)
73
+
74
+ A security update for Code together, Lend your PC, Hive City, `--demo` and extensions. Please update.
75
+
76
+ * 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.
77
+ * 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.
78
+ * 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.
79
+ * 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.
80
+ * 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.
81
+ * `--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.
82
+ * 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.
83
+
84
+ ## 0.2.0 (2026-10-17)
85
+
86
+ Hive City: hivedesk becomes a small distributed system for AI agents on people's computers. The city is the new home view.
87
+
88
+ ### Hive City, engine side (CITY-PROTOCOL.md)
89
+
90
+ * 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`.
91
+ * 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.
92
+ * 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`.
93
+ * 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.
94
+ * 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.
95
+ * 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.
96
+ * 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.
97
+ * 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.
98
+ * 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.
99
+ * `--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.
100
+ * 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.
101
+
102
+ ## 0.1.1 (2026-10-17)
103
+
104
+ * 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.
105
+ * The website shows the real Office mode and the desktop downloads for Windows, macOS and Linux.
106
+ * The README on npm matches the current requirements.
107
+
108
+ ## 0.1.0 (2026-10-17)
109
+
110
+ First release.
111
+
112
+ ### Start
113
+
114
+ * `npx hivedesk` asks a few questions in a terminal wizard (language, folder, brain, download, working mode, crew), each with a recommended default; later runs ask only "Use the same setup?". `--yes`, or no terminal, skips the questions. See FIRST-RUN.md.
115
+ * The model is chosen from the hardware (Qwen2.5-Coder 0.5B to 14B, Q4_K_M) and the reason is shown in one line. Free disk and free RAM are checked first; the runtime (node-llama-cpp) is installed into `~/.hivedesk` on first use; the download resumes and is checked against its SHA-256.
116
+ * Loading is GPU first: as many layers as fit next to the context, no memory map on the GPU (0.45 GB resident for the 3B instead of 2.4 GB), a refusal to load when free RAM is short, and the 1.5B on the CPU when the GPU cannot take the model.
117
+ * Other local runtimes and cloud providers with your own key work behind the same brain interface. Keys stay in `~/.hivedesk/keys.json`; the browser only sees "configured". A brain can be chosen per worker; tokens are counted per brain.
118
+ * hivedesk opens as a native desktop window (from `desktop/`), as an app style browser window, or in the browser; the desktop is installable as an app and shows a "start hivedesk" page when the server is not running.
119
+ * `--demo` runs a scripted job with no model; every event is labeled as a demo. `--doctor` checks Node, the GPU, RAM, disk and the models present.
120
+
121
+ ### The crew
122
+
123
+ * Mel, Dev, Designer, QA and Writer, plus workers you hire with a role, a color and a list of tools.
124
+ * The prompt refiner: Mel turns the request into a brief (goal, files and features, constraints, acceptance criteria, open questions with defaults). Vague requests get up to 3 multiple choice questions. The job waits until you use the brief, edit it or keep your own words.
125
+ * The loop: brief, plan, task graph, workers taking turns on one model through a fair scheduler, tools, QA against the acceptance criteria with findings by severity, at most 3 fix rounds, done.
126
+ * Quality for small local models: one task per worker, read before edit, small search and replace patches, checks after every change, "done" checked against the checks, a short scratchpad of decisions, loops stopped by Mel.
127
+ * Every model call is assembled from tagged sections (role, objective, context, tools, rules, process, output) within a token budget per model family; the Prompts window shows the exact prompt, the answer and the budget of each turn.
128
+ * At the end, a report (what was built, files, checks, what is missing) and an improved prompt with 2 or 3 next prompts, copyable and savable as a playbook.
129
+ * Every tool call is a JSON action checked by a schema; the local model is grammar constrained.
130
+ * Workspace tools: list, read, write, edit, delete, run (allow list, timeout, output cap, Node permission flags when available), static checks and preview.
131
+ * Approval mode (on by default) for commands, deletes and changes to files that existed before the job. Task retry, reassign and cancel, and pausing a worker.
132
+
133
+ ### Memory and history
134
+
135
+ * Local memory: project facts, decisions, preferences and session summaries, small and capped, in `.hivedesk/memory.json` and `~/.hivedesk/memory.json`, with search, pin, edit, delete, "forget this" and an off switch.
136
+ * One session file per job in `.hivedesk/sessions/`; any session can be reopened and continued.
137
+ * Playbooks: a job that ends well is saved and reused for similar requests.
138
+ * Replay: `events.jsonl` is the source of truth; any moment can be rebuilt.
139
+
140
+ ### Other
141
+
142
+ * Lend your PC: a paired friend's model can take turns for your crew (see the README).
143
+ * The protocol for the UI and plug-ins is in PROTOCOL.md.