busybits 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +17 -0
  3. package/README.es.md +27 -27
  4. package/README.fr.md +26 -26
  5. package/README.md +52 -34
  6. package/README.pt-BR.md +28 -28
  7. package/dist/build.json +2 -2
  8. package/dist/cli/busybits.js +36 -20
  9. package/dist/client/bundle/{app-AwZeKIeu.js → app-QYGBa260.js} +4 -4
  10. package/dist/client/bundle/{city-YoIG0FsX.js → city-UYDbxWIy.js} +1 -1
  11. package/dist/client/bundle/{daystats-DGzYOP8l.js → daystats-CJyNq6hu.js} +1 -1
  12. package/dist/client/bundle/{dom-D2vx0KTo.js → dom-slmnBOjx.js} +1 -1
  13. package/dist/client/bundle/{en-DBfNt5uV.js → en-BQQEHqmG.js} +3 -3
  14. package/dist/client/bundle/{es-pnWdszTE.js → es-BgBoKwEe.js} +3 -3
  15. package/dist/client/bundle/{format-C7qb6Cn-.js → format-CvlPqloO.js} +1 -1
  16. package/dist/client/bundle/{fr-CY8q9pj4.js → fr-PI_gjIFq.js} +3 -3
  17. package/dist/client/bundle/{main-DktU0GfB.js → main-DTHUta25.js} +2 -2
  18. package/dist/client/bundle/{ptypane-NIZ2Y8QM.js → ptypane-9pL54zR0.js} +1 -1
  19. package/dist/client/bundle/{room-name-CFJfHE5L.js → room-name-Bv6N672f.js} +1 -1
  20. package/dist/client/bundle/{simulator-BnBPS_Ws.js → simulator-B45JPgSp.js} +1 -1
  21. package/dist/client/bundle/{world-model-BIYmgAWC.js → world-model-BgjMjmrp.js} +1 -1
  22. package/dist/client/bundle/{world-stream-BRkL9Eme.js → world-stream-CUfry7aL.js} +1 -1
  23. package/dist/client/index.html +1 -1
  24. package/dist/server/index.js +33 -18
  25. package/mod/README.md +144 -144
  26. package/mod/habblaud/.claude-plugin/plugin.json +1 -1
  27. package/mod/habblaud-mensagens/.claude-plugin/plugin.json +1 -1
  28. package/mod/habblaud-permissoes/.claude-plugin/plugin.json +1 -1
  29. package/mod/habblaud-pi/package.json +1 -1
  30. package/package.json +6 -2
