@jossuealcala/madre 1.0.4 → 1.0.5

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 (104) hide show
  1. package/CHANGELOG.en.md +106 -1
  2. package/CHANGELOG.md +106 -1
  3. package/NOTICE +30 -0
  4. package/README.en.md +59 -156
  5. package/README.md +60 -161
  6. package/TRADEMARKS.md +18 -0
  7. package/bin/madre.mjs +2 -2
  8. package/docs/REFERENCE.md +1 -1
  9. package/docs/SDK.md +25 -4
  10. package/docs/en/REFERENCE.md +1 -1
  11. package/docs/en/SDK.md +22 -2
  12. package/docs/madre-banner.png +0 -0
  13. package/package.json +1 -1
  14. package/public/app.js +1078 -239
  15. package/public/assets/manual/madre-manual-en.pdf +0 -0
  16. package/public/assets/manual/madre-manual-es.pdf +0 -0
  17. package/public/assets/manual/shots/en-agents.webp +0 -0
  18. package/public/assets/manual/shots/en-code.webp +0 -0
  19. package/public/assets/manual/shots/en-composer.webp +0 -0
  20. package/public/assets/manual/shots/en-connectors.webp +0 -0
  21. package/public/assets/manual/shots/en-continuity.webp +0 -0
  22. package/public/assets/manual/shots/en-coordinator.webp +0 -0
  23. package/public/assets/manual/shots/en-copilot.webp +0 -0
  24. package/public/assets/manual/shots/en-diagnostics.webp +0 -0
  25. package/public/assets/manual/shots/en-home.webp +0 -0
  26. package/public/assets/manual/shots/en-local.webp +0 -0
  27. package/public/assets/manual/shots/en-memory.webp +0 -0
  28. package/public/assets/manual/shots/en-modes.webp +0 -0
  29. package/public/assets/manual/shots/en-modules.webp +0 -0
  30. package/public/assets/manual/shots/en-notes.webp +0 -0
  31. package/public/assets/manual/shots/en-settings.webp +0 -0
  32. package/public/assets/manual/shots/en-windows.webp +0 -0
  33. package/public/assets/manual/shots/es-agents.webp +0 -0
  34. package/public/assets/manual/shots/es-code.webp +0 -0
  35. package/public/assets/manual/shots/es-composer.webp +0 -0
  36. package/public/assets/manual/shots/es-connectors.webp +0 -0
  37. package/public/assets/manual/shots/es-continuity.webp +0 -0
  38. package/public/assets/manual/shots/es-coordinator.webp +0 -0
  39. package/public/assets/manual/shots/es-copilot.webp +0 -0
  40. package/public/assets/manual/shots/es-diagnostics.webp +0 -0
  41. package/public/assets/manual/shots/es-home.webp +0 -0
  42. package/public/assets/manual/shots/es-local.webp +0 -0
  43. package/public/assets/manual/shots/es-memory.webp +0 -0
  44. package/public/assets/manual/shots/es-modes.webp +0 -0
  45. package/public/assets/manual/shots/es-modules.webp +0 -0
  46. package/public/assets/manual/shots/es-notes.webp +0 -0
  47. package/public/assets/manual/shots/es-settings.webp +0 -0
  48. package/public/assets/manual/shots/es-windows.webp +0 -0
  49. package/public/en.js +74 -0
  50. package/public/es.js +493 -136
  51. package/public/i18n.js +45 -7
  52. package/public/index.html +2 -3
  53. package/public/manual-content.js +657 -0
  54. package/public/manual-shots.js +43 -0
  55. package/public/manual.css +228 -0
  56. package/public/manual.html +15 -0
  57. package/public/manual.js +398 -0
  58. package/public/market-art.js +56 -0
  59. package/public/market-view.js +140 -22
  60. package/public/market.js +25 -14
  61. package/public/mcp-catalog.js +62 -0
  62. package/public/resay.js +1 -0
  63. package/public/salas-mac.css +178 -30
  64. package/public/salas-mac.html +5 -5
  65. package/public/salas-mac.js +432 -67
  66. package/public/styles.css +300 -42
  67. package/public/tour-chapters.js +98 -90
  68. package/public/tour.js +63 -21
  69. package/public/troubleshooting.js +145 -10
  70. package/src/adapters/cursor.mjs +56 -7
  71. package/src/adapters/gemini.mjs +12 -1
  72. package/src/adapters/madre.mjs +27 -6
  73. package/src/adapters/process.mjs +5 -2
  74. package/src/auth-probe.mjs +22 -3
  75. package/src/bridge/policy.mjs +1 -1
  76. package/src/bridge/server.mjs +1 -1
  77. package/src/capabilities.mjs +3 -3
  78. package/src/credentials.mjs +24 -2
  79. package/src/history.mjs +76 -0
  80. package/src/i18n.mjs +23 -1
  81. package/src/local-ai.mjs +10 -2
  82. package/src/looks.mjs +17 -5
  83. package/src/market-license.mjs +104 -0
  84. package/src/market-remote.mjs +17 -1
  85. package/src/mcp/notes-server.mjs +120 -0
  86. package/src/mcp/proxy.mjs +14 -3
  87. package/src/models.mjs +82 -9
  88. package/src/modules/index.mjs +3 -1
  89. package/src/modules/local-models.mjs +28 -0
  90. package/src/modules/notes.mjs +142 -0
  91. package/src/modules/ollama.mjs +39 -10
  92. package/src/modules/playwright.mjs +14 -3
  93. package/src/modules/reminders.mjs +345 -0
  94. package/src/modules/sdk.mjs +21 -5
  95. package/src/mother.mjs +11 -1
  96. package/src/ollama.mjs +2 -2
  97. package/src/opencode-health.mjs +63 -0
  98. package/src/outbound.mjs +25 -1
  99. package/src/reminder-time.mjs +127 -0
  100. package/src/room.mjs +19 -7
  101. package/src/runtime-detection.mjs +6 -2
  102. package/src/sentinel-errors.mjs +4 -3
  103. package/src/server.mjs +302 -70
  104. package/src/tour.mjs +24 -5
