@jossuealcala/madre 1.1.3 → 1.1.4

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 (121) hide show
  1. package/CHANGELOG.en.md +20 -1
  2. package/CHANGELOG.md +20 -1
  3. package/TRADEMARKS.md +6 -2
  4. package/bin/madre.mjs +4 -2
  5. package/docs/REFERENCE.md +3 -3
  6. package/docs/SDK.md +28 -1
  7. package/docs/en/REFERENCE.md +2 -2
  8. package/docs/en/SDK.md +26 -0
  9. package/docs/sdk/hello-module.mjs +38 -3
  10. package/habilidades/explicamelo-facil/HABILIDAD.md +19 -0
  11. package/habilidades/hojas-de-calculo/HABILIDAD.md +18 -0
  12. package/habilidades/mensajes-a-clientes/HABILIDAD.md +19 -0
  13. package/habilidades/publicaciones-para-redes/HABILIDAD.md +19 -0
  14. package/habilidades/resumen-y-pendientes/HABILIDAD.md +18 -0
  15. package/habilidades/tu-pagina-paso-a-paso/HABILIDAD.md +19 -0
  16. package/package.json +4 -3
  17. package/public/activity.js +57 -22
  18. package/public/app.js +3998 -762
  19. package/public/assets/brand/OFL-SpaceGrotesk.txt +93 -0
  20. package/public/assets/brand/SpaceGrotesk-latin-ext.woff2 +0 -0
  21. package/public/assets/brand/SpaceGrotesk-latin.woff2 +0 -0
  22. package/public/assets/brand/madre-app-180.png +0 -0
  23. package/public/assets/brand/madre-app-192.png +0 -0
  24. package/public/assets/brand/madre-app-512.png +0 -0
  25. package/public/assets/brand/madre-app.svg +1 -1
  26. package/public/assets/brand/madre-favicon.svg +1 -1
  27. package/public/attribution.js +28 -27
  28. package/public/auto-open.js +102 -0
  29. package/public/brands.js +9 -6
  30. package/public/changes.js +63 -0
  31. package/public/en.js +1085 -101
  32. package/public/es.js +2395 -1688
  33. package/public/i18n.js +11 -0
  34. package/public/index.html +28 -27
  35. package/public/loader.js +322 -117
  36. package/public/macroverso.js +33 -350
  37. package/public/manual-content.js +37 -7
  38. package/public/manual.js +21 -6
  39. package/public/market-view.js +212 -105
  40. package/public/market.js +10 -2
  41. package/public/mcp-catalog.js +7 -2
  42. package/public/missions.js +169 -0
  43. package/public/news-scenes.js +110 -3
  44. package/public/nostromo-engine.js +935 -654
  45. package/public/notices.js +14 -2
  46. package/public/notifications.js +119 -0
  47. package/public/provider-marks.js +170 -0
  48. package/public/provider-pick.js +147 -0
  49. package/public/resay.js +1 -0
  50. package/public/review-ask.js +16 -13
  51. package/public/routing.js +29 -3
  52. package/public/salas-mac.css +257 -40
  53. package/public/salas-mac.html +5 -5
  54. package/public/salas-mac.js +376 -97
  55. package/public/salas.css +2 -2
  56. package/public/salas.html +2 -2
  57. package/public/salas.js +1 -1
  58. package/public/starters.js +128 -0
  59. package/public/styles.css +2656 -336
  60. package/public/subscription.js +303 -0
  61. package/public/terms-field.js +170 -0
  62. package/public/terms.js +117 -19
  63. package/public/tips.js +41 -7
  64. package/public/tour-chapters.js +35 -35
  65. package/public/tour.js +333 -43
  66. package/public/troubleshooting.js +100 -7
  67. package/public/welcome-scene.js +117 -29
  68. package/public/welcome.js +364 -60
  69. package/src/adapters/claude.mjs +2 -1
  70. package/src/adapters/codex.mjs +2 -1
  71. package/src/adapters/cursor.mjs +9 -6
  72. package/src/adapters/gemini.mjs +4 -0
  73. package/src/adapters/grok.mjs +6 -4
  74. package/src/adapters/madre.mjs +71 -23
  75. package/src/adapters/opencode.mjs +15 -2
  76. package/src/adapters/steps.mjs +176 -0
  77. package/src/app-invite.mjs +90 -0
  78. package/src/billing-key.mjs +8 -0
  79. package/src/billing.mjs +317 -0
  80. package/src/bridge/policy.mjs +1 -1
  81. package/src/capabilities.mjs +17 -11
  82. package/src/chats.mjs +44 -2
  83. package/src/checkpoint.mjs +5 -1
  84. package/src/commands.mjs +5 -2
  85. package/src/directives.mjs +1 -0
  86. package/src/event-store.mjs +15 -0
  87. package/src/extensions.mjs +5 -1
  88. package/src/ficha.mjs +16 -0
  89. package/src/image-studio.mjs +13 -3
  90. package/src/install-metrics.mjs +9 -3
  91. package/src/lease.mjs +1 -1
  92. package/src/looks.mjs +4 -1
  93. package/src/mcp/image-server.mjs +59 -90
  94. package/src/modules/ahp.mjs +2 -1
  95. package/src/modules/github.mjs +6 -2
  96. package/src/modules/image-providers.mjs +281 -0
  97. package/src/modules/image-studio.mjs +100 -19
  98. package/src/modules/index.mjs +7 -1
  99. package/src/modules/intents-observe.mjs +3 -1
  100. package/src/modules/playwright.mjs +33 -4
  101. package/src/modules/reminders.mjs +42 -2
  102. package/src/modules/ripley.mjs +2 -1
  103. package/src/modules/sdk.mjs +6 -1
  104. package/src/opencode-health.mjs +1 -1
  105. package/src/outbound.mjs +80 -6
  106. package/src/quota-sources.mjs +148 -3
  107. package/src/review-ask.mjs +55 -31
  108. package/src/room/changes.mjs +79 -0
  109. package/src/room/economy.mjs +1 -1
  110. package/src/room/guard.mjs +8 -1
  111. package/src/room/prompt.mjs +20 -4
  112. package/src/room.mjs +87 -21
  113. package/src/salas.mjs +30 -3
  114. package/src/server.mjs +545 -59
  115. package/src/setup.mjs +1 -1
  116. package/src/skills.mjs +10 -0
  117. package/src/terms.mjs +23 -5
  118. package/src/tour.mjs +18 -3
  119. package/src/updates.mjs +47 -4
  120. package/src/web-preview.mjs +181 -0
  121. package/src/whats-new.mjs +76 -4
