@jossuealcala/madre 1.1.2 → 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 (166) hide show
  1. package/CHANGELOG.en.md +40 -1
  2. package/CHANGELOG.md +40 -1
  3. package/README.en.md +3 -3
  4. package/README.md +3 -3
  5. package/SECURITY.md +11 -6
  6. package/TRADEMARKS.md +6 -2
  7. package/bin/madre.mjs +76 -11
  8. package/docs/REFERENCE.md +16 -10
  9. package/docs/SDK.md +36 -9
  10. package/docs/en/REFERENCE.md +12 -8
  11. package/docs/en/SDK.md +34 -8
  12. package/docs/en/training/README.md +1 -1
  13. package/docs/sdk/connector-module.mjs +1 -1
  14. package/docs/sdk/hello-module.mjs +39 -4
  15. package/docs/training/README.md +1 -1
  16. package/docs/training/train.sh +3 -0
  17. package/habilidades/explicamelo-facil/HABILIDAD.md +19 -0
  18. package/habilidades/hojas-de-calculo/HABILIDAD.md +18 -0
  19. package/habilidades/mensajes-a-clientes/HABILIDAD.md +19 -0
  20. package/habilidades/publicaciones-para-redes/HABILIDAD.md +19 -0
  21. package/habilidades/resumen-y-pendientes/HABILIDAD.md +18 -0
  22. package/habilidades/tu-pagina-paso-a-paso/HABILIDAD.md +19 -0
  23. package/package.json +7 -4
  24. package/public/activity.js +66 -22
  25. package/public/app.js +4947 -894
  26. package/public/assets/brand/OFL-SpaceGrotesk.txt +93 -0
  27. package/public/assets/brand/SpaceGrotesk-latin-ext.woff2 +0 -0
  28. package/public/assets/brand/SpaceGrotesk-latin.woff2 +0 -0
  29. package/public/assets/brand/madre-app-180.png +0 -0
  30. package/public/assets/brand/madre-app-192.png +0 -0
  31. package/public/assets/brand/madre-app-512.png +0 -0
  32. package/public/assets/brand/madre-app.svg +1 -1
  33. package/public/assets/brand/madre-favicon.svg +1 -1
  34. package/public/attribution.js +29 -19
  35. package/public/auto-open.js +102 -0
  36. package/public/brands.js +36 -19
  37. package/public/changes.js +63 -0
  38. package/public/en.js +1085 -102
  39. package/public/es.js +2940 -1656
  40. package/public/i18n.js +11 -0
  41. package/public/index.html +31 -27
  42. package/public/loader.js +322 -117
  43. package/public/macroverso.js +57 -355
  44. package/public/manual-content.js +69 -9
  45. package/public/manual.js +21 -6
  46. package/public/market-view.js +298 -84
  47. package/public/market.js +25 -2
  48. package/public/mcp-catalog.js +7 -2
  49. package/public/missions.js +169 -0
  50. package/public/news-scenes.js +292 -0
  51. package/public/nostromo-engine.js +935 -654
  52. package/public/notices.js +78 -0
  53. package/public/notifications.js +119 -0
  54. package/public/power.js +1 -1
  55. package/public/provider-marks.js +170 -0
  56. package/public/provider-pick.js +147 -0
  57. package/public/resay.js +4 -0
  58. package/public/review-ask.js +16 -13
  59. package/public/routing.js +29 -3
  60. package/public/salas-mac.css +467 -47
  61. package/public/salas-mac.html +8 -5
  62. package/public/salas-mac.js +805 -109
  63. package/public/salas.css +2 -2
  64. package/public/salas.html +2 -2
  65. package/public/salas.js +1 -1
  66. package/public/starters.js +128 -0
  67. package/public/styles.css +3036 -340
  68. package/public/subscription.js +303 -0
  69. package/public/terms-field.js +170 -0
  70. package/public/terms.js +117 -19
  71. package/public/tips.js +158 -0
  72. package/public/tour-chapters.js +88 -88
  73. package/public/tour.js +364 -46
  74. package/public/troubleshooting.js +313 -27
  75. package/public/welcome-scene.js +446 -0
  76. package/public/welcome.js +827 -282
  77. package/src/adapters/claude.mjs +2 -1
  78. package/src/adapters/codex.mjs +2 -1
  79. package/src/adapters/cursor.mjs +9 -6
  80. package/src/adapters/gemini-rest.mjs +236 -0
  81. package/src/adapters/gemini.mjs +13 -7
  82. package/src/adapters/grok.mjs +290 -0
  83. package/src/adapters/madre.mjs +71 -23
  84. package/src/adapters/opencode.mjs +15 -2
  85. package/src/adapters/process.mjs +14 -3
  86. package/src/adapters/steps.mjs +176 -0
  87. package/src/app-invite.mjs +90 -0
  88. package/src/auth-probe.mjs +32 -0
  89. package/src/billing-key.mjs +8 -0
  90. package/src/billing.mjs +317 -0
  91. package/src/bridge/policy.mjs +1 -1
  92. package/src/capabilities.mjs +46 -10
  93. package/src/chats.mjs +44 -2
  94. package/src/checkpoint.mjs +119 -1
  95. package/src/codex-route.mjs +113 -0
  96. package/src/commands.mjs +5 -2
  97. package/src/credentials.mjs +46 -8
  98. package/src/dataset.mjs +18 -7
  99. package/src/directives.mjs +1 -0
  100. package/src/event-store.mjs +25 -2
  101. package/src/extensions.mjs +5 -1
  102. package/src/ficha.mjs +158 -0
  103. package/src/files.mjs +36 -2
  104. package/src/image-studio.mjs +13 -3
  105. package/src/install-metrics.mjs +9 -3
  106. package/src/lease.mjs +6 -1
  107. package/src/looks.mjs +4 -1
  108. package/src/market-check.mjs +1 -1
  109. package/src/market-remote.mjs +135 -1
  110. package/src/mcp/image-server.mjs +59 -90
  111. package/src/mcp/memory-server.mjs +10 -0
  112. package/src/memory-tools.mjs +3 -0
  113. package/src/memory.mjs +29 -4
  114. package/src/models.mjs +21 -3
  115. package/src/modules/ahp.mjs +10 -4
  116. package/src/modules/bishop-exam.mjs +41 -12
  117. package/src/modules/bishop.mjs +2 -2
  118. package/src/modules/choices.mjs +12 -10
  119. package/src/modules/fetch-alone.mjs +7 -0
  120. package/src/modules/github.mjs +6 -2
  121. package/src/modules/helpers.mjs +23 -5
  122. package/src/modules/image-providers.mjs +281 -0
  123. package/src/modules/image-studio.mjs +106 -39
  124. package/src/modules/index.mjs +61 -12
  125. package/src/modules/intents-observe.mjs +3 -1
  126. package/src/modules/isolated.mjs +160 -0
  127. package/src/modules/ollama.mjs +35 -6
  128. package/src/modules/playwright.mjs +78 -20
  129. package/src/modules/reminders.mjs +42 -2
  130. package/src/modules/ripley.mjs +2 -1
  131. package/src/modules/run-alone.mjs +122 -0
  132. package/src/modules/runs.mjs +11 -8
  133. package/src/modules/sdk.mjs +10 -3
  134. package/src/notices-key.mjs +8 -0
  135. package/src/notices.mjs +185 -0
  136. package/src/ollama.mjs +57 -15
  137. package/src/opencode-health.mjs +1 -1
  138. package/src/outbound.mjs +124 -13
  139. package/src/quota-sources.mjs +148 -3
  140. package/src/review-ask.mjs +55 -31
  141. package/src/room/archivist.mjs +30 -5
  142. package/src/room/busy.mjs +16 -0
  143. package/src/room/changes.mjs +79 -0
  144. package/src/room/control.mjs +36 -6
  145. package/src/room/economy.mjs +1 -1
  146. package/src/room/guard.mjs +39 -2
  147. package/src/room/prompt.mjs +49 -6
  148. package/src/room/vectors.mjs +7 -1
  149. package/src/room.mjs +181 -49
  150. package/src/router.mjs +1 -1
  151. package/src/runs.mjs +39 -0
  152. package/src/runtime-detection.mjs +46 -6
  153. package/src/salas.mjs +181 -18
  154. package/src/server.mjs +1101 -118
  155. package/src/service.mjs +116 -0
  156. package/src/setup-trouble.mjs +20 -1
  157. package/src/setup.mjs +1 -1
  158. package/src/skill-check.mjs +269 -0
  159. package/src/skills-import.mjs +128 -0
  160. package/src/skills.mjs +502 -0
  161. package/src/terms.mjs +23 -5
  162. package/src/tour.mjs +31 -5
  163. package/src/updates.mjs +47 -4
  164. package/src/web-preview.mjs +181 -0
  165. package/src/whats-new.mjs +121 -1
  166. package/src/rumbo.mjs +0 -337