@@ -56,18 +56,18 @@ export const CHAPTERS = [
56
56
  {
57
57
  id: 'home',
58
58
  title: { es: 'Inicio', en: 'Home' },
59
- lead: { es: 'Todos tus proyectos en un lugar, abiertos o dormidos.', en: 'All your projects in one place, open or asleep.' },
59
+ lead: { es: 'Aquí ves todos tus proyectos. Un clic abre uno.', en: 'Here you see all your projects. One click opens one.' },
60
60
  news: { kind: 'new', es: 'En 0.7.2 cada proyecto se abría por su cuenta con <code>madre start</code>; Inicio los reúne a todos.', en: 'In 0.7.2 each project opened on its own with <code>madre start</code>; Home gathers them all.' },
61
61
  points: {
62
62
  es: [
63
- 'Agrega las carpetas de tus proyectos; ninguna se abre hasta que tú lo decidas. Clic derecho o ⋯ en un proyecto para anclarlo a la barra o quitarlo de MADRE; su carpeta no se toca.',
64
- 'Inicio es un tablero: clic derecho en cualquier tarjeta para moverla, cambiar su tamaño o quitarla, y en el fondo para agregar widgets. También puedes arrastrarlas.',
65
- 'Te esperan, Decisiones recientes y Resumen reciente te cuentan qué pasó mientras no estabas.',
63
+ 'Agrega la carpeta de cada proyecto. Ninguno se abre hasta que tú lo pidas, y agregarla no cambia nada de lo que hay dentro.',
64
+ 'Con clic derecho o ⋯ en un proyecto lo anclas a la barra o lo quitas de MADRE. Su carpeta se queda como está.',
65
+ 'Acomoda Inicio a tu gusto: arrastra las tarjetas o haz clic derecho en una para cambiarla de tamaño. «Te necesita» y «Resumen reciente» te cuentan qué pasó mientras no estabas.',
66
66
  ],
67
67
  en: [
68
- 'Add folders: they do not open until you want them to. Right-click or ⋯ on a project to pin it to the bar or remove it from MADRE; its folder is not touched.',
69
- 'Home is a board: right-click any card to move it, resize it or take it off, and the background to add widgets. You can drag them too.',
70
- 'Waiting for you, Recent decisions and the Recent summary tell you what happened while you were away.',
68
+ 'Add the folder of each project. None opens until you ask, and adding it changes nothing inside.',
69
+ 'Right-click or ⋯ on a project to pin it to the bar or take it out of MADRE. Its folder stays as it is.',
70
+ 'Arrange Home your way: drag the cards, or right-click one to change its size. «Needs you» and «Recent summary» tell you what happened while you were away.',
71
71
  ],
72
72
  },
73
73
  keys: [
@@ -129,23 +129,23 @@ export const CHAPTERS = [
129
129
  {
130
130
  id: 'widgets',
131
131
  title: { es: 'Widgets', en: 'Widgets' },
132
- lead: { es: 'Tarjetas que muestran lo que pasa en tu Mac y en tus proyectos. Solo se ofrecen si hay algo que las alimente.', en: 'Cards that show what happens on your Mac and in your projects. Only offered when something feeds them.' },
132
+ lead: { es: 'Tarjetas que te dicen cómo va tu Mac y cada proyecto. Solo aparecen las que tienen algo que contar.', en: 'Cards that tell you how your Mac and each project are doing. Only those with something to tell show up.' },
133
133
  news: { kind: 'new', es: 'Nuevos: tarjetas con lo que pasa en tu Mac y en tus proyectos. Se agregan con clic derecho en Inicio › Agregar a Inicio.', en: 'New: cards with what happens on your Mac and in your projects. Add them with right-click in Home › Add to Home.' },
134
134
  since: { kind: 'new', es: 'Llegaron después de 1.0. Se agregan con clic derecho en Inicio › Agregar a Inicio.', en: 'They came after 1.0. Add them with right-click in Home › Add to Home.' },
135
135
  points: {
136
136
  es: [
137
- '<b>Recursos del sistema</b>: qué tan ocupado está el procesador y cuánta memoria queda libre.',
138
- '<b>Servidores</b>: los servidores que corren en tus proyectos abiertos y si responden. Necesita la Vista previa encendida en el proyecto.',
139
- '<b>Calidad de la memoria</b>: qué tan madura está la memoria de cada proyecto abierto y cuál es su punto más débil.',
140
- '<b>Entrenamiento del Coordinador</b>: cuánto le falta a la memoria del Coordinador para entrenar un modelo propio.',
141
- '<b>Modelos locales</b>: Ollama, sus modelos y cuántos ejemplos lleva cada proyecto para entrenar el suyo (8/300 son 8 de 300). Desde ahí eliges qué proyectos usan la IA local.',
137
+ '<b>Recursos del sistema</b>: qué tan ocupada está tu Mac y cuánta memoria le queda libre.',
138
+ '<b>Servidores</b>: las páginas y apps que tus proyectos tienen encendidas, y si responden. Para verlas, enciende la Vista previa en el proyecto.',
139
+ '<b>Calidad de la memoria</b>: cuánto ha aprendido cada proyecto abierto y qué le falta.',
140
+ '<b>Entrenamiento del Coordinador</b>: cuánto le falta al Coordinador para tener un modelo propio.',
141
+ '<b>Modelos locales</b>: la IA que corre en tu Mac, sus modelos y cuántos ejemplos lleva cada proyecto para aprender a tu manera (8/300 quiere decir 8 de 300). Ahí mismo eliges qué proyectos la usan.',
142
142
  ],
143
143
  en: [
144
- '<b>System resources</b>: how busy the processor is and how much memory is free.',
145
- '<b>Servers</b>: the servers running in your open projects and whether they answer. It needs Preview on in the project.',
146
- '<b>Memory quality</b>: how grown each open project\'s memory is, and its weakest side.',
147
- '<b>Coordinator training</b>: how far the Coordinator\'s memory is from training a model of its own.',
148
- '<b>Local models</b>: Ollama, its models and how many examples each project has toward its own (8/300 is 8 of 300). From there you choose which projects use the local AI.',
144
+ '<b>System resources</b>: how busy your Mac is and how much memory it has free.',
145
+ '<b>Servers</b>: the pages and apps your projects have running, and whether they answer. To see them, turn Preview on in the project.',
146
+ '<b>Memory quality</b>: how much each open project has learned and what it still lacks.',
147
+ '<b>Coordinator training</b>: how far the Coordinator is from a model of its own.',
148
+ '<b>Local models</b>: the AI that runs on your Mac, its models and how many examples each project has to learn your way (8/300 means 8 of 300). Right there you choose which projects use it.',
149
149
  ],
150
150
  },
151
151
  keys: [
@@ -157,18 +157,18 @@ export const CHAPTERS = [
157
157
  {
158
158
  id: 'project',
159
159
  title: { es: 'Tu proyecto', en: 'Your project' },
160
- lead: { es: 'Cada proyecto tiene su conversación, sus archivos y su memoria.', en: 'Each project has its own conversation, files and memory.' },
160
+ lead: { es: 'Dentro de un proyecto están sus chats, sus archivos y su memoria.', en: 'Inside a project are its chats, its files and its memory.' },
161
161
  news: { kind: 'changed', es: 'Hay una segunda barra y un panel para cambiar de proyecto. Además, los paneles se abren al lado o en una ventana que puedes mover.', en: 'The second bar and Switch project are new, and panels open beside you or in a window you move.' },
162
162
  points: {
163
163
  es: [
164
- 'La segunda barra te lleva a Inicio, a otro proyecto abierto o a Ajustes, y te deja recargar.',
165
- 'Cambiar de proyecto muestra los que tienes abiertos. Su luz te avisa si alguien te espera, si un agente está trabajando o si algo terminó.',
166
- 'Abre otra conversación al lado o en una ventana aparte, y acomoda los paneles como quieras.',
164
+ 'La barra de arriba te lleva a Inicio, a otro proyecto abierto o a Ajustes.',
165
+ 'El botón de proyectos te muestra los que tienes abiertos. Una luz te avisa si alguien te espera, si un agente está trabajando o si algo ya terminó.',
166
+ 'Puedes abrir otro chat al lado o en una ventana aparte, y mover cada ventana adonde menos estorbe.',
167
167
  ],
168
168
  en: [
169
- 'The second bar takes you to Home, to another open project, to reload and to Settings.',
170
- 'Switch project shows the ones you have open; its light says if someone waits for you, if an agent is working or if something finished.',
171
- 'Open another conversation beside this one or in a window, and arrange the panels as you like.',
169
+ 'The bar at the top takes you to Home, to another open project or to Settings.',
170
+ 'The projects key shows the ones you have open. A light tells you if someone is waiting for you, if an agent is working or if something is done.',
171
+ 'You can open another chat beside this one or in a window of its own, and move each window to where it is least in the way.',
172
172
  ],
173
173
  },
174
174
  keys: [
@@ -181,18 +181,18 @@ export const CHAPTERS = [
181
181
  {
182
182
  id: 'talk',
183
183
  title: { es: 'Hablar con los agentes', en: 'Talking to your agents' },
184
- lead: { es: 'Una conversación, todos tus agentes.', en: 'One conversation, every agent.' },
185
- news: { kind: 'changed', es: 'Llegan dos módulos: Intenciones, que sugiere bajo la caja cuánto debe pensar cada agente, y GitHub, que agrega el comando /gh.', en: 'New here: the Intenciones module, which suggests under the box how hard each agent should think, and /gh, with the GitHub module.' },
184
+ lead: { es: 'Escribes en la caja de abajo y el agente que elegiste te contesta.', en: 'You write in the box at the bottom and the agent you chose answers.' },
185
+ news: { kind: 'changed', es: 'Llegan dos módulos: Esfuerzo sugerido, que te propone bajo la caja cuánto debe pensar cada agente, y GitHub, que agrega el comando /gh.', en: 'New here: the Suggested effort module, which proposes under the box how hard each agent should think, and /gh, with the GitHub module.' },
186
186
  points: {
187
187
  es: [
188
- 'Elige el agente en el orbe. El modo, el modelo y el esfuerzo están en una fila bajo la caja de texto.',
189
- 'Escribe @ para elegir un agente, # para un modo, ! para un archivo y / para un comando.',
190
- 'Cada respuesta se puede calificar, copiar o responder.',
188
+ 'Elige con quién hablar en el círculo junto a la caja de texto. Debajo de la caja decides cuánto puede hacer, qué modelo usa y cuánto debe pensar.',
189
+ 'Atajos al escribir: @ para llamar a un agente, # para el permiso, ! para señalar un archivo y / para un comando.',
190
+ 'Cada respuesta se puede copiar, calificar o contestar.',
191
191
  ],
192
192
  en: [
193
- 'Choose the agent in the orb; mode, model and effort sit in one row under the box.',
194
- 'Type @ for an agent, # for a mode, ! for a file and / for a command.',
195
- 'Every answer can be rated, copied or replied to.',
193
+ 'Choose who to talk to in the circle beside the text box. Under the box you decide how much it may do, which model it uses and how hard it should think.',
194
+ 'Shortcuts as you type: @ to call an agent, # for the permission, ! to point at a file and / for a command.',
195
+ 'Every answer can be copied, rated or replied to.',
196
196
  ],
197
197
  },
198
198
  keys: [
@@ -206,18 +206,18 @@ export const CHAPTERS = [
206
206
  {
207
207
  id: 'modes',
208
208
  title: { es: 'Modos y permisos', en: 'Modes and permissions' },
209
- lead: { es: 'Cada mensaje lleva un nivel de permiso: hasta dónde puede llegar el agente.', en: 'Every message says how far the agent may go.' },
209
+ lead: { es: 'Cada mensaje lleva un permiso: lo que el agente puede hacer con él.', en: 'Every message carries a permission: what the agent may do with it.' },
210
210
  news: { kind: 'changed', es: '#4 AIRLOCK ahora se llama #4 Acceso total. Tú eliges cómo confirmar #3 y #4, y una confirmación puede valer unos minutos.', en: '#4 AIRLOCK is now #4 Full access. You choose which key opens #3 and #4, and an accepted key can last a few minutes.' },
211
211
  points: {
212
212
  es: [
213
- 'Los niveles, de menos a más: #0 Incógnito, #1 Solo conversar, #2 Crear, #3 Editar y #4 Acceso total.',
214
- '#3 y #4 te piden confirmar, y #4 lo pide dos veces. Cómo confirmas lo eliges en Ajustes › Permisos.',
215
- 'Una confirmación puede valer unos minutos; mientras dura, la ves junto a la caja.',
213
+ 'Hay cinco niveles, de menos a más: #0 Incógnito, #1 Solo conversar, #2 Crear, #3 Editar y #4 Acceso total.',
214
+ 'Con #3 y #4, MADRE te pide confirmar antes de que el agente toque algo, y con #4 te lo pide dos veces. Cómo confirmas lo eliges en Ajustes › Permisos.',
215
+ 'Si quieres, una confirmación puede durar unos minutos. Mientras dura, la ves junto a la caja de texto.',
216
216
  ],
217
217
  en: [
218
- '#0 Incognito, #1 Chat only, #2 Create, #3 Edit and #4 Full access.',
219
- '#3 and #4 ask for your key, and #4 asks for it twice. Which key, you choose in Settings › Permissions.',
220
- 'An accepted key can last a few minutes; while it does, you see it beside the box.',
218
+ 'There are five levels, from least to most: #0 Incognito, #1 Chat only, #2 Create, #3 Edit and #4 Full access.',
219
+ 'With #3 and #4, MADRE asks you to confirm before the agent touches anything, and with #4 it asks twice. How you confirm, you choose in Settings › Permissions.',
220
+ 'If you like, a confirmation can last a few minutes. While it does, you see it beside the text box.',
221
221
  ],
222
222
  },
223
223
  keys: [[{ es: 'Elegir el modo al escribir', en: 'Choose the mode as you type' }, '#']],
@@ -226,18 +226,18 @@ export const CHAPTERS = [
226
226
  {
227
227
  id: 'coordinator',
228
228
  title: { es: 'El Coordinador', en: 'The Coordinator' },
229
- lead: { es: 'Un agente que ve todos tus proyectos desde arriba.', en: 'An agent that sees all your projects from above.' },
229
+ lead: { es: 'Un agente que ve todos tus proyectos y puede pasar instrucciones de uno a otro.', en: 'An agent that sees all your projects and can pass instructions from one to another.' },
230
230
  news: { kind: 'new', es: 'En 0.7.2 cada proyecto trabajaba por su cuenta; ahora un agente los ve todos.', en: 'In 0.7.2 each project worked on its own; now one agent sees them all.' },
231
231
  points: {
232
232
  es: [
233
- 'Consulta todos tus proyectos, firma conexiones y lleva órdenes de uno a otro. Le hablas en su propio proyecto, desde Inicio.',
234
- 'Desde cualquier proyecto le preguntas con /bishop, y la respuesta es solo para ti.',
235
- 'Sus órdenes llegan hasta #2. Para #3 y #4 te deja una propuesta, y tú la apruebas en ese proyecto.',
233
+ 'Le hablas en su propio espacio, desde Inicio. Puede consultar lo que pasa en cada proyecto.',
234
+ 'Desde cualquier proyecto le preguntas con /bishop. Su respuesta solo la ves tú.',
235
+ 'Por su cuenta llega hasta #2. Si algo necesita #3 o #4, te deja una propuesta y tú decides en ese proyecto.',
236
236
  ],
237
237
  en: [
238
- 'It reads across your projects, signs connections and carries orders from one to another. You talk to it in its own project, from Home.',
239
- 'From any project you ask it with /bishop, and the answer is for you only.',
240
- 'Its orders go up to #2; #3 and #4 arrive as a proposal you unlock in that project.',
238
+ 'You talk to it in its own space, from Home. It can look up what is going on in each project.',
239
+ 'From any project you ask it with /bishop. Only you see its answer.',
240
+ 'On its own it goes up to #2. If something needs #3 or #4, it leaves you a proposal and you decide in that project.',
241
241
  ],
242
242
  },
243
243
  keys: [[{ es: 'Preguntarle desde un proyecto', en: 'Ask it from a project' }, '/bishop']],
@@ -246,18 +246,18 @@ export const CHAPTERS = [
246
246
  {
247
247
  id: 'links',
248
248
  title: { es: 'Conexiones', en: 'Connections' },
249
- lead: { es: 'Un proyecto puede consultar lo que otro ya aprendió.', en: 'One project can look up what another has already learned.' },
249
+ lead: { es: 'Un proyecto puede aprender de otro, si tú lo permites.', en: 'One project can learn from another, if you allow it.' },
250
250
  news: { kind: 'new', es: 'En 0.7.2, «Conexiones» era iniciar sesión de tus agentes; ahora une dos proyectos.', en: 'In 0.7.2, «Connections» was signing your agents in; now it joins two projects.' },
251
251
  points: {
252
252
  es: [
253
- 'Tú firmas cada conexión: qué puede consultar, por cuánto tiempo y si el Coordinador puede dar órdenes.',
254
- 'Solo se comparten notas que ya están en uso, sin datos privados. Nunca tus archivos ni tus conversaciones.',
255
- 'Cada par de proyectos se conecta una sola vez, y puedes cancelar la conexión cuando quieras desde Conexiones, en Inicio.',
253
+ 'Tú firmas cada conexión: qué puede consultar, por cuánto tiempo y si el Coordinador puede dar instrucciones.',
254
+ 'Solo se comparten notas que ya se usan, sin datos privados. Tus archivos y tus chats nunca salen del proyecto.',
255
+ 'Puedes cancelar una conexión cuando quieras desde Conexiones, en Inicio.',
256
256
  ],
257
257
  en: [
258
- 'You sign every connection: what it looks up, for how long, and whether the Coordinator may give orders.',
259
- 'Only notes already in use cross, cleaned of private data; never your files nor your conversations.',
260
- 'Two projects are connected once; you revoke it whenever you want from Connections, in Home.',
258
+ 'You sign every connection: what it may look up, for how long and whether the Coordinator may give instructions.',
259
+ 'Only notes already in use are shared, without private data. Your files and your chats never leave the project.',
260
+ 'You can cancel a connection whenever you want from Connections, in Home.',
261
261
  ],
262
262
  },
263
263
  since: { kind: 'changed', es: 'El mapa de Conexiones en Inicio ahora es un cielo: cada proyecto es una estrella y cada conexión, un flujo de luz. Ábrelo en una ventana para explorarlo.', en: 'The Connections map in Home is now a sky: every project is a star and every connection a flow of light. Open it in a window to explore it.' },
@@ -267,18 +267,18 @@ export const CHAPTERS = [
267
267
  {
268
268
  id: 'maps',
269
269
  title: { es: 'Los mapas', en: 'The maps' },
270
- lead: { es: 'Tu memoria y tus proyectos, de un vistazo.', en: 'Your memory and your projects, at a glance.' },
270
+ lead: { es: 'Dos dibujos: lo que MADRE recuerda de un proyecto y cómo se conectan tus proyectos.', en: 'Two drawings: what MADRE remembers about a project, and how your projects connect.' },
271
271
  news: { kind: 'changed', es: 'NOSTROMO ahora es el Mapa de memoria, con su tecla en la barra; el Mapa de proyectos es nuevo.', en: 'NOSTROMO is now the Memory map, with its key on the bar; the Project map is new.' },
272
272
  points: {
273
273
  es: [
274
- 'El Mapa de memoria tiene su tecla en la barra del proyecto: cada estrella es algo que MADRE recuerda de él.',
275
- 'El Mapa de proyectos, en Inicio, muestra tus proyectos y sus conexiones. Necesita una pantalla de 900 px o más.',
276
- 'En el Mapa de proyectos, arrastra un proyecto sobre otro para conectarlos.',
274
+ 'El Mapa de memoria, en la barra del proyecto, dibuja como una estrella cada cosa que MADRE recuerda de él.',
275
+ 'El Mapa de proyectos, en Inicio, muestra tus proyectos y sus conexiones. Necesita una pantalla de al menos 900 px de ancho.',
276
+ 'Para conectar dos proyectos, arrastra uno sobre el otro en el Mapa de proyectos.',
277
277
  ],
278
278
  en: [
279
- 'The Memory map has its key on the project\'s bar: every star is something MADRE remembers about it.',
280
- 'The Project map, in Home, shows your projects and their connections; it needs a screen of 900 px or more.',
281
- 'In the Project map, carry one project onto another to connect them.',
279
+ 'The Memory map, on the project\'s bar, draws as a star each thing MADRE remembers about it.',
280
+ 'The Project map, in Home, shows your projects and their connections. It needs a screen at least 900 px wide.',
281
+ 'To connect two projects, drag one onto the other in the Project map.',
282
282
  ],
283
283
  },
284
284
  keys: [
@@ -292,19 +292,19 @@ export const CHAPTERS = [
292
292
  {
293
293
  id: 'settings',
294
294
  title: { es: 'Diagnóstico y Ajustes', en: 'Diagnostics and Settings' },
295
- lead: { es: 'Todo lo que configuras, en un lugar; y la solución cuando algo falla.', en: 'Everything you set, in one place; and the remedy when something fails.' },
295
+ lead: { es: 'En Ajustes cambias cómo se ve y cómo trabaja MADRE. Diagnóstico te ayuda cuando algo falla.', en: 'In Settings you change how MADRE looks and works. Diagnostics helps when something fails.' },
296
296
  since: { kind: 'changed', es: 'Los Ajustes de Inicio suman IA local. En Ajustes › Agentes cada agente se pliega, y OpenCode agrupa sus modelos por proveedor.', en: 'Home\'s Settings gain Local AI. In Settings › Agents each agent folds, and OpenCode groups its models by provider.' },
297
297
  news: { kind: 'new', es: 'Lo que estaba repartido entre MU/TH/UR, ⚙ CONEXIONES y la barra ahora está en una ventana con buscador, y Diagnóstico te da la solución.', en: 'What was spread across MU/TH/UR, ⚙ CONNECTIONS and the bar now lives in one window with a search, and Diagnostics gives you the remedy.' },
298
298
  points: {
299
299
  es: [
300
- 'Ajustes se abre con ⌘ , y se busca con /. Los cambios se aplican al instante.',
301
- 'Apariencia tiene los colores de acento y los fondos para tema claro y oscuro, y también el idioma.',
302
- 'En Diagnóstico describes con tus palabras lo que pasa, y te dice qué hacer y con qué tecla resolverlo.',
300
+ 'Ábrelos con ⌘ , y escribe / para buscar cualquier ajuste. Lo que cambias se aplica en ese momento.',
301
+ 'En Apariencia eliges los colores, el fondo, el tema claro u oscuro y el idioma.',
302
+ 'Si algo no funciona, abre Diagnóstico y cuéntale qué pasa con tus palabras: te dice qué hacer y te da el botón para arreglarlo.',
303
303
  ],
304
304
  en: [
305
- 'Settings opens with ⌘ , and is searched with /. Changes apply at once.',
306
- 'Appearance has the accents and wallpapers for light and dark, and the language too.',
307
- 'In Diagnostics you say what happens in your own words and it tells you what to do, with the key that fixes it.',
305
+ 'Open them with ⌘ , and type / to find any setting. What you change applies right away.',
306
+ 'In Appearance you choose the colours, the background, light or dark and the language.',
307
+ 'If something does not work, open Diagnostics and tell it what happens in your own words: it says what to do and gives you the key that fixes it.',
308
308
  ],
309
309
  },
310
310
  keys: [
@@ -317,18 +317,18 @@ export const CHAPTERS = [
317
317
  {
318
318
  id: 'modules',
319
319
  title: { es: 'Módulos', en: 'Modules' },
320
- lead: { es: 'Funciones extra que le agregas a MADRE, como apps.', en: 'What you add to MADRE, like apps.' },
321
- news: { kind: 'changed', es: 'Ahora son un tablero de mosaicos, como apps. ash ahora se llama Ahorro de tokens, y llegan Intenciones y GitHub.', en: 'They are now a board of tiles, like apps; ash is Token saver, and Intenciones and GitHub join them.' },
320
+ lead: { es: 'Funciones que enciendes cuando las necesitas. Apagadas, no hacen nada.', en: 'Features you turn on when you need them. While off, they do nothing.' },
321
+ news: { kind: 'changed', es: 'Ahora son un tablero de mosaicos, como apps. ash ahora se llama Ahorro de tokens, y llegan Esfuerzo sugerido y GitHub.', en: 'They are now a board of tiles, like apps; ash is Token saver, and Suggested effort and GitHub join them.' },
322
322
  points: {
323
323
  es: [
324
- 'Un tablero de mosaicos, cada uno con su interruptor y su ficha.',
325
- 'Ahorro de tokens, Intenciones e IA local se abren en su propia ventana.',
326
- 'Continuidad (AHP+), GitHub y los demás te dicen qué escriben y qué necesitan antes de instalarlos.',
324
+ 'Cada mosaico tiene su interruptor. Tócalo para ver qué hace antes de encenderlo.',
325
+ 'Algunos, como Ahorro de tokens, Esfuerzo sugerido y Notas, se abren en su propia ventana.',
326
+ 'Antes de encender uno, MADRE te dice qué va a escribir y qué necesita. En el Mercado encuentras más.',
327
327
  ],
328
328
  en: [
329
- 'A board of tiles, each with its switch and its sheet.',
330
- 'Token saver, Intents and Local AI open in their own window.',
331
- 'Continuity (AHP+), GitHub and the rest say what they write and what they need before they are installed.',
329
+ 'Every tile has its switch. Press it to see what it does before you turn it on.',
330
+ 'Some, such as Token saver, Suggested effort and Notes, open in their own window.',
331
+ 'Before you turn one on, MADRE tells you what it will write and what it needs. The Market has more.',
332
332
  ],
333
333
  },
334
334
  keys: [],
@@ -337,19 +337,19 @@ export const CHAPTERS = [
337
337
  {
338
338
  id: 'local',
339
339
  title: { es: 'IA local por proyecto', en: 'Local AI by project' },
340
- lead: { es: 'Eliges qué proyectos usan Ollama, la IA que corre en tu Mac sin gastar tokens ni enviar nada.', en: 'You choose which projects use Ollama, the AI that runs on your Mac with no tokens spent and nothing sent.' },
340
+ lead: { es: 'Una IA que corre en tu Mac, gratis y sin internet. Tú eliges qué proyectos la usan.', en: 'An AI that runs on your Mac, free and offline. You choose which projects use it.' },
341
341
  news: { kind: 'changed', es: 'En 0.7.2 la IA local era todo o nada; ahora se elige proyecto por proyecto.', en: 'In 0.7.2 the local AI was all or nothing; now it is chosen project by project.' },
342
342
  since: { kind: 'new', es: 'En 1.0 la IA local era todo o nada; ahora se elige proyecto por proyecto.', en: 'In 1.0 the local AI was all or nothing; now it is chosen project by project.' },
343
343
  points: {
344
344
  es: [
345
- 'En Inicio › Ajustes › IA local hay tres modos: Automático (todos), Uno a uno (solo los que enciendes) y Manual (cada proyecto decide en sus Ajustes).',
346
- 'Cambiar de modo no cambia a ningún proyecto que ya existe: solo decide cómo empiezan los nuevos.',
347
- 'Un proyecto sin IA local sigue trabajando con sus agentes. Solo deja de usar la búsqueda por significado, el resumen de la memoria y @madre.',
345
+ 'Se configura en Inicio › Ajustes › IA local. Ahí eliges si la usan todos tus proyectos, solo los que tú enciendas, o si cada proyecto lo decide en sus Ajustes.',
346
+ 'MADRE te recomienda los modelos que caben en tu equipo y te dice cuánto pesan antes de descargarlos.',
347
+ 'Un proyecto sin IA local sigue trabajando con tus agentes. Solo deja de buscar por significado, de resumir su memoria y de usar a @madre.',
348
348
  ],
349
349
  en: [
350
- 'In Home › Settings › Local AI there are three modes: Automatic (all), One by one (only those you switch on) and Manual (each project decides in its Settings).',
351
- 'Changing the mode changes no project that already exists: it only decides how new ones start.',
352
- 'A project without the local AI keeps working with its agents; it only stops using search by meaning, the memory summary and @madre.',
350
+ 'It is set in Home › Settings › Local AI. There you choose whether all your projects use it, only the ones you switch on, or each project decides in its Settings.',
351
+ 'MADRE recommends the models that fit your computer and tells you how big they are before you download them.',
352
+ 'A project without the local AI keeps working with your agents. It only stops searching by meaning, summing up its memory and using @madre.',
353
353
  ],
354
354
  },
355
355
  keys: [[{ es: 'Elegir proyectos', en: 'Choose projects' }, { es: 'Ajustes › IA local', en: 'Settings › Local AI' }]],
@@ -358,17 +358,17 @@ export const CHAPTERS = [
358
358
  {
359
359
  id: 'phone',
360
360
  title: { es: 'Tu teléfono', en: 'Your phone' },
361
- lead: { es: 'Sigue donde ibas, desde el teléfono.', en: 'Carry on where you were, from your phone.' },
361
+ lead: { es: 'Sigue tu trabajo desde el teléfono.', en: 'Carry on with your work from your phone.' },
362
362
  news: { kind: 'new', es: 'En 0.7.2 MADRE solo se abría en la Mac.', en: 'In 0.7.2 MADRE only opened on the Mac.' },
363
363
  points: {
364
364
  es: [
365
- 'Empareja tu teléfono con un código QR, en la misma red Wi‑Fi que tu Mac.',
366
- 'Desde el teléfono llegas hasta #2; #3 y #4 se quedan en la Mac.',
365
+ 'Conecta tu teléfono con un código QR. Tiene que estar en la misma red Wi‑Fi que tu Mac.',
366
+ 'Desde el teléfono llegas hasta #2. Lo que necesita #3 o #4 se aprueba en la Mac.',
367
367
  'Lo que empiezas en uno lo sigues en el otro: la Mac te ofrece continuar donde ibas.',
368
368
  ],
369
369
  en: [
370
- 'Pair your phone with a QR code, on the same Wi‑Fi as your Mac.',
371
- 'From the phone you reach up to #2; #3 and #4 stay on the Mac.',
370
+ 'Connect your phone with a QR code. It has to be on the same Wi‑Fi as your Mac.',
371
+ 'From the phone you reach up to #2. What needs #3 or #4 is approved on the Mac.',
372
372
  'What you start on one you carry on on the other: the Mac offers to continue where you were.',
373
373
  ],
374
374
  },
@@ -379,7 +379,7 @@ export const CHAPTERS = [
379
379
  {
380
380
  id: 'gestures',
381
381
  title: { es: 'Gestos y atajos', en: 'Gestures and shortcuts' },
382
- lead: { es: 'Los gestos y atajos de MADRE. Abre esta hoja con ? cuando quieras.', en: 'What is done with your hands. This sheet opens with ? at any moment.' },
382
+ lead: { es: 'Todos los atajos en una hoja. La abres con la tecla ? en cualquier pantalla.', en: 'Every shortcut on one sheet. The ? key opens it on any screen.' },
383
383
  news: { kind: 'new', es: 'Los gestos y atajos de todo MADRE, juntos en una hoja por primera vez.', en: 'The gestures and shortcuts of all of MADRE, together on one sheet for the first time.' },
384
384
  since: { kind: 'changed', es: 'Suma los gestos del tablero de Inicio: acomodar, arrastrar y agregar tarjetas.', en: 'It adds the gestures of Home\'s board: arrange, drag and add cards.' },
385
385
  points: { es: [], en: [] },
@@ -412,7 +412,9 @@ export const GESTURES = [
412
412
  [{ es: 'Ventanas y paneles', en: 'Windows and panels' }, [
413
413
  [{ es: 'Mover', en: 'Move' }, { es: 'arrastrar la cabecera', en: 'drag the header' }],
414
414
  [{ es: 'ACOMODAR', en: 'ARRANGE' }, { es: 'mantener el puntero 0,4 s', en: 'hold the pointer 0.4 s' }],
415
- [{ es: 'Apartar las ventanas', en: 'Set the windows aside' }, { es: 'clic en el escritorio', en: 'click the desktop' }],
415
+ [{ es: 'Apartar o traer todas', en: 'All aside, or all back' }, { es: 'clic en el escritorio', en: 'click the desktop' }],
416
+ [{ es: 'Apartar lo que tapa', en: 'Move aside what covers' }, { es: 'clic o escribir', en: 'click or type' }],
417
+ [{ es: 'Traer una', en: 'Bring one back' }, { es: 'clic en su borde', en: 'click its edge' }],
416
418
  [{ es: 'Ancho del panel', en: 'Panel width' }, { es: '← → · con ⇧, de 64 px en 64 px', en: '← → · ⇧ for 64 px' }],
417
419
  ]],
418
420
  [{ es: 'La caja', en: 'The box' }, [
@@ -421,6 +423,12 @@ export const GESTURES = [
421
423
  [{ es: 'Agente, modo, archivo, comando', en: 'Agent, mode, file, command' }, '@ # ! /'],
422
424
  [{ es: 'Pegar o soltar imágenes', en: 'Paste or drop images' }, '⌘ V'],
423
425
  ]],
426
+ [{ es: 'Código', en: 'Code' }, [
427
+ [{ es: 'Buscar un archivo', en: 'Find a file' }, '⌘ P'],
428
+ [{ es: 'Guardar', en: 'Save' }, '⌘ S'],
429
+ [{ es: 'Buscar en el archivo', en: 'Find in the file' }, '⌘ F'],
430
+ [{ es: 'Comentar las líneas', en: 'Comment the lines' }, '⌘ /'],
431
+ ]],
424
432
  [{ es: 'Ajustes', en: 'Settings' }, [
425
433
  [{ es: 'Buscar', en: 'Search' }, '/'],
426
434
  [{ es: 'Abrir el primero', en: 'Open the first' }, '↵'],
package/public/tour.js CHANGED
@@ -18,10 +18,13 @@
18
18
  // order they are used (public/tour-chapters.js, ORDER).
19
19
 
20
20
  import { LOADER_MARK, finishLoader, makeLoader, setLoader } from './loader.js';
21
- import { language, t } from './i18n.js';
21
+ import { hostWords, keyWords, language, t } from './i18n.js';
22
22
  import { CHAPTERS, GESTURES, ORDER } from './tour-chapters.js';
23
23
 
24
24
  const say = (pair) => (typeof pair === 'string' ? pair : pair?.[language()] ?? pair?.es ?? '');
25
+ // The chapters' own words, said of the computer and the keyboard in front of the person: «tu Mac» is
26
+ // the machine's name off a Mac, ⌘ is Ctrl+ there (i18n.js).
27
+ const plain = (text) => hostWords(keyWords(text));
25
28
  const fill = (template, vars) => template.replace(/\{(\w+)\}/g, (whole, name) => (Object.hasOwn(vars, name) ? String(vars[name]) : whole));
26
29
  const still = () => typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;
27
30
  // Up, turned for down: the way to a hint whose place is out of view.
@@ -137,6 +140,14 @@ export function startTour({ page, go = {}, ready = () => true, phone = false, de
137
140
  // Three people (src/tour.mjs): new, back from 0.7.2, or back from 1.0 (`since`).
138
141
  const path = () => state?.path ?? (info?.from === '1.0' ? 'since' : info?.returning ? 'back' : 'new');
139
142
  const chapters = () => (ORDER[path()] ?? ORDER.new).filter((id) => !hidden().includes(id)).map((id) => CHAPTERS.find((chapter) => chapter.id === id)).filter((chapter) => chapter && (!chapter.only || chapter.only === language()));
143
+ // Who meets MADRE now and who knew it before (src/tour.mjs: `met`, written on the bonjour, and the
144
+ // version whose news this code tells). Whoever knew it is told only what is new — the cards of
145
+ // news, and for whoever came from 0.7.2 what «Connections» means now — never again what each key
146
+ // is (2026-10-21): they were shown cards of things they had used for months.
147
+ const below = (a, b) => { const x = String(a).split('.').map(Number); const y = String(b).split('.').map(Number); for (let i = 0; i < 3; i += 1) if ((x[i] ?? 0) !== (y[i] ?? 0)) return (x[i] ?? 0) < (y[i] ?? 0); return false; };
148
+ const returning = () => Boolean(state?.bonjourAt) && (!state.met || (Boolean(info?.level) && below(state.met, info.level)));
149
+ const newcomer = () => Boolean(state?.bonjourAt) && !returning();
150
+ const forThem = (id) => !returning() || id.startsWith('new-') || (id === 'links' && path() === 'back');
140
151
  const busyWith = () => Boolean(windowNode?.open || sheetNode?.open || document.querySelector('dialog.tour-bonjour[open]'));
141
152
 
142
153
  // ---- One tab at a time. The tab that shows the bonjour or the chapters holds the tour and says
@@ -251,14 +262,14 @@ export function startTour({ page, go = {}, ready = () => true, phone = false, de
251
262
  const title = el('h1', 'tour-hello', back || since ? t('Hello again.') : t('Hello.'));
252
263
  title.id = 'tour-bonjour-title';
253
264
  const body = el('p', 'tour-hello-says', since
254
- ? t('Since 1.0, Home became a board you arrange, with widgets; the local AI is chosen project by project, and MADRE speaks more plainly. I tell you what changed, at your own pace.')
265
+ ? t('Since 1.0, Home became a board you arrange, with widgets; the local AI is chosen project by project, and MADRE speaks more plainly. Here is what changed.')
255
266
  : back
256
- ? t('MADRE changed a lot since 0.7.2. First I bring your projects to Home; then I tell you what is new, at your own pace.')
257
- : t('This is MADRE: all your AI agents in one place, with your projects, their memory and your permissions.'));
267
+ ? t('MADRE changed a lot since 0.7.2. First I bring your projects to Home; then I tell you what is new.')
268
+ : t('This is MADRE. Here you work with the AIs you already use: you write to them, they read your project, and you decide what they may change.'));
258
269
  const note = el('p', 'tour-hello-note');
259
270
  if (since) note.textContent = t('Nothing you set up changed: your projects, agents and permissions are as you left them.');
260
271
  else if (back) note.innerHTML = t('<code>madre</code> now opens Home; <code>madre start</code> still opens the project in the folder.'); // trusted: our own catalogue
261
- else note.textContent = page === 'home' && welcome?.needed?.() ? t('First we get an agent and a project ready; then I tell you the essentials, at your own pace.') : t('I tell you the essentials in a few short chapters, at your own pace.');
272
+ else note.textContent = page === 'home' && welcome?.needed?.() ? t('First we get an agent and a project ready; then I show you the basics, whenever you like.') : t('I show you the basics in a few short chapters. You can stop and pick it up later.');
262
273
  const acts = el('div', 'tour-hello-acts');
263
274
  const later = key('tour-btn quiet', t('Later'), async () => {
264
275
  await keep({ path: path(), bonjour: true, closed: true });
@@ -284,7 +295,7 @@ export function startTour({ page, go = {}, ready = () => true, phone = false, de
284
295
  node.addEventListener('close', () => { letGoIfDone(); setTimeout(() => node.remove(), 400); });
285
296
  document.body.append(node);
286
297
  node.showModal();
287
- onward.focus();
298
+ focusQuietly(onward);
288
299
  }
289
300
 
290
301
  // ---- 0.7.2: the projects Home cannot list, brought back one by one, the loader saying how far.
@@ -320,7 +331,7 @@ export function startTour({ page, go = {}, ready = () => true, phone = false, de
320
331
  acts.append(key('tour-btn primary', t('See what is new'), () => { node.close(); openChapters('moved'); }));
321
332
  done.append(acts);
322
333
  stage.replaceChildren(done);
323
- acts.firstChild.focus();
334
+ focusQuietly(acts.firstChild);
324
335
  }
325
336
 
326
337
  // ---- The chapters.
@@ -375,7 +386,7 @@ export function startTour({ page, go = {}, ready = () => true, phone = false, de
375
386
  const back = path() === 'back';
376
387
  const since = path() === 'since';
377
388
  windowNode.querySelector('.tour-head .wn-eyebrow').textContent = since ? t('What is new since 1.0') : back ? t('The tour of MADRE 1.0') : t('Getting to know MADRE');
378
- windowNode.querySelector('#tour-window-title').textContent = since ? t('What changed, at your pace') : back ? t('Everything new, at your pace') : t('The essentials, at your pace');
389
+ windowNode.querySelector('#tour-window-title').textContent = since ? t('What changed since 1.0') : back ? t('What is new since 0.7.2') : t('The basics of MADRE');
379
390
  void keep({ chapter: chapter.id, at: chapter.id });
380
391
  if (!state.done.includes(chapter.id)) state.done = [...state.done, chapter.id];
381
392
  const list = chapters();
@@ -408,7 +419,7 @@ export function startTour({ page, go = {}, ready = () => true, phone = false, de
408
419
  if (back && chapter.news) {
409
420
  const news = el('p', `tour-news ${chapter.news.kind}`);
410
421
  const said = el('span');
411
- said.innerHTML = say(chapter.news); // trusted: our own copy
422
+ said.innerHTML = plain(say(chapter.news)); // trusted: our own copy
412
423
  news.append(el('b', 'tour-news-tag', chapter.news.kind === 'new' ? t('New in 1.0') : t('Changed in 1.0')), said);
413
424
  words.append(news);
414
425
  }
@@ -416,21 +427,21 @@ export function startTour({ page, go = {}, ready = () => true, phone = false, de
416
427
  if (since && chapter.since) {
417
428
  const news = el('p', `tour-news ${chapter.since.kind}`);
418
429
  const said = el('span');
419
- said.innerHTML = say(chapter.since); // trusted: our own copy
430
+ said.innerHTML = plain(say(chapter.since)); // trusted: our own copy
420
431
  news.append(el('b', 'tour-news-tag', chapter.since.kind === 'new' ? t('New since 1.0') : t('Changed since 1.0')), said);
421
432
  words.append(news);
422
433
  }
423
- words.append(el('p', 'tour-lead', say(chapter.lead)));
434
+ words.append(el('p', 'tour-lead', plain(say(chapter.lead))));
424
435
  const points = chapter.points?.[language()] ?? chapter.points?.es ?? [];
425
436
  if (points.length) {
426
437
  const ul = el('ul', 'tour-points');
427
- for (const point of points) { const item = el('li'); item.innerHTML = point; ul.append(item); } // trusted: our own copy
438
+ for (const point of points) { const item = el('li'); item.innerHTML = plain(point); ul.append(item); } // trusted: our own copy
428
439
  words.append(ul);
429
440
  }
430
441
  if (chapter.id === 'gestures') words.append(gestureGrid());
431
442
  else if (chapter.keys?.length) {
432
443
  const keys = el('dl', 'tour-keys');
433
- for (const [what, how] of chapter.keys) keys.append(el('dt', null, say(what)), el('dd', null, say(how)));
444
+ for (const [what, how] of chapter.keys) keys.append(el('dt', null, say(what)), el('dd', null, keyWords(say(how))));
434
445
  words.append(keys);
435
446
  }
436
447
  const acts = el('div', 'tour-acts');
@@ -457,14 +468,26 @@ export function startTour({ page, go = {}, ready = () => true, phone = false, de
457
468
  acts.querySelector('.tour-btn.primary')?.focus({ preventScroll: true });
458
469
  }
459
470
 
460
- // ---- `?`: the sheet of gestures, anywhere.
471
+ // The key that goes on holds the focus, so ↵ presses it, without wearing the focus ring nobody
472
+ // asked for: the browser drew it in its own blue around the first key of the welcome, as if it had
473
+ // been chosen. The ring comes back the moment the keyboard is used (2026-10-20).
474
+ function focusQuietly(button) {
475
+ if (!button) return;
476
+ button.classList.add('quiet-focus');
477
+ const wake = () => button.classList.remove('quiet-focus');
478
+ button.addEventListener('keydown', wake, { once: true });
479
+ button.addEventListener('blur', wake, { once: true });
480
+ button.focus({ focusVisible: false });
481
+ }
482
+ // ---- `?`: the sheet of gestures, anywhere. Its keys are the keyboard's in front of the person:
483
+ // ⌘ on a Mac, Ctrl+ anywhere else.
461
484
  function gestureGrid() {
462
485
  const grid = el('div', 'tour-gestures');
463
486
  for (const [group, rows] of GESTURES) {
464
487
  const box = el('section', 'tour-gesture-group');
465
488
  box.append(el('h4', null, say(group)));
466
489
  const keys = el('dl', 'tour-keys');
467
- for (const [what, how] of rows) keys.append(el('dt', null, say(what)), el('dd', null, say(how)));
490
+ for (const [what, how] of rows) keys.append(el('dt', null, say(what)), el('dd', null, keyWords(say(how))));
468
491
  box.append(keys);
469
492
  grid.append(box);
470
493
  }
@@ -508,35 +531,45 @@ export function startTour({ page, go = {}, ready = () => true, phone = false, de
508
531
  // ---- The hints: one line, once, the first time someone reaches a place that confuses. Never
509
532
  // two at once, never over the bonjour or the chapters, never before the bonjour was seen.
510
533
  // `inside`: the hint goes into that box, at its top (a window that is modal, where a card
511
- // floating over the page could not be pressed); it counts as seen when the box closes.
512
- async function hint(id, anchor, { title, text, inside = false }) {
534
+ // floating over the page could not be pressed). A hint is kept as seen the moment it shows, not
535
+ // when it is put away: one left open and the page reloaded came back every time (2026-10-21).
536
+ // `step` of `of`: one of a short walk (Home's, salas-mac.js), said as «2 of 4» with «Next»;
537
+ // `skip` puts the rest of the walk away, `then` comes after this one is put away.
538
+ async function hint(id, anchor, { title, text, inside = false, step = 0, of = 0, skip = null, then = null }) {
513
539
  const answer = await loaded;
514
- if (phone || !answer || !state?.bonjourAt || state.hints?.[id] || hintNode || busyWith()) return false;
540
+ // Nor over a card of the room's news (app.js, .hint-card): two at once covered each other.
541
+ if (phone || !answer || !state?.bonjourAt || state.hints?.[id] || !forThem(id) || hintNode || busyWith() || document.querySelector('.hint-card')) return false;
515
542
  if (!anchor?.isConnected) return false;
516
543
  const box = anchor.getBoundingClientRect();
517
544
  if (!inside && !box.width && !box.height) return false;
518
545
  const card = el('section', `tour-hint${inside ? ' inline' : ''}`);
519
546
  card.setAttribute('role', 'note');
520
- card.append(el('span', 'tour-hint-eyebrow', t('The first time')), el('b', null, title), el('p', null, text));
547
+ const walking = step > 0 && of > 1;
548
+ card.append(el('span', 'tour-hint-eyebrow', walking ? t('{n} of {total}', { n: step, total: of }) : t('The first time')), el('b', null, title), el('p', null, text));
521
549
  let spot = null;
522
550
  let away = null;
523
551
  let follow = null;
552
+ let skipped = false;
524
553
  const done = () => {
525
554
  if (!hintNode) return;
526
- void keep({ hint: id });
527
555
  spot?.remove();
528
556
  card.remove();
529
557
  away?.remove();
530
558
  hintNode = null;
531
559
  document.removeEventListener('keydown', onKey, true);
532
560
  if (follow) { window.removeEventListener('scroll', follow, true); window.removeEventListener('resize', follow); }
561
+ if (!skipped) then?.();
533
562
  };
534
563
  // Esc puts away the hint in sight, or the one its way-there key speaks of; one hidden under a
535
564
  // layer (the Project map) is not the one meant.
536
565
  const shown = (node) => Boolean(node?.isConnected) && getComputedStyle(node).display !== 'none';
537
566
  const onKey = (event) => { if (event.key === 'Escape' && hintNode && !inside && (shown(card) || shown(away))) { event.stopPropagation(); done(); } };
538
- card.append(key('tour-btn small primary', t('Got it'), done));
567
+ const keys = el('div', 'tour-hint-keys');
568
+ if (walking && step < of && skip) keys.append(key('tour-btn small quiet', t('Skip the tips'), () => { skipped = true; skip(); done(); }));
569
+ keys.append(key('tour-btn small primary', walking && step < of ? t('Next') : t('Got it'), done));
570
+ card.append(keys);
539
571
  hintNode = card;
572
+ void keep({ hint: id });
540
573
  if (inside) {
541
574
  anchor.prepend(card);
542
575
  anchor.closest('dialog')?.addEventListener('close', done, { once: true });
@@ -577,6 +610,11 @@ export function startTour({ page, go = {}, ready = () => true, phone = false, de
577
610
  const below = at.bottom + 10 + height < window.innerHeight;
578
611
  Object.assign(card.style, { left: `${left}px`, top: `${below ? at.bottom + 10 : Math.max(12, at.top - height - 10)}px` });
579
612
  };
613
+ // A step of a walk takes the page to what it speaks of, instead of asking to scroll there.
614
+ if (walking) {
615
+ const at = anchor.getBoundingClientRect();
616
+ if (at.top < 60 || at.bottom > window.innerHeight - 40) anchor.scrollIntoView?.({ block: 'center', behavior: still() ? 'auto' : 'smooth' });
617
+ }
580
618
  spot = spotlight(anchor);
581
619
  follow = () => place();
582
620
  window.addEventListener('scroll', follow, true);
@@ -619,6 +657,10 @@ export function startTour({ page, go = {}, ready = () => true, phone = false, de
619
657
  openChapters,
620
658
  openGestures,
621
659
  hint,
660
+ returning,
661
+ newcomer,
662
+ // A card the page shows itself (app.js: first touches and news) is kept as seen here, per person.
663
+ seen: (id) => keep({ hint: id }),
622
664
  state: () => state,
623
665
  path,
624
666
  };