busybits 0.0.0-stage → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/.claude-plugin/marketplace.json +26 -0
  2. package/CHANGELOG.md +675 -0
  3. package/LICENSE +21 -0
  4. package/README.es.md +1457 -0
  5. package/README.fr.md +1435 -0
  6. package/README.md +1605 -2
  7. package/README.pt-BR.md +1373 -0
  8. package/dist/build.json +5 -0
  9. package/dist/cli/busybits.js +14708 -0
  10. package/dist/client/assets/art/framed/painting-abstract.png +0 -0
  11. package/dist/client/assets/art/framed/painting-beach.png +0 -0
  12. package/dist/client/assets/art/framed/painting-cat.png +0 -0
  13. package/dist/client/assets/art/framed/painting-city-night.png +0 -0
  14. package/dist/client/assets/art/framed/painting-mountains.png +0 -0
  15. package/dist/client/assets/art/framed/painting-rio.png +0 -0
  16. package/dist/client/assets/art/framed/painting-sunflowers.png +0 -0
  17. package/dist/client/assets/art/framed/painting-wave.png +0 -0
  18. package/dist/client/assets/art/framed/painting-wide-aurora.png +0 -0
  19. package/dist/client/assets/art/framed/painting-wide-color-fields.png +0 -0
  20. package/dist/client/assets/art/framed/painting-wide-forest-lake.png +0 -0
  21. package/dist/client/assets/art/painting-abstract.png +0 -0
  22. package/dist/client/assets/art/painting-beach.png +0 -0
  23. package/dist/client/assets/art/painting-cat.png +0 -0
  24. package/dist/client/assets/art/painting-city-night.png +0 -0
  25. package/dist/client/assets/art/painting-mountains.png +0 -0
  26. package/dist/client/assets/art/painting-rio.png +0 -0
  27. package/dist/client/assets/art/painting-sunflowers.png +0 -0
  28. package/dist/client/assets/art/painting-wave.png +0 -0
  29. package/dist/client/assets/art/painting-wide-aurora.png +0 -0
  30. package/dist/client/assets/art/painting-wide-color-fields.png +0 -0
  31. package/dist/client/assets/art/painting-wide-forest-lake.png +0 -0
  32. package/dist/client/assets/art/poster-bug.png +0 -0
  33. package/dist/client/assets/art/poster-cat.png +0 -0
  34. package/dist/client/assets/art/poster-code.png +0 -0
  35. package/dist/client/assets/art/poster-coffee.png +0 -0
  36. package/dist/client/assets/art/poster-rocket.png +0 -0
  37. package/dist/client/assets/art/poster-ship-it.png +0 -0
  38. package/dist/client/assets/brand/apple-touch-icon.png +0 -0
  39. package/dist/client/assets/brand/favicon-16.png +0 -0
  40. package/dist/client/assets/brand/favicon-32.png +0 -0
  41. package/dist/client/assets/brand/icon-192.png +0 -0
  42. package/dist/client/assets/brand/icon-512.png +0 -0
  43. package/dist/client/assets/brand/logo-detailed.png +0 -0
  44. package/dist/client/assets/brand/logo-mark.png +0 -0
  45. package/dist/client/assets/brand/logo-mark@4x.png +0 -0
  46. package/dist/client/assets/brand/signage.png +0 -0
  47. package/dist/client/assets/brand/signage@4x.png +0 -0
  48. package/dist/client/assets/emoji/LICENSE-SerenityOS.txt +28 -0
  49. package/dist/client/assets/emoji/sheet.png +0 -0
  50. package/dist/client/assets/illustrations/empty-office.png +0 -0
  51. package/dist/client/assets/manifest.json +260 -0
  52. package/dist/client/assets/og-image.png +0 -0
  53. package/dist/client/bundle/app-AwZeKIeu.js +24 -0
  54. package/dist/client/bundle/app-CoDOLwxe.css +1 -0
  55. package/dist/client/bundle/city-DPTwQLdi.css +1 -0
  56. package/dist/client/bundle/city-YoIG0FsX.js +1 -0
  57. package/dist/client/bundle/daystats-DGzYOP8l.js +1 -0
  58. package/dist/client/bundle/dom-D2vx0KTo.js +1 -0
  59. package/dist/client/bundle/en-DBfNt5uV.js +169 -0
  60. package/dist/client/bundle/es-pnWdszTE.js +169 -0
  61. package/dist/client/bundle/format-C7qb6Cn-.js +1 -0
  62. package/dist/client/bundle/fr-CY8q9pj4.js +169 -0
  63. package/dist/client/bundle/main-DktU0GfB.js +2 -0
  64. package/dist/client/bundle/pixelify-sans-cyrillic-400-normal-Ckz2YJkH.woff2 +0 -0
  65. package/dist/client/bundle/pixelify-sans-cyrillic-400-normal-DfOZNMlW.woff +0 -0
  66. package/dist/client/bundle/pixelify-sans-cyrillic-500-normal--wrb4dVK.woff2 +0 -0
  67. package/dist/client/bundle/pixelify-sans-cyrillic-500-normal-CR9SIKMr.woff +0 -0
  68. package/dist/client/bundle/pixelify-sans-cyrillic-600-normal-B3EuUOZG.woff +0 -0
  69. package/dist/client/bundle/pixelify-sans-cyrillic-600-normal-BhqNJYOZ.woff2 +0 -0
  70. package/dist/client/bundle/pixelify-sans-cyrillic-700-normal-BrZTw8tu.woff +0 -0
  71. package/dist/client/bundle/pixelify-sans-cyrillic-700-normal-CYtG5Rfp.woff2 +0 -0
  72. package/dist/client/bundle/pixelify-sans-latin-400-normal-DLrIX9QE.woff2 +0 -0
  73. package/dist/client/bundle/pixelify-sans-latin-400-normal-JapMNN6Z.woff +0 -0
  74. package/dist/client/bundle/pixelify-sans-latin-500-normal-Bq6pAlou.woff +0 -0
  75. package/dist/client/bundle/pixelify-sans-latin-500-normal-DC052d-m.woff2 +0 -0
  76. package/dist/client/bundle/pixelify-sans-latin-600-normal-BNlgYbDL.woff +0 -0
  77. package/dist/client/bundle/pixelify-sans-latin-600-normal-Dd_Dy7u5.woff2 +0 -0
  78. package/dist/client/bundle/pixelify-sans-latin-700-normal-BctWAS0u.woff +0 -0
  79. package/dist/client/bundle/pixelify-sans-latin-700-normal-D3Xxx3QE.woff2 +0 -0
  80. package/dist/client/bundle/pixelify-sans-latin-ext-400-normal-BkfTUL4s.woff +0 -0
  81. package/dist/client/bundle/pixelify-sans-latin-ext-400-normal-DdH6zlBQ.woff2 +0 -0
  82. package/dist/client/bundle/pixelify-sans-latin-ext-500-normal-BHT4w5qI.woff2 +0 -0
  83. package/dist/client/bundle/pixelify-sans-latin-ext-500-normal-Bkr-oq6R.woff +0 -0
  84. package/dist/client/bundle/pixelify-sans-latin-ext-600-normal-CDaIumwU.woff +0 -0
  85. package/dist/client/bundle/pixelify-sans-latin-ext-600-normal-Dha6RiOG.woff2 +0 -0
  86. package/dist/client/bundle/pixelify-sans-latin-ext-700-normal-BadXkHzZ.woff +0 -0
  87. package/dist/client/bundle/pixelify-sans-latin-ext-700-normal-ClyJstAh.woff2 +0 -0
  88. package/dist/client/bundle/ptypane-BrP-ENHg.css +1 -0
  89. package/dist/client/bundle/ptypane-NIZ2Y8QM.js +16 -0
  90. package/dist/client/bundle/room-name-CFJfHE5L.js +1 -0
  91. package/dist/client/bundle/simulator-BnBPS_Ws.js +7 -0
  92. package/dist/client/bundle/world-model-BIYmgAWC.js +1 -0
  93. package/dist/client/bundle/world-stream-BRkL9Eme.js +1 -0
  94. package/dist/client/index.html +41 -0
  95. package/dist/client/manifest.webmanifest +17 -0
  96. package/dist/server/index.js +40327 -0
  97. package/mod/README.md +193 -0
  98. package/mod/habblaud/.claude-plugin/plugin.json +11 -0
  99. package/mod/habblaud/hooks/hooks.json +4 -0
  100. package/mod/habblaud/hooks/register.ts +517 -0
  101. package/mod/habblaud-codex/hook.mjs +274 -0
  102. package/mod/habblaud-mensagens/.claude-plugin/plugin.json +11 -0
  103. package/mod/habblaud-mensagens/hooks/hooks.json +4 -0
  104. package/mod/habblaud-mensagens/hooks/register.ts +384 -0
  105. package/mod/habblaud-permissoes/.claude-plugin/plugin.json +11 -0
  106. package/mod/habblaud-permissoes/hooks/hooks.json +18 -0
  107. package/mod/habblaud-permissoes/hooks/permission-hook.mjs +265 -0
  108. package/mod/habblaud-pi/core.ts +325 -0
  109. package/mod/habblaud-pi/extension.ts +119 -0
  110. package/mod/habblaud-pi/package.json +12 -0
  111. package/package.json +96 -4