package/public/terms.js CHANGED
@@ -11,6 +11,8 @@
11
11
 
12
12
  import { browserLanguage, language, setLanguage, t } from './i18n.js';
13
13
  import { MADRE_LOGO, playOpening } from './loader.js';
14
+ import { trazo } from './icons.js';
15
+ import { PRELUDE, createTermsField } from './terms-field.js';
14
16
 
15
17
  const el = (tag, className = null, text = null) => {
16
18
  const node = document.createElement(tag);
@@ -27,6 +29,16 @@ const link = (href, words) => {
27
29
  };
28
30
  const pick = (pair) => pair?.[language()] ?? pair?.es ?? '#';
29
31
 
32
+ // The ground over the page while it is drawn (index.html, salas-mac.html: `madre-booting`), put back,
33
+ // with the same way out if nothing takes it away.
34
+ function veilPage() {
35
+ const root = document.documentElement;
36
+ if (root.classList.contains('madre-booting')) return;
37
+ root.classList.remove('madre-arriving');
38
+ root.classList.add('madre-booting');
39
+ setTimeout(() => root.classList.remove('madre-booting'), 6000);
40
+ }
41
+
30
42
  export async function ensureTerms() {
31
43
  if (typeof document === 'undefined' || typeof fetch !== 'function') return;
32
44
  let answer = null;
@@ -44,35 +56,102 @@ function askTerms(answer, done) {
44
56
  // The dialog's first focus goes to the card, never to a link or a key with the browser's ring on it.
45
57
  card.tabIndex = -1;
46
58
  card.setAttribute('autofocus', '');
47
- dialog.append(card);
59
+ // Behind the card, over the window's right half: MADRE at work, in the abstract (terms-field.js).
60
+ const field = createTermsField();
61
+ dialog.append(field.node, card);
48
62
  // Esc is no answer here: without accepting, MADRE does not start.
49
63
  dialog.addEventListener('cancel', (event) => event.preventDefault());
50
64
  let diagnostics = answer.diagnosticsFixed ? false : answer.diagnostics !== false;
51
- const returning = answer.before === true;
65
+ // Inside the desktop app (src/terms.mjs, `kind`) the license is the app's own, closed, and whoever
66
+ // accepted the source code's before is told the app has one of its own.
67
+ const app = answer.kind === 'app';
68
+ const returning = app ? Boolean(answer.previous) : answer.before === true;
52
69
 
70
+ // The logo draws itself in once: drawn again with every change of language, it started over.
71
+ const askLogo = el('div', 'terms-logo');
72
+ askLogo.innerHTML = MADRE_LOGO; // trusted: our own SVG string
53
73
  const paintAsk = () => {
54
74
  card.replaceChildren();
55
- const logo = el('div', 'terms-logo');
56
- logo.innerHTML = MADRE_LOGO; // trusted: our own SVG string
57
- const title = el('h1', 'terms-title', returning ? t('MADRE 1.1 has a new license') : t('Before you start'));
75
+ const logo = askLogo;
76
+ // THE LANGUAGE, by hand (2026-11-11, the author: «whatever language is detected, an ES key in the
77
+ // top right corner»): ES and EN, the one on lit; the card is said again in the other at once,
78
+ // and MADRE keeps it as the person's choice.
79
+ const tongue = el('div', 'terms-lang');
80
+ tongue.setAttribute('role', 'radiogroup');
81
+ tongue.setAttribute('aria-label', 'Idioma · Language');
82
+ for (const [code, word] of [['es', 'ES'], ['en', 'EN']]) {
83
+ const key = el('button', null, word);
84
+ key.type = 'button';
85
+ key.setAttribute('role', 'radio');
86
+ key.setAttribute('aria-checked', String(language() === code));
87
+ key.setAttribute('aria-label', code === 'es' ? 'Español' : 'English');
88
+ key.addEventListener('click', async () => {
89
+ if (language() === code) return;
90
+ setLanguage(code);
91
+ // Drawn in once: put back in the card it would draw itself in again (2026-11-13, the author: the
92
+ // logo «animates as when changing language»), so from here it is the drawn mark, still.
93
+ askLogo.classList.add('still');
94
+ paintAsk();
95
+ await fetch('/api/language', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ language: code }) }).catch(() => null);
96
+ });
97
+ tongue.append(key);
98
+ }
99
+ // Said to be read in seconds and to calm, not to warn (2026-11-13, the author: «I read that and I
100
+ // would not install it»): free, two quick things, and each one's detail one click away.
101
+ const title = el('h1', 'terms-title', returning ? (app ? t('MADRE is an app now') : t('MADRE 1.1 has a new license')) : t('Before you start'));
58
102
  title.id = 'terms-title';
59
- const lead = el('p', 'terms-lead', returning
60
- ? t('It is still free for you and for teams of up to 10 people. To keep using it, accept the license and the privacy notice.')
61
- : t('MADRE is free for you and for teams of up to 10 people, also when you use it to work for your clients.'));
103
+ // Q-26 (2026-11-17, the author): the app never says it is free for you. With the author's switch
104
+ // on (answer.trialDays) it names the first days with everything and the one project after them;
105
+ // with it off it promises nothing either way. The source code keeps its words (BSL).
106
+ const days = Number.isInteger(answer.trialDays) && answer.trialDays > 0 ? answer.trialDays : null;
107
+ const lead = el('p', 'terms-lead', app
108
+ ? (days
109
+ ? (returning
110
+ ? t('The first {days} days you have all of MADRE App; then it stays free with one project. Two quick things and you carry on where you left off.', { days })
111
+ : t('The first {days} days you have all of MADRE App; then it stays free with one project. Two quick things and you are in.', { days }))
112
+ : (returning ? t('Two quick things and you carry on where you left off.') : t('MADRE App is ready. Two quick things and you are in.')))
113
+ : returning
114
+ ? t('It is still free for you and for teams of up to 10 people. Two quick things and you carry on where you left off.')
115
+ : t('MADRE is free for you and for teams of up to 10 people. Two quick things and you are in.'));
62
116
 
117
+ // WHAT MADRE IS, before anything is asked (2026-11-11, the author: «a short description of what
118
+ // MADRE is in the first window, where the license is accepted»): three lines, the same three ideas
119
+ // the opening tells after it.
120
+ const about = el('section', 'terms-about');
121
+ about.append(el('h2', null, t('What MADRE is')));
122
+ const points = el('ul', 'terms-about-list');
123
+ for (const [icon, title, sub] of [
124
+ ['agents', t('Your AIs, together'), t('Claude, ChatGPT, Gemini and more, in one place.')],
125
+ ['folder', t('They work in your folders'), t('You ask the way you would ask someone on your team, and they do it in your files.')],
126
+ ['brain', t('MADRE remembers'), t('What gets decided is kept, so nobody starts from zero.')],
127
+ ]) {
128
+ const item = el('li');
129
+ const mark = el('span', 'terms-about-icon');
130
+ mark.setAttribute('aria-hidden', 'true');
131
+ mark.innerHTML = trazo(icon); // trusted: our own SVG string
132
+ const words = el('span', 'terms-about-words');
133
+ words.append(el('b', null, title), el('small', null, sub));
134
+ item.append(mark, words);
135
+ points.append(item);
136
+ }
137
+ about.append(points);
63
138
  const license = el('section', 'terms-block');
64
139
  license.append(
65
- el('h2', null, t('Personal license')),
66
- el('p', null, t('You can use MADRE, change it and share it; an organization of more than 10 people, or whoever offers MADRE as a service, needs a commercial license.')),
140
+ el('h2', null, app ? t('Your license') : t('Free for you and your team')),
141
+ el('p', null, app
142
+ ? (days
143
+ ? t('A personal license: the first {days} days with everything, then free with one project, or everything with the subscription. What you make with it is yours.', { days })
144
+ : t('A personal license, for your computers and your projects. Everything you make with it is yours.'))
145
+ : t('Use it, change it and share it. Everything you make with it is yours; a company of more than 10 people writes to us for its license.')),
67
146
  link(pick(answer.links?.license), t('Read the license')),
68
147
  );
69
148
 
70
149
  const help = el('section', 'terms-block terms-help');
71
150
  const head = el('div', 'terms-help-head');
72
151
  const words = el('div');
73
- words.append(el('h2', null, t('Help make MADRE better')), el('p', null, returning
74
- ? t('MADRE is made by one person. From this version your copy can share its errors with me anonymously, so the next versions fix first what fails for you. It is optional and you can turn it off whenever you like in Settings.')
75
- : t('MADRE is made by one person. Your copy can share its errors with me anonymously, so each version fixes first what fails for you. It is optional and you can turn it off whenever you like in Settings.')));
152
+ // What it is for and what never leaves, in two lines; what is sent, every detail of it (the daily
153
+ // notice too), is one click away (2026-11-13, the author: «summarise it very quickly»).
154
+ words.append(el('h2', null, t('Help make MADRE better')), el('p', null, t('If something fails, your copy tells me without saying who you are, and I fix it first. Your files and what you write never leave your computer.')));
76
155
  const knob = el('button', 'terms-switch');
77
156
  knob.type = 'button';
78
157
  knob.setAttribute('role', 'switch');
@@ -85,7 +164,7 @@ function askTerms(answer, done) {
85
164
  said.replaceChildren();
86
165
  if (answer.diagnosticsFixed) said.append(t('Off: MADRE was started with PULSE_TELEMETRY=0.'));
87
166
  else if (diagnostics) said.append(link(pick(answer.links?.privacy), t('See what is sent')));
88
- else said.append(t('Off: the author will not know when something fails for you, and it may take longer to fix.'));
167
+ else said.append(t('Off. MADRE works the same; it will just take me longer to find out if something fails for you.'));
89
168
  };
90
169
  knob.addEventListener('click', () => { diagnostics = !diagnostics; paintKnob(); });
91
170
  paintKnob();
@@ -107,19 +186,30 @@ function askTerms(answer, done) {
107
186
  error.textContent = '';
108
187
  const saved = await fetch('/api/terms', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ accept: true, diagnostics }) }).then((response) => response.ok).catch(() => false);