@@ -2543,13 +2543,13 @@ var EN = {
2543
2543
  // scripts/hooks-install.ts
2544
2544
  "--timeout precisa de um n\xFAmero de segundos entre 5 e 86400 (24 h).": "--timeout needs a number of seconds between 5 and 86400 (24 h).",
2545
2545
  // scripts/remote-mdns.ts
2546
- "[remote-mdns] sem HABBLAUD_REMOTE_NAME v\xE1lido no .env: rode npm run remote:setup.": "[remote-mdns] no valid HABBLAUD_REMOTE_NAME in .env: run npm run remote:setup.",
2546
+ "[remote-mdns] sem HABBLAUD_REMOTE_NAME v\xE1lido na configura\xE7\xE3o: rode npm run remote:setup.": "[remote-mdns] no valid HABBLAUD_REMOTE_NAME in the settings: run npm run remote:setup.",
2547
2547
  "[remote-mdns] sem rede: an\xFAncio suspenso.": "[remote-mdns] no network: announcement paused.",
2548
2548
  "[remote-mdns] {0} sem suporte: use o IP ou um endere\xE7o no DNS do roteador.": "[remote-mdns] {0} not supported: use the IP or an address in the router's DNS.",
2549
2549
  "[remote-mdns] n\xE3o deu para rodar {0}: {1}": "[remote-mdns] couldn't run {0}: {1}",
2550
2550
  "[remote-mdns] anunciando {0}.local -> {1}": "[remote-mdns] announcing {0}.local -> {1}",
2551
2551
  // scripts/remote-setup.ts
2552
- "Uso: npm run remote:setup [-- op\xE7\xF5es]\n\nLiga o acesso pelo celular (https://<nome>.local) com usu\xE1rio, senha e HTTPS.\n\n --user <nome> usu\xE1rio do login (padr\xE3o: o seu usu\xE1rio do sistema)\n --name <nome> endere\xE7o <nome>.local (padr\xE3o: habblaud)\n --domain <endere\xE7o> endere\xE7o pr\xF3prio, ex.: meuclaude.home (precisa de uma entrada no DNS do roteador)\n --port <n> porta no computador (padr\xE3o: 443 se estiver livre, sen\xE3o 4748)\n --allow <lista> o que o celular pode fazer: permissions, messages, terminal, spawn, none (padr\xE3o: permissions)\n --password-stdin l\xEA a senha da entrada padr\xE3o (automa\xE7\xE3o), em vez de perguntar\n --no-service n\xE3o instala o servi\xE7o do an\xFAncio <nome>.local (rode npm run remote:mdns voc\xEA mesmo)\n --off desliga o acesso pelo celular (tira as linhas do .env e o servi\xE7o; mant\xE9m a CA)": "Usage: npm run remote:setup [-- options]\n\nTurns on phone access (https://<name>.local) with username, password and HTTPS.\n\n --user <name> login username (default: your system username)\n --name <name> address <name>.local (default: habblaud)\n --domain <address> own address, e.g. myclaude.home (needs an entry in the router's DNS)\n --port <n> port on the computer (default: 443 if free, otherwise 4748)\n --allow <list> what the phone can do: permissions, messages, terminal, spawn, none (default: permissions)\n --password-stdin reads the password from standard input (automation) instead of asking\n --no-service doesn't install the <name>.local announcement service (run npm run remote:mdns yourself)\n --off turns off phone access (removes the lines from .env and the service; keeps the CA)",
2552
+ "Uso: npm run remote:setup [-- op\xE7\xF5es]\n\nLiga o acesso pelo celular (https://<nome>.local) com usu\xE1rio, senha e HTTPS.\n\n --user <nome> usu\xE1rio do login (padr\xE3o: o seu usu\xE1rio do sistema)\n --name <nome> endere\xE7o <nome>.local (padr\xE3o: busybits)\n --domain <endere\xE7o> endere\xE7o pr\xF3prio, ex.: meuclaude.home (precisa de uma entrada no DNS do roteador)\n --port <n> porta no computador (padr\xE3o: 443 se estiver livre, sen\xE3o 4748)\n --allow <lista> o que o celular pode fazer: permissions, messages, terminal, spawn, none (padr\xE3o: permissions)\n --password-stdin l\xEA a senha da entrada padr\xE3o (automa\xE7\xE3o), em vez de perguntar\n --no-service n\xE3o instala o servi\xE7o do an\xFAncio <nome>.local (rode npm run remote:mdns voc\xEA mesmo)\n --off desliga o acesso pelo celular (tira as linhas do arquivo de configura\xE7\xE3o e o servi\xE7o; mant\xE9m a CA)": "Usage: npm run remote:setup [-- options]\n\nTurns on phone access (https://<name>.local) with username, password and HTTPS.\n\n --user <name> login username (default: your system username)\n --name <name> address <name>.local (default: busybits)\n --domain <address> own address, e.g. myclaude.home (needs an entry in the router's DNS)\n --port <n> port on the computer (default: 443 if free, otherwise 4748)\n --allow <list> what the phone can do: permissions, messages, terminal, spawn, none (default: permissions)\n --password-stdin reads the password from standard input (automation) instead of asking\n --no-service doesn't install the <name>.local announcement service (run npm run remote:mdns yourself)\n --off turns off phone access (removes the lines from the settings file and the service; keeps the CA)",
2553
2553
  "falta o valor de {0}": "missing value for {0}",
2554
2554
  "op\xE7\xE3o desconhecida: {0}": "unknown option: {0}",
2555
2555
  "porta inv\xE1lida": "invalid port",
@@ -2559,10 +2559,15 @@ var EN = {
2559
2559
  "sem terminal para perguntar a senha: use --password-stdin": "no terminal to ask for the password: use --password-stdin",
2560
2560
  "servi\xE7o {0} ligado (log: ~/.habblaud/logs/remote-mdns.log)": "service {0} enabled (log: ~/.habblaud/logs/remote-mdns.log)",
2561
2561
  "n\xE3o consegui ligar o servi\xE7o: {0}": "couldn't enable the service: {0}",
2562
- "Habblaud: anuncia o endere\xE7o .local do acesso pelo celular": "Busybits: announces the .local address for phone access",
2563
- "servi\xE7o habblaud-remote-mdns ligado (para seguir ligado sem login: loginctl enable-linger)": "habblaud-remote-mdns service enabled (to keep it on while logged out: loginctl enable-linger)",
2562
+ "Busybits: anuncia o endere\xE7o .local do acesso pelo celular": "Busybits: announces the .local address for phone access",
2563
+ "servi\xE7o busybits-remote-mdns ligado (para seguir ligado sem login: loginctl enable-linger)": "busybits-remote-mdns service enabled (to keep it on while logged out: loginctl enable-linger)",
2564
2564
  "{0}: sem servi\xE7o autom\xE1tico; deixe npm run remote:mdns rodando ou use o IP": "{0}: no automatic service; keep npm run remote:mdns running or use the IP",
2565
- "[remote-setup] Acesso pelo celular desligado (a CA continua em ~/.habblaud/remote-tls). Agora: npm run docker:up": "[remote-setup] Phone access turned off (the CA stays in ~/.habblaud/remote-tls). Now: npm run docker:up",
2565
+ "[remote-setup] Acesso pelo celular desligado (a CA continua em ~/.habblaud/remote-tls).": "[remote-setup] Phone access turned off (the CA stays in ~/.habblaud/remote-tls).",
2566
+ " Configura\xE7\xE3o: {0} (lida pelo servidor Node: servi\xE7o ou npm start)": " Settings: {0} (read by the Node server: service or npm start)",
2567
+ " Configura\xE7\xE3o: {0} (lida pelo Docker: npm run docker:up)": " Settings: {0} (read by Docker: npm run docker:up)",
2568
+ " Agora rode: {0}": " Now run: {0}",
2569
+ " Agora rode: {0} (reinicia o servi\xE7o do Busybits para ler as novas configura\xE7\xF5es)": " Now run: {0} (restarts the Busybits service so it reads the new settings)",
2570
+ " Agora: reinicie o servidor do Busybits (npm start) para ler as novas configura\xE7\xF5es": " Now: restart the Busybits server (npm start) so it reads the new settings",
2566
2571
  "Usu\xE1rio do login": "Login username",
2567
2572
  "usu\xE1rio inv\xE1lido (sem espa\xE7os)": "invalid username (no spaces)",
2568
2573
  "senha recusada: {0}": "password rejected: {0}",
@@ -2581,7 +2586,7 @@ var EN = {
2581
2586
  "{0} (depois de criar no roteador: {1} -> {2})": "{0} (after creating it in the router: {1} -> {2})",
2582
2587
  "IP deste computador": "this computer's IP",
2583
2588
  "[remote-setup] Pronto.{0}": "[remote-setup] Done.{0}",
2584
- ' .env: usu\xE1rio "{0}", senha guardada s\xF3 como hash (scrypt), porta {1}': ' .env: user "{0}", password stored only as a hash (scrypt), port {1}',
2589
+ ' Acesso: usu\xE1rio "{0}", senha guardada s\xF3 como hash (scrypt), porta {1}': ' Access: user "{0}", password stored only as a hash (scrypt), port {1}',
2585
2590
  " Certificado: {0}": " Certificate: {0}",
2586
2591
  " An\xFAncio: {0}": " Announcing: {0}",
2587
2592
  " Agora rode: npm run docker:up": " Now run: npm run docker:up",
@@ -6201,13 +6206,13 @@ var ES = {
6201
6206
  // scripts/hooks-install.ts
6202
6207
  "--timeout precisa de um n\xFAmero de segundos entre 5 e 86400 (24 h).": "--timeout necesita un n\xFAmero de segundos entre 5 y 86400 (24 h).",
6203
6208
  // scripts/remote-mdns.ts
6204
- "[remote-mdns] sem HABBLAUD_REMOTE_NAME v\xE1lido no .env: rode npm run remote:setup.": "[remote-mdns] sin HABBLAUD_REMOTE_NAME v\xE1lido en el .env: ejecuta npm run remote:setup.",
6209
+ "[remote-mdns] sem HABBLAUD_REMOTE_NAME v\xE1lido na configura\xE7\xE3o: rode npm run remote:setup.": "[remote-mdns] sin HABBLAUD_REMOTE_NAME v\xE1lido en la configuraci\xF3n: ejecuta npm run remote:setup.",
6205
6210
  "[remote-mdns] sem rede: an\xFAncio suspenso.": "[remote-mdns] sin red: anuncio suspendido.",
6206
6211
  "[remote-mdns] {0} sem suporte: use o IP ou um endere\xE7o no DNS do roteador.": "[remote-mdns] {0} no compatible: usa la IP o una direcci\xF3n en el DNS del router.",
6207
6212
  "[remote-mdns] n\xE3o deu para rodar {0}: {1}": "[remote-mdns] no se pudo ejecutar {0}: {1}",
6208
6213
  "[remote-mdns] anunciando {0}.local -> {1}": "[remote-mdns] anunciando {0}.local -> {1}",
6209
6214
  // scripts/remote-setup.ts
6210
- "Uso: npm run remote:setup [-- op\xE7\xF5es]\n\nLiga o acesso pelo celular (https://<nome>.local) com usu\xE1rio, senha e HTTPS.\n\n --user <nome> usu\xE1rio do login (padr\xE3o: o seu usu\xE1rio do sistema)\n --name <nome> endere\xE7o <nome>.local (padr\xE3o: habblaud)\n --domain <endere\xE7o> endere\xE7o pr\xF3prio, ex.: meuclaude.home (precisa de uma entrada no DNS do roteador)\n --port <n> porta no computador (padr\xE3o: 443 se estiver livre, sen\xE3o 4748)\n --allow <lista> o que o celular pode fazer: permissions, messages, terminal, spawn, none (padr\xE3o: permissions)\n --password-stdin l\xEA a senha da entrada padr\xE3o (automa\xE7\xE3o), em vez de perguntar\n --no-service n\xE3o instala o servi\xE7o do an\xFAncio <nome>.local (rode npm run remote:mdns voc\xEA mesmo)\n --off desliga o acesso pelo celular (tira as linhas do .env e o servi\xE7o; mant\xE9m a CA)": "Uso: npm run remote:setup [-- opciones]\n\nActiva el acceso desde el celular (https://<nombre>.local) con usuario, contrase\xF1a y HTTPS.\n\n --user <nombre> usuario del inicio de sesi\xF3n (por defecto: tu usuario del sistema)\n --name <nombre> direcci\xF3n <nombre>.local (por defecto: habblaud)\n --domain <dominio> direcci\xF3n propia, p. ej., miclaude.home (necesita una entrada en el DNS del router)\n --port <n> puerto en el equipo (por defecto: 443 si est\xE1 libre, si no 4748)\n --allow <lista> lo que puede hacer el celular: permissions, messages, terminal, spawn, none (por defecto: permissions)\n --password-stdin lee la contrase\xF1a de la entrada est\xE1ndar (automatizaci\xF3n), en vez de preguntarla\n --no-service no instala el servicio de anuncio de <nombre>.local (ejecuta npm run remote:mdns t\xFA mismo)\n --off desactiva el acceso desde el celular (quita las l\xEDneas del .env y el servicio; mantiene la CA)",
6215
+ "Uso: npm run remote:setup [-- op\xE7\xF5es]\n\nLiga o acesso pelo celular (https://<nome>.local) com usu\xE1rio, senha e HTTPS.\n\n --user <nome> usu\xE1rio do login (padr\xE3o: o seu usu\xE1rio do sistema)\n --name <nome> endere\xE7o <nome>.local (padr\xE3o: busybits)\n --domain <endere\xE7o> endere\xE7o pr\xF3prio, ex.: meuclaude.home (precisa de uma entrada no DNS do roteador)\n --port <n> porta no computador (padr\xE3o: 443 se estiver livre, sen\xE3o 4748)\n --allow <lista> o que o celular pode fazer: permissions, messages, terminal, spawn, none (padr\xE3o: permissions)\n --password-stdin l\xEA a senha da entrada padr\xE3o (automa\xE7\xE3o), em vez de perguntar\n --no-service n\xE3o instala o servi\xE7o do an\xFAncio <nome>.local (rode npm run remote:mdns voc\xEA mesmo)\n --off desliga o acesso pelo celular (tira as linhas do arquivo de configura\xE7\xE3o e o servi\xE7o; mant\xE9m a CA)": "Uso: npm run remote:setup [-- opciones]\n\nActiva el acceso desde el celular (https://<nombre>.local) con usuario, contrase\xF1a y HTTPS.\n\n --user <nombre> usuario del inicio de sesi\xF3n (por defecto: tu usuario del sistema)\n --name <nombre> direcci\xF3n <nombre>.local (por defecto: busybits)\n --domain <dominio> direcci\xF3n propia, p. ej., miclaude.home (necesita una entrada en el DNS del router)\n --port <n> puerto en el equipo (por defecto: 443 si est\xE1 libre, si no 4748)\n --allow <lista> lo que puede hacer el celular: permissions, messages, terminal, spawn, none (por defecto: permissions)\n --password-stdin lee la contrase\xF1a de la entrada est\xE1ndar (automatizaci\xF3n), en vez de preguntarla\n --no-service no instala el servicio de anuncio de <nombre>.local (ejecuta npm run remote:mdns t\xFA mismo)\n --off desactiva el acceso desde el celular (quita las l\xEDneas del archivo de configuraci\xF3n y el servicio; mantiene la CA)",
6211
6216
  "falta o valor de {0}": "falta el valor de {0}",
6212
6217
  "op\xE7\xE3o desconhecida: {0}": "opci\xF3n desconocida: {0}",
6213
6218
  "porta inv\xE1lida": "puerto inv\xE1lido",
@@ -6217,10 +6222,15 @@ var ES = {
6217
6222
  "sem terminal para perguntar a senha: use --password-stdin": "sin terminal para pedir la contrase\xF1a: usa --password-stdin",
6218
6223
  "servi\xE7o {0} ligado (log: ~/.habblaud/logs/remote-mdns.log)": "servicio {0} activado (log: ~/.habblaud/logs/remote-mdns.log)",
6219
6224
  "n\xE3o consegui ligar o servi\xE7o: {0}": "no se pudo activar el servicio: {0}",
6220
- "Habblaud: anuncia o endere\xE7o .local do acesso pelo celular": "Busybits: anuncia la direcci\xF3n .local del acceso desde el celular",
6221
- "servi\xE7o habblaud-remote-mdns ligado (para seguir ligado sem login: loginctl enable-linger)": "servicio habblaud-remote-mdns activado (para que siga activo sin sesi\xF3n iniciada: loginctl enable-linger)",
6225
+ "Busybits: anuncia o endere\xE7o .local do acesso pelo celular": "Busybits: anuncia la direcci\xF3n .local del acceso desde el m\xF3vil",
6226
+ "servi\xE7o busybits-remote-mdns ligado (para seguir ligado sem login: loginctl enable-linger)": "servicio busybits-remote-mdns activado (para que siga activo sin sesi\xF3n: loginctl enable-linger)",
6222
6227
  "{0}: sem servi\xE7o autom\xE1tico; deixe npm run remote:mdns rodando ou use o IP": "{0}: sin servicio autom\xE1tico; deja npm run remote:mdns corriendo o usa la IP",
6223
- "[remote-setup] Acesso pelo celular desligado (a CA continua em ~/.habblaud/remote-tls). Agora: npm run docker:up": "[remote-setup] Acceso desde el celular desactivado (la CA sigue en ~/.habblaud/remote-tls). Ahora: npm run docker:up",
6228
+ "[remote-setup] Acesso pelo celular desligado (a CA continua em ~/.habblaud/remote-tls).": "[remote-setup] Acceso desde el m\xF3vil desactivado (la CA sigue en ~/.habblaud/remote-tls).",
6229
+ " Configura\xE7\xE3o: {0} (lida pelo servidor Node: servi\xE7o ou npm start)": " Configuraci\xF3n: {0} (lo lee el servidor Node: servicio o npm start)",
6230
+ " Configura\xE7\xE3o: {0} (lida pelo Docker: npm run docker:up)": " Configuraci\xF3n: {0} (lo lee Docker: npm run docker:up)",
6231
+ " Agora rode: {0}": " Ahora ejecuta: {0}",
6232
+ " Agora rode: {0} (reinicia o servi\xE7o do Busybits para ler as novas configura\xE7\xF5es)": " Ahora ejecuta: {0} (reinicia el servicio de Busybits para que lea la nueva configuraci\xF3n)",
6233
+ " Agora: reinicie o servidor do Busybits (npm start) para ler as novas configura\xE7\xF5es": " Ahora: reinicia el servidor de Busybits (npm start) para que lea la nueva configuraci\xF3n",
6224
6234
  "Usu\xE1rio do login": "Usuario de inicio de sesi\xF3n",
6225
6235
  "usu\xE1rio inv\xE1lido (sem espa\xE7os)": "usuario inv\xE1lido (sin espacios)",
6226
6236
  "senha recusada: {0}": "contrase\xF1a rechazada: {0}",
@@ -6239,7 +6249,7 @@ var ES = {
6239
6249
  "{0} (depois de criar no roteador: {1} -> {2})": "{0} (despu\xE9s de crearla en el router: {1} -> {2})",
6240
6250
  "IP deste computador": "IP de este equipo",
6241
6251
  "[remote-setup] Pronto.{0}": "[remote-setup] Listo.{0}",
6242
- ' .env: usu\xE1rio "{0}", senha guardada s\xF3 como hash (scrypt), porta {1}': ' .env: usuario "{0}", contrase\xF1a guardada solo como hash (scrypt), puerto {1}',
6252
+ ' Acesso: usu\xE1rio "{0}", senha guardada s\xF3 como hash (scrypt), porta {1}': ' Acceso: usuario "{0}", contrase\xF1a guardada solo como hash (scrypt), puerto {1}',
6243
6253
  " Certificado: {0}": " Certificado: {0}",
6244
6254
  " An\xFAncio: {0}": " Anuncio: {0}",
6245
6255
  " Agora rode: npm run docker:up": " Ejecuta: npm run docker:up",
@@ -9867,13 +9877,13 @@ var FR = {
9867
9877
  // scripts/hooks-install.ts
9868
9878
  "--timeout precisa de um n\xFAmero de segundos entre 5 e 86400 (24 h).": "--timeout attend un nombre de secondes entre 5 et 86400 (24 h).",
9869
9879
  // scripts/remote-mdns.ts
9870
- "[remote-mdns] sem HABBLAUD_REMOTE_NAME v\xE1lido no .env: rode npm run remote:setup.": "[remote-mdns] pas de HABBLAUD_REMOTE_NAME valide dans le .env : lancez npm run remote:setup.",
9880
+ "[remote-mdns] sem HABBLAUD_REMOTE_NAME v\xE1lido na configura\xE7\xE3o: rode npm run remote:setup.": "[remote-mdns] pas de HABBLAUD_REMOTE_NAME valide dans la configuration : lancez npm run remote:setup.",
9871
9881
  "[remote-mdns] sem rede: an\xFAncio suspenso.": "[remote-mdns] pas de r\xE9seau : annonce suspendue.",
9872
9882
  "[remote-mdns] {0} sem suporte: use o IP ou um endere\xE7o no DNS do roteador.": "[remote-mdns] {0} non pris en charge : utilisez l'IP ou une adresse dans le DNS du routeur.",
9873
9883
  "[remote-mdns] n\xE3o deu para rodar {0}: {1}": "[remote-mdns] impossible de lancer {0} : {1}",
9874
9884
  "[remote-mdns] anunciando {0}.local -> {1}": "[remote-mdns] annonce de {0}.local -> {1}",
9875
9885
  // scripts/remote-setup.ts
9876
- "Uso: npm run remote:setup [-- op\xE7\xF5es]\n\nLiga o acesso pelo celular (https://<nome>.local) com usu\xE1rio, senha e HTTPS.\n\n --user <nome> usu\xE1rio do login (padr\xE3o: o seu usu\xE1rio do sistema)\n --name <nome> endere\xE7o <nome>.local (padr\xE3o: habblaud)\n --domain <endere\xE7o> endere\xE7o pr\xF3prio, ex.: meuclaude.home (precisa de uma entrada no DNS do roteador)\n --port <n> porta no computador (padr\xE3o: 443 se estiver livre, sen\xE3o 4748)\n --allow <lista> o que o celular pode fazer: permissions, messages, terminal, spawn, none (padr\xE3o: permissions)\n --password-stdin l\xEA a senha da entrada padr\xE3o (automa\xE7\xE3o), em vez de perguntar\n --no-service n\xE3o instala o servi\xE7o do an\xFAncio <nome>.local (rode npm run remote:mdns voc\xEA mesmo)\n --off desliga o acesso pelo celular (tira as linhas do .env e o servi\xE7o; mant\xE9m a CA)": "Usage : npm run remote:setup [-- options]\n\nActive l'acc\xE8s depuis le t\xE9l\xE9phone (https://<nom>.local) avec nom d'utilisateur, mot de passe et HTTPS.\n\n --user <nom> nom d'utilisateur de connexion (par d\xE9faut : votre nom d'utilisateur syst\xE8me)\n --name <nom> adresse <nom>.local (par d\xE9faut : habblaud)\n --domain <adresse> adresse personnalis\xE9e, ex. : monclaude.home (n\xE9cessite une entr\xE9e dans le DNS du routeur)\n --port <n> port sur l'ordinateur (par d\xE9faut : 443 s'il est libre, sinon 4748)\n --allow <liste> ce que le t\xE9l\xE9phone peut faire : permissions, messages, terminal, spawn, none (par d\xE9faut : permissions)\n --password-stdin lit le mot de passe sur l'entr\xE9e standard (automatisation) au lieu de le demander\n --no-service n'installe pas le service d'annonce de <nom>.local (lancez npm run remote:mdns vous-m\xEAme)\n --off d\xE9sactive l'acc\xE8s depuis le t\xE9l\xE9phone (retire les lignes du .env et le service ; garde la CA)",
9886
+ "Uso: npm run remote:setup [-- op\xE7\xF5es]\n\nLiga o acesso pelo celular (https://<nome>.local) com usu\xE1rio, senha e HTTPS.\n\n --user <nome> usu\xE1rio do login (padr\xE3o: o seu usu\xE1rio do sistema)\n --name <nome> endere\xE7o <nome>.local (padr\xE3o: busybits)\n --domain <endere\xE7o> endere\xE7o pr\xF3prio, ex.: meuclaude.home (precisa de uma entrada no DNS do roteador)\n --port <n> porta no computador (padr\xE3o: 443 se estiver livre, sen\xE3o 4748)\n --allow <lista> o que o celular pode fazer: permissions, messages, terminal, spawn, none (padr\xE3o: permissions)\n --password-stdin l\xEA a senha da entrada padr\xE3o (automa\xE7\xE3o), em vez de perguntar\n --no-service n\xE3o instala o servi\xE7o do an\xFAncio <nome>.local (rode npm run remote:mdns voc\xEA mesmo)\n --off desliga o acesso pelo celular (tira as linhas do arquivo de configura\xE7\xE3o e o servi\xE7o; mant\xE9m a CA)": "Usage : npm run remote:setup [-- options]\n\nActive l'acc\xE8s depuis le t\xE9l\xE9phone (https://<nom>.local) avec nom d'utilisateur, mot de passe et HTTPS.\n\n --user <nom> nom d'utilisateur de connexion (par d\xE9faut : votre nom d'utilisateur syst\xE8me)\n --name <nom> adresse <nom>.local (par d\xE9faut : busybits)\n --domain <adresse> adresse personnalis\xE9e, ex. : monclaude.home (n\xE9cessite une entr\xE9e dans le DNS du routeur)\n --port <n> port sur l'ordinateur (par d\xE9faut : 443 s'il est libre, sinon 4748)\n --allow <liste> ce que le t\xE9l\xE9phone peut faire : permissions, messages, terminal, spawn, none (par d\xE9faut : permissions)\n --password-stdin lit le mot de passe sur l'entr\xE9e standard (automatisation) au lieu de le demander\n --no-service n'installe pas le service d'annonce de <nom>.local (lancez npm run remote:mdns vous-m\xEAme)\n --off d\xE9sactive l'acc\xE8s depuis le t\xE9l\xE9phone (retire les lignes du fichier de configuration et le service ; garde la CA)",
9877
9887
  "falta o valor de {0}": "valeur manquante pour {0}",
9878
9888
  "op\xE7\xE3o desconhecida: {0}": "option inconnue : {0}",
9879
9889
  "porta inv\xE1lida": "port invalide",
@@ -9883,10 +9893,15 @@ var FR = {
9883
9893
  "sem terminal para perguntar a senha: use --password-stdin": "pas de terminal pour demander le mot de passe : utilisez --password-stdin",
9884
9894
  "servi\xE7o {0} ligado (log: ~/.habblaud/logs/remote-mdns.log)": "service {0} activ\xE9 (journal : ~/.habblaud/logs/remote-mdns.log)",
9885
9895
  "n\xE3o consegui ligar o servi\xE7o: {0}": "impossible d'activer le service : {0}",
9886
- "Habblaud: anuncia o endere\xE7o .local do acesso pelo celular": "Busybits : annonce l'adresse .local de l'acc\xE8s depuis le t\xE9l\xE9phone",
9887
- "servi\xE7o habblaud-remote-mdns ligado (para seguir ligado sem login: loginctl enable-linger)": "service habblaud-remote-mdns activ\xE9 (pour qu'il reste actif sans session ouverte : loginctl enable-linger)",
9896
+ "Busybits: anuncia o endere\xE7o .local do acesso pelo celular": "Busybits : annonce l'adresse .local de l'acc\xE8s depuis le t\xE9l\xE9phone",
9897
+ "servi\xE7o busybits-remote-mdns ligado (para seguir ligado sem login: loginctl enable-linger)": "service busybits-remote-mdns activ\xE9 (pour qu'il reste actif sans session : loginctl enable-linger)",
9888
9898
  "{0}: sem servi\xE7o autom\xE1tico; deixe npm run remote:mdns rodando ou use o IP": "{0} : pas de service automatique ; laissez tourner npm run remote:mdns ou utilisez l'IP",
9889
- "[remote-setup] Acesso pelo celular desligado (a CA continua em ~/.habblaud/remote-tls). Agora: npm run docker:up": "[remote-setup] Acc\xE8s depuis le t\xE9l\xE9phone d\xE9sactiv\xE9 (la CA reste dans ~/.habblaud/remote-tls). Maintenant : npm run docker:up",
9899
+ "[remote-setup] Acesso pelo celular desligado (a CA continua em ~/.habblaud/remote-tls).": "[remote-setup] Acc\xE8s depuis le t\xE9l\xE9phone d\xE9sactiv\xE9 (la CA reste dans ~/.habblaud/remote-tls).",
9900
+ " Configura\xE7\xE3o: {0} (lida pelo servidor Node: servi\xE7o ou npm start)": " Configuration : {0} (lue par le serveur Node : service ou npm start)",
9901
+ " Configura\xE7\xE3o: {0} (lida pelo Docker: npm run docker:up)": " Configuration : {0} (lue par Docker : npm run docker:up)",
9902
+ " Agora rode: {0}": " Lancez maintenant : {0}",
9903
+ " Agora rode: {0} (reinicia o servi\xE7o do Busybits para ler as novas configura\xE7\xF5es)": " Lancez maintenant : {0} (red\xE9marre le service Busybits pour qu'il lise la nouvelle configuration)",
9904
+ " Agora: reinicie o servidor do Busybits (npm start) para ler as novas configura\xE7\xF5es": " Maintenant : red\xE9marrez le serveur Busybits (npm start) pour qu'il lise la nouvelle configuration",
9890
9905
  "Usu\xE1rio do login": "Nom d'utilisateur de connexion",
9891
9906
  "usu\xE1rio inv\xE1lido (sem espa\xE7os)": "nom d'utilisateur invalide (sans espaces)",
9892
9907
  "senha recusada: {0}": "mot de passe refus\xE9 : {0}",
@@ -9905,7 +9920,7 @@ var FR = {
9905
9920
  "{0} (depois de criar no roteador: {1} -> {2})": "{0} (apr\xE8s l'avoir cr\xE9\xE9e dans le routeur : {1} -> {2})",
9906
9921
  "IP deste computador": "IP de cet ordinateur",
9907
9922
  "[remote-setup] Pronto.{0}": "[remote-setup] C'est fait.{0}",
9908
- ' .env: usu\xE1rio "{0}", senha guardada s\xF3 como hash (scrypt), porta {1}': ' .env : utilisateur "{0}", mot de passe stock\xE9 uniquement sous forme de hash (scrypt), port {1}',
9923
+ ' Acesso: usu\xE1rio "{0}", senha guardada s\xF3 como hash (scrypt), porta {1}': ' Acc\xE8s : utilisateur "{0}", mot de passe stock\xE9 uniquement sous forme de hash (scrypt), port {1}',
9909
9924
  " Certificado: {0}": " Certificat : {0}",
9910
9925
  " An\xFAncio: {0}": " Annonce : {0}",
9911
9926
  " Agora rode: npm run docker:up": " Lancez : npm run docker:up",
package/mod/README.md CHANGED
@@ -1,43 +1,43 @@
1
- # Plugins do Claude Code do Busybits
2
-
3
- O repositório é também um marketplace de plugins do Claude Code: `.claude-plugin/marketplace.json` (na raiz)
4
- lista o marketplace `habblaud` com três plugins, um em cada pasta daqui: o mod `busybits` (só observa; mora na pasta `mod/habblaud`),
5
- `busybits-permissions` (responder permissões pelo escritório) e `busybits-messages` (mandar mensagens pelo
6
- escritório). O `npm run mod:install` instala os três; `--sem-permissoes` e `--sem-mensagens` deixam o seu de fora.
7
- As versões acompanham o `package.json` (o teste `server/test/mod.test.ts` falha se divergirem).
8
-
9
- Testado com o **Claude Code 2.1.293** (o `busybits-messages`, por enquanto só pelo `claude plugin test` do
10
- 2.1.295). Mods (hooks em TypeScript carregados pelo próprio Claude Code) existem a partir da 2.1.287; a API ainda é
11
- "early access" e pode mudar entre versões. Em versões anteriores, use os instaladores de sempre
12
- (`npm run usage:install` e `npm run hooks:install`); mandar mensagens pelo escritório só existe com o mod. A
13
- instalação está no README principal.
14
-
15
- ## `busybits` — o mod
16
-
17
- `habblaud/hooks/register.ts`, um módulo só, sem build. Liga cada sessão ao escritório sem ler a conversa:
18
-
19
- - **Uso do plano (5h e semanal):** no início da sessão e a cada `session.measure` (depois de cada turno e quando
20
- um limite anda um ponto) lê `$.session.usage().rateLimits` e grava `~/.habblaud/usage/<conta>.json` (ou em
21
- `HABBLAUD_USAGE_DIR`) no mesmo formato do tap de statusline, mais `"source": "mod"`. Substitui o
22
- `npm run usage:install`: o seu statusline fica intocado. A conta é a pasta de `CLAUDE_CONFIG_DIR` (o primeiro
23
- item) ou `~/.claude` (`~` é o `HOME`; no Windows sem ele, o `USERPROFILE`). Valores iguais gravados há menos de
24
- 10 s não são regravados; falha ao gravar = silêncio.
25
- - **"Precisa de você" embaixo do prompt:** a cada 5 s pergunta ao Busybits local
26
- (`GET http://127.0.0.1:<HABBLAUD_PORT ou 4747>/api/mod/summary`) quem está esperando, já sem esta sessão e os
27
- subagentes dela, e mostra `🏢 Valentina precisa de você em loja-virtual` ou
28
- `🏢 2 precisam de você: Valentina (loja-virtual), Elias (app-mobile)` (até 3 nomes, depois "e mais N").
29
- Ninguém esperando ou Busybits fora do ar: a linha some; fora do ar, as perguntas passam a ser a cada 30 s até
30
- ele voltar. Só em sessões que desenham (no `claude -p` não pergunta nada).
31
- - **`/busybits`:** resumo do escritório inteiro, respondido pelo próprio mod (não chama o modelo, não gasta uso):
1
+ # Busybits plugins for Claude Code
2
+
3
+ The repository is also a Claude Code plugin marketplace: `.claude-plugin/marketplace.json` (at the root)
4
+ lists the `busybits` marketplace with three plugins, each in a folder here: the `busybits` mod (observe-only; it lives in the `mod/habblaud` folder),
5
+ `busybits-permissions` (answer permission requests from the office; `mod/habblaud-permissoes`) and `busybits-messages` (send messages from the
6
+ office; `mod/habblaud-mensagens`). `npm run mod:install` installs all three; `--sem-permissoes` and `--sem-mensagens` leave theirs out.
7
+ Versions follow `package.json` (the test `server/test/mod.test.ts` fails if they diverge).
8
+
9
+ Tested with **Claude Code 2.1.293** (`busybits-messages`, for now only through `claude plugin test` on
10
+ 2.1.295). Mods (TypeScript hooks loaded by Claude Code itself) exist from 2.1.287 on; the API is still
11
+ "early access" and may change between versions. On older versions, use the usual installers
12
+ (`npm run usage:install` and `npm run hooks:install`); sending messages from the office only exists with the mod.
13
+ Installation is covered in the main README.
14
+
15
+ ## `busybits` — the mod
16
+
17
+ `habblaud/hooks/register.ts`, a single module, no build. It connects each session to the office without reading the conversation:
18
+
19
+ - **Plan usage (5h and weekly):** at session start and on every `session.measure` (after each turn and when
20
+ a limit moves by a point) it reads `$.session.usage().rateLimits` and writes `~/.habblaud/usage/<account>.json` (or to
21
+ `HABBLAUD_USAGE_DIR`) in the same format as the statusline tap, plus `"source": "mod"`. It replaces
22
+ `npm run usage:install`: your statusline is left untouched. The account is the `CLAUDE_CONFIG_DIR` folder (the first
23
+ item) or `~/.claude` (`~` is `HOME`; on Windows without it, `USERPROFILE`). Identical values written less than
24
+ 10 s ago are not rewritten; a write failure is silent.
25
+ - **"Needs you" under the prompt:** every 5 s it asks the local Busybits
26
+ (`GET http://127.0.0.1:<HABBLAUD_PORT or 4747>/api/mod/summary`) who is waiting, already excluding this session and its
27
+ subagents, and shows `🏢 Valentina needs you in loja-virtual` or
28
+ `🏢 2 need you: Valentina (loja-virtual), Elias (app-mobile)` (up to 3 names, then "and N more").
29
+ Nobody waiting or Busybits down: the line disappears; while it is down, the polling drops to every 30 s until
30
+ it is back. Only in sessions that draw a UI (`claude -p` asks nothing).
31
+ - **`/busybits`:** a summary of the whole office, answered by the mod itself (it does not call the model and spends no usage):
32
32
 
33
33
  ```
34
- Busybits 0.3.0 em http://localhost:4747
35
- 7 agentes · 3 trabalhando · 2 precisam de você
36
- ✋ Valentina (loja-virtual): aprovar uma permissão · dá para responder pelo escritório
37
- ✋ Elias (app-mobile): responder no terminal
34
+ Busybits 2.0.1 at http://localhost:4747
35
+ 7 agents · 3 working · 2 need you
36
+ ✋ Valentina (loja-virtual): approve a permission · you can answer from the office
37
+ ✋ Elias (app-mobile): answer in the terminal
38
38
  ```
39
39
 
40
- Fora do ar: `O Busybits não respondeu em http://localhost:4747. Para subir: npm run docker:up na pasta do Busybits.`
40
+ When Busybits is down: `Busybits did not answer at http://localhost:4747. To start it: npm run docker:up in the Busybits folder.`
41
41
 
42
42
  ### Language
43
43
 
@@ -54,10 +54,10 @@ The plugin id is now `busybits@busybits`, in a marketplace named `busybits` (it
54
54
  removes every `*@habblaud` plugin and the `habblaud` marketplace in each account before adding `busybits`, and
55
55
  `npm run mod:uninstall` removes both generations. A packaged install (`busybits setup`) does the same switch, pointing the marketplace at `~/.busybits/marketplace`; until then `npm run mod:status` and `docker:up` report the old name.
56
56
 
57
- ### O que ele acessa
57
+ ### What it accesses
58
58
 
59
- Saída de `claude plugin validate --strict mod/habblaud` (a análise estática que o Claude Code faz antes de
60
- carregar o módulo; nada fora desta lista é chamado):
59
+ Output of `claude plugin validate --strict mod/habblaud` (the static analysis Claude Code runs before
60
+ loading the module; nothing outside this list is called):
61
61
 
62
62
  ```
63
63
  ❯ ./register.ts hooks: session.start, session.measure, command.run{command=busybits}
@@ -67,68 +67,68 @@ carregar o módulo; nada fora desta lista é chamado):
67
67
  ❯ ./register.ts env reads: CLAUDE_CONFIG_DIR, HABBLAUD_LANG, HABBLAUD_PORT, HABBLAUD_USAGE_DIR, HOME, LANG, LANGUAGE, LC_ALL, LC_MESSAGES, USERPROFILE
68
68
  ```
69
69
 
70
- Em palavras: só observa (nenhum hook decide nada: não aprova ferramentas, não muda prompts, não lê mensagens),
71
- grava um único arquivo (o de uso), fala só com `127.0.0.1` e lê dez variáveis de ambiente. `$.clock.after` é o
72
- prazo de 2 s de cada pergunta ao Busybits (`$.http.fetch` não aceita AbortSignal).
70
+ In plain words: it only observes (no hook decides anything: it does not approve tools, change prompts or read messages),
71
+ writes a single file (the usage one), talks only to `127.0.0.1` and reads ten environment variables. `$.clock.after` is the
72
+ 2 s deadline of each question to Busybits (`$.http.fetch` does not accept an AbortSignal).
73
73
 
74
- ## `busybits-permissions` — responder permissões pelo escritório
74
+ ## `busybits-permissions` — answer permissions from the office
75
75
 
76
- Um hook `PermissionRequest` comum (sem mod), em `habblaud-permissoes/hooks/hooks.json`:
76
+ A regular `PermissionRequest` hook (no mod), in `habblaud-permissoes/hooks/hooks.json`:
77
77
 
78
78
  ```json
79
79
  { "matcher": "*", "hooks": [{ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/permission-hook.mjs\"", "timeout": 86430, "statusMessage": "Aguardando resposta no Busybits" }] }
80
80
  ```
81
81
 
82
- O script `hooks/permission-hook.mjs` é o mesmo que o `npm run hooks:install` instala (fonte única; Node puro, só
83
- `node:*`, porque o Claude Code copia apenas a pasta do plugin para o cache). Ele manda o pedido ao Busybits local
84
- e espera a resposta por até 5 min; o diálogo continua no terminal e vale o que você responder primeiro. Sem o
85
- Busybits no ar ou sem nenhuma página aberta, sai na hora. Porta: `HABBLAUD_PORT` (padrão 4747); espera:
86
- `HABBLAUD_PERMISSION_TIMEOUT` (padrão 300 s, até 86400 s = 24 h; o tempo limite do hook no plugin é 86430 s). Para aprovar
87
- pelo celular longe do computador, ponha `"env": { "HABBLAUD_PERMISSION_TIMEOUT": "86400" }` no `settings.json` da
88
- conta: vale para as sessões abertas depois. Subagentes em segundo plano só mostram o diálogo quando o hook termina,
89
- por isso o padrão continua 5 min. Precisa de `node` 22+ no `PATH` da sessão.
90
-
91
- `claude plugin validate --strict mod/habblaud-permissoes`: `✔ Validation passed` (o validador também confere o
92
- esquema do `hooks.json`).
93
-
94
- ## `busybits-messages` — mensagens pelo escritório
95
-
96
- `habblaud-mensagens/hooks/register.ts`, um módulo só, sem build. Leva para a sessão o que você digita no escritório
97
- (no painel do agente ou no terminal da tecla T), como se você tivesse digitado no terminal:
98
-
99
- - **Busca:** a cada 2 s, só em sessões que desenham (no `claude -p` não pergunta nada),
100
- `POST http://127.0.0.1:<HABBLAUD_PORT ou 4747>/api/mod/inbox` com `{session, account}`. A pergunta também marca a
101
- sessão como presente: é ela que mostra, na página, a caixa de mensagem do agente (sem o plugin, a página dá a dica
102
- de instalar). Fora do ar, ou respondendo outra coisa (403 com as mensagens desligadas, 404 numa versão sem a
103
- rota), passa a perguntar a cada 30 s até ele voltar.
104
- - **Entrega:** cada mensagem, na ordem, vai por `$.prompt.submit({ text, asUser: true })`. O modelo lê o texto como
105
- seu, sem o "The busybits-messages plugin sent a message" (o registro da sessão ainda diz que veio do plugin), e o
106
- texto vai exatamente como foi digitado. Com a sessão no meio de um turno, o Claude Code guarda o prompt e o roda
107
- num turno só dele quando o atual terminar (um prompt de plugin nunca entra no meio do turno, como um digitado
108
- pode entrar). Um hook que recuse a mensagem (`{drop}`) ou uma exceção viram falha, com o motivo, na página.
109
- - **Comandos de barra:** a mensagem que começa por `/nome argumentos`, com `nome` na lista de `$.command.list()`,
110
- roda por `$.command.run({ command, args })` em vez de `$.prompt.submit` (o Claude Code recusa em `$.prompt.submit`
111
- todo texto que comece por `/`), e o desfecho (ok ou o erro) segue na confirmação. Com a lista fora do ar, quem
112
- decide é o `$.command.run`, que rejeita nome desconhecido. Texto que começa por `/` e não é comando da sessão
113
- (`/etc/hosts`, erro de digitação) falha com o motivo, sem ir à sessão. A mesma lista vai ao Busybits em
114
- `POST /api/mod/commands` com `{session, account, commands: [{name, description, source, plugin?}]}`, só quando muda
115
- e de minuto em minuto (o Busybits pode ter reiniciado): é ela que alimenta o autocompletar da caixa. Comandos que
116
- abrem um menu interativo (`/model` sem argumento, `/config`) não têm o que mostrar no escritório: dê argumentos ou
117
- use o terminal. O texto que o comando imprime não volta para a página.
118
- - **Confirmação:** um `POST /api/mod/inbox/ack` com o resultado de cada uma (`{session, results: [{id, ok, error?}]}`).
119
- A espera por mensagem (ou comando) é de no máximo 2 s: passou disso, a sessão está ocupada, a mensagem está na fila dela e
120
- conta como entregue (as seguintes vão em seguida, na ordem). Assim uma rodada nunca passa de uns poucos segundos e
121
- a presença (10 s) e a confirmação (30 s) do servidor não vencem com a sessão ocupada; o preço é que uma recusa
122
- depois desses 2 s não chega à página.
123
-
124
- Fica separado do mod `habblaud` de propósito: aquele só observa; este age, digitando na sessão em seu nome. Para
125
- ficar sem ele: `npm run mod:install -- --sem-mensagens` (um já instalado continua; para tirar:
126
- `claude plugin uninstall busybits-messages@busybits`). O `npm run docker:up` atualiza o plugin de quem já o tem,
127
- mas não o instala sozinho: numa conta com o mod e sem ele, só dá a dica de rodar o `npm run mod:install`.
128
-
129
- ### O que ele acessa
130
-
131
- Saída de `claude plugin validate --strict mod/habblaud-mensagens`:
82
+ The `hooks/permission-hook.mjs` script is the same one `npm run hooks:install` installs (single source; plain Node, only
83
+ `node:*`, because Claude Code copies only the plugin folder into its cache). It sends the request to the local Busybits
84
+ and waits for the answer for up to 5 min; the dialog stays in the terminal and whatever you answer first wins. Without
85
+ Busybits running, or without any open page, it exits immediately. Port: `HABBLAUD_PORT` (default 4747); wait:
86
+ `HABBLAUD_PERMISSION_TIMEOUT` (default 300 s, up to 86400 s = 24 h; the hook timeout in the plugin is 86430 s). To approve
87
+ from your phone while away from the computer, put `"env": { "HABBLAUD_PERMISSION_TIMEOUT": "86400" }` in the account's
88
+ `settings.json`: it applies to sessions opened afterwards. Background subagents only show the dialog once the hook finishes,
89
+ which is why the default stays at 5 min. Requires `node` 22+ on the session's `PATH`.
90
+
91
+ `claude plugin validate --strict mod/habblaud-permissoes`: `✔ Validation passed` (the validator also checks the
92
+ `hooks.json` schema).
93
+
94
+ ## `busybits-messages` — messages from the office
95
+
96
+ `habblaud-mensagens/hooks/register.ts`, a single module, no build. It brings into the session what you type in the office
97
+ (in the agent panel or in the terminal opened with the T key), as if you had typed it in the terminal:
98
+
99
+ - **Polling:** every 2 s, only in sessions that draw a UI (`claude -p` asks nothing),
100
+ `POST http://127.0.0.1:<HABBLAUD_PORT or 4747>/api/mod/inbox` with `{session, account}`. The request also marks the
101
+ session as present: that is what shows the agent's message box on the page (without the plugin, the page shows a hint
102
+ to install it). When Busybits is down, or answers something else (403 with messages turned off, 404 on a version without the
103
+ route), it polls every 30 s until it is back.
104
+ - **Delivery:** each message, in order, goes through `$.prompt.submit({ text, asUser: true })`. The model reads the text as
105
+ yours, without the "The busybits-messages plugin sent a message" prefix (the session log still says it came from the plugin), and the
106
+ text goes exactly as typed. If the session is in the middle of a turn, Claude Code holds the prompt and runs it
107
+ in a turn of its own when the current one ends (a plugin prompt never enters mid-turn, the way a typed one
108
+ can). A hook that refuses the message (`{drop}`) or an exception becomes a failure, with the reason, on the page.
109
+ - **Slash commands:** a message that starts with `/name arguments`, with `name` in the `$.command.list()` list,
110
+ runs through `$.command.run({ command, args })` instead of `$.prompt.submit` (Claude Code refuses any text that starts with `/`
111
+ in `$.prompt.submit`), and the outcome (ok or the error) follows in the acknowledgement. With the list unavailable, the decision is
112
+ left to `$.command.run`, which rejects unknown names. Text that starts with `/` and is not a session command
113
+ (`/etc/hosts`, a typo) fails with the reason, without reaching the session. The same list goes to Busybits in
114
+ `POST /api/mod/commands` with `{session, account, commands: [{name, description, source, plugin?}]}`, only when it changes
115
+ and once a minute (Busybits may have restarted): it feeds the box's autocomplete. Commands that
116
+ open an interactive menu (`/model` without an argument, `/config`) have nothing to show in the office: pass arguments or
117
+ use the terminal. The text the command prints does not come back to the page.
118
+ - **Acknowledgement:** a `POST /api/mod/inbox/ack` with the result of each one (`{session, results: [{id, ok, error?}]}`).
119
+ Waiting for a message (or command) takes at most 2 s: past that, the session is busy, the message is in its queue and
120
+ counts as delivered (the following ones go right after, in order). This way a round never takes more than a few seconds and
121
+ the server's presence (10 s) and confirmation (30 s) windows do not expire while the session is busy; the price is that a refusal
122
+ after those 2 s does not reach the page.
123
+
124
+ It is kept separate from the `busybits` mod on purpose: that one only observes; this one acts, typing into the session on your behalf. To
125
+ go without it: `npm run mod:install -- --sem-mensagens` (one already installed stays; to remove it:
126
+ `claude plugin uninstall busybits-messages@busybits`). `npm run docker:up` updates the plugin for accounts that already have it,
127
+ but does not install it by itself: on an account with the mod and without it, it only hints to run `npm run mod:install`.
128
+
129
+ ### What it accesses
130
+
131
+ Output of `claude plugin validate --strict mod/habblaud-mensagens`:
132
132
 
133
133
  ```
134
134
  ❯ ./register.ts hooks: session.start
@@ -137,57 +137,57 @@ Saída de `claude plugin validate --strict mod/habblaud-mensagens`:
137
137
  ❯ ./register.ts env reads: CLAUDE_CODE_ENTRYPOINT, CLAUDE_CONFIG_DIR, HABBLAUD_PORT, HOME, USERPROFILE
138
138
  ```
139
139
 
140
- Em palavras: um hook só (`session.start`, que liga o relógio das rodadas); as únicas ações na sessão são o
141
- `$.prompt.submit` das mensagens e o `$.command.run` dos comandos de barra que você manda (`$.command.list` só lê os
142
- nomes e as descrições dos comandos para publicá-los); não lê a conversa, não grava arquivo nenhum, fala só com `127.0.0.1` e lê quatro
143
- variáveis de ambiente (a conta sai do `CLAUDE_CONFIG_DIR`, como no mod). `$.clock.after` é o prazo de 2 s de cada
144
- pedido ao Busybits, de cada `$.prompt.submit`, `$.command.run` e `$.command.list`.
145
-
146
- Porta: `HABBLAUD_PORT` (padrão 4747). Precisa do Claude Code 2.1.287+ e de um Busybits com as mensagens ligadas: a
147
- mesma trava do terminal e das permissões (porta presa ao `127.0.0.1` e cabeçalho Host local) e `HABBLAUD_MENSAGENS`
148
- não desligado (`0`, `false`, `off` ou `no` desligam). Qualquer processo desta máquina que fale com o Busybits
149
- consegue mandar uma mensagem às sessões com o plugin: por isso a trava local.
150
-
151
- ## `habblaud-pi` — Gentle Shell e Pi
152
-
153
- Não é um plugin do Claude Code: é uma extensão do Pi (`habblaud-pi/extension.ts`, TypeScript carregado pelo próprio Pi, sem
154
- build; a lógica testável está em `core.ts`, sem dependência do Pi). Instalação: `npm run pi:install` (ou `npm run setup`),
155
- que põe a pasta `mod/habblaud-pi` em `packages` do `settings.json` de `~/.gentle-shell/agent` e de `~/.pi/agent`
156
- (o que o `pi install <pasta>` faz; com backup, idempotente, sem tocar em `auth.json` nem em `mcp*.json`);
157
- `npm run pi:status` e `npm run pi:uninstall` completam. Sessões abertas precisam ser reabertas (ou `/reload` no Pi).
158
-
159
- - **Mensagens:** o mesmo protocolo do `busybits-messages` (`/api/mod/inbox`, `/ack` e `/commands`), só em sessões com tela
160
- (`ctx.mode === "tui"`; subagentes, `-p` e RPC não buscam nada). Entrega com `pi.sendUserMessage`: a sessão ociosa recebe
161
- na hora e, no meio de um turno, a mensagem entra como `followUp`. `/comando` da lista de `pi.getCommands()` (extensões,
162
- prompt templates e skills) roda com `expandPromptTemplates`; o resto de `/...` falha com o motivo (os comandos embutidos
163
- do Pi só rodam no terminal).
164
- - **Precisa de você:** o Pi emite `ui_prompt_start` / `ui_prompt_end` (tipo e título) quando uma extensão abre uma caixa
165
- bloqueante. O guard do gentle-pi pergunta com `ctx.ui.confirm("Allow guarded git push?", <prévia do comando>)`
166
- (`extensions/gentle-ai.ts`, `confirmCommand`) e emite também `pi-permission-system:permission-request` (sem o
167
- comando). Com o agente trabalhando, a extensão avisa o Busybits (`POST /api/permissions` com `answerable: false`, o
168
- comando vindo da chamada de ferramenta em aberto) e libera o aviso quando a caixa fecha.
169
- **Responder pelo escritório não é possível com segurança:** os eventos só observam, o `confirm` é resolvido pela
170
- interface do terminal e o Pi não expõe como responder a caixa de outra extensão; a única saída seria substituir o
171
- `ctx.ui.confirm` por dentro, o que muda a semântica do guard (a decisão sairia de outro lugar que não a caixa do
172
- terminal). Por isso o escritório mostra que o agente espera, com o comando, e a resposta continua no terminal.
173
- - **O que acessa:** `127.0.0.1:<HABBLAUD_PORT ou 4747>` (nenhum outro destino), as variáveis `HABBLAUD_PORT`, `HABBLAUD_PI`
174
- (`0`, `false`, `off` ou `no` desligam) e `GENTLE_PI_AGENTS_CHILD`; não lê a conversa, não grava arquivo, não bloqueia nem
175
- decide nenhuma chamada de ferramenta (o handler de `tool_call` só observa).
176
- - Testes: `server/sources/gentle-shell/pi-extension.test.ts` (núcleo e extensão contra o Busybits de verdade, com um Pi
177
- falso), `pi-install.test.ts` e `setup.test.ts` (HOME falso).
178
-
179
- ## Desenvolver
140
+ In plain words: a single hook (`session.start`, which starts the round clock); the only actions on the session are
141
+ `$.prompt.submit` for messages and `$.command.run` for the slash commands you send (`$.command.list` only reads the
142
+ command names and descriptions to publish them); it does not read the conversation, does not write any file, talks only to `127.0.0.1` and reads four
143
+ environment variables (the account comes from `CLAUDE_CONFIG_DIR`, as in the mod). `$.clock.after` is the 2 s deadline of each
144
+ request to Busybits, and of each `$.prompt.submit`, `$.command.run` and `$.command.list`.
145
+
146
+ Port: `HABBLAUD_PORT` (default 4747). Requires Claude Code 2.1.287+ and a Busybits with messages turned on: the
147
+ same lock as the terminal and permissions (port bound to `127.0.0.1` and a local Host header) and `HABBLAUD_MENSAGENS`
148
+ not turned off (`0`, `false`, `off` or `no` turn it off). Any process on this machine that talks to Busybits
149
+ can send a message to the sessions that have the plugin: that is why the lock is local.
150
+
151
+ ## `habblaud-pi` — Gentle Shell and Pi
152
+
153
+ Not a Claude Code plugin: it is a Pi extension (`habblaud-pi/extension.ts`, TypeScript loaded by Pi itself, no
154
+ build; the testable logic is in `core.ts`, with no Pi dependency). Installation: `npm run pi:install` (or `npm run setup`),
155
+ which adds the `mod/habblaud-pi` folder to `packages` in the `settings.json` of `~/.gentle-shell/agent` and of `~/.pi/agent`
156
+ (what `pi install <folder>` does; with a backup, idempotent, without touching `auth.json` or `mcp*.json`);
157
+ `npm run pi:status` and `npm run pi:uninstall` complete the set. Open sessions must be reopened (or run `/reload` in Pi).
158
+
159
+ - **Messages:** the same protocol as `busybits-messages` (`/api/mod/inbox`, `/ack` and `/commands`), only in sessions with a UI
160
+ (`ctx.mode === "tui"`; subagents, `-p` and RPC fetch nothing). Delivery uses `pi.sendUserMessage`: an idle session receives
161
+ it right away and, in the middle of a turn, the message enters as a `followUp`. A `/command` from the `pi.getCommands()` list (extensions,
162
+ prompt templates and skills) runs with `expandPromptTemplates`; any other `/...` fails with the reason (Pi's built-in commands
163
+ only run in the terminal).
164
+ - **Needs you:** Pi emits `ui_prompt_start` / `ui_prompt_end` (type and title) when an extension opens a blocking
165
+ box. The gentle-pi guard asks with `ctx.ui.confirm("Allow guarded git push?", <command preview>)`
166
+ (`extensions/gentle-ai.ts`, `confirmCommand`) and also emits `pi-permission-system:permission-request` (without the
167
+ command). While the agent is working, the extension tells Busybits (`POST /api/permissions` with `answerable: false`, the
168
+ command taken from the open tool call) and releases the notice when the box closes.
169
+ **Answering from the office is not possible safely:** the events only observe, `confirm` is resolved by the
170
+ terminal UI and Pi does not expose a way to answer another extension's box; the only way out would be to replace
171
+ `ctx.ui.confirm` from the inside, which changes the guard's semantics (the decision would come from somewhere other than the
172
+ terminal box). That is why the office shows that the agent is waiting, with the command, and the answer stays in the terminal.
173
+ - **What it accesses:** `127.0.0.1:<HABBLAUD_PORT or 4747>` (no other destination), the variables `HABBLAUD_PORT`, `HABBLAUD_PI`
174
+ (`0`, `false`, `off` or `no` turn it off) and `GENTLE_PI_AGENTS_CHILD`; it does not read the conversation, does not write files, and does not block or
175
+ decide any tool call (the `tool_call` handler only observes).
176
+ - Tests: `server/sources/gentle-shell/pi-extension.test.ts` (core and extension against a real Busybits, with a fake
177
+ Pi), `pi-install.test.ts` and `setup.test.ts` (fake HOME).
178
+
179
+ ## Development
180
180
 
181
181
  ```bash
182
- claude --plugin-dir mod/habblaud # carrega o mod numa sessão, sem instalar (recarrega ao salvar)
183
- claude -p "/busybits" --plugin-dir mod/habblaud # testa o comando sem sessão interativa (não chama o modelo)
184
- cd mod/habblaud && claude plugin test # testes do mod (tests/*.test.ts), sem sessão, login nem rede
185
- cd mod/habblaud-mensagens && claude plugin test # idem para o plugin de mensagens
186
- claude plugin validate --strict mod/habblaud # análise estática + manifesto (idem para as outras pastas e .)
187
- npx tsc -p mod/habblaud # tipos (depois de carregar o mod uma vez com --plugin-dir)
182
+ claude --plugin-dir mod/habblaud # loads the mod in a session, without installing (reloads on save)
183
+ claude -p "/busybits" --plugin-dir mod/habblaud # tests the command without an interactive session (does not call the model)
184
+ cd mod/habblaud && claude plugin test # mod tests (tests/*.test.ts), no session, login or network
185
+ cd mod/habblaud-mensagens && claude plugin test # same for the messages plugin
186
+ claude plugin validate --strict mod/habblaud # static analysis + manifest (same for the other folders and .)
187
+ npx tsc -p mod/habblaud # types (after loading the mod once with --plugin-dir)
188
188
  ```
189
189
 
190
- Ao carregar um mod, o Claude Code grava os tipos da versão instalada em `<pasta>/.claude-plugin/types/` e um
191
- `<pasta>/tsconfig.json` que os estende; os dois são gerados e ficam fora do git (`mod/.gitignore`). Os testes dos
192
- mods importam `claude-code/testing` e só rodam pelo `claude plugin test`: o `npm test` (vitest) e o
193
- `npm run typecheck` não olham esta pasta.
190
+ When loading a mod, Claude Code writes the types of the installed version to `<folder>/.claude-plugin/types/` and a
191
+ `<folder>/tsconfig.json` that extends them; both are generated and kept out of git (`mod/.gitignore`). The mod tests
192
+ import `claude-code/testing` and only run through `claude plugin test`: `npm test` (vitest) and
193
+ `npm run typecheck` do not look at this folder.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "busybits",
3
3
  "displayName": "Busybits",
4
- "version": "2.0.0",
4
+ "version": "2.0.1",
5
5
  "description": "Connects the session to Busybits: records plan usage (5h and weekly) for the office, shows a line under the prompt when another session needs you, and adds the /busybits command.",
6
6
  "author": { "name": "Márcio Junior", "url": "https://github.com/marmottajr" },
7
7
  "homepage": "https://github.com/marmottajr/habblaud#readme",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "busybits-messages",
3
3
  "displayName": "Busybits: messages from the office",
4
- "version": "2.0.0",
4
+ "version": "2.0.1",
5
5
  "description": "Delivers to the Claude Code session the messages you type in Busybits (agent panel or terminal), as if you had typed them in the terminal.",
6
6
  "author": { "name": "Márcio Junior", "url": "https://github.com/marmottajr" },
7
7
  "homepage": "https://github.com/marmottajr/habblaud#readme",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "busybits-permissions",
3
3
  "displayName": "Busybits: permissions from the office",
4
- "version": "2.0.0",
4
+ "version": "2.0.1",
5
5
  "description": "PermissionRequest hook that lets you approve or deny Claude Code permission requests and answer AskUserQuestion prompts from Busybits; the dialog stays in the terminal and whichever answer comes first wins.",
6
6
  "author": { "name": "Márcio Junior", "url": "https://github.com/marmottajr" },
7
7
  "homepage": "https://github.com/marmottajr/habblaud#readme",