package/README.md CHANGED
@@ -1,3 +1,1606 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <img src="client/public/assets/brand/logo-mark@4x.png" width="96" alt="Busybits logo: a tile of small pixel-art blocks" />
3
+ </p>
2
4
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
5
+ <h1 align="center">Busybits</h1>
6
+
7
+ <p align="center">
8
+ <b>The virtual office for your Claude Code (and Codex) agents.</b><br />
9
+ Each project becomes a room, and each agent becomes a pixel-art character that shows, in real time, what it's doing.
10
+ </p>
11
+
12
+ <p align="center"><b>English</b> · <a href="README.pt-BR.md">Português</a> · <a href="README.es.md">Español</a> · <a href="README.fr.md">Français</a></p>
13
+
14
+ <p align="center"><sub>Based on <a href="https://github.com/marmottajr/habblaud">Habblaud</a> by Márcio Junior (MIT).</sub></p>
15
+
16
+ <p align="center">
17
+ <img alt="Node.js 22.12+" src="https://img.shields.io/badge/node-%E2%89%A522.12-5fa04e?logo=node.js&logoColor=white" />
18
+ <img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-7-3178c6?logo=typescript&logoColor=white" />
19
+ <img alt="Docker" src="https://img.shields.io/badge/Docker-ready-2496ed?logo=docker&logoColor=white" />
20
+ <img alt="Zero runtime dependencies" src="https://img.shields.io/badge/runtime%20dependencies-0-f08a3c" />
21
+ <img alt="Interface in Portuguese, English, Spanish and French" src="https://img.shields.io/badge/interface-PT%20%C2%B7%20EN%20%C2%B7%20ES%20%C2%B7%20FR-4aa8e8" />
22
+ </p>
23
+
24
+ <p align="center">
25
+ <img src="docs/screenshots/office.gif" width="820" alt="Animation of a Busybits room: characters typing at their desks, subagents with badges and activity bubbles" />
26
+ </p>
27
+
28
+ ---
29
+
30
+ You open Claude Code in several projects, launch subagents, leave tasks running… and lose track of who's doing
31
+ what. **Busybits** turns all of that into an office you can take in at a glance: who's typing, who raised a hand
32
+ because they **need you**, who delivered their work and left, who went for a coffee while waiting for the next
33
+ instruction — and how much of each account you've already used in the 5-hour session and in the week.
34
+
35
+ And when two or more agents have nothing to do, the office gets a **social life**: each one has its own personality,
36
+ and they watch soccer together in the lounge, play video games and ping-pong, gossip in the kitchen, freshen up at the
37
+ mirror and bet coins on rock-paper-scissors. See [Social life](#social-life).
38
+
39
+ Everything runs on your machine, reading the files Claude Code itself already writes (plus only the `alias` lines in
40
+ your shell, to give each account its letter). Nothing leaves the computer: Busybits doesn't read credentials or make
41
+ external calls.
42
+
43
+ ## Contents
44
+
45
+ - [What it looks like](#what-it-looks-like)
46
+ - [Installation](#installation)
47
+ - [One office for all your machines](#one-office-for-all-your-machines-optional)
48
+ - [How to use](#how-to-use)
49
+ - [Accounts and usage (5-hour and weekly)](#accounts-and-usage-5-hour-and-weekly)
50
+ - [Configuration](#configuration)
51
+ - [Habblaud World](#habblaud-world)
52
+ - [How it works](#how-it-works)
53
+ - [Privacy and security](#privacy-and-security)
54
+ - [Development](#development)
55
+ - [Troubleshooting](#troubleshooting)
56
+ - [Disclaimer](#disclaimer)
57
+ - [License](#license)
58
+ - [Social life](#social-life)
59
+
60
+ ## What it looks like
61
+
62
+ **Overview.** The building has a lobby with elevators, a kitchen, restrooms and a lounge; each project with an open
63
+ session gets its own room along the hallway. At the top, the counters and each account's usage; on the left, the rooms
64
+ and agents; at the bottom, the activity feed.
65
+
66
+ ![Busybits overview: building with lobby, kitchen, restrooms, lounge and project rooms; sidebar with rooms and agents; account usage at the top; activity feed at the bottom](docs/screenshots/overview.png)
67
+
68
+ <table>
69
+ <tr>
70
+ <td width="50%"><img src="docs/screenshots/agent-details.png" alt="Details drawer of an agent with tasks, subagents, timeline and stats" /></td>
71
+ <td width="50%"><img src="docs/screenshots/night.png" alt="The office at night, with streetlights on and lit rooms" /></td>
72
+ </tr>
73
+ <tr>
74
+ <td><b>Agent details:</b> current activity, tasks with progress, subagents, timeline and stats.</td>
75
+ <td><b>Day and night:</b> the sky in the windows and the lighting follow local time.</td>
76
+ </tr>
77
+ </table>
78
+
79
+ <table>
80
+ <tr>
81
+ <td width="42%"><img src="docs/screenshots/collab.png" alt="Subagent delivering the result to the main agent while another agent asks for permission" /></td>
82
+ <td width="58%">
83
+ <b>Collaboration in plain sight.</b> Subagents are coworkers with their own names and badges: they arrive by elevator, work in
84
+ the project's room and, when they finish, walk over to the agent that called them to deliver the result (📦) before leaving.<br /><br />
85
+ <b>Needs you.</b> When an agent is waiting for a permission or an answer in the terminal, it rushes to its desk and
86
+ raises a hand, with a blinking alert — and a notice pops up on screen (optionally with sound and a browser notification).
87
+ You can approve, answer the question or send the next instruction right there.
88
+ </td>
89
+ </tr>
90
+ </table>
91
+
92
+ <table>
93
+ <tr>
94
+ <td width="58%">
95
+ <b>Waiting on shell.</b> When the agent finishes its turn but leaves a command running (tests, build,
96
+ deploy…), it doesn't wander off: it stays at its desk with an hourglass flipping over its head, the terminal showing
97
+ progress and a bubble with the command and the elapsed time. And the wait turns into comedy: first it eats popcorn watching the
98
+ terminal; after 3 min it crosses its arms and spins in its chair; after 10 min it gathers cobwebs; after
99
+ 25 min it dozes off. When the command finishes, it stands up and celebrates with confetti — or gets a rain cloud, if
100
+ it failed. In the sidebar list and in the details, a timer shows how long each command has been running.
101
+ </td>
102
+ <td width="42%"><img src="docs/screenshots/shell-wait.png" alt="Agent eating popcorn at its desk, with an hourglass over its head and the bubble 'Run the test suite · 1 min'; in the front row, a coworker has been waiting longer, with cobwebs on the chair and the terminal showing progress" /></td>
103
+ </tr>
104
+ </table>
105
+
106
+ **The lights go out.** When you close a project's last session, the last character walks to the light switch,
107
+ turns off the lights and leaves by elevator — and the room is taken apart, becoming a garden until a new project
108
+ arrives. If the garden ended up between two rooms, the farthest room moves there: it's set up in the empty spot,
109
+ everyone walks over to it, and the old address goes dark and is taken apart. That way the building has no gaps and
110
+ shrinks on its own.
111
+
112
+ | 1. The room is set up, still dark | 2. Someone turns on the lights and everyone works | 3. The last one leaves and turns off the lights | 4. The room becomes a garden |
113
+ | --- | --- | --- | --- |
114
+ | ![Room being set up, with the furniture appearing and the lights off](docs/screenshots/lifecycle-1.png) | ![Lit room with three agents working at their desks](docs/screenshots/lifecycle-2.png) | ![Room with the lights off and the furniture still in place, after everyone left](docs/screenshots/lifecycle-3.png) | ![The room's lot turned into a garden](docs/screenshots/lifecycle-4.png) |
115
+
116
+ <table>
117
+ <tr>
118
+ <td width="34%"><img src="docs/screenshots/mobile.png" alt="Busybits on a phone, with account usage at the top" /></td>
119
+ <td>
120
+ <b>On your phone too.</b> The interface adapts to small screens: account usage stays at the top, the room list
121
+ becomes a drawer and the details open from the bottom up. See how to allow access over the local network in
122
+ <a href="#open-on-your-phone-optional">Open on your phone</a>.
123
+ </td>
124
+ </tr>
125
+ </table>
126
+
127
+ > The images above use **demo mode** (made-up projects, people and accounts).
128
+
129
+ ## Installation
130
+
131
+ ### Install (npm)
132
+
133
+ Needs **Node.js 22.12+** and npm. No clone, no build:
134
+
135
+ ```bash
136
+ npx busybits setup --service
137
+ # or, to keep the command around:
138
+ npm i -g busybits && busybits setup --service
139
+ ```
140
+
141
+ `busybits setup` installs the packaged version under `~/.busybits`, installs the Claude Code mod, the Pi extension and
142
+ the Codex hooks (each only when that tool is present), and with `--service` an always-on user service (`busybits.service`
143
+ on Linux, `com.busybits.server` on macOS). Then open **http://localhost:4747**. Setup options: `--service`, `--port <n>`,
144
+ `--no-claude`, `--no-pi`, `--no-codex`, `--dry-run`, `--ignore-node`.
145
+
146
+ | Command | What it does |
147
+ | --- | --- |
148
+ | `busybits status` | shows the install and the service state |
149
+ | `busybits start` | runs the server in the foreground |
150
+ | `busybits update` | updates to the latest version (see [Updating](#updating)) |
151
+ | `busybits update --rollback` | goes back to the previous version |
152
+ | `busybits uninstall` | removes extensions and services (`--purge` also deletes the data) |
153
+ | `busybits pair` | pairs this machine as a satellite of a central Busybits |
154
+
155
+ **Where things live**
156
+
157
+ - `~/.busybits` (`BUSYBITS_HOME` changes it): the installed versions, the command shims and the marketplace.
158
+ - Data stays in `~/.habblaud` and the env file in `~/.config/habblaud/env`, as before; an existing clone install is taken
159
+ over in place and keeps its pairing and TLS state.
160
+ - The old `habblaud.service` / `com.habblaud.server` are replaced by `busybits.service` / `com.busybits.server` (setup
161
+ removes the legacy ones).
162
+
163
+ **Good to know**
164
+
165
+ - **Codex:** after the first takeover, re-approve the Busybits hooks in Codex `/hooks`.
166
+ - **Linux:** `node-pty` (terminal takeover) compiles only when build tools (a C/C++ toolchain and Python, for node-gyp) are installed;
167
+ without them the install still works and terminal takeover stays off.
168
+ - **Node and the service:** the packaged service starts through a shim that looks up Node at each start, so switching
169
+ Node versions is safe. A service installed **from a clone** pins the Node that ran `npm run setup`; rerun setup after
170
+ changing Node.
171
+ - **Windows:** `busybits setup`, `update` and `uninstall` refuse there and point to `scripts/windows/install-satellite.ps1`
172
+ (run from a clone).
173
+
174
+ ### From a clone (development)
175
+
176
+ On a new machine, from a clone of the repository:
177
+
178
+ ```bash
179
+ git clone https://github.com/marmottajr/habblaud.git
180
+ cd habblaud
181
+ npm run setup
182
+ ```
183
+
184
+ `npm run setup` does everything below that is missing and skips what is already done, so it is safe to run again:
185
+
186
+ 1. checks Node (22.12+ or 24; otherwise it tells you how to get it with [nvm](https://github.com/nvm-sh/nvm):
187
+ `nvm install 24 && nvm use 24`);
188
+ 2. `npm ci` (only when `node_modules` is missing or older than `package-lock.json`) and `npm run build` (only when
189
+ `dist/` is missing or older than the code);
190
+ 3. writes `~/.config/habblaud/env` (`HABBLAUD_ENV_FILE` or `XDG_CONFIG_HOME` change the place) with the port and the
191
+ Claude Code accounts, **leaving out** leftover folders such as `.claude.retired` or `.claude.backup-…` that would
192
+ otherwise show up as phantom accounts. The server reads this file by itself on start-up (what is already in the
193
+ environment wins); only the block between the `habblaud setup` marks is rewritten;
194
+ 4. installs the Claude Code mod in those accounts (`npm run mod:install`), if `claude` is in the `PATH`;
195
+ 5. installs the **habblaud-pi** extension in Gentle Shell (`~/.gentle-shell/agent`) and Pi (`~/.pi/agent`), whichever
196
+ exist (`npm run pi:install`; see [Gentle Shell](#gentle-shell));
197
+ 6. with `npm run setup -- --service`, installs an always-on **user** service (no sudo): a systemd user unit on Linux
198
+ (`~/.config/systemd/user/busybits.service`) or a LaunchAgent on macOS (`com.busybits.server`) that runs the built
199
+ server with that environment. Windows has no service: use `npm start`.
200
+
201
+ ```bash
202
+ npm run setup -- --dry-run # shows what it would do, changes nothing
203
+ npm run setup:status # what is ready and what is missing
204
+ npm run setup:uninstall # removes the service, the Pi extension and the mod (--purge also deletes the env file)
205
+ ```
206
+
207
+ Other options: `--port <n>`, `--no-claude`, `--no-pi`, `--rebuild`, `--ignore-node`. Then run `npm start` (or let the
208
+ service start it) and open **http://localhost:4747**. The steps below are the manual version of the same thing.
209
+
210
+ ### Requirements
211
+
212
+ - **macOS** (tested) or Linux.
213
+ - **[Claude Code](https://code.claude.com)** installed, with one or more accounts (2.1.287 or newer for the mod).
214
+ - **Node.js 22.12+** and **npm** (developed with Node 24; Docker already uses Node 24).
215
+ - **Docker Desktop** (or Docker Engine with Compose v2), if you're going to run it in a container.
216
+
217
+ ### 1. Get the project
218
+
219
+ ```bash
220
+ git clone https://github.com/marmottajr/habblaud.git
221
+ cd habblaud
222
+ npm install
223
+ ```
224
+
225
+ > `npm install` only downloads build tools (Vite, TypeScript, tsx…). The Busybits server has no
226
+ > runtime dependencies: it only uses Node's built-in modules.
227
+
228
+ ### 2. Start Busybits
229
+
230
+ **Option A — Docker (recommended for keeping it always on)**
231
+
232
+ ```bash
233
+ npm run docker:up
234
+ ```
235
+
236
+ The script detects your Claude Code accounts, mounts only the folders it needs (read-only), builds
237
+ the image and starts the container — which restarts on its own along with Docker. Open **http://localhost:4747**.
238
+
239
+ **Option B — Node, without Docker**
240
+
241
+ ```bash
242
+ npm run build
243
+ npm start
244
+ ```
245
+
246
+ Open **http://localhost:4747**. For development, use `npm run dev` (server + Vite with hot reload).
247
+
248
+ Now open Claude Code in any project and watch your agent arrive by elevator. 🎉
249
+
250
+ ### 3. Install the Busybits mod in Claude Code (recommended)
251
+
252
+ ```bash
253
+ npm run mod:install # o mod e os plugins de permissões e de mensagens, em cada conta
254
+ npm run mod:install -- --sem-permissoes # sem responder permissões e perguntas pelo escritório
255
+ npm run mod:install -- --sem-mensagens # sem mandar mensagens aos agentes pelo escritório
256
+ ```
257
+
258
+ Busybits ships a [mod](https://code.claude.com/docs/en/plugins/mods/overview) (a plugin that runs inside
259
+ Claude Code) and installs it in each account, through `claude plugin` itself, from this folder. With it:
260
+
261
+ - each account's **5-hour and weekly usage** shows up live in Busybits;
262
+ - the terminal shows a line when **another session needs you** (permission or answer);
263
+ - the **`/busybits`** command becomes available in Claude Code, and the mod's texts follow your language (English, Spanish, Portuguese or French, from `HABBLAUD_LANG`, `LC_ALL`, `LC_MESSAGES`, `LANG` or `LANGUAGE`; English by default). If you installed it before it was renamed (`habblaud`), run `npm run mod:install` once: it swaps the old plugin for `busybits`;
264
+ - you can **approve or deny permission requests from the office** ("Do you want to…") and **answer the agent's
265
+ questions**, with the `busybits-permissions` plugin (see [Answering from the office](#answering-from-the-office));
266
+ - you can **send messages** to the agent from the office, as if you were typing in its terminal, with the
267
+ `busybits-messages` plugin (see [Sending messages](#sending-messages)).
268
+
269
+ It requires **Claude Code 2.1.287 or newer** (`claude --version`). The mod runs inside each session, with your
270
+ permissions, and only accesses what is listed in [`mod/README.md`](mod/README.md); to check without running anything,
271
+ `claude plugin validate mod/habblaud` shows the events it handles and the calls it makes. Sessions that are already open
272
+ load the mod with `/reload-plugins` (or when reopened). If the account had the old setup (below), `mod:install` removes the
273
+ tap and the hook from `settings.json` (with a backup), because the mod does the same thing. Check with `npm run mod:status`; to
274
+ undo: `npm run mod:uninstall`.
275
+
276
+ > The mod is loaded from this folder. If you move the folder, run `npm run mod:install` again.
277
+
278
+ <details>
279
+ <summary><b>Claude Code older than 2.1.287: the old way</b></summary>
280
+
281
+ Without mods, live usage and answering from the office come from two installers that edit each account's
282
+ `settings.json` (with a backup first):
283
+
284
+ ```bash
285
+ npm run usage:install # põe um "tap" na frente do statusline de cada conta, que captura o uso de 5h/semanal
286
+ npm run hooks:install # acrescenta o hook PermissionRequest, para responder permissões pelo escritório
287
+ ```
288
+
289
+ Your statusline keeps looking the same. To undo: `npm run usage:uninstall` and `npm run hooks:uninstall`.
290
+ Both point to this folder: if you move the folder, run them again (until then, the accounts' statusline shows an error).
291
+ When you update Claude Code, switch to the mod: `npm run mod:install` removes the old tap and hook (with a backup) so
292
+ you don't end up with two of them capturing usage or answering the same request.
293
+
294
+ </details>
295
+
296
+ ### 4. Codex in the office (optional)
297
+
298
+ If you also use OpenAI's **Codex** (the `codex` CLI or the app), its sessions join the same office: each
299
+ project is a room — the same room as Claude Code, when both are open in the same project — and each session is a
300
+ character with the **CODEX** tag. Busybits finds the Codex folder on its own (`~/.codex`, `CODEX_HOME` or `~/.codex*`) and
301
+ reads the conversations, without installing anything. To see Codex **live** (what it's doing right now, who needs you) and
302
+ approve commands from the office, install the hooks:
303
+
304
+ ```bash
305
+ npm run codex:install # acrescenta os hooks do Busybits em ~/.codex/hooks.json (backup antes; os outros ficam)
306
+ npm run codex:status # confere
307
+ ```
308
+
309
+ Then **open Codex and approve the Busybits hooks in `/hooks`**: Codex only runs a new hook after you
310
+ approve it (Busybits never writes that approval). With Busybits in Docker, to send messages to Codex sessions,
311
+ also keep `npm run codex:bridge` running on the Mac (see [Codex](#codex)).
312
+
313
+ ### Open on your phone (optional)
314
+
315
+ By default Busybits only accepts connections from the computer it runs on. To open it on your phone (on the same Wi-Fi), with Docker:
316
+
317
+ ```bash
318
+ printf 'HABBLAUD_BIND=0.0.0.0\n' > .env
319
+ npm run docker:up -- --no-build
320
+ ```
321
+
322
+ Then open `http://<ip-do-computador>:4747` on your phone (on macOS: `ipconfig getifaddr en0`; if it comes back empty,
323
+ `ipconfig getifaddr en1`). In Node mode, use `HABBLAUD_HOST=0.0.0.0 npm start`.
324
+
325
+ > ⚠️ With this, any device on the network can see the agents' activity (commands, files, session titles). Use it
326
+ > only on trusted networks. The [terminal](#terminal) (and with it, answering and sending messages from the office) stays
327
+ > off while the port is exposed. To go back: delete `.env` and run `npm run docker:up -- --no-build`.
328
+
329
+ #### Phone with login and HTTPS (approving requests)
330
+
331
+ Instead of exposing the main port, open a **second port with a username, a password and HTTPS**. Port 4747 stays on the
332
+ computer only (hooks, plugins and your browser keep working without a login); the remote port goes to the network and
333
+ every request on it requires a login. What separates the two is the port the connection arrived on, never the Host
334
+ header. Nothing of this exists until you run the setup: without it, no extra port is published.
335
+
336
+ ```bash
337
+ npm run remote:setup # usuário, senha, nome do endereço e (opcional) um endereço próprio
338
+ npm run docker:up
339
+ ```
340
+
341
+ `remote:setup` writes the username (`HABBLAUD_REMOTE_USER`) and only the password **hash** (scrypt,
342
+ `HABBLAUD_REMOTE_PASSWORD_HASH`) to `.env` — plain-text passwords (`HABBLAUD_REMOTE_PASSWORD`) are intentionally rejected
343
+ by the server (see [Remote environment variables](server/README.md#acesso-remoto-pelo-celular-habblaud_remote_)).
344
+ It also creates a local CA and the server certificate in `~/.habblaud/remote-tls`, and leaves a service announcing
345
+ `<nome>.local` (`HABBLAUD_REMOTE_NAME`, default `habblaud`) on the network (mDNS; LaunchAgent on macOS, systemd on Linux).
346
+ Open `https://<nome>.local` on your phone (with `:4748` if port 443 was taken). The first time,
347
+ accept the warning, tap **Install the Busybits certificate** and trust it (iPhone: Settings › Profile Downloaded ›
348
+ Install, then Settings › General › About › Certificate Trust Settings; Android: Security › Encryption & credentials ›
349
+ Install a certificate › CA certificate), checking the fingerprint the setup showed.
350
+
351
+ - **Restricted CA:** it only signs `localhost`, `.local` names, your own address and private-network IPs. Even if its
352
+ key leaked, a certificate for any other site would be rejected by the phone that trusts it. Changing your own
353
+ address creates a new CA (install the certificate on the phone again). The CA key never goes into the container.
354
+ - **Own address** (e.g. `meuclaude.home`): goes into the certificate, but the phone only finds it with an entry in the
355
+ router's DNS pointing to the computer's IP. `<nome>.local` works without configuring anything.
356
+ - **What the phone can do:** by default, approve and deny permission requests. `HABBLAUD_REMOTE_ALLOW` in `.env`
357
+ accepts `permissions`, `messages`, `terminal` and `spawn`, separated by commas, or `none` (view only). The
358
+ interactive terminal never works from the phone.
359
+ - **Deliveries** (phone, with `terminal` allowed): the box button in the top bar lists what each agent finished, with
360
+ a summary and attachments (screenshots, PDFs, files it sent) that open with a tap.
361
+ - **New agent** (the **+** button): starts a Claude Code session in the background on the computer (`claude --bg`, in
362
+ the chosen folder), which shows up in the office and receives messages and permission requests through Busybits. In
363
+ a folder Claude Code doesn't trust yet, it opens the Claude app's new-session screen filled in, and you press Enter
364
+ there. **It comes turned off:** it needs `HABBLAUD_PTY=1` (the same opt-in as the
365
+ [interactive terminal](#interactive-terminal-take-over-new-session-and-end); in Docker, put it in `.env` and keep
366
+ `npm run codex:bridge` running on the computer) and, from the phone, `spawn` in `HABBLAUD_REMOTE_ALLOW` too.
367
+ - **New agent in herdr:** the dialog offers the providers installed on the computer (Claude Code, Gentle Shell and
368
+ Codex) and where to open the session: in the background (Claude Code only, as above), in a new herdr tab in a
369
+ workspace you pick, or in a split to the right or below an existing herdr pane. A split always creates a new pane and
370
+ never touches the one you picked; the folder chosen in the dialog wins over that pane's. It needs herdr running on
371
+ the computer, Habblaud outside Docker, and herdr's `default` session; otherwise those options show up disabled with a
372
+ hint. **Take over here** on a session opened there focuses its herdr pane. Whether herdr brings these sessions back
373
+ after a restart is **not verified yet** for any of the three providers (see
374
+ [`docs/herdr-resume-verification.md`](docs/herdr-resume-verification.md)). For Gentle Shell, herdr only records the
375
+ session through its pi integration: `herdr integration install pi` is how to enable resume, still unverified.
376
+ With herdr open and nothing chosen before, the dialog preselects a new herdr tab, also for Claude Code, so new
377
+ sessions live where herdr can bring them back; the last provider and destination you used are remembered.
378
+ - **Dictation** (in New agent and in the message box): needs `whisper-cli` and `ffmpeg` (`brew install whisper-cpp
379
+ ffmpeg`) and a multilingual model in `~/.local/share/whisper/` (`ggml-small.bin` gets more right than
380
+ `ggml-base.bin`; the `.en` ones only understand English). Without them, the Dictate button doesn't show up. The
381
+ voice never leaves the computer. `HABBLAUD_WHISPER_BIN`, `HABBLAUD_FFMPEG_BIN`, `HABBLAUD_WHISPER_MODEL` and
382
+ `HABBLAUD_DICTATION_LANGS` (default `pt,en`) adjust it.
383
+ - **Away from home (Tailscale):** with Tailscale on the computer and on the phone, `tailscale serve --bg --https=443
384
+ https+insecure://127.0.0.1:443` publishes the remote port (with login) only to your devices, with a valid
385
+ certificate at `https://<computador>.<tailnet>.ts.net`; add that name to `HABBLAUD_ALLOWED_HOSTS`. Always point it at
386
+ the remote port, never at 4747 (which has no login).
387
+ - **Session:** 30 days; changing the password (running the setup again) ends all of them, and **Settings › Phone
388
+ access › Sign out** ends the one on that device. After 5 wrong passwords in a row, each new attempt waits from 1 s up to 5 min.
389
+ - **IP changed?** `docker:up` re-issues the server certificate when the new IP is missing or when it's 30 days from
390
+ expiring, with the same CA (the phone keeps trusting it); the server swaps the certificate without restarting.
391
+ - **Turn off:** `npm run remote:setup -- --off` and `npm run docker:up`.
392
+
393
+ Without HTTPS the remote port doesn't start; `HABBLAUD_REMOTE_INSECURE_HTTP=1` forces plain HTTP (password and cookie
394
+ in the clear on the network). In Node mode: `HABBLAUD_REMOTE_PORT` and `HABBLAUD_REMOTE_HOST` (default
395
+ `0.0.0.0:4748`) and `HABBLAUD_REMOTE_TLS_DIR` (default `~/.habblaud/remote-tls/server`). In Docker: `HABBLAUD_REMOTE_BIND`
396
+ (default `0.0.0.0` from setup, or `127.0.0.1`) and `HABBLAUD_REMOTE_HTTP_PORT` (optional port 80 redirect).
397
+
398
+ ### One office for all your machines (optional)
399
+
400
+ Run Busybits on several computers (say a Mac, a Windows PC and WSL) and see every agent in **one** office. One machine
401
+ is the **central** (the office you open); the others are **satellites** that send their agents to it. Both modes are off
402
+ by default and are not available in Docker. If you use a single machine, nothing changes: with both modes off Busybits
403
+ behaves, writes and listens exactly as before.
404
+
405
+ **Requirements:** [Tailscale](https://tailscale.com) on every machine, and Node 24 on the satellites.
406
+
407
+ **1. Turn the central on.** Add `HABBLAUD_SATELLITES=1` to `~/.config/habblaud/env` and restart Busybits. It starts a
408
+ second listener on the machine's **Tailscale address only**, port `4749` (`HABBLAUD_CENTRAL_PORT`), with its own CA in
409
+ `~/.habblaud/central-tls`. Without a Tailscale address it does not listen (and says so in the log).
410
+
411
+ **2. Pair each satellite.** On the central, open **Settings › Machines › Generate pairing code**. The pairing text
412
+ (`busybits-pair:1:...`) is shown **once**, is valid for 10 minutes, and works for one machine. Then, on the satellite,
413
+ paste it through stdin (it stays out of `ps` and of your shell history):
414
+
415
+ ```bash
416
+ echo "busybits-pair:1:https://…" | npm run satellite:pair -- --label Mac --codex-wait
417
+ ```
418
+
419
+ Run `npm run satellite:pair` with nothing piped to get a masked prompt instead. `--pairing <text>` also works, but the
420
+ text is then visible in the process list: use it only in CI. The command checks the central's CA fingerprint **before**
421
+ sending the code, saves the token and the CA to `~/.habblaud/satellite/link.json` (owner only) and prints the two
422
+ variables to set: `HABBLAUD_CENTRAL_URL` (satellite mode) and `HABBLAUD_MACHINE_LABEL` (the name shown in the office).
423
+ Put them in the env file and **restart the satellite's Busybits**. With `--codex-wait`, the Codex hooks wait 120 s for
424
+ your answer (instead of 25 s), because the answer now travels through the central; changing this wait asks you to
425
+ approve the hooks again in `/hooks`.
426
+
427
+ **Windows.** In PowerShell, in the checkout, with Node 24:
428
+
429
+ ```powershell
430
+ "busybits-pair:1:https://…" | .\scripts\windows\install-satellite.ps1 -Label Windows
431
+ ```
432
+
433
+ The script installs and builds, pairs (piping, or the masked prompt when nothing is piped; `-Pairing` is for CI only),
434
+ writes the env file and registers a Task Scheduler task at logon (no admin rights). The task runs a wrapper that
435
+ restarts the satellite after a crash (5 s, backing off to 60 s) and logs each restart to
436
+ `%USERPROFILE%\.habblaud\satellite-restarts.log`. Start it with `Start-ScheduledTask -TaskName 'Busybits satellite'`.
437
+ `-DryRun` prints every step and changes nothing; `scripts\windows\uninstall-satellite.ps1` removes the task.
438
+
439
+ **WSL.** Pair as above, then add `HABBLAUD_CENTRAL_URL=<printed url>` and `HABBLAUD_MACHINE_LABEL=WSL` to
440
+ `~/.config/habblaud/env` (the file `busybits.service` already reads) and run `systemctl --user restart busybits.service`.
441
+
442
+ **What works on a remote machine:** live agents in their rooms, messages (with images), permission requests,
443
+ agent detail, terminal and transcript view, session history, deliveries, day stats, the timelapse and usage meters.
444
+ **Taking over a terminal and ending a session** also work (phase 2): the satellite needs `HABBLAUD_PTY=1`; without it
445
+ the central shows the reason. The terminal window displays the machine's label; a temporary link drop appears inline
446
+ in yellow and recovery in green. **Not yet:** starting a **New agent** on a remote machine (phase 3).
447
+
448
+ **Limits and behaviour**
449
+
450
+ - A machine shows as **offline** after 30 s without news, and is **hidden** after 10 min. Its agents leave the list while
451
+ it is offline.
452
+ - A message to an offline machine fails (at once when the central already shows it offline, otherwise after up to
453
+ 60 s) and **keeps the text you typed**. Images are capped at 32 MB per message; a message with large images travels
454
+ to the machine on its own, so it never delays or drops other actions.
455
+ - At most 4 buffered reads (detail, history, stats, deliveries) run per machine at a time. The merged lists
456
+ (deliveries, history, stats) can be **partial** for a moment when a machine is slow; the page says so.
457
+ - The timelapse records remote agents only while the central is up. Remote agents count in the day stats as each
458
+ satellite reports them.
459
+ - At most 4 remote terminals run per machine at a time.
460
+ - Error messages that come from a satellite arrive in that satellite's language.
461
+
462
+ **Security**
463
+
464
+ - The central listens only on its Tailscale address, over TLS with its own CA (never the phone's CA). The satellite
465
+ **pins** that CA at pairing and talks only to it.
466
+ - Tokens are stored **hashed** on the central and can be revoked: **Settings › Machines › Revoke** takes effect
467
+ immediately and the machine disappears from the office. Re-pair to bring it back.
468
+ - Generating codes and revoking are local-only: they never work through the phone's remote port.
469
+ - Pairing attempts share **one** lockout across the whole tailnet (5 wrong codes, then a wait of up to 300 s), so
470
+ anyone on your tailnet can delay a pairing. They cannot pair without a valid code.
471
+ - The central never trusts what a satellite says about content types: it relays only JSON, and serves files sandboxed.
472
+
473
+ ### Updating
474
+
475
+ The version in use shows up in the top bar, next to "Connected", and in **Settings › About**. On a packaged install,
476
+ Busybits checks npm every 6 hours by default (clone and Docker installs: off; `HABBLAUD_UPDATE_CHECK=1` or `0` overrides
477
+ it). When there is a new version, the green **New version** badge appears in place of the number. **About** has the link
478
+ to what changed (also in [`CHANGELOG.md`](CHANGELOG.md)), the **Check now** button and, on a packaged install, **Update
479
+ now**, which runs `busybits update` outside the service. From a terminal:
480
+
481
+ ```bash
482
+ busybits update # to the latest version
483
+ busybits update --check # only shows the current and the latest version
484
+ busybits update --to 1.2.0 # to a specific version
485
+ busybits update --global # also refreshes the global busybits command
486
+ busybits update --rollback # back to the previous version
487
+ ```
488
+
489
+ - It refuses to start while another update runs (lock file `~/.busybits/update.lock`; if none is really running, delete it).
490
+ - If the new version fails its setup or does not answer `/api/health` within 30 s, it rolls back to the previous one (the `/api/health` check and its rollback only happen when a background service is installed; a setup failure always rolls back).
491
+ - Interrupting it with Ctrl-C during the health wait usually leaves the **new** version active: run
492
+ `busybits update --rollback` to go back.
493
+ - Windows: `busybits update` is not available; see the Install section.
494
+
495
+ **From a clone** (or Docker):
496
+
497
+ ```bash
498
+ git pull
499
+ npm install
500
+ npm run docker:up # ou: npm run build && npm start (e depois npm run mod:install)
501
+ ```
502
+
503
+ > If `git pull` stops with "Your local changes to the following files would be overwritten by merge:
504
+ > package-lock.json", run `git checkout -- package-lock.json` and try again: up to 0.4.0, `npm install` changed that
505
+ > file.
506
+
507
+ `docker:up` also updates the mod in the accounts where it's already installed (it never installs it on its own) and tells you:
508
+ "Mod updated to 0.3.0 on Account D; open sessions: /reload-plugins". In Node mode, run `npm run mod:install`
509
+ after updating. To have Busybits check npm for new versions, use `HABBLAUD_UPDATE_CHECK=1` (in `.env`, for Docker).
510
+
511
+ #### Coming from CodeTown
512
+
513
+ Busybits was called **CodeTown** up to 0.3.2. After `git pull`, run once:
514
+
515
+ ```bash
516
+ npm install
517
+ npm run mod:install # troca o marketplace e os plugins codetown pelos habblaud, em cada conta
518
+ npm run docker:up # tira o container codetown e copia os dados do volume antigo para o novo
519
+ ```
520
+
521
+ - **Mod:** until you run `mod:install`, the accounts' Claude Code complains about the `codetown` marketplace (the
522
+ `mod/codetown*` folders were renamed). `docker:up` warns you, but doesn't switch it on its own.
523
+ - **Docker:** the old volume (`codetown_codetown-data`) is left untouched. After checking that the characters' names
524
+ came over, delete it with `docker volume rm codetown_codetown-data`, and the old image with `docker image rm codetown:local`.
525
+ - **Local folder:** `~/.codetown` becomes `~/.habblaud` on its own (in the server, in `docker:up` and in `mod:install`).
526
+ - **Browser:** preferences and coins move to the new keys the first time the page opens.
527
+ - **Variables:** the `CODETOWN_*` ones no longer work; rename them to `HABBLAUD_*` in `.env` (e.g. `HABBLAUD_BIND`). The
528
+ server and `docker:up` warn you when they find an old one.
529
+ - **Repository:** it's now `github.com/marmottajr/habblaud` (GitHub redirects the old address). To fix your
530
+ clone: `git remote set-url origin https://github.com/marmottajr/habblaud.git`. The local folder can keep its
531
+ old name.
532
+ - `settings.json` backups made before the switch keep the name `settings.json.codetown-backup-<data>`.
533
+
534
+ ### Uninstalling
535
+
536
+ ```bash
537
+ busybits uninstall --dry-run # shows what would be removed
538
+ busybits uninstall # removes the service, the Pi extension, the Codex hooks and the mod
539
+ busybits uninstall --purge # also deletes the Busybits data
540
+ npm rm -g busybits # only if you installed it globally
541
+ ```
542
+
543
+ **From a clone** (or Docker):
544
+
545
+ ```bash
546
+ npm run mod:uninstall # tira o mod, os plugins de permissões e de mensagens e o marketplace
547
+ npm run codex:uninstall # tira os hooks do Busybits do Codex (os outros ficam)
548
+ npm run docker:down # para o container
549
+ docker volume rm habblaud_habblaud-data # apaga os dados do container (nomes, salas, linha do tempo e estatísticas)
550
+ docker image rm habblaud:local # apaga a imagem
551
+ rm -rf ~/.habblaud # apaga os dados locais (uso capturado, nomes, salas, linha do tempo e estatísticas)
552
+ ```
553
+
554
+ Then just delete the project folder — run `mod:uninstall` **first**, or the accounts' Claude Code will start
555
+ complaining about the missing marketplace. If you used the old way, also run `npm run usage:uninstall` (restores the
556
+ original statusline) and `npm run hooks:uninstall` (removes the permission hook); without them, the accounts' statusline starts
557
+ showing an error (and the hook, failing silently). `mod:install`, which removes the old tap and hook, and the old installers and
558
+ uninstallers leave `settings.json.habblaud-backup-<data>` copies in each account's folder (e.g.
559
+ `~/.claude/`); delete them if you no longer need them.
560
+
561
+ ## How to use
562
+
563
+ ### What each character is doing
564
+
565
+ | State | What you see |
566
+ | --- | --- |
567
+ | **Working** | At the desk, typing. The monitor and a bubble show the activity: 📖 reading, ✏️ editing, 💻 terminal, 🧪 tests, 🌐 searching… |
568
+ | **Needs you** | Rushes to the desk and raises a hand, with a blinking alert: it's waiting for a permission or an answer in the terminal. |
569
+ | **Waiting on shell** | Finished its turn but left a command running (tests, build, deploy…), so it stays at the desk with an hourglass flipping over its head and the terminal in progress: it eats popcorn while watching, after 3 min it crosses its arms and spins in its chair, after 10 min it gathers cobwebs and after 25 min it dozes off; when the command finishes, it stands up and celebrates with confetti (or gets a rain cloud, if it failed). After 40 s, if there are coworkers with nothing to do, it may head out to a hangout — with the hourglass over its head. |
570
+ | **Waiting for background agents** | Finished its turn while background agents are still running. It waits in an idle-like pose; the terminal shows each agent's type, task, elapsed time and known token count. A resumed agent becomes active again until its next completion notification. |
571
+ | **Idle** | Finished its turn and wanders around: coffee in the kitchen, the water cooler, the restroom, the lounge couch, the phone on the beanbag, the mirror. With idle coworkers around, it joins a hangout: TV, video games, ping-pong, a kitchen chat, rock-paper-scissors (see [Social life](#social-life)). After 10 min without moving, it dozes off — but a coworker may wake it up for a hangout. |
572
+ | **Subagent done** | Walks over to the agent that called it, delivers the result and leaves by elevator. |
573
+ | **Session ended** | Leaves; if it was the last one in the room, it turns off the lights on the way out. |
574
+
575
+ Each character has a **unique Brazilian name** (Marina, Henrique, Luan…) that stays as long as the session exists, and
576
+ a **colored chip with the account letter** (C, D…).
577
+
578
+ ### Interface
579
+
580
+ - **Top:** counters (rooms, agents, working, subagents, shells running, need you) and a **per-account usage**
581
+ card. The shells counter only shows up while some command is running; click it to go to whoever is waiting.
582
+ Below the logo are the connection and the version in use, which turns into the **New version** badge when a new version comes out (see
583
+ [Updating](#updating)).
584
+ - **Side panel:** search, account filter and the list of rooms with their agents and subagents.
585
+ - **Details drawer:** click a character (in the building or in the list) to see activity, tasks, subagents,
586
+ timeline and stats (tools, tokens, cost, lines changed, model, branch).
587
+ - **Feed:** the latest activity across the whole office.
588
+ - **Settings (⚙):** names, bubbles, how much idle agents wander around, day/night cycle, sounds, browser notifications,
589
+ FPS limits (60/30/15 FPS) and pause when tab is hidden, demo mode and **About** (version in use and new version). **Help (?):** full legend and shortcuts.
590
+ - **Performance panel:** the gauge icon in the top bar opens real-time resource usage per machine (central and satellites: CPU, RSS/heap memory, event loop delay p99, uptime, workload counters and 10-minute sparklines) and in the browser (FPS, frame time p50/p95 as GPU proxy, long tasks, JS heap, DOM nodes and FPS cap options). Polling runs only while the panel is open and visible.
591
+ - **My day (📊):** where the day's time went (see [My day](#my-day)). **Timelapse** and **Session history** (the clocks
592
+ in the top bar): see [Day timelapse](#day-timelapse) and [Terminal](#terminal).
593
+
594
+ **Camera:** drag to move, scroll to zoom, double-click a character to follow it.
595
+
596
+ **Shortcuts:** `/` search · `F` follow the selected one · `T` terminal · `L` timelapse · `M` my day · `P` next request
597
+ (permission or question) · `O` or `0` overview · `Esc` clear selection · `[` side panel · `]` feed · arrows/`WASD` move ·
598
+ `+` `-` zoom · `?` help.
599
+
600
+ ### Office themes
601
+
602
+ In **Settings → Appearance → Office theme**, choose:
603
+
604
+ - **Automatic** (default): follows the calendar, in local time. Halloween from October 1 to 31, Christmas from
605
+ November 1 to December 26 and, the rest of the year, the original look.
606
+ - **None**: always the original look.
607
+ - **Christmas**: wreaths, warm lights, trees with presents, Christmas rugs, snow on the windows and Santa hats on the characters.
608
+ - **Halloween**: pumpkins, decorative ghosts, cobwebs, bats, purple lights, themed rugs and costume accessories.
609
+
610
+ The switch is immediate and the choice is saved in this browser. The themes keep the agents' paths,
611
+ activities and animations. The day/night cycle is still a separate option.
612
+
613
+ <table>
614
+ <tr>
615
+ <td width="50%"><img src="docs/screenshots/seasonal-christmas.png" alt="Office with the Christmas theme: trees with presents in the corners of the rooms, wreaths and lights on the walls, red rugs and characters in Santa hats" /></td>
616
+ <td width="50%"><img src="docs/screenshots/seasonal-halloween.png" alt="Office with the Halloween theme: pumpkins and ghosts in place of the plants, cobwebs and bats on the walls, purple rugs and characters in costume" /></td>
617
+ </tr>
618
+ </table>
619
+
620
+ ### Languages
621
+
622
+ The interface is in **Portuguese, English, Spanish and French**. It follows the browser's language; in
623
+ **Settings › Language** you can pin one (the choice is saved in this browser). The texts the server builds
624
+ (activities, notices, terminal, logs and the install scripts) follow `HABBLAUD_LANG` and, without it, the
625
+ system language, and in English when neither names a supported language. For another language set `HABBLAUD_LANG`
626
+ (`pt-BR`, `en`, `es` or `fr`; in Docker, in `.env`), for example `HABBLAUD_LANG=es`. Any text without a translation shows
627
+ up in Portuguese.
628
+
629
+ ### Day, night and sounds
630
+
631
+ The office follows **local time**: late at night and in the evening the lawn and the street turn bluish and dark, the streetlights,
632
+ the lamps, the machines and the monitors that are on cast halos of light, the rooms with people in them are lit (the lights that
633
+ go out when a room empties still apply), the cars drive by with their headlights on and fireflies show up in the garden. At
634
+ dawn (~5–7 a.m.) and at dusk (~5–7 p.m.) everything takes on a warm tone, and during the day the sun comes in through the windows and
635
+ draws strips of light on the floor — short at noon, long and orange in the late afternoon. In **Settings › Day/night
636
+ cycle** you can choose automatic, always day or always night; to test a time, use `?hora=21:30` in the URL.
637
+
638
+ **Sounds** come turned off. Turned on in **Settings › Sounds**, they're synthesized in the browser itself (no audio
639
+ files) and quiet: the typing of whoever is working in the rooms in view, the elevator "ding" when someone arrives or
640
+ leaves, the bell when someone needs you, the click of a finished task and the ping-pong and arcade sounds of the hangouts.
641
+ There's a master volume and each category can be turned on and off separately. With the tab hidden, only the bell rings.
642
+
643
+ ### Terminal
644
+
645
+ Click an agent and use **Open terminal** to see the session's conversation the way Claude Code shows it: the prompts, the
646
+ replies, each tool call (with the command or the diff) and the result, updated live. It works for main
647
+ agents and subagents; in demo mode, the conversation is made up.
648
+
649
+ At the bottom, for main agents, you can **type**: `Enter` sends and `Shift+Enter` adds a new line. The text goes
650
+ into the session as if you had typed it in its terminal (see [Sending messages](#sending-messages)); if the agent
651
+ is busy, it goes in when the agent finishes what it's doing. Subagents and sessions from the history stay read-only.
652
+
653
+ - **Search:** with the terminal focused, `Ctrl+F` (`⌘F` on Mac) or the magnifier in the header opens search in the conversation,
654
+ ignoring case and accents. The counter shows the position ("3/17"); `Enter` and `Shift+Enter` go to the next
655
+ and the previous one, expanding the collapsed blocks ("… +N lines") where the term is. Search keeps working while
656
+ new messages arrive. `Esc` closes the search; the next one closes the terminal.
657
+ - **Filter:** **All**, **Prompts only** (your prompts and the agent's final replies, without the intermediate steps)
658
+ or **No tools**.
659
+ - **Copy:** hover over (or focus) a prompt, a reply, a command or a result to copy it.
660
+ - **Session history:** the clock in the top bar lists the sessions from the last 7 days across all accounts (up to 150), grouped
661
+ by day, with search by title, project or account. An ended session opens in the terminal with the project, title and date in the
662
+ header and "Session ended at …" at the bottom; a session that's still open opens the agent's live terminal.
663
+
664
+ Since the terminal (and the history) shows the whole conversation, it only exists when Busybits is reachable **only from the
665
+ computer it runs on** (the default), and it only opens through `http://localhost` or `http://127.0.0.1`. With the port open to the network
666
+ (`HABBLAUD_BIND=0.0.0.0` or `HABBLAUD_HOST=0.0.0.0`), it stays off. Details in
667
+ [Privacy and security](#privacy-and-security).
668
+
669
+ ### Interactive terminal (take over, new session and end)
670
+
671
+ With `HABBLAUD_PTY=1` and running with `npm start` (outside Docker), each main agent's terminal window is
672
+ interactive: the drawer's **Open terminal** button, the shortcut next to each agent in the side list or the `T` key
673
+ open the same window, with tabs for the other agents in the same project.
674
+
675
+ - Session opened here: it's the real Claude Code (type, answer; Esc interrupts the agent, as in the terminal).
676
+ - Session opened in another terminal: **Take over here** (at the top of the window) ends the session there and continues the **same
677
+ conversation** here (`claude --resume <sessão>`, in the same folder and account). The character keeps its name. On Windows, the
678
+ terminal the session came from goes back to normal (Busybits turns off the mouse/keyboard modes that Claude turned on).
679
+ - **End** closes the session, whether it's here or in another terminal (the conversation is saved).
680
+ - **New session** (in the room's drawer) opens a new Claude Code in the project folder.
681
+
682
+ Taking over and ending ask for a second click; closing the window doesn't end the session. The window (and the agent's
683
+ drawer) can be dragged by its bar and resized from the corner; double-clicking the bar puts it back in place.
684
+ **It comes turned off:** turn it on with `HABBLAUD_PTY=1` (first read the warning in [Privacy and security](#privacy-and-security)).
685
+ It uses `node-pty`, `@xterm/headless` (optional dependencies) and the `claude` on your PATH (`HABBLAUD_CLAUDE_BIN` for
686
+ another one); it only accepts requests from the computer it runs on. On startup, Busybits opens a test terminal: if `node-pty` or
687
+ `claude` don't work, the feature stays off and the log says why. **Restarting Busybits ends the sessions
688
+ it opened.**
689
+ The live terminal is still available in the session history, for subagents and when the interactive one is off.
690
+
691
+ ### Day timelapse
692
+
693
+ The **Timelapse** button (a clock with a back arrow, or the `L` key) replays the day at high speed: rooms
694
+ lighting up and going dark, agents arriving, working, waiting on you, heading to the hangouts, subagents coming and going.
695
+ The playback bar has the day, play/pause, the speed (60×, 180× or 600×: a 10-hour day in 10, 3⅓ or 1 min),
696
+ the draggable timeline with the chart of who was present and working, the peak markers (click to
697
+ jump there) and **Back to live**. Meanwhile, the office takes on a light sepia tone, with the **REPLAY 14:32** badge, and the
698
+ feed keeps showing what's happening now.
699
+
700
+ The server records the timeline **from the moment it's turned on** (the past can't be rebuilt):
701
+ summaries of what the office shows, without conversations, in `~/.habblaud/timeline/` (in Docker, in the data volume), with
702
+ a size limit per day and the last **7 days** kept. To not record: `HABBLAUD_TIMELINE=0`. Details in
703
+ [`server/README.md`](server/README.md#linha-do-tempo-timelapse).
704
+
705
+ The characters walk faster in the replay, but at high speeds anyone who stays only briefly in the office barely
706
+ reaches their desk; jumping to another point shows everyone already in place.
707
+ ### Answering from the office
708
+
709
+ With the permissions plugin installed (`npm run mod:install`, which installs it along with the mod; on Claude Code older
710
+ than 2.1.287, `npm run hooks:install`), when an agent asks for permission — to run a command, edit a file, open
711
+ a page — the request shows up in the office: the character raises a hand, a notice with **Reply**
712
+ pops up on screen and, in the agent's details, the **Asks for permission** card shows the command (or the edit's diff) with the
713
+ buttons:
714
+
715
+ - **Approve** — and, when Claude Code suggests it, **Approve and don't ask again** (the same rule the terminal
716
+ would offer, for example `Bash(npm test:*)` in this project);
717
+ - **Deny** — with an optional reason, which goes to the agent, and the option to interrupt it;
718
+ - **Answer in terminal** — Busybits sets the request aside.
719
+
720
+ The dialog keeps showing in the terminal at the same time, and whichever answer comes first wins: if you answered in the
721
+ terminal, the request disappears from the office on its own. The **need you** counter (and the `P` key) takes you to each request.
722
+
723
+ **The agent's questions** (`AskUserQuestion`) work too: the questions card shows each question with its
724
+ options and descriptions, as the terminal would. Pick an option (or several, when the question allows it) or write
725
+ your own in **Other**, and use **Reply**; **Deny…** tells the agent you don't want to answer, and **Answer in
726
+ terminal** leaves the question there. The answer reaches the agent as if you had chosen it in the terminal.
727
+
728
+ - The request goes through a Claude Code `PermissionRequest` hook (the plugin's, or the old way's), which only diverts it
729
+ when there's **some Busybits page open** on this computer; with Busybits stopped or no page open, it
730
+ exits right away and the terminal carries on as usual.
731
+ - With no answer from the office within 5 minutes (up to 24 h with `HABBLAUD_PERMISSION_TIMEOUT=86400` in the `env`
732
+ of `settings.json`), the request goes back to being answerable only in the terminal (the plugin's options are in
733
+ [`mod/README.md`](mod/README.md); in the old way, `npm run hooks:install -- --timeout 120` changes the time and
734
+ `--port`, the port). For **background subagents**, Claude Code only shows the dialog in the terminal after the
735
+ hook finishes: answer from the office or use **Answer in terminal**. With a wait longer than 5 minutes, if no
736
+ page that can answer stays open for 5 minutes (and no [phone with login](#phone-with-login-and-https-approving-requests)
737
+ is set up to answer), the request goes back to the terminal.
738
+ - It works under the same safeguard as the terminal: only with Busybits reachable only from the computer it runs on
739
+ and opened through `http://localhost`. Check with `npm run mod:status` (or `npm run hooks:status`, in the old
740
+ way). It also works from the [phone with login](#phone-with-login-and-https-approving-requests) (its default).
741
+ - In demo mode, the made-up agents also ask for permission and ask questions (pretend ones), so you can
742
+ try it out.
743
+
744
+ ### Sending messages
745
+
746
+ With the messages plugin installed (`npm run mod:install`, which installs it along with the mod; it requires Claude Code
747
+ 2.1.287 or newer), each main agent's details get the **Send message** section, and the bottom of the
748
+ [terminal](#terminal) becomes a text box. Write and press `Enter` (`Shift+Enter` adds a new line): the text
749
+ goes into the session **as if you had typed it in its terminal**. You can reply when the agent finishes its turn
750
+ and waits for the next request, give a new instruction or correct its course, without hunting for the right window.
751
+
752
+ - The box shows the status: **queued** (the session fetches messages every 2 seconds), **delivered** or **not
753
+ delivered**, with the reason. With the agent busy, the message waits and goes in when it finishes its turn, like a
754
+ prompt typed while the agent is working.
755
+ - The plugin runs inside each session and only talks to Busybits at `127.0.0.1`. Without it (or in a session opened before
756
+ the install: use `/reload-plugins`), an install hint shows up in place of the box. Subagents don't receive
757
+ messages.
758
+ - It works under the same safeguard as the terminal (local access only) and can be turned off with `HABBLAUD_MENSAGENS=0`.
759
+ Read the warning in [Privacy and security](#privacy-and-security).
760
+ From the [phone with login](#phone-with-login-and-https-approving-requests), only with `messages` in `HABBLAUD_REMOTE_ALLOW`.
761
+ - **Slash commands:** a message that starts with `/command arguments` runs that command in the session, as if you had
762
+ typed it (`/compact focus on the tests`, `/review`). Typing `/` at the start of the box opens an explorer with every
763
+ command and skill from the session, grouped by source (yours, plugins, MCP and Claude Code) with real-time filtering,
764
+ keyboard navigation (arrows, PageUp/PageDown, Home/End) and completion with `Enter` or `Tab` (`Esc` closes). A
765
+ message that starts with `/` but isn't a command of that session (`/etc/hosts`, a typo) is not delivered and says
766
+ why. Commands that open an interactive menu in the terminal (`/model` without an argument, `/config`) have nothing
767
+ to show here: give them arguments or use the terminal. Codex agents have no command list.
768
+ - **Images:** `Ctrl+V` pastes a screenshot into the box, and the attach button opens the file picker (gallery or camera
769
+ on a phone). Each image shows as a thumbnail with a `×` to remove it. Up to 8 images of up to 15 MB each (PNG, JPEG,
770
+ GIF and WebP, checked by their content, not by the name), and images alone are enough: the text can be empty. If an
771
+ upload fails, the thumbnail shows a retry and sending stays blocked until you fix or remove it. An uploaded image
772
+ expires after 30 minutes: the send then fails with a message, the text stays in the box, and only the expired images
773
+ ask to be attached again (the others stay ready). Removing a thumbnail also frees the image on the server. When the
774
+ clipboard has text too (Excel, Word, Keynote), `Ctrl+V` pastes only the text. Slash commands cannot
775
+ carry images. The agent receives your text plus the list of the saved paths; the files live in
776
+ `~/.habblaud/attachments/` (folders 700, files 600). From the
777
+ [phone with login](#phone-with-login-and-https-approving-requests), only with `messages` in `HABBLAUD_REMOTE_ALLOW`.
778
+ **Not available in Docker** (the container cannot write to the host, so the paths would not exist for the agents) nor
779
+ in the mock mode: the controls are hidden. Whether the agent can read the image depends on the provider: Claude Code
780
+ and Gentle Shell read the image from the path (the reading was checked with each CLI reading a test image from a path;
781
+ the run through the office box is still pending); Codex receives the paths, but whether it reads them has not been
782
+ verified. Any provider that cannot open the image still receives the path.
783
+ - In demo mode, the made-up agents also receive messages (pretend ones).
784
+
785
+ ### Editing the character
786
+
787
+ Each session arrives with a random name and look. To pin a project's character, open the main
788
+ agent's details and click the pencil next to the name (**Edit character**). In the editor:
789
+
790
+ - **Name:** up to 24 characters. It can't repeat the name of someone who's in the office or the one chosen for another
791
+ project.
792
+ - **Randomize:** brings up another look.
793
+ - **Pieces:** skin, hair, beard, eyes, top, bottom, shoes and accessory, with a preview next to them.
794
+ - **Save:** applies to the project (the room). The next session opened in it arrives as this character. With two sessions
795
+ at the same time in the same room, the second one gets a random character.
796
+ - **Back to random:** undoes the choice.
797
+ - **Default character style:** in **Settings › Characters › Default style**, configure fixed appearance parts (skin, hair, clothes...) for new agents, or apply them to all agents without hand-customized styles.
798
+
799
+ The choice is stored in `~/.habblaud/names.json` and goes away after 60 days without the project being used. The editor has the same safeguard as the
800
+ terminal: the pencil only shows up with the terminal on (without `HABBLAUD_TERMINAL=0`) and local access, that
801
+ is, with Busybits reachable only from the computer it runs on and opened through `http://localhost`.
802
+
803
+ ### Custom rooms and favorites
804
+
805
+ Every live main agent has a star when message access is enabled. With no custom rooms, clicking it creates **Favorites** and moves the agent there; with one room it moves directly, and with several it opens a room menu (including **New room…**). Clicking a filled star moves the agent back. Right-click a custom room on the map or in the sidebar to rename or delete it; deleting returns its agents to their project rooms.
806
+
807
+ Custom rooms are visual map seats only: agents keep their project room (`roomId`), grouping, deliverables, history, stats and room counts. Subagents remain in their original project room even when their parent is in a favorite room. The setup is stored in `~/.habblaud/favorites.json` with atomic writes. Creating, renaming, deleting and favoriting use the same permission as sending messages: local message access, or `HABBLAUD_REMOTE_ALLOW=messages` on the remote port.
808
+
809
+ ### Codex
810
+
811
+ Codex sessions (CLI or app) show up like Claude Code's: character, project room, activity, tasks,
812
+ subagents, terminal and history, 5-hour and weekly usage and **My day** (tokens only: Codex doesn't report cost). The
813
+ Codex account chip is hollow and carries the **CODEX** tag.
814
+
815
+ - **Without installing anything**, Busybits reads the files Codex itself writes (the conversations in `~/.codex/sessions` and the
816
+ locks of the open sessions in `~/.codex/thread-writer-locks`). The catch is that Codex writes each step **after** it
817
+ finishes and never writes "waiting on you": without the hooks, the office shows Codex with a delay and doesn't tell you when it
818
+ needs you.
819
+ - **With the hooks** (`npm run codex:install` and approving them in `/hooks`), Codex notifies Busybits at every step: the session
820
+ shows up right away, the activity is the current one and an approval request makes the character raise a hand.
821
+ - **Approving from the office:** with some Busybits page open, Codex's approval request waits for your
822
+ answer in the **Asks for permission** card for up to **25 seconds** (`npm run codex:install -- --espera <s>`, from 5 to 120):
823
+ **Approve** or **Deny** (with the reason). Unlike Claude Code, Codex only shows the approval in the terminal
824
+ **after** the office answers or the time runs out — in the meantime the terminal shows "Waiting for an answer in
825
+ Busybits…". There's no "always allow" or "interrupt", and Codex doesn't let you answer its questions from outside.
826
+ - **Sending messages:** the **Send message** box works for Codex too, through `codex queue`: the message joins
827
+ the session's queue and Codex picks it up when it finishes what it's doing (up to about 10 seconds later). In Node mode
828
+ Busybits runs the command itself; **in Docker**, keep `npm run codex:bridge` running on the Mac (the container can't
829
+ see your Codex).
830
+ - **Images:** the message box sends images to Codex too, but Codex only receives the saved paths (see [Sending messages](#sending-messages)); whether it reads them is not verified.
831
+ - **5-hour and weekly usage:** comes from Codex's own files and only refreshes while some session is running; the card
832
+ shows how old the numbers are and "no quota" when the workspace has run out of credits.
833
+ - **When the session comes in:** with the first message (that's when Codex records the project folder); a CLI that's open
834
+ and still has no conversation doesn't show up.
835
+ - **When the session leaves the office:** the Codex CLI runs sessions on a background server, which keeps them
836
+ loaded for up to a minute after they go idle with no one watching; that's why the character may take a
837
+ little while to leave after you close the terminal.
838
+ - ChatGPT cloud conversations (with no file on the computer) don't show up. `HABBLAUD_CODEX=0` turns Codex off.
839
+
840
+ ### Gentle Shell
841
+
842
+ Sessions of Gentle Shell (the `gentle-shell` CLI, built on Pi) show up like
843
+ the others: character, project room, activity (tool calls), tasks (`todo`), model, tokens and cost, and the
844
+ read-only terminal. Busybits reads `~/.gentle-shell/agent` (or `HABBLAUD_GENTLE_SHELL_DIRS`) without installing anything and
845
+ never writes there (`auth.json` and the settings are never opened). Messages and the "needs you" notice need the
846
+ `habblaud-pi` extension (below), which is the only thing that touches that folder (one entry in `settings.json`).
847
+
848
+ - **Open sessions:** a session is open while it keeps renewing its heartbeat in `gentle-agents/presence/` (about every
849
+ 5 s); when it stops, the character leaves. Versions without that folder fall back to "transcript modified in the last
850
+ 30 min". A Gentle Shell process from a version that doesn't write presence files doesn't show up.
851
+ - **Subagents:** each `subagent_run` appears as a subagent of its session while its task (`gentle-agents/tasks/`) is
852
+ running, with the activity of its own transcript, and delivers when it finishes.
853
+ - **Not supported yet:** answering permissions from the office, the session history and the plan usage. In
854
+ Docker (`docker:up`) the folder is not mounted automatically: Gentle Shell works in Node mode.
855
+ - `HABBLAUD_GENTLE_SHELL=0` turns Gentle Shell off.
856
+
857
+ ### Agent Hub
858
+
859
+ Jobs launched through Agent Hub appear as read-only agents for `agy`, `opencode`, `copilot` and `codex`. Running jobs
860
+ show as working, queued jobs as waiting, succeeded jobs as done, and failed or cancelled jobs as failed; unknown
861
+ statuses appear as idle. Finished jobs leave after the normal office grace period. All Agent Hub jobs sit in a single
862
+ shared "Agent Hub" room that exists while jobs are active. Each job derives its project from `repo.root` (mapping git
863
+ worktrees to their main repository) or scratch copies, shown as a secondary label in the sidebar and drawer ("projeto: ...").
864
+ Accounts are grouped by CLI ("Agent Hub · agy", "Agent Hub · copilot", "Agent Hub · opencode", "Agent Hub · codex"),
865
+ with the model shown on the agent. Agent Hub does not record the caller's Claude session. The drawer shows the tail of
866
+ `stdout.log` while a job runs and `response.txt` after it finishes. Busybits never starts, cancels or edits Agent Hub jobs.
867
+
868
+ The read-only mirror is `${XDG_DATA_HOME:-~/.local/share}/agent-hub/runs/<jobId>/`: `result.json` contains the job
869
+ metadata, `prompt.txt` the task, `stdout.log` live output, and `response.txt` the final answer. Busybits reads at most
870
+ the latest 64 KB of the output log and checks only recently updated job directories (up to 200), keeping completed
871
+ jobs from the last 30 minutes. See [server data sources](server/README.md#fontes-de-dados-somente-leitura) for the fields and
872
+ status mapping. `HABBLAUD_AGENT_HUB=off` disables the source; the default `auto` enables it only when the data
873
+ directory exists, and `on` forces it on.
874
+
875
+ #### Messages and "needs you": the `habblaud-pi` extension
876
+
877
+ ```bash
878
+ npm run pi:install # or npm run setup; npm run pi:status / npm run pi:uninstall
879
+ ```
880
+
881
+ It adds the `mod/habblaud-pi` folder to `packages` in the `settings.json` of `~/.gentle-shell/agent` (and of
882
+ `~/.pi/agent` if it exists), which is what `pi install <local folder>` does; nothing else in the file changes, a backup
883
+ (`settings.json.habblaud-backup-<date>`) is written first, and running it again changes nothing. `auth.json` and
884
+ `mcp*.json` are never touched. Open the Gentle Shell session again (or `/reload` in Pi) to load it.
885
+
886
+ - **Messages from the office:** the message box of a Gentle Shell agent works as it does for Claude Code: what you type is
887
+ delivered to the session as if you had typed it (`pi.sendUserMessage`; in the middle of a turn it waits for the turn to
888
+ end), and the "To send messages from here: npm run mod:install" hint goes away once the extension is connected.
889
+ `/command args` runs commands of extensions, prompt templates and skills of the session (and feeds the `/`
890
+ autocomplete); other texts starting with `/` fail with the reason, because Pi's built-in commands only run in the
891
+ terminal.
892
+ - **Images:** Gentle Shell reads the images attached in the message box from the saved paths (see [Sending messages](#sending-messages)). Text such as `/etc/hosts …` is treated as a command by the extension, so its delivery fails.
893
+ - **"Needs you":** when Pi opens a question box while the agent is working, such as gentle-pi's *"Allow guarded git
894
+ push? Yes/No"*, the agent shows as waiting in the office with the command (and the notice in the feed). It disappears
895
+ as soon as the box closes. **The answer is still given in the terminal**: gentle-pi asks with `ctx.ui.confirm` and
896
+ Pi gives extensions no way to answer another extension's dialog (only the `ui_prompt_start`/`ui_prompt_end`
897
+ notifications), so there are no Approve/Deny buttons for Gentle Shell and the guard keeps working exactly as before.
898
+ - Local only, like the other plugins: it talks to `127.0.0.1:<HABBLAUD_PORT or 4747>` and respects the same locks
899
+ (`HABBLAUD_MENSAGENS=0` turns messages off). `HABBLAUD_PI=0` turns the extension off for a session.
900
+
901
+ ### GitHub in the office
902
+
903
+ What the agents do on GitHub livens up the project's room, with no token and no internet access: Busybits reads the
904
+ calls in the transcripts (`gh pr create`, `gh pr merge`, `git push`, `gh run watch`, `gh pr checks`, `gh run view`,
905
+ `gh release create` and the GitHub MCP tools) and their results.
906
+
907
+ | Event | What happens |
908
+ | --- | --- |
909
+ | 🎉 **PR opened or merged, release published** | Confetti falls in the room, everyone celebrates by hopping and a banner says why ("PR #12 merged!") for ~12 s. |
910
+ | 🚨 **Red CI** | A rotating beacon flashing in the corners of the room, a reddish floor and a "!" bubble over whoever saw the failure, until a green CI in the room (which turns into a party) or for 10 min. |
911
+ | 🚀 **Push** | Just the notice and the feed. |
912
+
913
+ <table>
914
+ <tr>
915
+ <td width="50%"><img src="docs/screenshots/github-party.png" alt="The app-mobile room partying: confetti falling, the golden banner 'PR #12 merged!' and Jéssica standing with her arms up and a star over her head" /></td>
916
+ <td width="50%"><img src="docs/screenshots/github-alarm.png" alt="The data-pipeline room on alert: reddish floor, red banner 'CI failed (feat/checkout)', rotating beacons in the top corners and a red '!' bubble next to Ícaro" /></td>
917
+ </tr>
918
+ </table>
919
+
920
+ Each event also creates a notice ("🎉 Danilo opened PR #12 in habblaud", "🚨 CI failed in habblaud (feat/x)") and goes
921
+ into the feed. Only what happens live livens up the room: whatever was already in the transcripts when Busybits opened only goes to the
922
+ history. With "reduce motion" turned on in the system, nothing flashes or spins. In demo mode, made-up PRs, merges and CI runs
923
+ show up from time to time.
924
+ ### My day
925
+
926
+ The **My day** button (or the `M` key) shows where the day went: how much time the agents spent working and,
927
+ highlighted, how much time they spent **waiting on you** (permission, question or choice) — with the longest wait, who
928
+ waited, where and when. Next to it, sessions, subagents, requests, tokens and cost (when Claude Code records the cost in the
929
+ transcript), and charts by hour, by project (from the one that waited on you the most to the one that waited the least) and by account, plus
930
+ the ranking of the longest waits. Pick the day in the selector (Busybits keeps the last 30); when it's showing today,
931
+ the panel refreshes every 30 s. Each chart has a table version, and the legend turns each status on and off.
932
+
933
+ The time is **agent time**: two agents working for an hour count as two hours. Busybits only counts what
934
+ happens while it's running, and the day follows your browser's time zone. With demo mode on, the panel
935
+ shows made-up numbers (with the "demo" badge) and lets you switch to the real data; the demo agents never
936
+ go into the real stats.
937
+
938
+ ### Demo mode
939
+
940
+ Want to see the office full without having any sessions open?
941
+
942
+ - Add **`?mock=1`** to the URL (e.g. http://localhost:4747/?mock=1) to simulate everything in the browser, without your
943
+ real sessions. Parameters: `&speed=3` speeds up time and `&sessions=6` changes the number of simulated sessions.
944
+ - Or turn it on from the interface — **View demo** (when the office is empty) or **Settings › Demo
945
+ mode** — which puts made-up agents alongside the real ones. With `npm run demo` (or `HABBLAUD_DEMO=1` in the
946
+ Docker `.env`), this mode starts already on.
947
+
948
+ ## Accounts and usage (5-hour and weekly)
949
+
950
+ > **Codex** accounts come in on their own (each `~/.codex*` folder or `CODEX_HOME` is an account; the letter comes from an
951
+ > `alias x='CODEX_HOME=… codex'`, if there is one) and their usage comes from Codex's files; see [Codex](#codex). The rest
952
+ > of this section is about Claude Code.
953
+
954
+ If you use more than one Claude Code account (for example, a `c` shortcut with `~/.claude` and a `d` with
955
+ `CLAUDE_CONFIG_DIR=~/.claude-conta2`), Busybits shows them all together: each agent carries its account's chip and the top bar
956
+ shows, for each account, the **percentage used** of the 5-hour session and of the week and **when each limit resets**.
957
+
958
+ **How accounts are recognized.** Each Claude Code config folder is an account: `~/.claude` and any
959
+ `~/.claude*` with `projects/` or `sessions/` (plus `CLAUDE_CONFIG_DIR`). Copies are not accounts: a folder whose name has
960
+ `.backup`, `.bak`, `.retired`, `.old` or `.orig` as a whole word, or ends in a date/time stamp (`.claude.backup-20260521-113111`),
961
+ is skipped; one named in `CLAUDE_CONFIG_DIR`, `HABBLAUD_CLAUDE_DIRS` or `--conta <folder>` never is. To give each one its letter, Busybits
962
+ reads, in your shell files (`~/.zshrc`, `~/.bashrc`…), **only** the `alias x='... claude ...'` lines:
963
+
964
+ ```bash
965
+ alias c='claude'
966
+ alias d='CLAUDE_CONFIG_DIR=~/.claude-conta2 claude'
967
+ ```
968
+
969
+ becomes **Account C** and **Account D**. Only shortcuts of up to 3 letters count; accounts without a shortcut get A, B…
970
+
971
+ **Where the numbers come from.** The recommended way is the Busybits mod (`npm run mod:install`, Claude Code 2.1.287+):
972
+ inside each session, it receives the plan limits from Claude Code itself and stores only the 5-hour and weekly
973
+ percentages (and when they reset) in `~/.habblaud/usage/<conta>.json`. The numbers arrive after each account's next
974
+ reply. Check with `npm run mod:status`. On earlier versions of Claude Code, the statusline tap
975
+ (`npm run usage:install`) does the same through the statusline command, in the same file.
976
+
977
+ <details>
978
+ <summary><b>Details of the tap and the /usage cache</b></summary>
979
+
980
+ - `usage:install` (the old way) changes, in `<conta>/settings.json`, **only** the `statusLine.command` field: the
981
+ original command (e.g. `npx -y ccstatusline`) now runs through `node "<pasta do Busybits>/scripts/statusline-tap.mjs" --
982
+ <comando original>` (on Windows, the original command runs in Git Bash, as Claude Code would run it). A copy of the
983
+ file first goes to `settings.json.habblaud-backup-<data>`. If the account had no statusline, one is created that only
984
+ captures usage. `npm run usage:install -- --dry-run` shows what would change without writing anything.
985
+ - The tap passes the same JSON on to your statusline (output and exit code are still its own) and writes **only**
986
+ `{accountId, configDir, fetchedAt, five_hour, seven_day}` — no prompts, costs or project paths. Any
987
+ failure while capturing is ignored: the statusline never breaks because of Busybits.
988
+
989
+ | Source | How it works |
990
+ | --- | --- |
991
+ | **Busybits mod** (recommended) | Live, as described above. Replaces the tap: `mod:install` removes the tap from the account. |
992
+ | Statusline tap (Claude Code older than 2.1.287) | Live, through the statusline command, in the same file. |
993
+ | `/usage` cache (always on) | Claude Code saves the last result of the `/usage` command. In Node mode, Busybits rereads it every 60 s; in Docker, the value read at the last `npm run docker:up` applies. It only changes when someone runs `/usage`. |
994
+
995
+ The sources are local files: none of them reads passwords or tokens, or makes network calls. The source with the
996
+ most recent numbers always wins. Numbers older than 30 minutes show up as **outdated**; a window that has already reset
997
+ since the numbers were collected shows up as **—** until new numbers arrive.
998
+
999
+ </details>
1000
+
1001
+ ## Configuration
1002
+
1003
+ Everything works without configuring anything. If you need to adjust something, use environment variables (each
1004
+ `HABBLAUD_X` also accepts the alias `BUSYBITS_X` in Node mode; when both are set, `HABBLAUD_X` wins):
1005
+
1006
+ | Variable | Default | What for |
1007
+ | --- | --- | --- |
1008
+ | `HABBLAUD_PORT` | `4747` | HTTP port (in Docker, the port published on the host). |
1009
+ | `HABBLAUD_HOST` | `127.0.0.1` | Server interface in Node mode. Anything other than `127.0.0.1`/`localhost` turns off the terminal (and answering and sending messages from the office). |
1010
+ | `HABBLAUD_BIND` | `127.0.0.1` | Docker only (in `.env`): where the port is published. `0.0.0.0` opens it to the local network (and turns off the terminal and anything that acts on the sessions). |
1011
+ | `HABBLAUD_CLAUDE_DIRS` | automatic detection | Account folders, comma-separated (e.g. `/caminho/conta1,/caminho/conta2`). |
1012
+ | `HABBLAUD_DATA_DIR` | `~/.habblaud` | Where Busybits keeps its own data (character and room names, the timelapse timeline and the My day stats). |
1013
+ | `HABBLAUD_TIMELINE` | on | `0` turns off timeline recording (the days already recorded stay in the timelapse). In Docker it's always on. |
1014
+ | `HABBLAUD_USAGE_DIR` | `~/.habblaud/usage` | Where the mod (or the statusline tap) writes usage. |
1015
+ | `HABBLAUD_DEMO` | off | `1` turns on demo mode at startup. |
1016
+ | `HABBLAUD_ALLOWED_HOSTS` | — | Extra names accepted in the address (e.g. `meu-mac.local`), besides `localhost` and IPs. |
1017
+ | `HABBLAUD_TERMINAL` | on (local access only) | `0` turns off the terminal, answering and sending messages from the office, and the character editor. With the port exposed they're already off, with no way to turn them on. |
1018
+ | `HABBLAUD_PTY` | off | `1` turns on the interactive terminal (open, take over and end Claude Code sessions from the office; local access only and outside Docker) and **New agent** (also in Docker, through `npm run codex:bridge`). Read the warning in [Privacy and security](#privacy-and-security). |
1019
+ | `HABBLAUD_CLAUDE_BIN` | `claude` from PATH | The Claude Code executable that the interactive terminal and New agent run. |
1020
+ | `HABBLAUD_REMOTE_ALLOW` | `permissions` | What the [phone with login](#phone-with-login-and-https-approving-requests) can do: `permissions`, `messages`, `terminal`, `spawn` (comma-separated) or `none`. The other `HABBLAUD_REMOTE_*` are written by `npm run remote:setup`. |
1021
+ | `HABBLAUD_MENSAGENS` | on (with the terminal) | `0` turns off only messages from the office (the box in the terminal and in the agent's details). |
1022
+ | `HABBLAUD_CODEX` | on | `0` turns off Codex in the office. |
1023
+ | `HABBLAUD_CODEX_DIRS` | automatic detection | Codex folders, comma-separated (instead of `~/.codex*` and `CODEX_HOME`). |
1024
+ | `HABBLAUD_CODEX_BIN` | `codex` from PATH (on Windows, `codex.exe`) | The Codex binary that delivers the messages (`codex queue`), in Node mode or in `npm run codex:bridge`. |
1025
+ | `HABBLAUD_GENTLE_SHELL` | on | `0` turns off Gentle Shell in the office. |
1026
+ | `HABBLAUD_GENTLE_SHELL_DIRS` | `~/.gentle-shell/agent` | Gentle Shell `agent/` folders, comma-separated (instead of the default). |
1027
+ | `HABBLAUD_AGENT_HUB` | auto | `auto` reads Agent Hub when `~/.local/share/agent-hub` (or `$XDG_DATA_HOME/agent-hub`) exists; `on` forces it on and `off` disables it. |
1028
+ | `HABBLAUD_UPDATE_CHECK` | packaged: on; clone/Docker: off | `1` turns on the new-version check (a request to the npm registry every 6 h), `0` turns it off. |
1029
+ | `HABBLAUD_LANG` | system language, otherwise `en` | Language of the texts the server builds (activities, notices, logs): `pt-BR`, `en`, `es` or `fr`. The interface follows the browser or the choice in Settings › Language. See [Languages](#languages). |
1030
+ | `HABBLAUD_ACCOUNTS` | — | JSON to customize name, letter or color, matched by the account folder name. E.g. `[{"id":".claude-conta2","name":"Trabalho","short":"T","color":"#5cc97b"}]`. |
1031
+
1032
+ **In Docker**, `HABBLAUD_PORT`, `HABBLAUD_BIND`, `HABBLAUD_ALLOWED_HOSTS`, `HABBLAUD_DEMO`, `HABBLAUD_TERMINAL`,
1033
+ `HABBLAUD_MENSAGENS`, `HABBLAUD_CODEX`, `HABBLAUD_UPDATE_CHECK`, `HABBLAUD_LANG`, `HABBLAUD_PTY`, the `HABBLAUD_WORLD*` and the
1034
+ `HABBLAUD_REMOTE_*` apply (in `.env` or in the environment), as do `HABBLAUD_CLAUDE_DIRS`, `HABBLAUD_CODEX_DIRS`, `HABBLAUD_USAGE_DIR` and
1035
+ `HABBLAUD_ACCOUNTS` (read by `docker:up` on the host); the rest are fixed inside the container. Options: `npm run docker:up -- --no-build` (starts without rebuilding),
1036
+ `npm run docker:down` (stops) and `npm run docker:logs` (follows the logs).
1037
+
1038
+ ## Habblaud World
1039
+
1040
+ Habblaud World is an online pixel-art city where every Busybits office becomes a building, lit up live while the agents
1041
+ work, and everyone walks around with a character. **It's off by default in Busybits**: `HABBLAUD_WORLD=1` turns it on,
1042
+ pointing at `server.habblaud.com`; even then, **nothing leaves your computer until you create an account** and sign in.
1043
+ Access is granted through a waiting list.
1044
+
1045
+ **How to configure it.** Turn it on with `HABBLAUD_WORLD=1` (in `.env` or in the environment); the other variables
1046
+ below are optional: without them, Busybits points at the official server. The section shows up in the **Habblaud World** window (the city button in the top bar) and only works from this computer (never through the phone port); the
1047
+ account stays only here, in `~/.habblaud/world.json` (permission 600; in Docker, in the `/data` volume).
1048
+
1049
+ | Variable | Default | What for |
1050
+ | --- | --- | --- |
1051
+ | `HABBLAUD_WORLD_URL` | `https://server.habblaud.com` | World server address, `https://` or `wss://` only (no path). |
1052
+ | `HABBLAUD_WORLD` | off | `1` turns on the World (routes and interface). Unset or `0`, there's nothing about it and nothing leaves your computer. |
1053
+ | `HABBLAUD_WORLD_DEV` | off | `1` accepts a local world server without TLS: `http://127.0.0.1:<port>` (`npm run dev` already does) or, from inside Docker, `http://host.docker.internal:<port>`. |
1054
+
1055
+ **Privacy.** Nothing about your work leaves your computer. From the building, only this goes out: the theme, one floor
1056
+ per open room (with a random code that changes every day) and, for each agent, main or subagent, the tool, the status,
1057
+ the appearance, a drawn name and the band of tasks completed that day. Paths, project names, titles, commands,
1058
+ messages, code, cost, model, branch and your Claude account never leave. The full list, field by field (in Portuguese):
1059
+ [docs/world/privacidade.md](docs/world/privacidade.md). **See what was sent**, on the Your building card, shows the
1060
+ exact JSON of the last upload, with its size in bytes and the world's reply.
1061
+
1062
+ **Account and waitlist.** Sign up with e-mail, **player name** (3 to 20 characters, unique in the world: it stays
1063
+ reserved for you while you wait on the list and becomes your character's name) and password (12 characters or more;
1064
+ leaked passwords are refused), a 6-digit code by e-mail and accepting the Terms of Use and the Privacy Policy. Every
1065
+ account joins a waitlist, and access is granted in batches: an open Busybits checks on its own every 30 minutes. Up to 3
1066
+ computers per account (**Devices**, with revoke).
1067
+
1068
+ **Character.** The player name chosen at sign-up (it can be changed later, once every 30 days), the same appearance
1069
+ editor as the agents, 2 or 3 personality traits and an intro line from the list (there's no free text in the world
1070
+ besides the name). You can create it while still on the waitlist.
1071
+
1072
+ **Building.** With the account approved and the character created, the building goes up on its own (over a WebSocket)
1073
+ and follows the office live. The **Your building** card shows the connection, floors, agents, the last upload and, when
1074
+ the world refuses an upload or stops the building (old version, another computer, suspended or banned account), the
1075
+ reason; a suspended or banned account gets **Appeal by e-mail**. A building marked as "unverified" (implausible numbers,
1076
+ under review) stays out of leaderboards and highlights and shows **Dispute by e-mail**. When the world is under
1077
+ maintenance, the card says so, and Busybits tries again on its own.
1078
+
1079
+ **Visibility.** Live (floors, counters and each character's status) or **discreet mode** (only lit or dark and the
1080
+ number of floors); closed to visits; hide the country; the building's **tokens** only in bands (up to 100 thousand, 1
1081
+ million…), never the number or the cost, and they can be turned off; leaderboard and compactions only if you turn them
1082
+ on; knocks on the door (**Let me know when someone knocks**) only if you turn it on.
1083
+
1084
+ **City.** The **World** button in the top bar swaps the office for the city: walk with the arrows/WASD or by clicking,
1085
+ each building's card shows floors, agents and status, and the minimap sits in the corner; paused or out of the world,
1086
+ your building stays dark, but you can still walk around the city. In demo mode (`?mock=1&world=approved&scene=city`,
1087
+ only fictional buildings and people): [the city](docs/screenshots/world-cidade.png) and
1088
+ [a building's card](docs/screenshots/world-cartao.png).
1089
+
1090
+ **Visits.** Near a building's door, **Enter (E)** takes you inside: the owner's live office, with rooms under made-up
1091
+ names and the agents in their current status, view only (no terminal, messages or permissions, and nothing about the
1092
+ work); a building closed to visits can only be seen from outside. On yours, you see "N visitors now" (only the count,
1093
+ never who). In demo mode: [the visit](docs/screenshots/world-visita.png) and
1094
+ [the visit panel](docs/screenshots/world-visita-painel.png).
1095
+
1096
+ **Social.** In the city, with no free text anywhere: **L** likes the building by the door, **G** opens the greeting
1097
+ wheel (ready-made phrases, translated for whoever reads them) and **K** knocks on the door of owners who accept it; each
1098
+ person's card has Greet, Block and Report, and the minimap takes you to a building by its code ("Go to HB-XXXX") or to
1099
+ any lit building. Inside a building, **Like** and **Leave a stamp** at the front desk (one per building per day). In the
1100
+ square, the thermometer of the city's weekly goal and, when it's reached, fireworks. In the office, the "❤️ N today"
1101
+ chip and the "While you were away" card with the visits, likes and stamps left at the front desk (never who); people you
1102
+ blocked are listed in **Blocked**, with **Unblock**. In demo mode:
1103
+ [the greeting wheel](docs/screenshots/world-social.png) and
1104
+ [the square with the fireworks](docs/screenshots/world-praca.png).
1105
+
1106
+ **Pause, leave, delete.** **Pause** turns the building off right away and keeps the lot (after 30 days paused, it
1107
+ disappears from the map; 30 days later, it's removed). **Leave the world** removes the building and frees the lot; the
1108
+ account and the character stay, and coming back creates a new building. **Delete account** (in **Account and data**,
1109
+ with the code that arrives by e-mail) takes the building and the profile out of the world right away, deletes the
1110
+ account, likes, blocks, reports you made and devices from the database within 7 days (and from backups within 30) and
1111
+ deletes `world.json` from this computer. With no word from Busybits for 7 days, the building disappears from the map
1112
+ and, 30 days later, is removed; an e-mail warns 3 days before (can be turned off in **Account and data**).
1113
+
1114
+ **Export.** **Download my data** (in **Account and data**) saves `habblaud-world-dados.json` with what the world keeps
1115
+ about your account: e-mail, dates, character, visibility, devices, building, likes given, blocks and reports you made.
1116
+ Once a day.
1117
+
1118
+ **Truthful data.** The World only works if the buildings are real: changing Busybits to send invented or inflated
1119
+ floors, agents, statuses, tokens or characters breaks the Terms of Use and gets the account banned (the server checks
1120
+ the plausibility of every packet). Changing Busybits for anything else stays free (MIT). How Busybits talks to the World
1121
+ (in Portuguese): [shared/world/README.md](shared/world/README.md).
1122
+
1123
+ **Testing with a local world server.** For World development, with the world server running on the same computer (for
1124
+ example, in Docker, published on port 4848):
1125
+
1126
+ - Outside Docker: `HABBLAUD_WORLD_URL=http://127.0.0.1:4848 npm run dev`.
1127
+ - With Busybits in Docker: in this folder's `.env`, `HABBLAUD_WORLD_URL=http://host.docker.internal:4848` and
1128
+ `HABBLAUD_WORLD_DEV=1`; then `npm run docker:up`, which ends with the World line
1129
+ (`Habblaud World: on: http://host.docker.internal:4848`, or why it stayed off). `docker-compose.yml` already maps
1130
+ `host.docker.internal` to the host (`extra_hosts` with `host-gateway`; Docker Desktop already has the name). On
1131
+ Linux, the world server must listen on an interface the container can reach (`0.0.0.0` or the Docker bridge IP): a
1132
+ port published only on the host's `127.0.0.1` doesn't answer through `host-gateway`.
1133
+ - Without TLS, only with `HABBLAUD_WORLD_DEV=1` (or `--dev`) and only for `127.0.0.1` and `host.docker.internal`;
1134
+ otherwise, only `https://` or `wss://`. The world server must accept the name used in the URL as its game host
1135
+ (otherwise it answers `421`).
1136
+
1137
+ How the section looks, in demo mode (`?mock=1&world=logged_out`, `waiting` or `approved`; in Portuguese):
1138
+ [no account](docs/screenshots/world-sem-conta.png), [waitlist](docs/screenshots/world-lista-de-espera.png),
1139
+ [character](docs/screenshots/world-personagem.png), [Your building](docs/screenshots/world-predio.png) and
1140
+ [what was sent](docs/screenshots/world-enviado.png).
1141
+
1142
+ ## How it works
1143
+
1144
+ ```
1145
+ ~/.claude*/sessions/<pid>.json ─────────────────┐
1146
+ ~/.claude*/projects/<projeto>/<sessão>.jsonl ───┼──▶ servidor Node ──▶ modelo do escritório ──▶ SSE ──▶ navegador
1147
+ .../<sessão>/subagents/**/agent-*.jsonl ────────┘ (polling de 1 s) (canvas + interface)
1148
+ ```
1149
+
1150
+ - **Who's in the office:** while a session is open, Claude Code keeps `sessions/<pid>.json` with the
1151
+ project and the status (busy, idle, waiting on you or waiting on a background shell). That's what decides
1152
+ who shows up and what each one does.
1153
+ - **Running shells:** in the transcripts, each background `Bash` (or long foreground command) becomes a
1154
+ "shell" with a label and a timer, until the notification arrives that it finished, failed or was interrupted.
1155
+ - **Social life:** the hangouts, the personalities and the coins are a simulation in the browser (`client/src/world/social/`),
1156
+ with no effect at all on the real agents. The personality comes from each agent's seed (it's the same in any
1157
+ browser); the wallets are kept in the browser's `localStorage`.
1158
+ - **What each one is doing:** the server follows the end of the transcripts (`.jsonl`) of the open sessions and turns
1159
+ each tool call into an activity, with an icon, in the server's language (see [Languages](#languages)). Tasks, title, model and
1160
+ stats come from there too.
1161
+ - **Subagents:** the transcripts in `<sessão>/subagents/` (including those from workflows) become characters linked to the
1162
+ agent that called them.
1163
+ - **GitHub:** PRs, pushes, CI and releases come from the same transcript lines (the command and its output, or the
1164
+ `gitOperation` that Claude Code itself records); nothing is queried on GitHub.
1165
+ - **The drawing:** the browser receives the state over SSE and draws everything on a canvas — characters, furniture, floors and walls
1166
+ are pixel art **generated by code**; the logo, the illustrations and the pictures on the walls, on the other hand, were generated with AI.
1167
+
1168
+ <details>
1169
+ <summary><b>Code structure and API</b></summary>
1170
+
1171
+ ```
1172
+ shared/ protocolo (types.ts), atividades em PT-BR, nomes, simulador de demonstração
1173
+ server/ servidor HTTP + SSE: contas e uso, leitura das sessões e transcripts, modelo do escritório
1174
+ client/ Vite: src/art (pixel art procedural), src/world (o escritório no canvas), src/ui (interface)
1175
+ scripts/ build do servidor, docker-up, instaladores (mod, tap de statusline e hook de permissão) e screenshots
1176
+ mod/ o mod do Busybits e os plugins de permissões e de mensagens (plugins do Claude Code; marketplace em .claude-plugin/)
1177
+ ```
1178
+
1179
+ | Route | Description |
1180
+ | --- | --- |
1181
+ | `GET /api/stream` | SSE with the `snapshot`, `feed` and `notice` events (format in `shared/types.ts`). |
1182
+ | `GET /api/snapshot` | Current state of the office. |
1183
+ | `GET /api/agents/:id` | An agent's details, with up to 200 activities. |
1184
+ | `GET /api/agents/:id/terminal` | Terminal SSE (`init` and `append` events); local access only. |
1185
+ | `PUT /api/agents/:id/character` | Edit the character: `{name, seed, parts}` saves the main agent's name and look as the project's (the room's) character; local access only. |
1186
+ | `DELETE /api/agents/:id/character` | "Back to random": deletes the project's character and the agent goes back to its random name; local access only. |
1187
+ | `GET /api/sessions/recent` | Session history: sessions from the last 7 days across all accounts (up to 150); local access only. |
1188
+ | `GET /api/sessions/:conta/:sessionId/terminal` | SSE of the conversation of a session from the history (same protocol as the terminal); local access only. |
1189
+ | `GET /api/stats?day=AAAA-MM-DD` | My day stats (time per status, projects, accounts, hours, waits, tokens and cost). |
1190
+ | `GET /api/stats/days` | Days with stats (the last 30). |
1191
+ | `GET /api/timeline/days` | Days recorded for the timelapse, with size and the time of the first and last entries. |
1192
+ | `GET /api/timeline/:dia` | A day's timeline (`AAAA-MM-DD`), in JSONL (gzipped). |
1193
+ | `GET /api/health` | Health: version, demo, Docker, terminal, answering and sending messages from the office, sources and usage status of each account. |
1194
+ | `POST /api/demo` | `{"enabled": true \| false}` turns the simulated agents on or off. |
1195
+ | `POST /api/rooms/rename` | `{"id": sala, "name": nome}` renames the room (empty goes back to the folder name); the name is stored in `rooms.json`, in the data folder. Local access only. |
1196
+ | `GET /api/mod/summary` | For the Claude Code mod: version, how many agents, how many are working and who needs you (without the demo and, with `?account=&session=`, without its own session). |
1197
+ | `/api/permissions…` | Answering from the office: the permission hook registers the request (permission or question) and waits; the page fetches the details and decides or answers. Local access only. |
1198
+ | `/api/messages…` and `/api/mod/inbox…` | Sending messages: the page puts the message in the queue and follows its delivery; the `busybits-messages` plugin fetches it, delivers it to the session and confirms. Local access only. |
1199
+ | `POST /api/mod/commands` and `GET /api/messages/commands/:agentId` | Slash commands: the plugin publishes the session's command list; the page reads it for the message box autocomplete. Local access only. |
1200
+ | `POST /api/codex/events` | Events from the Codex hooks (session opened, tool, approval, end of turn). Local access only. |
1201
+ | `/api/codex/bridge/poll` and `/ack` | `npm run codex:bridge` fetches the messages for Codex and confirms delivery. Local access only. |
1202
+
1203
+ More server details in [`server/README.md`](server/README.md).
1204
+
1205
+ </details>
1206
+
1207
+ <details>
1208
+ <summary><b>What Docker mounts and why</b></summary>
1209
+
1210
+ | Host | Container | What for |
1211
+ | --- | --- | --- |
1212
+ | `<conta>/sessions/` | `/claude/<conta>/sessions` (read-only) | Open sessions and their status. |
1213
+ | `<conta>/projects/` | `/claude/<conta>/projects` (read-only) | Transcripts of the sessions and subagents. |
1214
+ | `~/.habblaud/usage/` | `/usage` (read-only) | Usage captured by the mod (or by the statusline tap). |
1215
+ | `habblaud-data` volume | `/data` | Busybits's own data (character names, the timelapse timeline and the My day stats). |
1216
+ | `~/.habblaud/remote-tls/server/` | `/remote-tls` (read-only) | Only after `npm run remote:setup`: the server certificate and key of the [phone with login](#phone-with-login-and-https-approving-requests) (never the CA key). |
1217
+
1218
+ The account folder is **never** mounted whole (credentials and settings live there). The container runs as an unprivileged
1219
+ user, with a read-only file system, no extra capabilities and with `no-new-privileges`. The accounts'
1220
+ metadata (letter, email, organization) is read on the host by `docker:up` and passed to the container.
1221
+
1222
+ </details>
1223
+
1224
+ ## Privacy and security
1225
+
1226
+ - **Read-only:** Busybits never writes to the Claude Code folders. The exceptions are the installers, which you run:
1227
+ `npm run mod:install` / `mod:uninstall` uses `claude plugin` itself (which registers the marketplace and the plugins
1228
+ in `settings.json` and in `<conta>/plugins/`) and, on install, removes the old tap and hook with a backup; in the old
1229
+ way, `npm run usage:install` / `usage:uninstall` changes only the `statusLine.command` in `settings.json` and
1230
+ `npm run hooks:install` / `hooks:uninstall`, only the `hooks.PermissionRequest` list — always with a backup first.
1231
+ - **The mod:** runs inside each Claude Code session, with your permissions (like every mod), and only does what is
1232
+ listed in [`mod/README.md`](mod/README.md) — `claude plugin validate mod/habblaud` shows the events and the calls,
1233
+ without running anything. It only writes the 5-hour and weekly usage percentages (and when they reset) to
1234
+ `~/.habblaud/usage/<conta>.json`; for the "needs you" line and `/busybits`, it only talks to Busybits at
1235
+ `127.0.0.1`. It doesn't read the conversation, doesn't call the model and doesn't send anything off the computer. It's loaded from this
1236
+ folder: whatever is in it (including after a `git pull`) is what runs. The messages plugin
1237
+ (`busybits-messages`) is separate precisely because it acts: it types into the session what you sent from the office.
1238
+ - **Local only, by default:** the server only accepts connections from the computer it runs on; opening it to the local network is optional.
1239
+ There's no telemetry. The only external call is the new-version check: on by default for packaged installs (off for clone and Docker;
1240
+ `HABBLAUD_UPDATE_CHECK=1` or `0` overrides), every 6 hours, an anonymous request, with no token, to the npm registry
1241
+ (`registry.npmjs.org/busybits`). It doesn't send anything about your sessions; npm only sees your IP. With
1242
+ `HABBLAUD_UPDATE_CHECK=0` (or on a clone without `=1`), there's no request.
1243
+ [Habblaud World](#habblaud-world) (off by default in Busybits; `HABBLAUD_WORLD=1` turns it on) only sends something
1244
+ to the world server after you create an account and sign in, and only what is listed in
1245
+ [what leaves your computer](docs/world/privacidade.md) (in Portuguese).
1246
+ So is the [phone with login](#phone-with-login-and-https-approving-requests), which only exists after `npm run remote:setup`.
1247
+ - **No credentials:** Busybits doesn't read passwords or access tokens. From each account's `.claude.json` it only uses the
1248
+ email, the organization and the `/usage` cache; live usage comes from the mod (or the statusline tap).
1249
+ - **Masked secrets:** tokens and passwords in known formats (`Bearer`, `-u usuário:senha`, `TOKEN=`, `sk-…`,
1250
+ `ghp_…`, `AKIA…` keys, JWTs, passwords in URLs) become `***` before they reach the browser.
1251
+ - **Protected against malicious sites:** the server refuses addresses that aren't `localhost`/IP (DNS rebinding) and
1252
+ `POST` requests coming from other origins (CSRF), and doesn't let the page be embedded in other sites.
1253
+ - **Local-only terminal:** the full conversation of the sessions (and the history of the ended sessions, with their
1254
+ titles) only leaves the server with Busybits reachable only from the computer it runs on (`HABBLAUD_HOST` local in Node;
1255
+ `HABBLAUD_BIND` local in Docker) — there's no way to
1256
+ turn it on with the port exposed — and each request has to come through `localhost`/`127.0.0.1`: network IPs and names from
1257
+ `HABBLAUD_ALLOWED_HOSTS` (proxies, tunnels) are refused. Secrets are masked and long texts truncated before
1258
+ they reach the browser; in demo mode, the conversation is made up. `HABBLAUD_TERMINAL=0` turns it off for good.
1259
+ The one exception is the [phone with login](#phone-with-login-and-https-approving-requests), and only with `terminal` in `HABBLAUD_REMOTE_ALLOW`.
1260
+ - **Timelapse timeline:** only the summaries that already show up on screen (one-line activity, status, titles,
1261
+ account usage, with no emails, full commands or conversations), written to `~/.habblaud/timeline/` and deleted after
1262
+ 7 days. `HABBLAUD_TIMELINE=0` turns off recording.
1263
+ - **Answering from the office, local only:** approving or denying acts on the sessions, so it follows the same safeguard as the
1264
+ terminal (local bind, local `Host`, no proxies or tunnels) and only exists with the permission hook (the one from the
1265
+ `busybits-permissions` plugin or the old way's) installed by you. Answers require JSON and a local origin (a site
1266
+ open in the browser can't send them), the hook only talks to `127.0.0.1` and, when in doubt — Busybits down,
1267
+ an error, a timeout — it exits without deciding: the terminal decides. The full command or the diff only leaves the server for
1268
+ whoever opened the page from the computer it runs on. "Always allow" only applies a rule that Claude Code itself suggested
1269
+ for that request. Note: any program or person that can open `http://localhost:4747` on this machine
1270
+ can also answer; on computers shared with other users, don't install the hook
1271
+ (`npm run mod:install -- --sem-permissoes`).
1272
+ Exception: the [phone with login](#phone-with-login-and-https-approving-requests) answers too (that is its default) and sees the same command or diff.
1273
+ - **Sending messages, local only — and with a warning:** the message goes into the session as if you had typed it, so
1274
+ whatever the agent can do with a request of yours applies. It follows the same safeguard (local bind, local `Host`, JSON and local origin,
1275
+ so a site open in the browser can't send one), but **any program on this machine** that talks to
1276
+ `http://localhost:4747` — including an agent running a command — can leave a message for another session
1277
+ that has the plugin. If that doesn't work for you (shared computer, agents running unsupervised), don't
1278
+ install the plugin (`npm run mod:install -- --sem-mensagens`) or turn it off with `HABBLAUD_MENSAGENS=0`. The text of the
1279
+ messages isn't saved: it disappears from the server as soon as it's delivered.
1280
+ Images and files sent from the message box or from **New agent** are saved in `~/.habblaud/attachments/` (or
1281
+ `HABBLAUD_ATTACHMENTS_DIR`). They are deleted automatically once older than the period chosen in Settings › Saved
1282
+ attachments (1, 3, 7 — the default —, 30 days, or never): the server cleans up at startup and about once an hour,
1283
+ and only removes request folders (named like `20261107-181926-fcdfdad9`) directly inside that folder, never
1284
+ following symbolic links. Changing the setting takes effect without a restart; only this computer can change it.
1285
+ From the [phone with login](#phone-with-login-and-https-approving-requests), only with `messages` in `HABBLAUD_REMOTE_ALLOW`.
1286
+ - **Interactive terminal, opt-in — and with a warning:** with `HABBLAUD_PTY=1`, the office opens Claude Code in
1287
+ any folder, types into it (including `!comando`, which runs in the shell) and ends or takes over sessions open in other
1288
+ terminals. It follows the same safeguard as the terminal (local bind, local `Host`, no proxies or tunnels) and each request
1289
+ has to come from the computer it runs on, with a local origin (a site open in the browser can't send one). Even so,
1290
+ **any program on this machine** that talks to `http://localhost:4747` — including an agent running a command —
1291
+ gets that power. Before ending a process from outside, Busybits checks in the session registry and in the system that
1292
+ that PID is still that Claude Code (same start time and executable). On shared computers or with agents
1293
+ running unsupervised, leave it off.
1294
+ - **Phone with login, opt-in:** only exists after `npm run remote:setup`. A second port with HTTPS (a local CA that only
1295
+ signs `.local` names, `localhost`, your own address and private IPs), a username and a password (only the scrypt
1296
+ hash is stored); the session is an `HttpOnly`, `SameSite=Strict`, `Secure` cookie signed with HMAC. On that port,
1297
+ what is allowed comes from `HABBLAUD_REMOTE_ALLOW` (by default, only answering permission requests), never from the
1298
+ Host header; the routes of the hooks, the plugins and the host helper, the interactive terminal, the character editor
1299
+ and renaming rooms never work through it. Whoever has the password gets what you allowed: choose a strong one and
1300
+ allow only what you need. The CA key stays in `~/.habblaud/remote-tls/ca` and never goes into the container.
1301
+ - **New agent, opt-in:** with `HABBLAUD_PTY=1`, the office starts Claude Code sessions with the request you wrote, in
1302
+ the folder you choose — the same warning as the interactive terminal applies. Attachments are written to
1303
+ `~/.habblaud/attachments/` (folder 700, files 600). In Docker, whoever starts the sessions is the host helper
1304
+ (`npm run codex:bridge`), which also reads the delivery files only from known project folders (the ones Claude Code
1305
+ has in `<conta>/projects`), the temporary folder and the attachments.
1306
+ - **Character editor, local only:** saving or going back to random changes the office and writes to `names.json`, so it
1307
+ follows the same safeguard as the terminal (local bind, local `Host`, no proxies or tunnels): without it, the pencil doesn't show up
1308
+ and the server answers `403`. Changes require JSON and a local origin. `HABBLAUD_TERMINAL=0` turns it off too.
1309
+ - **My day stats:** only aggregate numbers (time per status, counts, tokens, cost) with project,
1310
+ account and agent names, kept in `HABBLAUD_DATA_DIR/stats/` for 30 days — nothing from the conversation.
1311
+ - **Codex:** Busybits only reads the conversations (`sessions/`, `archived_sessions/`) and the locks of the open sessions
1312
+ (`thread-writer-locks/`); in Docker, only those three folders are mounted, read-only. It never reads `auth.json`,
1313
+ `config.toml`, the shell environment (`shell_snapshots/`), the prompt history, the logs or the Codex databases, and doesn't
1314
+ show the ChatGPT account ids. `npm run codex:install` only adds groups to `hooks.json` (with a backup; those from
1315
+ other apps stay where they are) and writes `~/.habblaud/codex-hook.json`; approving the hooks is always up to you, in
1316
+ `/hooks`. The hooks only talk to `127.0.0.1`. Messages to Codex carry the same warning as those to Claude Code: any
1317
+ program on this machine that talks to Busybits can leave a message in a session's queue.
1318
+ - **What shows up on screen:** activity summaries (tool, file, command or query), session titles,
1319
+ tasks and stats (and, in the terminal, the conversation). Don't expose the port on networks you don't
1320
+ trust.
1321
+
1322
+ ## Development
1323
+
1324
+ | Command | What it does |
1325
+ | --- | --- |
1326
+ | `npm run dev` | Server + Vite at http://localhost:4747, with hot reload. |
1327
+ | `npm run dev:client` | Vite only, at http://localhost:5173 (open it with `?mock=1`; `/api` is proxied to port 4747). |
1328
+ | `npm run demo` | `npm run dev` with demo mode on. |
1329
+ | `npm run build` / `npm start` | Builds and runs the production version. |
1330
+ | `npm test` | Tests (Vitest). |
1331
+ | `npm run typecheck` | Type checking for the client, the server and the scripts. |
1332
+ | `claude plugin test mod/habblaud` | Mod tests (no session, account or network); same for `mod/habblaud-mensagens`. |
1333
+ | `claude plugin validate .` | Validates the marketplace (`.claude-plugin/marketplace.json`); with `mod/habblaud`, `mod/habblaud-permissoes` or `mod/habblaud-mensagens`, validates the plugin and lists the mod's events and calls. |
1334
+ | `claude --plugin-dir mod/habblaud` | Opens a session with the mod from this folder, without installing it (edit and run `/reload-plugins`). |
1335
+ | `npm run mod:status` | Shows, per account, the marketplace, the plugins and the installed versions. |
1336
+ | `npm run demo:timeline` | Generates a made-up timeline (demo mode simulator) for the timelapse. |
1337
+ | `npm run release` | Publishes the `package.json` version on GitHub (tag and release with the notes from `CHANGELOG.md`). |
1338
+
1339
+ To take screenshots without opening your browser, `scripts/shot.mjs` uses an isolated headless Chromium (Playwright).
1340
+ The first time, download the browser (just once): `npx playwright-core install chromium-headless-shell`.
1341
+
1342
+ ```bash
1343
+ node scripts/shot.mjs 'http://localhost:4747/?mock=1&speed=3' /tmp/habblaud.png --size 1400x900 --wait 4000
1344
+ ```
1345
+
1346
+ In the browser console, `habblaud.world.debug` has tools for testing scenes (e.g.
1347
+ `habblaud.world.debug.setHour(21)` to see the night). To set the time right when it opens, use `?hora=21:30` in the URL.
1348
+
1349
+ **Timelapse with made-up data only** (e.g. to record a GIF): `npm run demo:timeline` runs the demo mode
1350
+ simulator offline and records a whole day (by default, yesterday from 9 a.m. to 7 p.m., with a busy morning, a quieter lunch and a
1351
+ peak in the afternoon) in `<tmp>/habblaud-demo/timeline/`. Then start a Busybits that only reads that folder and doesn't show your
1352
+ sessions, and open the Timelapse:
1353
+
1354
+ ```bash
1355
+ npm run demo:timeline -- --data-dir /tmp/habblaud-demo # opções: --date, --start 8:30, --hours, --sessions, --seed
1356
+ mkdir -p /tmp/habblaud-demo/vazio
1357
+ HABBLAUD_DATA_DIR=/tmp/habblaud-demo HABBLAUD_TIMELINE=0 HABBLAUD_CLAUDE_DIRS=/tmp/habblaud-demo/vazio \
1358
+ HABBLAUD_PORT=4848 npm start # depois de npm run build; abra http://localhost:4848
1359
+ ```
1360
+
1361
+ `HABBLAUD_TIMELINE=0` avoids writing to that folder; with recording on, days older than 7 days are deleted.
1362
+
1363
+ **Publishing a version:** every version has its own section in [`CHANGELOG.md`](CHANGELOG.md), with what went in. While
1364
+ working, note the changes under "Não lançado" (Unreleased). To release:
1365
+
1366
+ 1. Bump the number with `npm version minor --no-git-tag-version` (or `patch`, for a bug-fix-only version).
1367
+ 2. Replace "Não lançado" with the version and the date (`## [0.3.0] - AAAA-MM-DD`), leave an empty "Não lançado" above it and
1368
+ update the links at the end. `npm test` fails if the `package.json` version doesn't have a section.
1369
+ 3. Merge into `main` and run `npm run release` (it needs an authenticated [`gh`](https://cli.github.com/); `-- --dry-run`
1370
+ only shows the notes). The script creates the `v0.3.0` tag and the release with the section's text. From then on, Busybits
1371
+ users see the **New version** badge.
1372
+
1373
+ ## Troubleshooting
1374
+
1375
+ <details>
1376
+ <summary><b>The office is empty</b></summary>
1377
+
1378
+ Only **open** Claude Code sessions show up. Check whether there's one running and whether the account was detected at
1379
+ `http://localhost:4747/api/health`. If the account folders are somewhere else, use
1380
+ `HABBLAUD_CLAUDE_DIRS=/caminho/conta1,/caminho/conta2`.
1381
+
1382
+ </details>
1383
+
1384
+ <details>
1385
+ <summary><b>Usage shows "no data" or "outdated"</b></summary>
1386
+
1387
+ Run `npm run mod:install` (or, on Claude Code older than 2.1.287, `npm run usage:install`) and check with
1388
+ `npm run mod:status` (or `npm run usage:status`). The numbers arrive after the next reply in an open session
1389
+ of that account; in a session opened before the install, run `/reload-plugins` or reopen the session. A **—** in place
1390
+ of the percentage means the window has reset since the last collection.
1391
+
1392
+ </details>
1393
+
1394
+ <details>
1395
+ <summary><b>The mod doesn't load in a session</b></summary>
1396
+
1397
+ Run `npm run mod:status`: it shows the Claude Code version (the mod needs 2.1.287 or newer) and, per account,
1398
+ whether the marketplace points to this folder and whether the plugins are installed and enabled. In a session opened before the
1399
+ install, run `/reload-plugins`; `/plugin` shows, below the tabs, the loaded mods (e.g.
1400
+ `1 mod active · habblaud`). Mods don't run with `"disableAllHooks": true` in the account's `settings.json` or with
1401
+ `claude --safe-mode`.
1402
+
1403
+ </details>
1404
+
1405
+ <details>
1406
+ <summary><b>"Port 4747 is already in use"</b></summary>
1407
+
1408
+ Another Busybits (Node or Docker) is already running. Stop it (`npm run docker:down`, or Ctrl+C in the
1409
+ `npm start` terminal) or use another port: `HABBLAUD_PORT=4848 npm run docker:up` (Docker) or `HABBLAUD_PORT=4848 npm start`
1410
+ (Node).
1411
+
1412
+ </details>
1413
+
1414
+ <details>
1415
+ <summary><b>It doesn't open on my phone</b></summary>
1416
+
1417
+ Check that you created `.env` with `HABBLAUD_BIND=0.0.0.0` and recreated the container (`npm run docker:up -- --no-build`), that
1418
+ the phone is on the same Wi-Fi and that the computer's firewall allows connections on port 4747. By IP it works right away;
1419
+ to open it by a name (e.g. `meu-mac.local`), add `HABBLAUD_ALLOWED_HOSTS=meu-mac.local` (in Docker, in the same
1420
+ `.env`).
1421
+
1422
+ </details>
1423
+
1424
+ <details>
1425
+ <summary><b>The terminal doesn't open</b></summary>
1426
+
1427
+ The terminal only exists with Busybits reachable only from the computer it runs on. Check that `.env` doesn't have
1428
+ `HABBLAUD_BIND=0.0.0.0` (or, in Node mode, that you didn't use `HABBLAUD_HOST=0.0.0.0`) or `HABBLAUD_TERMINAL=0`, and open it through
1429
+ `http://localhost:4747` (through the network IP or a name from `HABBLAUD_ALLOWED_HOSTS` it's refused). In Docker, a container
1430
+ created before this feature needs to be recreated: `npm run docker:up`. The startup log (`npm run docker:logs`)
1431
+ says whether the terminal is on and, if it isn't, why.
1432
+
1433
+ </details>
1434
+
1435
+ <details>
1436
+ <summary><b>The permission request (or the question) doesn't show up in the office</b></summary>
1437
+
1438
+ Run `npm run mod:status`: it says, per account, whether the `busybits-permissions` plugin is installed and enabled (and whether
1439
+ the old hook was left alongside it, which would make two of them answer) and whether Busybits is handling requests. In the old way,
1440
+ `npm run hooks:status` says whether the hook is installed and pointing to this folder. The request is only diverted with some
1441
+ Busybits page opened through `http://localhost` (or `127.0.0.1`) and with the terminal on (same safeguard). Sessions
1442
+ opened before the install load the plugin with `/reload-plugins` (or when reopened). In the old way, if Busybits
1443
+ uses another port, reinstall with `npm run hooks:install -- --port <porta>`. For the agent's questions, the plugin
1444
+ must be from 0.6.0 or newer: run `npm run mod:install` after updating.
1445
+
1446
+ </details>
1447
+
1448
+ <details>
1449
+ <summary><b>Codex doesn't show up in the office (or shows up with a delay)</b></summary>
1450
+
1451
+ The startup log (`npm run docker:logs`) says how many Codex accounts Busybits found; if it's none, point to the
1452
+ folder with `HABBLAUD_CODEX_DIRS` (and run `npm run docker:up` again: in Docker, only the folders that existed at
1453
+ `docker:up` are mounted). Without the hooks, Codex shows up through its files, which are only written after each step:
1454
+ run `npm run codex:install`, **approve the hooks in `/hooks` in Codex** and check with `npm run codex:status`. Codex runs
1455
+ the hooks through the login shell, which may have an old Node; `codex:install` picks a Node 22+ and tells you which one (or use
1456
+ `--node <caminho>`). A freshly opened CLI session only shows up with the **first message**: before that, Codex doesn't
1457
+ say which folder it's in (it only creates the session lock), and without the folder there's no room.
1458
+
1459
+ </details>
1460
+
1461
+ <details>
1462
+ <summary><b>The message box doesn't show up (or stays queued)</b></summary>
1463
+
1464
+ The box only shows up for main agents whose session has the `busybits-messages` plugin connected: run
1465
+ `npm run mod:status` (it says, per account, whether the plugin is installed and whether Busybits has messages turned on) and, in
1466
+ sessions opened before the install, `/reload-plugins`. Without the plugin, the agent's details show the install
1467
+ hint. Messages follow the terminal's safeguard and `HABBLAUD_MENSAGENS=0` turns them off; the startup log
1468
+ (`npm run docker:logs`) says whether they're on and, if they aren't, why. A message that stays **queued** and fails
1469
+ with "the session didn't fetch the message" means the session stopped asking Busybits (it closed, or the plugin was
1470
+ turned off).
1471
+
1472
+ </details>
1473
+
1474
+ <details>
1475
+ <summary><b>In Docker, a closed session stays in the office</b></summary>
1476
+
1477
+ This happens if Claude Code was force-quit without deleting its own entry in `sessions/` (in Docker there's no way to
1478
+ check whether the process still exists). Running with Node (`npm start`), Busybits checks the processes and this doesn't
1479
+ happen.
1480
+
1481
+ </details>
1482
+
1483
+ <details>
1484
+ <summary><b>In Docker, an account outside /Users doesn't show up</b></summary>
1485
+
1486
+ Docker Desktop only shares some Mac folders with containers (by default `/Users`, `/Volumes`, `/private` and
1487
+ `/tmp`). Add the folder in *Settings › Resources › File sharing*.
1488
+
1489
+ </details>
1490
+
1491
+ <details>
1492
+ <summary><b>I want to start from scratch</b></summary>
1493
+
1494
+ `npm run docker:down`, then `docker volume rm habblaud_habblaud-data` (deletes the saved names) and
1495
+ `npm run docker:up`.
1496
+
1497
+ </details>
1498
+
1499
+ ### Releasing
1500
+
1501
+ Maintainers cut a release with:
1502
+
1503
+ ```bash
1504
+ npm version minor --no-git-tag-version # bumps and syncs the version files
1505
+ npm run release # tags vX.Y.Z from the CHANGELOG section and pushes the tag
1506
+ ```
1507
+
1508
+ Pushing a `vX.Y.Z` tag runs `.github/workflows/release.yml`, which publishes the package to npm and needs the
1509
+ `NPM_TOKEN` repository secret. The publish step has no `--provenance` while the repository is private.
1510
+
1511
+ ## Disclaimer
1512
+
1513
+ Busybits is an independent project, **not affiliated with, sponsored or endorsed by Anthropic**. "Claude" and
1514
+ "Claude Code" are trademarks of Anthropic, used here only to describe what the project works with.
1515
+
1516
+ To show the agents, Busybits only reads local files that Claude Code itself writes on your machine
1517
+ (records of the open sessions, transcripts and account settings). This format isn't documented and may change between Claude Code versions:
1518
+ after an update, Busybits may stop working, fully or partially, until it's adjusted.
1519
+
1520
+ ## License
1521
+
1522
+ [MIT](LICENSE). The images in `client/public/assets` (logo, illustrations, pictures and posters) were generated with
1523
+ AI for this project and converted into pixel art by the scripts in `scripts/assets/`.
1524
+
1525
+ The pixel-art emoji (`client/public/assets/emoji/`) are from [SerenityOS](https://github.com/SerenityOS/serenity) (BSD 2-Clause, copyright the
1526
+ SerenityOS developers); the license text is in `LICENSE-SerenityOS.txt` next to the sprite sheet, which
1527
+ `scripts/build-emoji-sheet.mjs` regenerates.
1528
+
1529
+ ## Social life
1530
+
1531
+ When two or more agents have nothing to do — idle, or waiting on a shell for more than 40 seconds — they stop
1532
+ wandering around alone and get together. Nobody plans anything: each character has a **personality**, **friends** and
1533
+ **rivals**, and that decides what it prefers to do, with whom and what it says. Someone waiting on a shell only leaves the desk
1534
+ for a hangout (alone, it sticks with the popcorn) and takes the hourglass along; when the command finishes — or when you send
1535
+ a new request to someone — it lets the group know ("Oops, they're calling me! 🏃") and runs back to its desk.
1536
+
1537
+ <p align="center">
1538
+ <img src="docs/screenshots/social-lounge.gif" width="816" alt="Busybits lounge with three hangouts at once: three coworkers on the couch watching soccer on TV (the screen flashes GOL), a ping-pong match with fans and an arcade duel with trash talk in the bubbles" />
1539
+ </p>
1540
+
1541
+ ### The hangouts
1542
+
1543
+ | | Hangout | What happens |
1544
+ | --- | --- | --- |
1545
+ | 📺 | **TV in the lounge** | Soccer, a soap opera or cartoons, with popcorn on the couch. During soccer the fans cheer along with the "GOL" flashing on the screen (or groan at the other team's goal); during the soap opera, little hearts and "No way! 😱". Nap lovers end up falling asleep on the couch. |
1546
+ | 🎮 | **Video games** | Two on the couch with controllers, the TV in split screen (racing or fighting), best of 3, trash talk ("What's with this lag?!") and fans. |
1547
+ | 👾 | **Arcade** | A duel at the lounge's two machines, a single match. |
1548
+ | 🏓 | **Ping-pong** | Up to 5 points, with the ball going back and forth, the score in the bubbles ("3 × 2 🏓") and fans behind the table. |
1549
+ | ☕ | **Kitchen chat** | Each one grabs a coffee (or water) and sits at the table: gossip with coworkers' names ("Did you see Rafaela's commit? 👀"), jokes (the group cracks up), work talk ("Deploy on a Friday? 😈") and topics about the day and the time ("TGIF! 🎉"). |
1550
+ | 💬 | **Chat** | Two coworkers standing in a corner of the lobby, the kitchen or the lounge. |
1551
+ | ✊ | **Rock-paper-scissors for coins** | "Jo… Ken… Po!", the hand signs appear over their heads, the winner celebrates and the coins fly from one to the other; the loser gets upset and, if competitive, asks for a rematch. A tie goes again. Anyone walking by may stop to watch. |
1552
+ | 💄 | **Bathroom mirror** | Lipstick or a comb, with the face reflected in the mirror and a sparkle at the end. Works alone or in pairs ("Can I borrow your comb?"). |
1553
+
1554
+ <table>
1555
+ <tr>
1556
+ <td width="50%"><img src="docs/screenshots/social-rps.png" alt="Rock-paper-scissors in the lobby: Lia celebrates with a coin over her head and the bubble 'I won!', coins fly from Bruna (upset, with the rock icon) to her, '+20' and '−20' floating, and Iara watches from behind" /></td>
1557
+ <td width="50%"><img src="docs/screenshots/social-kitchen.png" alt="Kitchen chat: four coworkers sitting at the long table with coffee, with the bubbles 'It'll work out!' and 'Hahaha'" /></td>
1558
+ </tr>
1559
+ <tr>
1560
+ <td><b>Rock-paper-scissors for coins.</b> The bet comes from the personality (betting lovers bet big, penny-pinchers bet little) and never goes over the balance of whoever has less.</td>
1561
+ <td><b>Kitchen chat.</b> Whoever is more sociable talks more; the reactions depend on the topic (a big laugh at a joke, 👀 at gossip).</td>
1562
+ </tr>
1563
+ <tr>
1564
+ <td><img src="docs/screenshots/social-mirror.png" alt="Two coworkers at the bathroom sinks freshening up, with their faces reflected in the mirrors and the bubble 'You're killing it!'" /></td>
1565
+ <td><img src="docs/screenshots/social-drawer.png" alt="Social life section in the agent's details: 'Watching a soap opera on TV with Bruna and Iara', 115 coins, 1 win and 0 losses, the Vanity and Thrift traits, the catchphrase, friendships, rivalries with the score and the statement" /></td>
1566
+ </tr>
1567
+ <tr>
1568
+ <td><b>At the mirror.</b> Vanity lovers stop by the restroom whenever they can — and show up reflected.</td>
1569
+ <td><b>In the agent's details.</b> What it's doing, the wallet, the score, the personality, friendships and rivalries (with the head-to-head record) and the statement.</td>
1570
+ </tr>
1571
+ </table>
1572
+
1573
+ ### Personalities
1574
+
1575
+ Each agent has 2 or 3 traits, drawn from its seed (it's always the same person, in any browser):
1576
+
1577
+ 🏆 Competition · 🎲 Betting · 🎮 Games · 📺 TV & shows · 🗣️ Gossip · 💄 Vanity · ☕ Caffeine · 😂 Jokes · 🏓 Sports ·
1578
+ 🙈 Shyness · 💰 Thrift · 😴 Naps · 🧘 Calm · 📚 Reading
1579
+
1580
+ The traits change what each one chooses (TV lovers turn on the TV, sports lovers call people over for ping-pong), whom
1581
+ they call (friends look for each other; rivals challenge each other in games), what they say and even who plays better. Each one also has a
1582
+ catchphrase ("Done and done!", "Let's code!"). Hover over a trait in the agent's details to see what it does.
1583
+
1584
+ ### Coins
1585
+
1586
+ Made-up coins (🪙), just to make the bets more fun:
1587
+
1588
+ | | |
1589
+ | --- | --- |
1590
+ | **Arrived at the office** | 🪙100 (subagents, 🪙30) |
1591
+ | **Task done** (item on the task list) | +🪙10 |
1592
+ | **Request handled** (end of turn) | +🪙5 |
1593
+ | **Subagent delivered the result** | +🪙15 |
1594
+ | **Bets** (rock-paper-scissors; matches between rivals or with betting lovers) | whatever the loser loses goes to the winner |
1595
+
1596
+ Each gain shows up as "+🪙10" over the head; matches and bets go into the activity feed. The balance, the score
1597
+ and the statement are saved in the browser (each browser has its own economy: the bets are drawn there) and are
1598
+ forgotten three days after the agent leaves.
1599
+
1600
+ > All of this is just Busybits putting on a show: nothing changes in the Claude Code agents, which keep working normally.
1601
+
1602
+ ---
1603
+
1604
+ <p align="center">
1605
+ Made with ☕ and lots of <a href="https://code.claude.com">Claude Code</a> agents.
1606
+ </p>