109
188
  if (!saved) { yes.disabled = false; no.disabled = false; error.textContent = t('It could not be saved. Try again.'); return; }
110
- // Whoever updated meets MADRE's opening here, before Home is drawn behind it (2026-10-30): drawn
111
- // first and the opening over it, it looked like a jump. Someone new meets it in the welcome.
112
- if (returning) { card.style.visibility = 'hidden'; await playOpening(dialog, { skipLabel: t('Skip') }); }
189
+ // MADRE's opening plays here, before Home is drawn behind it (2026-10-30): drawn first and the
190
+ // opening over it, it looked like a jump. Since 2026-11-10 for someone new too: the page's veil
191
+ // had gone while they read the license (loader.js, six seconds), so Home showed and the opening
192
+ // came after it, with the welcome. The veil goes back over the page until the welcome opens or
193
+ // Home is drawn (bootDone); the welcome does not play the opening again (openingPlayed).
194
+ card.style.visibility = 'hidden';
195
+ // The opening takes up the smoke where it is (terms-field.js), and condenses it.
196
+ await playOpening(dialog, { skipLabel: t('Skip'), from: field.smoke?.() ?? null });
197
+ veilPage();
113
198
  dialog.classList.add('leaving');
114
- setTimeout(() => { dialog.close(); dialog.remove(); done(); }, 260);
199
+ setTimeout(() => { field.stop(); dialog.close(); dialog.remove(); done(); }, 260);
115
200
  });