@@ -45,6 +45,10 @@ const installAgent = {
45
45
  darwin: ['curl https://cursor.com/install -fsS | bash'],
46
46
  linux: ['curl https://cursor.com/install -fsS | bash']
47
47
  },
48
+ grok: {
49
+ darwin: ['npm install -g @xai-official/grok'],
50
+ linux: ['npm install -g @xai-official/grok']
51
+ },
48
52
  };
49
53
 
50
54
  const loginAgent = {
@@ -53,10 +57,16 @@ const loginAgent = {
53
57
  gemini: { darwin: ['gemini', '# inside gemini: /auth → "Use Gemini API key" or Google login'], linux: ['gemini', '# inside gemini: /auth']},
54
58
  opencode: { darwin: ['opencode auth login', 'opencode auth list'], linux: ['opencode auth login', 'opencode auth list']},
55
59
  cursor: { darwin: ['cursor-agent login', 'cursor-agent status'], linux: ['cursor-agent login', 'cursor-agent status']},
60
+ grok: { darwin: ['grok login', 'grok models'], linux: ['grok login --device-auth', 'grok models']},
56
61
  };
57
62
 
58
63
  const same = (commands) => ({ darwin: commands, linux: commands });
59
64
 
65
+ const customEndpointFixes = (agent = null) => ({
66
+ darwin: ['env | grep -E \'^(ANTHROPIC|OPENAI)_BASE_URL=\'', '# remove that export from ~/.zshrc, ~/.zprofile or ~/.zshenv; then:', 'unset ANTHROPIC_BASE_URL OPENAI_BASE_URL', ...(agent === 'codex' ? ['# if MADRE names Codex config.toml, remove openai_base_url or model_provider from ~/.codex/config.toml (or $CODEX_HOME/config.toml)'] : []), ...(agent ? ['# reopen the project; only for a gateway you verified:', `PULSE_ALLOW_CUSTOM_AGENT_ENDPOINTS=${agent} madre start`] : [])],
67
+ linux: ['env | grep -E \'^(ANTHROPIC|OPENAI)_BASE_URL=\'', '# remove that export from ~/.bashrc, ~/.profile or ~/.bash_profile; then:', 'unset ANTHROPIC_BASE_URL OPENAI_BASE_URL', ...(agent === 'codex' ? ['# if MADRE names Codex config.toml, remove openai_base_url or model_provider from ~/.codex/config.toml (or $CODEX_HOME/config.toml)'] : []), ...(agent ? ['# reopen the project; only for a gateway you verified:', `PULSE_ALLOW_CUSTOM_AGENT_ENDPOINTS=${agent} madre start`] : [])],
68
+ });
69
+
60
70
  export const CONDITIONS = [
61
71
  {
62
72
  id: 'claude-api-key-shadows-plan',
@@ -78,12 +88,11 @@ export const CONDITIONS = [
78
88
  severity: 'blocking',
79
89
  title: 'The agent is pointed at a custom endpoint',
80
90
  match: /MADRE blocked @(?:codex|claude) before sending the briefing|Subscribe to (?:the )?Telegram|@conduitapi/i,
81
- diagnosis: 'The installed CLI inherited a base-URL override from this computer, so its request was going to another gateway instead of the official agent service. A demand to join a Telegram channel comes from that gateway, not from MADRE, Anthropic or OpenAI. MADRE now names that route and stops before sending the briefing.',
82
- remedy: 'Do not subscribe or enter credentials. Remove the base-URL override and reopen MADRE to use the official service. If the gateway is intentional and you have verified who operates it, explicitly allow only that agent.',
83
- fixes: {
84
- darwin: ['env | grep -E \'^(ANTHROPIC|OPENAI)_BASE_URL=\'', '# remove that export from ~/.zshrc, ~/.zprofile or ~/.zshenv; then:', 'unset ANTHROPIC_BASE_URL OPENAI_BASE_URL', '# reopen the project; only for a gateway you verified:', 'PULSE_ALLOW_CUSTOM_AGENT_ENDPOINTS=claude madre start'],
85
- linux: ['env | grep -E \'^(ANTHROPIC|OPENAI)_BASE_URL=\'', '# remove that export from ~/.bashrc, ~/.profile or ~/.bash_profile; then:', 'unset ANTHROPIC_BASE_URL OPENAI_BASE_URL', '# reopen the project; only for a gateway you verified:', 'PULSE_ALLOW_CUSTOM_AGENT_ENDPOINTS=claude madre start'],
86
- },
91
+ diagnosis: 'The agent has a custom route in this computer\'s environment or, for Codex, in its user configuration. Its request could go to another gateway instead of the official agent service. A demand to join a Telegram channel comes from that gateway, not from MADRE, Anthropic or OpenAI. When MADRE detects the route before a turn, it stops before preparing the briefing.',
92
+ remedy: 'Do not subscribe or enter credentials. Remove the custom route from the environment or Codex configuration and reopen MADRE to use the official service. If the gateway is intentional and you have verified who operates it, explicitly allow only that agent.',
93
+ fixes: customEndpointFixes(),
94
+ perAgent: { codex: customEndpointFixes('codex'), claude: customEndpointFixes('claude') },
95
+ perAgentReplacesFixes: true,
87
96
  },
88
97
  {
89
98
  id: 'codex-reading-stdin',
@@ -148,7 +157,9 @@ export const CONDITIONS = [
148
157
  agent: 'gemini',
149
158
  severity: 'transient',
150
159
  title: 'Gemini model under high demand (503)',
151
- match: /status 503|high demand|UNAVAILABLE/i,
160
+ // MADRE's own sentence too, in the room's language (1.1.2 diagnostics: 14 copies filed «Google
161
+ // reportó el modelo como no disponible (HTTP 503)…» as unknown).
162
+ match: /status 503|high demand|UNAVAILABLE|\(HTTP 503\)/i,
152
163
  diagnosis: 'Google is shedding load on the selected model (HTTP 503). The CLI would retry with backoff for minutes; MADRE stops it after 15 s of that and retries once on gemini-3-flash-preview. The turn failed only if that spare model failed too; the message is still the one about the model you chose.',
153
164
  remedy: 'Ask again in a minute, pick an explicit model from the Write box\'s model menu, or hand the question to another agent. PULSE_GEMINI_FALLBACK_MODEL changes the spare model; left empty, there is none.',
154
165
  fixes: same(['# wait, then resend — or continue with @codex / @claude / @opencode', 'PULSE_GEMINI_FALLBACK_MODEL= madre start']),
@@ -168,6 +179,24 @@ export const CONDITIONS = [
168
179
  linux: ['npx @jossuealcala/madre setup', '# press [m] and pick a provider/model that has a session', 'PULSE_OPENCODE_MODEL=openai/gpt-5.6-sol npx @jossuealcala/madre start', 'opencode auth logout anthropic']
169
180
  },
170
181
  },
182
+ {
183
+ // The QA of the app (2026-11-13): with no model chosen, OpenCode picked one its provider does not
184
+ // have (anthropic/claude-fable-5-1) and every turn ended in «APIError: Not Found», read by the
185
+ // person as a sign-in that would not work. Same way out as MU-007: a model that answers.
186
+ id: 'opencode-default-model-missing',
187
+ code: 'MU-094',
188
+ solvedIn: 'connections',
189
+ agent: 'opencode',
190
+ severity: 'blocking',
191
+ title: 'The model OpenCode picked does not exist at its provider',
192
+ match: /APIError:\s*Not Found|Error:\s*Not Found\b|model[^\n]{0,40}not found/i,
193
+ diagnosis: 'With no model chosen in MADRE, OpenCode picks one by itself, and its provider answered that it does not have it. Your sign-in is fine: the model is what fails.',
194
+ remedy: 'Retry on a model that works (MADRE offers one under the error), or choose OpenCode\'s model in Settings › Agents › OpenCode.',
195
+ fixes: {
196
+ darwin: ['npx @jossuealcala/madre setup', '# press [m] and pick a model that answers, e.g. openai/gpt-5.6-sol or opencode/big-pickle', '# one-off alternative:', 'PULSE_OPENCODE_MODEL=opencode/big-pickle npx @jossuealcala/madre start'],
197
+ linux: ['npx @jossuealcala/madre setup', '# press [m] and pick a model that answers', 'PULSE_OPENCODE_MODEL=opencode/big-pickle npx @jossuealcala/madre start'],
198
+ },
199
+ },
171
200
  {
172
201
  // Seen in a real project (2026-10-19): OpenCode's default model was Anthropic's, through an API
173
202
  // key with no balance, and every turn of a plan failed with the provider's words in English.
@@ -175,7 +204,8 @@ export const CONDITIONS = [
175
204
  code: 'MU-059',
176
205
  severity: 'blocking',
177
206
  title: 'The API account behind this agent has no credit left',
178
- match: /credit balance is too low|purchase credits|insufficient_quota|exceeded your current quota|billing_hard_limit_reached/i,
207
+ // OpenRouter's two ways of saying it (diagnostics of 1.1.2, D-7).
208
+ match: /credit balance is too low|purchase credits|insufficient_quota|exceeded your current quota|billing_hard_limit_reached|requires more credits|exceed your available credits/i,
179
209
  diagnosis: 'The provider refused the turn because the API key it was sent with has no balance left. An API key is billed apart from a subscription: a Claude Pro or Max plan, or ChatGPT, does not pay for it. In OpenCode it is the provider of the model the turn asked for, and a turn that named none ran on the default model of Settings › Agents › OpenCode.',
180
210
  remedy: 'Top up that API account, or give OpenCode a model whose provider has a session that works: your ChatGPT account (openai/…), GitHub Copilot, or OpenCode\'s own free models (opencode/…). Change the default in Settings › Agents › OpenCode, or pick another model in the Write box for one turn.',
181
211
  fixes: same(['# Anthropic API: https://console.anthropic.com/settings/billing', '# OpenAI API: https://platform.openai.com/settings/organization/billing', '# OpenCode, one turn on its own free model:', 'PULSE_OPENCODE_MODEL=opencode/big-pickle madre start', '# or take the key with no balance out of OpenCode:', 'opencode auth logout anthropic']),
@@ -186,7 +216,8 @@ export const CONDITIONS = [
186
216
  agent: 'opencode',
187
217
  severity: 'blocking',
188
218
  title: 'OpenCode\'s free models have run out for now',
189
- match: /Free usage limit reached|free use of OpenCode ran out/i,
219
+ // And MADRE's sentence in Spanish (1.1.2 diagnostics: 5 copies filed it as unknown).
220
+ match: /Free usage limit reached|free use of OpenCode ran out|uso gratis de OpenCode/i,
190
221
  diagnosis: 'OpenCode\'s own free models (opencode/…) answer without an account, but only up to a limit; when it is reached OpenCode retries in silence and never answers. MADRE now stops the turn as soon as OpenCode says so, instead of waiting for the clock. Nothing in the project is wrong.',
191
222
  remedy: 'Connect a provider of yours to OpenCode in Settings › Agents › OpenCode (your ChatGPT account, GitHub Copilot or an API key), ask another agent, or ask @madre, which runs on this computer. The free use comes back after a while.',
192
223
  fixes: same(['# the providers OpenCode can use:', 'opencode auth login', '# subscription for more free use: https://opencode.ai/go']),
@@ -202,6 +233,133 @@ export const CONDITIONS = [
202
233
  remedy: 'Wait for the usage to renew, change the Cursor plan, or ask another agent in the meantime.',
203
234
  fixes: same(['# plan and usage: https://cursor.com/dashboard', 'cursor-agent status']),
204
235
  },
236
+ {
237
+ // Seen with a Grok Plus account on 2026-11-06: every turn refused with «Access to the chat
238
+ // endpoint is denied», in the CLI's own screen too. The sign-in had been made before the plan
239
+ // was active; signing in again fixed it.
240
+ id: 'grok-account-refused',
241
+ code: 'MU-084',
242
+ agent: 'grok',
243
+ severity: 'blocking',
244
+ title: 'xAI refuses this Grok account',
245
+ match: /chat endpoint is denied|xAI refused this Grok account|xAI rechazó esta cuenta de Grok/i,
246
+ diagnosis: 'Grok is signed in, but xAI answers every turn with a 403. It happens when the sign-in was made before the plan was active. It is xAI\'s answer, not MADRE\'s: nothing in the project is wrong.',
247
+ remedy: 'Sign in to Grok again: grok logout, then grok login. If it keeps happening, check at grok.com that your plan is active.',
248
+ fixes: same(['grok logout', 'grok login', 'grok models # «You are logged in with grok.com.»']),
249
+ },
250
+ {
251
+ // 1.1.3: Gemini answers through its API with a key, without its CLI (a575180). Google's «model
252
+ // not found» came back in MADRE's own words, in both languages, and no card knew it.
253
+ id: 'gemini-model-unavailable',
254
+ code: 'MU-085',
255
+ agent: 'gemini',
256
+ severity: 'blocking',
257
+ title: 'This Gemini model is not available for your key',
258
+ match: /does not exist or is not available for this key|no existe o no está disponible para esta llave|is not found for API version|is not supported for generateContent|is no longer available to new users/i,
259
+ diagnosis: 'Gemini answers through its API with your key, and Google says the model chosen in the box does not exist or this key cannot use it. It happens with a model Google retired, a preview your key has no access to, or a name written by hand.',
260
+ remedy: 'Choose another Gemini model in the box, or leave the default one. If you need that model, check in AI Studio that your key has access to it.',
261
+ fixes: same(['# the models your key opens: https://aistudio.google.com/app/apikey']),
262
+ },
263
+ {
264
+ // 1.1.3, the same adapter: through the API the whole briefing goes in one request.
265
+ id: 'gemini-message-too-long',
266
+ code: 'MU-086',
267
+ agent: 'gemini',
268
+ severity: 'blocking',
269
+ title: 'The message is too long for this Gemini model',
270
+ match: /longer than this Gemini model takes|más largo de lo que este modelo de Gemini recibe|exceeds the maximum number of tokens/i,
271
+ diagnosis: 'Through its API, Gemini receives everything in one go: your message, what you attached and the memory that came with it. This time it was more than the chosen model takes.',
272
+ remedy: 'Ask in smaller parts, attach less at once, or choose a Gemini model that takes more. A new chat also sends less of the conversation.',
273
+ fixes: same(['# how much each model takes: https://ai.google.dev/gemini-api/docs/models']),
274
+ },
275
+ {
276
+ // 1.1.3: a module you install runs in a process of its own, fenced by Node's permission model
277
+ // (b454bab). One written for the old way, that writes or starts a program itself, is stopped by
278
+ // Node with ERR_ACCESS_DENIED, which reached nobody as anything they could act on.
279
+ id: 'module-fenced',
280
+ code: 'MU-087',
281
+ severity: 'blocking',
282
+ title: 'A module tried something its fence does not allow',
283
+ match: /ERR_ACCESS_DENIED|Access to this API has been restricted/i,
284
+ diagnosis: 'Since 1.1.3, a module you install runs apart, with limited permissions: it can read its own file, but it cannot write your files or start other programs by itself. This module tried one of those and Node stopped it. Your project and MADRE are fine.',
285
+ remedy: 'Ask the module\'s author for a version made for MADRE 1.1.3, which asks MADRE for what it needs instead of doing it itself. Meanwhile, turn it off in Modules.',
286
+ fixes: same(['# Modules › the module › turn it off']),
287
+ },
288
+ {
289
+ // The sentinel's first reading (S-2, 2026-11-09): OpenCode's provider answered 502.
290
+ id: 'provider-bad-gateway',
291
+ code: 'MU-088',
292
+ severity: 'transient',
293
+ title: 'The AI\'s provider did not answer (Bad Gateway)',
294
+ match: /APIError: Bad Gateway|\bBad Gateway\b|HTTP 502\b/i,
295
+ diagnosis: 'The server of the company behind this AI answered with a 502: it could not reach its own model in that moment. It is on their side, not in MADRE or in the project.',
296
+ remedy: 'Try again in a moment. If it keeps happening, choose another model or ask another agent meanwhile.',
297
+ fixes: same(['# try again in a moment, or choose another model in the box']),
298
+ },
299
+ {
300
+ // S-5: OpenCode through OpenRouter, with privacy settings that leave no provider for the model.
301
+ id: 'opencode-provider-policy',
302
+ code: 'MU-089',
303
+ agent: 'opencode',
304
+ severity: 'blocking',
305
+ title: 'No provider of this model fits your data policy',
306
+ match: /guardrail restrictions and data policy|No endpoints found matching your data policy/i,
307
+ diagnosis: 'OpenCode asks OpenRouter for this model, and OpenRouter has no provider of it that fits the privacy settings of your account (for example, providers that may train on your prompts are excluded). Nothing in MADRE or the project is wrong.',
308
+ remedy: 'Choose another model in the box, or allow more providers in OpenRouter\'s privacy settings.',
309
+ fixes: same(['# OpenRouter › Settings › Privacy: https://openrouter.ai/settings/privacy']),
310
+ },
311
+ {
312
+ // S-15: a model whose providers do not take tools; MADRE's OpenCode works with tools.
313
+ id: 'opencode-model-no-tools',
314
+ code: 'MU-090',
315
+ agent: 'opencode',
316
+ severity: 'blocking',
317
+ title: 'This model does not take tools, and OpenCode needs them',
318
+ match: /No endpoints found that support tool use/i,
319
+ diagnosis: 'Inside MADRE, OpenCode reads the project with tools (reading files, searching). The model chosen has no provider that accepts tools, so the turn cannot start.',
320
+ remedy: 'Choose another model in the box: most current models take tools.',
321
+ fixes: same(['# the box › OpenCode\'s sphere › choose another model']),
322
+ },
323
+ {
324
+ // S-20 (1.1.1): Codex could not start the helper it runs inside itself.
325
+ id: 'codex-app-server',
326
+ code: 'MU-091',
327
+ agent: 'codex',
328
+ severity: 'blocking',
329
+ title: 'Codex could not start its own helper',
330
+ match: /failed to initialize in-process app-server client/i,
331
+ diagnosis: 'Before answering, Codex starts a helper inside itself, and the system did not let it («Operation not permitted»). It usually comes from a Codex half updated, or from a Codex folder its user cannot write.',
332
+ remedy: 'Update Codex and try again. If it keeps happening, sign Codex in again.',
333
+ fixes: same(['npm install -g @openai/codex@latest', 'codex --version', '# if it keeps happening:', 'codex logout', 'codex login']),
334
+ },
335
+ {
336
+ // S-4 (1.1.3): Grok on Linux enforces what it may not touch with bubblewrap, and refuses to start
337
+ // without it.
338
+ id: 'grok-needs-bubblewrap',
339
+ code: 'MU-092',
340
+ agent: 'grok',
341
+ severity: 'blocking',
342
+ title: 'Grok needs bubblewrap on Linux',
343
+ match: /bwrap exec failed|Install bubblewrap|could not enforce its deny list/i,
344
+ diagnosis: 'On Linux, Grok keeps itself away from what it must not touch with a small program called bubblewrap, and it refuses to start when it is missing. It is a package of the system, nothing in the project.',
345
+ remedy: 'Install bubblewrap and send the message again.',
346
+ fixes: {
347
+ darwin: ['# only Linux needs it; on a Mac this is not the cause'],
348
+ linux: ['sudo apt install -y bubblewrap', 'bwrap --version'],
349
+ },
350
+ },
351
+ {
352
+ // D-32, S-1 (OpenCode, 1.1.3) and S-10 (Gemini): a clean exit with nothing written. Since this
353
+ // version OpenCode's line also says why, when it can tell (src/adapters/opencode.mjs).
354
+ id: 'empty-answer',
355
+ code: 'MU-093',
356
+ severity: 'transient',
357
+ title: 'The AI ended without writing an answer',
358
+ match: /exited cleanly without an answer|terminó sin errores pero sin respuesta|only thought and wrote no answer|solo pensó y no escribió|stopped before writing an answer|se detuvo antes de escribir|ran out of room before writing|se quedó sin espacio antes de escribir/i,
359
+ diagnosis: 'The AI finished its turn without an error but also without a word: its model only thought, used its tools and stopped, or ran out of room. Free models do it more often. Nothing in MADRE or the project is wrong.',
360
+ remedy: 'Send the message again. If it repeats, choose another model or ask another agent.',
361
+ fixes: same(['# send it again, or choose another model in the box']),
362
+ },
205
363
  {
206
364
  // Seen in the diagnostics of 1.1.0 (2026-10-31): Codex on a free ChatGPT account ran out and
207
365
  // the room called it an unknown failure.
@@ -215,6 +373,96 @@ export const CONDITIONS = [
215
373
  remedy: 'Wait until the date Codex gives, change your ChatGPT plan, or ask another agent in the meantime.',
216
374
  fixes: same(['# plan and usage: https://chatgpt.com/codex/settings/usage']),
217
375
  },
376
+ {
377
+ // Seen in the diagnostics of 1.1.2 (2026-11-03 to 11-06, two copies): Codex signed in with a
378
+ // ChatGPT account asks, before each turn, which workspace of that account to send it to, and
379
+ // «workspace routing discovery failed» reached the author as an unknown failure. Its 401 is a
380
+ // session gone, which the signed-out card already reads.
381
+ id: 'codex-workspace-routing',
382
+ code: 'MU-083',
383
+ agent: 'codex',
384
+ severity: 'transient',
385
+ title: 'Codex could not reach its ChatGPT workspace',
386
+ match: /workspace routing discovery (?:failed|timed out)/i,
387
+ diagnosis: 'Signed in with a ChatGPT account, Codex first asks OpenAI which workspace of that account the turn goes to, and that question did not get an answer: OpenAI did not answer in time, or this computer\'s connection did not get through. Nothing in the project is wrong.',
388
+ remedy: 'Try again in a moment. If it keeps happening, sign Codex in again in Settings › Agents › Codex, and check the connection of this computer.',
389
+ fixes: same(['# sign in again:', 'codex logout', 'codex login']),
390
+ },
391
+ {
392
+ // Seen in the diagnostics of 1.1.2 (2026-11-03): a model the ChatGPT plan does not include
393
+ // reached the room as Codex's own English line.
394
+ id: 'codex-model-plan',
395
+ code: 'MU-075',
396
+ agent: 'codex',
397
+ severity: 'blocking',
398
+ title: 'Codex does not offer that model on this account',
399
+ match: /model is not supported when using Codex with a ChatGPT account/i,
400
+ diagnosis: 'The model chosen for this turn is not one your ChatGPT account can use in Codex, so Codex refused the turn before starting. Nothing in the project changed.',
401
+ remedy: 'Choose «default» in the model menu of the Write box, or one of the models listed there: they are the ones your account offers.',
402
+ fixes: same(['# the models your account lists: ~/.codex/models_cache.json', 'codex # then /model']),
403
+ },
404
+ {
405
+ // Seen in the diagnostics of 1.1.2 (2026-11-03, D-7): Claude's plan window ran out, and only the
406
+ // card that explains the usage numbers matched it, which is no reason for a failure.
407
+ id: 'claude-usage-limit',
408
+ code: 'MU-077',
409
+ agent: 'claude',
410
+ severity: 'blocking',
411
+ title: 'Claude has reached its usage limit',
412
+ match: /hit your (?:5-hour|weekly|session|usage) limit|Claude AI usage limit reached/i,
413
+ diagnosis: 'Your Claude account has used up what its plan gives for this window, and Claude refuses every turn until it resets. Claude says when that is at the end of its message. It is Anthropic\'s limit, not MADRE\'s: nothing in the project is wrong.',
414
+ remedy: 'Wait until the time Claude gives, change your Claude plan, or ask another agent in the meantime.',
415
+ fixes: same(['# plan and usage: https://claude.ai/settings/usage', 'claude # then /usage']),
416
+ },
417
+ {
418
+ // Seen in the diagnostics of 1.1.2 (2026-11-03, D-7): a provider of OpenCode refused its key.
419
+ id: 'api-key-invalid',
420
+ code: 'MU-078',
421
+ severity: 'blocking',
422
+ title: 'The provider refused the API key',
423
+ match: /API Key appears to be invalid|invalid api key|incorrect api key provided|api key (?:has |is )?expired/i,
424
+ diagnosis: 'The agent reached its provider, but the provider did not accept the API key it was sent with: it was mistyped, revoked or has expired. In OpenCode it is the key of the provider of the model the turn asked for.',
425
+ remedy: 'Make a new key in the provider\'s console and give it to the agent again in Settings › Agents, or connect that agent another way (your ChatGPT account, GitHub Copilot or a sign-in).',
426
+ fixes: same(['# OpenCode, the key of one provider:', 'opencode auth login', '# or take the key out:', 'opencode auth logout <provider>']),
427
+ },
428
+ {
429
+ // Seen in the diagnostics of 1.1.2 (2026-11-03, D-7): a Kimi plan without the model asked for.
430
+ id: 'plan-lacks-model',
431
+ code: 'MU-079',
432
+ severity: 'blocking',
433
+ title: 'Your plan does not include that model',
434
+ match: /subscription does not have access|Upgrade to higher-tier/i,
435
+ diagnosis: 'The provider answered, but the plan of that account does not include the model this turn asked for, so it refused the turn before starting. Nothing in the project changed.',
436
+ remedy: 'Choose another model in the model menu of the Write box, or «default», or change the plan with that provider.',
437
+ fixes: same(['# OpenCode, the models it can use:', 'opencode models']),
438
+ },
439
+ {
440
+ // Seen in the diagnostics of 1.1.2 (2026-11-03, D-7): STOP ALL and the time limit end a turn
441
+ // before its process closes, so a signal named here came from outside the turn.
442
+ id: 'stopped-from-outside',
443
+ code: 'MU-080',
444
+ severity: 'transient',
445
+ title: 'Something outside the turn stopped the agent',
446
+ match: /\((?:SIGTERM|SIGINT|SIGHUP)\)/,
447
+ diagnosis: 'The agent\'s program received a signal to quit that its turn did not send: the system, another program, a closed terminal or MADRE closing. It is not a failure of the agent or of the project.',
448
+ remedy: 'Ask again. If it keeps happening, look for what closes programs on this computer: a session that ends, WSL shutting down, or a tool that stops processes.',
449
+ fixes: same(['# WSL: what closed the Linux', 'wsl --list --running']),
450
+ },
451
+ {
452
+ // Seen in the diagnostics of 1.1.2 (2026-11-03, D-5): Linux copies with no git at all. The
453
+ // restore point before an AI writes is a git one, also in a project that is not a repository.
454
+ id: 'no-git',
455
+ code: 'MU-081',
456
+ severity: 'blocking',
457
+ title: 'Git is not installed on this computer',
458
+ match: /does not have git, which MADRE needs|no tiene git, que MADRE necesita|spawn git ENOENT/i,
459
+ diagnosis: 'Before an AI writes (#2, #3 or #4), MADRE takes a restore point with git, so that UNDO can bring everything back. This computer has no git, so the turn stopped before writing and nothing was changed. Chatting (#1) works without it.',
460
+ remedy: 'Install git, reload the page and send the message again. In the mode menu the modes that write say NEEDS GIT until it is installed.',
461
+ fixes: {
462
+ darwin: ['xcode-select --install'],
463
+ linux: ['# Ubuntu, Debian or WSL', 'sudo apt install git', '# Fedora', 'sudo dnf install git'],
464
+ },
465
+ },
218
466
  {
219
467
  id: 'not-signed-in',
220
468
  code: 'MU-008',
@@ -222,7 +470,10 @@ export const CONDITIONS = [
222
470
  severity: 'blocking',
223
471
  title: 'Agent installed but signed out',
224
472
  // «set an Auth method»: Gemini with no account chosen exits with code 41 (1.1.0 diagnostics).
225
- match: /not logged in|sign in required|Error authenticating|unauthorized|please (?:log|sign) ?in|no credentials|set an Auth method/i,
473
+ // «Update your environment»: Gemini chosen to use an API key with none set, code 41 too (1.1.2, D-7).
474
+ // Gemini's refusal in MADRE's words, in both languages (1.1.2 diagnostics: 4 copies filed «Google
475
+ // rechazó las credenciales de Gemini» as unknown, and no card matched the English either).
476
+ match: /not logged in|Grok is not signed in|Grok no tiene sesión|sign in required|Error authenticating|unauthorized|please (?:log|sign) ?in|no credentials|set an Auth method|Update your environment and try again|rejected the Gemini credentials|rechazó las credenciales de Gemini|refresh token was already used|Please log out and sign in again|Authentication required/i,
226
477
  diagnosis: 'The CLI is on this computer but has no session for its provider. MADRE never stores credentials; each agent keeps its own.',
227
478
  remedy: 'This agent has no session yet. Connect it once in Settings › Agents (MADRE runs its sign-in for you, nothing to type in a terminal), or ask the same of an agent that is connected.',
228
479
  fixes: same(['npx @jossuealcala/madre setup', '# or directly:', 'codex login', 'claude auth login', 'opencode auth login', 'gemini # then /auth']),
@@ -267,7 +518,7 @@ export const CONDITIONS = [
267
518
  title: 'Agent did not respond before the timeout',
268
519
  // MADRE writes this one itself, in the room's language, so it is matched in both: a room in
269
520
  // Spanish recorded «no contestó antes del tiempo límite» and filed it as unclassified.
270
- match: /did not respond before the timeout|went silent for|no contestó antes del tiempo límite|se quedó callad/i,
521
+ match: /did not respond before the timeout|went silent for|no contestó antes del tiempo límite|no respondió antes del tiempo límite|se quedó callad/i,
271
522
  diagnosis: 'The agent was still reading files or reasoning when its time limit expired (by default 180 s for a turn that reads and 600 s for one that writes), or Gemini stayed silent for 90 s (PULSE_GEMINI_IDLE_MS) and was stopped after one automatic retry. Long questions over many files take longer; MADRE killed the whole process tree. Whatever a writing turn left before it stopped is listed under the failure, with UNDO.',
272
523
  remedy: 'Press Apply below, or type a new number in Settings: Default time limit in Project and turns, or Time limit on the agent in Agents. Each field saves the moment you leave it. It applies to the next turn and persists in ~/.pulse/config.json. Environment variables work too, but only for a server started after exporting them; a running project never sees a later export.',
273
524
  fixes: {
@@ -406,8 +657,8 @@ export const CONDITIONS = [
406
657
  severity: 'informational',
407
658
  title: 'Web access for an agent',
408
659
  match: /scope-[a-z]+-web/,
409
- diagnosis: 'Every CLI can browse: Codex with --search, Claude Code with WebFetch/WebSearch, Gemini with google_web_search/web_fetch, OpenCode with webfetch/websearch. MADRE keeps it off until you enable it per agent.',
410
- remedy: 'Switch on Web access for that agent in Settings → Agents; it saves at once. It applies to every turn of that agent; content fetched is sent to its provider.',
660
+ diagnosis: 'Every CLI can browse: Codex with --search, Claude Code with WebFetch/WebSearch, Gemini with google_web_search/web_fetch, OpenCode with webfetch/websearch. MADRE has it on for every agent; you can turn it off per agent.',
661
+ remedy: 'To turn it off, switch off Web access for that agent in Settings → Agents; it saves at once. It applies to every turn of that agent; content fetched is sent to its provider.',
411
662
  fixes: same(['# Settings → Agents → the agent → Web access']),
412
663
  },
413
664
  {
@@ -429,8 +680,8 @@ export const CONDITIONS = [
429
680
  // was filed as this help card (1.1.0 diagnostics, MU-023 from Codex and OpenCode).
430
681
  match: /\bmodes?\b|ghost|exchange|control|airlock|deploy|despleg|producci|override|designation|max mode|#[0-4]\b/i,
431
682
  diagnosis: 'Every message goes out at a mode, chosen in the chip after TO @agent (or typed as #2 in the text). #0 INCOGNITO is off the record: nothing is saved, no other agent remembers it, gone on reload, no plan. #1 CHAT ONLY is the default: read and coordinate. #2 CREATE lets the agent add new files and folders anywhere in the project, where they belong; whatever existed before is put back after the turn and the project says so. #3 EDIT puts one agent in command of the project itself: a git restore point is taken first, every change is listed afterwards, writes into .git, .pulse or .env files are reverted on the spot, and UNDO goes back to the restore point. One holder at a time; it needs Max mode #3 and a git repository. Your mode is the ceiling of any plan the message starts, and #3 is never given to a plan step. Each agent has a Max mode in Settings → Permissions; above it, #2 is answered read-only and #3 is refused. When a #1 plan reaches a step that wants to create something, the project pauses and asks you: GRANT ONCE, GRANT FOR PLAN or DENY, with a 3-minute clock; silence denies. #4 FULL ACCESS is EDIT plus commands: tests, builds, git push, deploys with the CLIs and sessions already on this machine. Files still come back with UNDO; what leaves the machine does not, so the unlock asks for the project name twice. An agent that says it needs a "production mode" or "permission to run commands" is asking for #4.',
432
- remedy: 'Pick the mode in the chip, or type #0..#4 in the message. Raise an agent\'s Max mode in Settings → Permissions, under Who may do what. EDIT asks for the project name (the folder name) in the unlock; FULL ACCESS asks for it twice.',
433
- fixes: same(['# chip: TO @codex #1 CHAT ONLY ▾ → choose', '@codex #2 create the poster', '@opencode #4 run the tests and deploy to preview', '# Settings → Permissions → Who may do what']),
683
+ remedy: 'Pick the mode in the chip, or type #0..#4 in the message. Raise an agent\'s Max mode in Settings → Permissions, under What each AI may do. EDIT asks for the project name (the folder name) in the unlock; FULL ACCESS asks for it twice.',
684
+ fixes: same(['# chip: TO @codex #1 CHAT ONLY ▾ → choose', '@codex #2 create the poster', '@opencode #4 run the tests and deploy to preview', '# Settings → Permissions → What each AI may do']),
434
685
  },
435
686
  {
436
687
  id: 'lease-missing',
@@ -450,7 +701,7 @@ export const CONDITIONS = [
450
701
  match: /scope-[a-z]+-write/,
451
702
  diagnosis: 'Every CLI can create files inside a permission to create; each agent\'s Max mode says how far it may go, and nothing is created until you press CREATE.',
452
703
  remedy: 'Give the agent a Max mode of #2 or more in Settings → Permissions, then arm CREATE in the Write box for the request.',
453
- fixes: same(['# Settings → Permissions → Who may do what → #2', '# Write box → CREATE (lock) → send']),
704
+ fixes: same(['# Settings → Permissions → What each AI may do → #2', '# Write box → CREATE (lock) → send']),
454
705
  },
455
706
  {
456
707
  id: 'node-version',
@@ -620,7 +871,7 @@ export const CONDITIONS = [
620
871
  code: 'MU-040',
621
872
  severity: 'informational',
622
873
  title: 'Conversations: many per project, one memory, one at a time',
623
- match: /conversation|already open for this project|ROOM_IN_USE|a turn is running in this conversation|new conversation|chats\.json/i,
874
+ match: /conversation|already open for this project|ya está abierta para este proyecto|ROOM_IN_USE|a turn is running in this conversation|new conversation|chats\.json/i,
624
875
  diagnosis: 'A project has one memory and many conversations. The archive, the agents, the modules and the privacy list belong to the project and do not start over when you open another thread; a conversation is only the record of one line of work, and everything said in any of them feeds the same archive. The first conversation is the ledger that was always there, so a project that existed before opens exactly as it did. The numbering is the project\'s, not the thread\'s: a new conversation starts where the project got to, which is why a citation like #1411 means the same exchange in all of them. One conversation drives the agents at a time — two threads editing the same working tree is a way to lose work — so opening another while a turn runs is refused until it finishes. And one server per project: a second `madre start` on the same project is refused with the address of the project that is already open, because two servers would hand out the same sequence twice and the archive would quietly keep one of them.',
625
876
  remedy: 'The panel on the left of the canvas lists them: open one, or start another at the bottom. Deleting one takes its transcript and nothing else — what the archivist distilled from it is the project\'s memory and stays. If MADRE says the project is already open, use that project and open a conversation inside it instead of starting a second server.',
626
877
  fixes: same(['# project → Conversations → NEW CONVERSATION', '# the address of the open project is in the refusal itself', 'ls ~/.pulse/rooms/*/chats.json # their names and which one is open']),
@@ -684,7 +935,7 @@ export const CONDITIONS = [
684
935
  severity: 'common',
685
936
  title: 'Installing a module somebody else wrote',
686
937
  match: /already taken|must live under \/api\/x\/|not a module|default export must be a module|module file|\.module\.mjs|add a module/i,
687
- diagnosis: 'Modules has + Add a module for a .mjs somebody wrote. It comes through the same door as everything else: written to a scratch copy, imported there, checked against the house rules, and installed only if it passes. Three things get a file refused, each with the reason: an id that belongs to a module MADRE ships with, a route outside its own corner of the API (/api/x/<id>/), and a file that will not load at all. Said plainly, because it is what it is: a module runs inside MADRE, with your permissions, on this computer. MADRE checks that it loads and stays in its corral; what the code intends is the one thing nobody can check for you.',
938
+ diagnosis: 'Modules has + Add a module for a .mjs somebody wrote. MADRE checks it in a separate process and installs it only if it passes. Three things get a file refused, each with the reason: an id that belongs to a module MADRE ships with, a route outside its own corner of the API (/api/x/<id>/), and a file that will not load at all. Once installed, each call runs in a separate Node process with limited permissions. Node cannot guarantee containment of malicious code: review its code and network destinations before installing it.',
688
939
  remedy: 'Install it only if you trust where it came from. A module you wrote can also be updated from where you publish it: declare updates: { url } in the file, or install it from a file and MADRE remembers which, and its page in Modules carries Get a newer file.',
689
940
  fixes: same(['# Modules → + Add a module', 'ls ~/.pulse/modules # every module you installed, and where it came from', '# docs/SDK.md is the whole contract, and docs/sdk/hello-module.mjs is one that works']),
690
941
  },
@@ -729,7 +980,7 @@ export const CONDITIONS = [
729
980
  title: 'What leaves this computer, and how to stop each thing that does',
730
981
  match: /what left this machine|outbound|leaves? (this )?(computer|machine)|sends? (my )?(code|data)|telemetry|phone home|privacy/i,
731
982
  diagnosis: 'MADRE runs here and keeps what it knows in a file you own, and the list that qualifies that sentence is inside the core, under OUTBOUND. Seven addresses, each saying what it carries and where it is switched off: the briefing, which goes to whoever runs the agent you sent the turn to; Gemini embeddings, which carry the text of your memories; the image model, which carries the prompt an agent wrote; the npm registry and GitHub, which get a package name and nothing else; the error collector, which gets a redacted condition and only with your press; and Anthropic, for how much of your Claude plan is left. Ollama is on the list to be seen staying here.',
732
- remedy: 'Under the list is the log itself: every request this process made, MADRE\'s own and any a module made, because a module runs inside MADRE and cannot opt out of the wrapper. No body, no header and no query value is ever written there — only which parameters were set. An address nothing declares is reported as exactly that.',
983
+ remedy: 'Under the list is the fetch log for MADRE and its modules, including a module\'s separate process and its one-file MCP server. It does not include network calls made through other Node protocols or by an agent CLI. No body, header or query value is written there — only which parameters were set. An address nothing declares is reported as exactly that.',
733
984
  fixes: same([
734
985
  '# Memory map → click What is sent → OUTBOUND',
735
986
  'cat ~/.pulse/rooms/*/outbound.jsonl | tail -20 # the same log, on disk',
@@ -774,12 +1025,31 @@ export const CONDITIONS = [
774
1025
  remedy: 'Write 127.0.0.1 in the tunnel instead of localhost, and open http://127.0.0.1 with the same port in your browser.',
775
1026
  fixes: same(['# 127.0.0.1, not localhost, on both sides of the tunnel:', 'ssh -L 5317:127.0.0.1:5317 user@server']),
776
1027
  },
1028
+ {
1029
+ // Seen in the diagnostics of 1.1.1 (D-3, two copies in WSL, 2026-11-01): Ollama could not find
1030
+ // registry.ollama.ai, «lookup … on 10.255.255.254:53: i/o timeout». It read as a download that
1031
+ // took too long, and the card said to try again.
1032
+ id: 'name-lookup',
1033
+ code: 'MU-082',
1034
+ severity: 'blocking',
1035
+ title: 'This computer cannot find internet addresses',
1036
+ match: /\blookup \S+ on \S+:53\b|no such host|server misbehaving|Temporary failure in name resolution/i,
1037
+ diagnosis: 'Before downloading, a program asks for the address behind a name such as registry.ollama.ai (DNS), and nobody answered. The browser may still work while this Linux cannot ask: in WSL, the address it asks (10.255.255.254) is Windows passing the question on, and it stops answering with a VPN, after the computer sleeps or when the network changes.',
1038
+ remedy: 'In WSL, close it from Windows and open it again; with a VPN on, try without it. On Linux, check the network connection. Then try again from the same place.',
1039
+ fixes: {
1040
+ darwin: ['# whether this Mac finds the name:', 'dscacheutil -q host -a name registry.ollama.ai'],
1041
+ linux: ['# whether this Linux finds the name (no answer: it finds none):', 'getent hosts registry.ollama.ai', '# which server it asks:', 'resolvectl status'],
1042
+ wsl: ['# in Windows PowerShell, then open Ubuntu again:', 'wsl --shutdown', '# back in Ubuntu, whether the name is found now:', 'getent hosts registry.ollama.ai'],
1043
+ },
1044
+ },
777
1045
  {
778
1046
  id: 'install-offline',
779
1047
  code: 'MU-064',
780
1048
  severity: 'transient',
781
1049
  title: 'An install could not download',
782
- match: /ENOTFOUND|EAI_AGAIN|getaddrinfo|ECONNRESET|network (?:is )?unreachable|unable to get local issuer certificate|self[- ]signed certificate in certificate chain|request to https?:\/\/registry\.npmjs\.org\S* failed/i,
1050
+ // And Ollama's, in Go's words (D-20, a copy in WSL): the connection to the models' server did
1051
+ // not finish, which read as a download that took too long.
1052
+ match: /ENOTFOUND|EAI_AGAIN|getaddrinfo|ECONNRESET|network (?:is )?unreachable|unable to get local issuer certificate|self[- ]signed certificate in certificate chain|request to https?:\/\/registry\.npmjs\.org\S* failed|TLS handshake timeout|connection reset by peer|no route to host/i,
783
1053
  diagnosis: 'Installing an agent or a model downloads it from the internet: agents from npm, models from Ollama. The download did not get through: there is no connection, the server\'s name could not be found, or something on this network (a VPN, a proxy, a company firewall) stopped it. Nothing was left half installed.',
784
1054
  remedy: 'Check that this computer has internet and try again. On a company network or a VPN, try from another one, or ask whoever runs it to allow registry.npmjs.org and ollama.com.',
785
1055
  fixes: same(['npm ping', 'curl -I https://registry.npmjs.org', '# behind a proxy, npm has to be told:', 'npm config set proxy http://proxy:port']),
@@ -812,20 +1082,36 @@ export const CONDITIONS = [
812
1082
  code: 'MU-067',
813
1083
  severity: 'blocking',
814
1084
  title: 'Ollama does not start',
815
- match: /Ollama did not answer|listen tcp 127\.0\.0\.1:11434: bind|address already in use[^\n]*11434|could not connect to ollama/i,
816
- diagnosis: 'Ollama is installed but nothing answers on its port (11434). Usually it is closed (on a Mac, the app is not open), another copy of Ollama already holds the port, or on Linux its service did not start.',
1085
+ // «@madre left the project: Ollama is not running» too (D-12, a copy in WSL wrote to @madre five
1086
+ // times in nine minutes): only the card on @madre matched it, which explains the agent and is
1087
+ // filed as unknown, not how to start Ollama.
1088
+ match: /Ollama did not answer|Ollama is not running|Ollama no está (?:corriendo|encendido)|listen tcp 127\.0\.0\.1:11434: bind|address already in use[^\n]*11434|could not connect to ollama/i,
1089
+ diagnosis: 'Nothing answers on Ollama\'s port (11434). Usually it is closed (on a Mac, the app is not open), another copy of Ollama already holds the port, on Linux its service did not start, or it is not installed yet.',
817
1090
  remedy: 'On a Mac, open the Ollama app. On Linux, start its service. Then press «I did it», or Check again in Settings › Local AI.',
818
1091
  fixes: {
819
1092
  darwin: ['open -a Ollama', 'curl http://127.0.0.1:11434/api/version'],
820
1093
  linux: ['sudo systemctl start ollama', 'systemctl status ollama --no-pager', '# without systemd (WSL without it, a container):', 'ollama serve', 'curl http://127.0.0.1:11434/api/version'],
821
1094
  },
822
1095
  },
1096
+ {
1097
+ // Seen in the diagnostics of 1.1.2 (2026-11-03), in WSL: an install of Ollama cut by the time
1098
+ // limit or the network left the program without what runs the models.
1099
+ id: 'ollama-halfway',
1100
+ code: 'MU-076',
1101
+ agent: 'madre',
1102
+ severity: 'blocking',
1103
+ title: 'Ollama was left installed halfway',
1104
+ match: /llama-server binary not found/i,
1105
+ diagnosis: 'Ollama\'s install stopped before it finished, usually because the download (more than a GB) was cut by the network or ran out of time. The program is there but the part that runs the models is not, so every answer of @madre fails.',
1106
+ remedy: 'Install Ollama again from Settings › Local AI: it downloads it whole and finishes it. Your models stay where they are.',
1107
+ fixes: { darwin: ['# Home → Settings → Local AI → Install'], linux: ['# Home → Settings → Local AI → Install', '# or in a terminal:', 'curl -fsSL https://ollama.com/install.sh | sh'] },
1108
+ },
823
1109
  {
824
1110
  id: 'model-download',
825
1111
  code: 'MU-068',
826
1112
  severity: 'transient',
827
1113
  title: 'A model download stopped',
828
- match: /Ollama pull HTTP|pull model manifest|max retries exceeded/i,
1114
+ match: /Ollama pull HTTP|pull model manifest|max retries exceeded|^(?:TypeError: )?terminated$|Ollama closed the connection|Ollama cerró la conexión|other side closed/im,
829
1115
  diagnosis: 'Models are big (from half a GB to dozens) and come down in pieces. A cut connection or a full disk stops the download; what already arrived stays, and trying again picks up where it stopped.',
830
1116
  remedy: 'Try again from the same place. If it stops at the same point, check the free space (the model needs its size plus some room) or choose a smaller model.',
831
1117
  fixes: same(['ollama pull qwen2.5:3b # the model you chose; it resumes where it stopped', 'ollama list', 'df -h ~']),
@@ -915,7 +1201,7 @@ export const allConditions = () => CONDITIONS.map(said);
915
1201
 
916
1202
  // Lowercase and without accents: «limite» finds «límite», and a person types what they type.
917
1203
  const fold = (text) => String(text ?? '').normalize('NFD').replace(/[̀-ͯ]/g, '').toLowerCase();
918
- const AGENT_WORDS = new Set(['codex', 'claude', 'gemini', 'opencode', 'cursor', 'madre', 'ollama']);
1204
+ const AGENT_WORDS = new Set(['codex', 'claude', 'gemini', 'opencode', 'cursor', 'grok', 'madre', 'ollama']);
919
1205
  const named = (words) => words.find((word) => AGENT_WORDS.has(word.replace(/^@/, '')))?.replace(/^@/, '') ?? null;
920
1206
  const wordsOf = (query) => fold(query).split(/[^a-z0-9#.@_-]+/).filter(Boolean);
921
1207
 
@@ -941,7 +1227,7 @@ const SYMPTOMS = [
941
1227
  /\b(?:sign(?:ed)?|log(?:ged)?)[ -]?(?:in|out)\b|\blog[ -]?in\b|\bauthenticat|\bcredential|\bpassword|\bre-?auth/,
942
1228
  /\b(?:inici\w*|cerr\w*|abr\w*|pide\w*)(?: la| una| mi| de)? sesion|\bsesion (?:cerrada|expirada|vencida)|\bsin sesion|\bautentic|\bcredencial|\bcontrasena|\bme pide (?:entrar|la cuenta|mi cuenta)/,
943
1229
  ],
944
- cards: ['not-signed-in', 'gemini-ineligible-tier', 'opencode-default-provider', 'custom-agent-endpoint'],
1230
+ cards: ['not-signed-in', 'grok-account-refused', 'gemini-ineligible-tier', 'opencode-default-provider', 'custom-agent-endpoint'],
945
1231
  },
946
1232
  {
947
1233
  id: 'no-credit',
@@ -975,7 +1261,7 @@ const SYMPTOMS = [
975
1261
  /\b(?:doesn'?t|does not|isn'?t|is not|not|won'?t|stopped) work\w*|\bbroken\b|\bfail(?:s|ed|ing)?\b/,
976
1262
  /\bno (?:funciona|jala|sirve|anda|arranca|abre)\b|\bfall(?:a|o|ando)\b|\bdej\w* de funcionar|\besta roto\b/,
977
1263
  ],
978
- cards: ['not-signed-in', 'not-installed', 'timeout', 'provider-credit-exhausted', 'gemini-rate-limited', 'gemini-ineligible-tier', 'cursor-usage-limit', 'opencode-default-provider', 'madre-agent', 'ollama', 'adapter-pending'],
1264
+ cards: ['not-signed-in', 'not-installed', 'timeout', 'provider-credit-exhausted', 'gemini-rate-limited', 'gemini-ineligible-tier', 'cursor-usage-limit', 'grok-account-refused', 'opencode-default-provider', 'madre-agent', 'ollama', 'adapter-pending'],
979
1265
  },
980
1266
  ];
981
1267
 
@@ -1055,7 +1341,7 @@ export const WINDOWS_FIRST = ['# On Windows, MADRE runs inside WSL2, Linux insid
1055
1341
  export function fixesFor(condition, platform, agent = null) {
1056
1342
  const base = columnFor(condition.fixes, platform) ?? [];
1057
1343
  const perAgent = condition.perAgent?.[agent] ? columnFor(condition.perAgent[agent], platform) : null;
1058
- const lines = perAgent ? [...perAgent, ...(base.length && !base[0].startsWith('#') ? base : [])] : base;
1344
+ const lines = perAgent ? [...perAgent, ...(condition.perAgentReplacesFixes || !base.length || base[0].startsWith('#') ? [] : base)] : base;
1059
1345
  const ownWindows = condition.fixes?.win32 || condition.perAgent?.[agent]?.win32;
1060
1346
  return platform === 'win32' && !ownWindows && lines.length ? [...WINDOWS_FIRST, ...lines] : lines;
1061
1347
  }