116
201
  actions.append(no, yes);
117
- card.append(logo, title, lead, license, help, foot, error, actions);
202
+ // The language key belongs to the window's top right corner, never to the card (2026-11-13, the
203
+ // author): inside the card, the card's own movement as it arrives carried it next to the title.
204
+ dialog.querySelector(':scope > .terms-lang')?.remove();
205
+ dialog.append(tongue);
206
+ card.append(logo, title, lead, ...(returning ? [] : [about]), license, help, foot, error, actions);
118
207
  setTimeout(() => card.focus({ preventScroll: true }), 0);
119
208
  };
120
209
 
121
210
  const paintDeclined = () => {
122
211
  card.replaceChildren();
212
+ dialog.querySelector(':scope > .terms-lang')?.remove();
123
213
  const logo = el('div', 'terms-logo');
124
214
  logo.innerHTML = MADRE_LOGO; // trusted: our own SVG string
125
215
  const title = el('h1', 'terms-title', t('MADRE cannot start without it'));
@@ -149,4 +239,12 @@ function askTerms(answer, done) {
149
239
  paintAsk();
150
240
  document.body.append(dialog);
151
241
  if (typeof dialog.showModal === 'function') dialog.showModal(); else dialog.setAttribute('open', '');
242
+ // The story begins before the card (2026-11-13, the author): the AIs come as points of light and open
243
+ // into the smoke, one line says where it all starts, and then the card arrives over the smoke.
244
+ dialog.classList.add('prelude');
245
+ const story = el('p', 'terms-prelude', t('It all starts with your AIs.'));
246
+ story.setAttribute('aria-hidden', 'true');
247
+ dialog.append(story);
248
+ const born = field.start({ prelude: true });
249
+ setTimeout(() => { dialog.classList.remove('prelude'); setTimeout(() => story.remove(), 900); }, born ? (PRELUDE.done - 0.55) * 1000 : 0);
152
250
  }
package/public/tips.js CHANGED
@@ -2,14 +2,17 @@
2
2
  // MADRE · © 2026 Jossue Alcalá · Business Source License 1.1: LICENSE
3
3
  // TIPS (2026-11-07): one small, solid label for every key that explains itself, in Home and in every
4
4
  // project, instead of the browser's own (late, and drawn differently by each one). A key keeps
5
- // saying what it says through `title`: when the pointer rests on it or the keyboard lands on it,
6
- // the words move to `data-tip` for as long as the tip shows (so the browser's tip does not show
7
- // too) and go back after. A key with no words of its own keeps them as its accessible name.
5
+ // saying what it says through `title`: the moment the pointer reaches it or the keyboard lands on it,
6
+ // the words move to `data-tip` until the pointer leaves (so the browser's own tip, which comes
7
+ // sooner, never shows first: 2026-11-10) and go back after. Anything with a `title` gets MADRE's tip,
8
+ // not only keys. A key with no words of its own keeps them as its accessible name.
8
9
  //
9
10
  // One element for the whole page, under the key or over it when there is no room, never under the
10
11
  // pointer's way, gone at the first press, scroll or key. Nothing shows on touch.
11
12
 
12
- const SHOW_AFTER = 380; // ms resting on a key before its tip shows
13
+ // ms resting on a key before its tip shows (2026-11-10, the author: 380 was too eager). A part of the
14
+ // page can ask for longer with `data-tip-after` (the box's agent, mode, model, effort and copilot).
15
+ const SHOW_AFTER = 2000;
13
16
  const AGAIN_WITHIN = 600; // ms after one hides in which the next shows at once
14
17
  const GAP = 7;
15
18
 
@@ -18,10 +21,11 @@ let current = null;
18
21
  let timer = null;
19
22
  let hiddenAt = 0;
20
23
  let pending = null; // the key a tip is waiting to show for
24
+ let held = []; // the keys around it, their `title` kept aside meanwhile
21
25
 
22
26
  // A key that already shows its own label (an agent's sphere in the crew's column) says `data-tip-off`.
23
27
  const keyOf = (target) => {
24
- const key = target?.closest?.('button[title], [role="button"][title], a[title], label[title], summary[title], [data-tip]') ?? null;
28
+ const key = target?.closest?.('[title]:not(iframe, html, body), [data-tip]') ?? null;
25
29
  return key && !key.closest('[data-tip-off]') ? key : null;
26
30
  };
27
31
 
@@ -48,10 +52,30 @@ function words(key) {
48
52
 
49
53
  function restore(key) {
50
54
  if (!key?.dataset?.tip) return;
51
- key.setAttribute('title', key.dataset.tip);
55
+ // Words the page gave it while the pointer was on it win over the ones it had.
56
+ if (!key.hasAttribute('title')) key.setAttribute('title', key.dataset.tip);
52
57
  delete key.dataset.tip;
53
58
  }
54
59
 
60
+ // A key inside another that has words too (UNDO inside the card of changes, the card inside its row
61
+ // of notices): with only the inner one's `title` gone, the browser showed the outer one's under
62
+ // MADRE's tip (2026-11-12, the author: «the tips double»). The ones around it keep theirs aside too,
63
+ // until the pointer leaves.
64
+ function holdAround(key) {
65
+ for (let up = key.parentElement?.closest?.('[title]'); up && up !== document.body && up !== document.documentElement; up = up.parentElement?.closest?.('[title]')) {
66
+ up.dataset.tipHeld = up.getAttribute('title') ?? '';
67
+ up.removeAttribute('title');
68
+ held.push(up);
69
+ }
70
+ }
71
+ function releaseAround() {
72
+ for (const up of held) {
73
+ if (!up.hasAttribute('title') && 'tipHeld' in up.dataset) up.setAttribute('title', up.dataset.tipHeld);
74
+ delete up.dataset.tipHeld;
75
+ }
76
+ held = [];
77
+ }
78
+
55
79
  function place(key) {
56
80
  const node = ensure();
57
81
  const box = key.getBoundingClientRect();
@@ -67,6 +91,10 @@ function place(key) {
67
91
  }
68
92
 
69
93
  function show(key) {
94
+ // A key gone from the page, or with no size (a row of notices opened under the pointer while the
95
+ // tip waited), has no place to point at: its tip came up in the window's top corner (2026-11-13).
96
+ const box = key.isConnected ? key.getBoundingClientRect() : null;
97
+ if (!box || (!box.width && !box.height)) { restore(key); return; }
70
98
  const said = words(key);
71
99
  if (!said) return;
72
100
  current = key;
@@ -78,9 +106,11 @@ function show(key) {
78
106
  export function hideTip() {
79
107
  clearTimeout(timer);
80
108
  timer = null;
109
+ if (pending) restore(pending);
81
110
  pending = null;
82
111
  if (current) { restore(current); hiddenAt = performance.now(); }
83
112
  current = null;
113
+ releaseAround();
84
114
  if (tip) { tip.classList.remove('shown'); tip.hidden = true; }
85
115
  }
86
116
 
@@ -88,8 +118,12 @@ function arm(key) {
88
118
  if (key === current) return;
89
119
  hideTip();
90
120
  const soon = performance.now() - hiddenAt < AGAIN_WITHIN;
121
+ // Its words leave `title` now, not when the tip shows: the browser's would come first.
122
+ if (!words(key)) return;
123
+ holdAround(key);
91
124
  pending = key;
92
- timer = setTimeout(() => { pending = null; show(key); }, soon ? 0 : SHOW_AFTER);
125
+ const after = Number(key.closest('[data-tip-after]')?.dataset.tipAfter) || SHOW_AFTER;
126
+ timer = setTimeout(() => { pending = null; show(key); }, soon ? 0 : after);
93
127
  }
94
128
 
95
129
  export function installTips(root = globalThis.document) {
@@ -86,7 +86,7 @@ export const CHAPTERS = [
86
86
  [{ es: 'Turnos', en: 'Turns' }, { es: 'Respuestas', en: 'Replies' }],
87
87
  [{ es: 'Remedio · condición', en: 'Remedy · condition' }, { es: 'Solución · problema', en: 'Solution · problem' }],
88
88
  [{ es: 'BODEGA · PUENTE · ENFERMERÍA · ESCLUSA', en: 'HOLD · BRIDGE · MED BAY · JETTISONED' }, { es: 'SIN CONFIRMAR · CONFIRMADA · EN CUARENTENA · DESCARTADA', en: 'UNCONFIRMED · CONFIRMED · QUARANTINED · DISCARDED' }],
89
- [{ es: 'Archivista', en: 'Archivist' }, { es: 'Quien resume la memoria', en: 'Who sums up the memory' }],
89
+ [{ es: 'Archivista', en: 'Archivist' }, { es: 'Quién resume la memoria', en: 'Who sums up the memory' }],
90
90
  [{ es: 'La llave de #3 y #4', en: 'The key of #3 and #4' }, { es: 'Confirmar', en: 'Confirm' }],
91
91
  [{ es: 'Abordar · Papeles', en: 'Board · Roles' }, { es: 'Entrar · Funciones', en: 'Board · Roles' }],
92
92
  ],
@@ -138,14 +138,14 @@ export const CHAPTERS = [
138
138
  '<b>Servidores</b>: las páginas y apps que tus proyectos tienen prendidas, y si contestan. Para verlas, prende la Vista previa dentro del proyecto.',
139
139
  '<b>Calidad de la memoria</b>: cuánto ha aprendido cada proyecto abierto y qué le falta saber.',
140
140
  '<b>Entrenamiento del Coordinador</b>: cuánto le falta al Coordinador para tener su propio modelo.',
141
- '<b>Modelos locales</b>: la IA que corre en tu Mac, sus modelos y cuántos ejemplos junta cada proyecto para aprender cómo trabajas (8/300 es 8 de 300). Ahí mismo eliges qué proyectos la usan.',
141
+ '<b>Modelos locales</b>: la IA local, sus modelos y cuántos ejemplos junta cada proyecto para aprender cómo trabajas (8/300 es 8 de 300). Ahí mismo eliges qué proyectos la usan.',
142
142
  ],
143
143
  en: [
144
144
  '<b>System resources</b>: how busy your Mac is and how much memory it has left.',
145
145
  '<b>Servers</b>: the pages and apps your projects have running, and whether they answer. To see them, turn Preview on inside the project.',
146
146
  '<b>Memory quality</b>: how much each open project has learned and what it still needs to know.',
147
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 gathers to learn how you work (8/300 is 8 of 300). Right there you choose which projects use it.',
148
+ '<b>Local models</b>: the local AI, its models and how many examples each project gathers to learn how you work (8/300 is 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: 'Al entrar a un proyecto tienes todo junto: tus conversaciones, tus archivos y lo que MADRE recuerda de él.', en: 'Inside a project you have it all together: your conversations, your files and what MADRE remembers about it.' },
160
+ lead: { es: 'Al entrar a un proyecto tienes todo junto: tus chats, tus archivos y lo que MADRE recuerda de él.', en: 'Inside a project you have it all together: your chats, your files and what MADRE remembers about it.' },
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
164
  'La barra de arriba es tu camino de regreso: a Inicio, a otro proyecto abierto o a Ajustes.',
165
- 'El botón de proyectos te enseña los que tienes abiertos. Una lucecita te avisa si alguien te espera, si una IA está trabajando o si algo ya quedó.',
166
- '¿Quieres dos conversaciones a la vez? Abre otra al lado o en su propia ventana, y mueve cada una adonde no te estorbe.',
165
+ 'El botón de proyectos te enseña los que tienes abiertos. Una lucecita te avisa si alguien te espera, si una IA está trabajando o si algo ya terminó.',
166
+ '¿Quieres dos chats a la vez? Abre otro al lado o en su propia ventana, y mueve cada uno adonde no te estorbe.',
167
167
  ],
168
168
  en: [
169
169
  'The bar at the top is your way back: to Home, to another open project or to Settings.',
170
- 'The projects key shows the ones you have open. A small light tells you if someone is waiting for you, if an AI is working or if something is done.',
171
- 'Two conversations at once? Open another beside this one or in a window of its own, and move each one to where it is not in your way.',
170
+ 'The projects button shows the ones you have open. A small light tells you if someone is waiting for you, if an AI is working or if something is done.',
171
+ 'Two chats at once? Open another beside this one or in a window of its own, and move each one to where it is not in your way.',
172
172
  ],
173
173
  },
174
174
  keys: [
@@ -180,9 +180,9 @@ export const CHAPTERS = [
180
180
  },
181
181
  {
182
182
  id: 'talk',
183
- title: { es: 'Hablar con los agentes', en: 'Talking to your agents' },
183
+ title: { es: 'Hablar con tus IAs', en: 'Talking to your AIs' },
184
184
  lead: { es: 'Escribes en la caja de abajo, como le escribirías a alguien, y la IA que elegiste te contesta.', en: 'You write in the box at the bottom, the way you would write to someone, and the AI 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.' },
185
+ news: { kind: 'changed', es: 'Llegan dos módulos: Esfuerzo sugerido, que te propone bajo la caja cuánto debe pensar cada IA, y GitHub, que agrega el comando /gh.', en: 'New here: the Suggested effort module, which proposes under the box how hard each AI should think, and /gh, with the GitHub module.' },
186
186
  points: {
187
187
  es: [
188
188
  'En el círculo junto a la caja escoges con quién hablar. Debajo decides cuánto puede hacer, qué modelo usa y qué tanto debe pensar antes de contestar.',
@@ -198,46 +198,46 @@ export const CHAPTERS = [
198
198
  keys: [
199
199
  [{ es: 'Enviar', en: 'Send' }, '↵'],
200
200
  [{ es: 'Salto de línea', en: 'New line' }, '⌥ ↵'],
201
- [{ es: 'Agente, modo, archivo, comando', en: 'Agent, mode, file, command' }, '@ # ! /'],
201
+ [{ es: 'IA, permiso, archivo, comando', en: 'AI, permission, file, command' }, '@ # ! /'],
202
202
  [{ es: 'Pegar o soltar imágenes', en: 'Paste or drop images' }, '⌘ V'],
203
203
  ],
204
204
  where: ['room'],
205
205
  },
206
206
  {
207
207
  id: 'modes',
208
- title: { es: 'Modos y permisos', en: 'Modes and permissions' },
208
+ title: { es: 'Permisos', en: 'Permissions' },
209
209
  lead: { es: 'Cada mensaje lleva un permiso: hasta dónde puede llegar la IA con lo que le pides.', en: 'Every message carries a permission: how far the AI may go with what you ask.' },
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.' },
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 how you confirm #3 and #4, and a confirmation can last a few minutes.' },
211
211
  points: {
212
212
  es: [
213
- 'Son cinco niveles, de menos a más: #0 Incógnito, #1 Solo conversar, #2 Crear, #3 Editar y #4 Acceso total. Si solo quieres platicar, con #1 basta.',
214
- 'Con #3 y #4 la IA puede cambiar lo que ya existe, así que MADRE te pide confirmar antes; con #4, dos veces. Cómo confirmas lo eliges en Ajustes › Permisos.',
213
+ 'Son cinco permisos, de menos a más: #0 Sin guardar, #1 Solo conversar, #2 Puede crear, #3 Puede editar y #4 Acceso total. Si solo quieres platicar, con «Solo conversar» basta.',
214
+ 'Con «Puede editar» y «Acceso total» la IA puede cambiar lo que ya tienes, así que MADRE te pide confirmar antes; con «Acceso total», dos veces. Cómo confirmas lo eliges en Ajustes › Permisos.',
215
215
  'Si vas a trabajar un buen rato, una confirmación puede durar unos minutos. Mientras dura, la ves junto a la caja.',
216
216
  ],
217
217
  en: [
218
- 'There are five levels, from least to most: #0 Incognito, #1 Chat only, #2 Create, #3 Edit and #4 Full access. If you only want to talk, #1 is enough.',
219
- 'With #3 and #4 the AI can change what already exists, so MADRE asks you to confirm first; with #4, twice. How you confirm, you choose in Settings › Permissions.',
218
+ 'There are five permissions, from least to most: #0 Not saved, #1 Just chat, #2 Can create, #3 Can edit and #4 Full access. If you only want to talk, «Just chat» is enough.',
219
+ 'With «Can edit» and «Full access» the AI can change what you already have, so MADRE asks you to confirm first; with «Full access», twice. You choose how you confirm in Settings › Permissions.',
220
220
  'If you are going to work for a while, a confirmation can last a few minutes. While it does, you see it beside the box.',
221
221
  ],
222
222
  },
223
- keys: [[{ es: 'Elegir el modo al escribir', en: 'Choose the mode as you type' }, '#']],
223
+ keys: [[{ es: 'Elegir el permiso al escribir', en: 'Choose the permission as you type' }, '#']],
224
224
  where: ['room'],
225
225
  },
226
226
  {
227
227
  id: 'coordinator',
228
228
  title: { es: 'El Coordinador', en: 'The Coordinator' },
229
- lead: { es: 'El que ve todos tus proyectos a la vez y puede pasar encargos de uno a otro.', en: 'The one that sees all your projects at once and can pass tasks from one to another.' },
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.' },
229
+ lead: { es: 'Una IA que ve todos tus proyectos a la vez y puede pasar encargos de uno a otro.', en: 'An AI that sees all your projects at once and can pass tasks from one to another.' },
230
+ news: { kind: 'new', es: 'En 0.7.2 cada proyecto trabajaba por su cuenta; ahora una IA los ve todos.', en: 'In 0.7.2 each project worked on its own; now one AI sees them all.' },
231
231
  points: {
232
232
  es: [
233
233
  'Le hablas en su propio espacio, desde Inicio, y puede asomarse a lo que pasa en cada proyecto. Pregúntale, por ejemplo, «¿qué quedó pendiente esta semana?».',
234
234
  'Desde cualquier proyecto le preguntas escribiendo /bishop. Su respuesta solo la ves tú.',
235
- 'Por su cuenta llega hasta #2. Si algo necesita #3 o #4, te deja la propuesta y tú decides en ese proyecto.',
235
+ 'Por su cuenta llega hasta «Puede crear» (#2). Si algo necesita más, te deja la propuesta y tú decides en ese proyecto.',
236
236
  ],
237
237
  en: [
238
238
  'You talk to it in its own space, from Home, and it can look into what is going on in each project. Ask it, for example, «what was left pending this week?».',
239
239
  'From any project you ask it by writing /bishop. Only you see its answer.',
240
- 'On its own it goes up to #2. If something needs #3 or #4, it leaves you the proposal and you decide in that project.',
240
+ 'On its own it goes up to «Can create» (#2). If something needs more, it leaves you the 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']],
@@ -247,16 +247,16 @@ export const CHAPTERS = [
247
247
  id: 'links',
248
248
  title: { es: 'Conexiones', en: 'Connections' },
249
249
  lead: { es: 'Un proyecto puede aprender de otro, solo si tú le das permiso.', en: 'One project can learn from another, only if you give it permission.' },
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.' },
250
+ news: { kind: 'new', es: 'En 0.7.2, «Conexiones» era donde iniciabas sesión con tus IAs; ahora une dos proyectos.', en: 'In 0.7.2, «Connections» was where you signed your AIs in; now it joins two projects.' },
251
251
  points: {
252
252
  es: [
253
253
  'Cada conexión la firmas tú: qué puede consultar, por cuánto tiempo y si el Coordinador puede pasar encargos.',
254
- 'Solo se comparten notas que ya están en uso, sin datos privados. Tus archivos y tus conversaciones nunca salen de su proyecto.',
254
+ 'Solo se comparten notas que ya están en uso, sin datos privados. Tus archivos y tus chats nunca salen de su proyecto.',
255
255
  'En Conexiones, en Inicio, ves cada una como en el mapa: quién consulta a quién, qué comparte y hasta cuándo. «Cancelar conexión» la termina cuando quieras.',
256
256
  ],
257
257
  en: [
258
258
  'You sign every connection: what it may look up, for how long and whether the Coordinator may pass tasks.',
259
- 'Only notes already in use are shared, without private data. Your files and your conversations never leave their project.',
259
+ 'Only notes already in use are shared, without private data. Your files and your chats never leave their project.',
260
260
  'In Connections, in Home, you see each one as on the map: who looks up whom, what it shares and until when. «Cancel the connection» ends it whenever you want.',
261
261
  ],
262
262
  },
@@ -291,20 +291,20 @@ export const CHAPTERS = [
291
291
  },
292
292
  {
293
293
  id: 'settings',
294
- title: { es: 'Diagnóstico y Ajustes', en: 'Diagnostics and Settings' },
295
- lead: { es: 'Ajustes es donde cambias cómo se ve y cómo trabaja MADRE. Diagnóstico te ayuda cuando algo falla.', en: 'Settings is where you change how MADRE looks and works. Diagnostics helps you when something fails.' },
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.' },
294
+ title: { es: 'Ajustes y Ayuda', en: 'Settings and Help' },
295
+ lead: { es: 'Ajustes es donde cambias cómo se ve y cómo trabaja MADRE. Ayuda te saca del apuro cuando algo falla.', en: 'Settings is where you change how MADRE looks and works. Help gets you out of trouble when something fails.' },
296
+ since: { kind: 'changed', es: 'Los Ajustes de Inicio suman IA local. En Ajustes › Tus IAs cada una se pliega, y OpenCode agrupa sus modelos por proveedor.', en: 'Home\'s Settings gain Local AI. In Settings › Your AIs each one 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
- 'Ábrelos con ⌘ , y escribe / para encontrar cualquier ajuste. Lo que cambias se aplica al instante.',
300
+ 'Abre Ajustes con ⌘ , y escribe / para encontrar cualquier ajuste. Lo que cambias se aplica al instante.',
301
301
  'En Apariencia escoges colores, fondo, tema claro u oscuro e idioma. En Automático, MADRE se pone clara u oscura igual que tu sistema.',
302
- '¿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. Si algo falla al instalar, «Ver cómo arreglarlo» te da los pasos para tu sistema.',
302
+ '¿Algo no funciona? Abre Ayuda, en la barra del proyecto, y cuenta qué pasa con tus palabras: Diagnóstico te dice qué hacer y te da el botón para arreglarlo. Si algo falla al instalar, «Ver cómo arreglarlo» te da los pasos para tu sistema.',
303
303
  ],
304
304
  en: [
305
- 'Open them with ⌘ , and type / to find any setting. What you change applies at once.',
305
+ 'Open Settings with ⌘ , and type / to find any setting. What you change applies at once.',
306
306
  'In Appearance you choose colours, background, light or dark and language. On Automatic, MADRE goes light or dark the same as your system.',
307
- 'Something not working? Open Diagnostics and tell it what happens in your own words: it says what to do and gives you the key that fixes it. When an install fails, «See how to fix it» gives you the steps for your system.',
307
+ 'Something not working? Open Help, on the project\'s bar, and say what happens in your own words: Diagnostics tells you what to do and gives you the button that fixes it. When an install fails, «See how to fix it» gives you the steps for your system.',
308
308
  ],
309
309
  },
310
310
  keys: [
@@ -336,8 +336,8 @@ export const CHAPTERS = [
336
336
  },
337
337
  {
338
338
  id: 'local',
339
- title: { es: 'IA local por proyecto', en: 'Local AI by project' },
340
- lead: { es: 'Una IA que vive en tu Mac: gratis, sin internet, y tú decides qué proyectos la usan.', en: 'An AI that lives on your Mac: free, offline, and you decide which projects use it.' },
339
+ title: { es: 'Tu IA local', en: 'Your local AI' },
340
+ lead: { es: 'Una IA que vive en tu Mac, gratis y sin internet. En los chats la llamas @madre, y tú decides qué proyectos la usan.', en: 'An AI that runs on your Mac, free and offline. In chats you call it @madre, and you decide 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: {
@@ -420,7 +420,7 @@ export const GESTURES = [
420
420
  [{ es: 'La caja', en: 'The box' }, [
421
421
  [{ es: 'Enviar', en: 'Send' }, '↵'],
422
422
  [{ es: 'Salto de línea', en: 'New line' }, '⌥ ↵'],
423
- [{ es: 'Agente, modo, archivo, comando', en: 'Agent, mode, file, command' }, '@ # ! /'],
423
+ [{ es: 'IA, permiso, archivo, comando', en: 'AI, permission, file, command' }, '@ # ! /'],
424
424
  [{ es: 'Pegar o soltar imágenes', en: 'Paste or drop images' }, '⌘ V'],
425
425
  ]],
426
426
  [{ es: 'Código', en: 'Code' }, [