@jossuealcala/madre 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.en.md +113 -1
  2. package/CHANGELOG.md +113 -1
  3. package/NOTICE +30 -0
  4. package/README.en.md +59 -156
  5. package/README.md +60 -161
  6. package/TRADEMARKS.md +18 -0
  7. package/bin/madre.mjs +2 -2
  8. package/docs/REFERENCE.md +1 -1
  9. package/docs/SDK.md +25 -4
  10. package/docs/en/REFERENCE.md +1 -1
  11. package/docs/en/SDK.md +22 -2
  12. package/docs/madre-banner.png +0 -0
  13. package/package.json +1 -1
  14. package/public/app.js +1087 -247
  15. package/public/assets/manual/madre-manual-en.pdf +0 -0
  16. package/public/assets/manual/madre-manual-es.pdf +0 -0
  17. package/public/assets/manual/shots/en-agents.webp +0 -0
  18. package/public/assets/manual/shots/en-code.webp +0 -0
  19. package/public/assets/manual/shots/en-composer.webp +0 -0
  20. package/public/assets/manual/shots/en-connectors.webp +0 -0
  21. package/public/assets/manual/shots/en-continuity.webp +0 -0
  22. package/public/assets/manual/shots/en-coordinator.webp +0 -0
  23. package/public/assets/manual/shots/en-copilot.webp +0 -0
  24. package/public/assets/manual/shots/en-diagnostics.webp +0 -0
  25. package/public/assets/manual/shots/en-home.webp +0 -0
  26. package/public/assets/manual/shots/en-local.webp +0 -0
  27. package/public/assets/manual/shots/en-memory.webp +0 -0
  28. package/public/assets/manual/shots/en-modes.webp +0 -0
  29. package/public/assets/manual/shots/en-modules.webp +0 -0
  30. package/public/assets/manual/shots/en-notes.webp +0 -0
  31. package/public/assets/manual/shots/en-settings.webp +0 -0
  32. package/public/assets/manual/shots/en-windows.webp +0 -0
  33. package/public/assets/manual/shots/es-agents.webp +0 -0
  34. package/public/assets/manual/shots/es-code.webp +0 -0
  35. package/public/assets/manual/shots/es-composer.webp +0 -0
  36. package/public/assets/manual/shots/es-connectors.webp +0 -0
  37. package/public/assets/manual/shots/es-continuity.webp +0 -0
  38. package/public/assets/manual/shots/es-coordinator.webp +0 -0
  39. package/public/assets/manual/shots/es-copilot.webp +0 -0
  40. package/public/assets/manual/shots/es-diagnostics.webp +0 -0
  41. package/public/assets/manual/shots/es-home.webp +0 -0
  42. package/public/assets/manual/shots/es-local.webp +0 -0
  43. package/public/assets/manual/shots/es-memory.webp +0 -0
  44. package/public/assets/manual/shots/es-modes.webp +0 -0
  45. package/public/assets/manual/shots/es-modules.webp +0 -0
  46. package/public/assets/manual/shots/es-notes.webp +0 -0
  47. package/public/assets/manual/shots/es-settings.webp +0 -0
  48. package/public/assets/manual/shots/es-windows.webp +0 -0
  49. package/public/en.js +74 -0
  50. package/public/es.js +495 -137
  51. package/public/i18n.js +45 -7
  52. package/public/index.html +2 -3
  53. package/public/manual-content.js +657 -0
  54. package/public/manual-shots.js +43 -0
  55. package/public/manual.css +228 -0
  56. package/public/manual.html +15 -0
  57. package/public/manual.js +398 -0
  58. package/public/market-art.js +56 -0
  59. package/public/market-view.js +140 -22
  60. package/public/market.js +25 -14
  61. package/public/mcp-catalog.js +62 -0
  62. package/public/resay.js +1 -0
  63. package/public/salas-mac.css +185 -30
  64. package/public/salas-mac.html +5 -5
  65. package/public/salas-mac.js +475 -68
  66. package/public/styles.css +306 -42
  67. package/public/tour-chapters.js +98 -90
  68. package/public/tour.js +63 -21
  69. package/public/troubleshooting.js +145 -10
  70. package/src/adapters/cursor.mjs +56 -7
  71. package/src/adapters/gemini.mjs +12 -1
  72. package/src/adapters/madre.mjs +27 -6
  73. package/src/adapters/process.mjs +5 -2
  74. package/src/auth-probe.mjs +22 -3
  75. package/src/bridge/policy.mjs +1 -1
  76. package/src/bridge/server.mjs +1 -1
  77. package/src/capabilities.mjs +3 -3
  78. package/src/credentials.mjs +24 -2
  79. package/src/history.mjs +76 -0
  80. package/src/i18n.mjs +23 -1
  81. package/src/local-ai.mjs +10 -2
  82. package/src/looks.mjs +17 -5
  83. package/src/market-license.mjs +104 -0
  84. package/src/market-remote.mjs +17 -1
  85. package/src/mcp/notes-server.mjs +120 -0
  86. package/src/mcp/proxy.mjs +14 -3
  87. package/src/models.mjs +82 -9
  88. package/src/modules/index.mjs +3 -1
  89. package/src/modules/local-models.mjs +28 -0
  90. package/src/modules/notes.mjs +142 -0
  91. package/src/modules/ollama.mjs +39 -10
  92. package/src/modules/playwright.mjs +14 -3
  93. package/src/modules/reminders.mjs +345 -0
  94. package/src/modules/sdk.mjs +21 -5
  95. package/src/mother.mjs +11 -1
  96. package/src/ollama.mjs +2 -2
  97. package/src/opencode-health.mjs +63 -0
  98. package/src/outbound.mjs +25 -1
  99. package/src/ports.mjs +4 -6
  100. package/src/reminder-time.mjs +127 -0
  101. package/src/room.mjs +19 -7
  102. package/src/runtime-detection.mjs +6 -2
  103. package/src/sentinel-errors.mjs +4 -3
  104. package/src/server-sentinel.mjs +7 -3
  105. package/src/server.mjs +302 -70
  106. package/src/tour.mjs +24 -5
package/docs/REFERENCE.md CHANGED
@@ -358,7 +358,7 @@ Los planes viven en `bishop-plans.json` junto al registro del proyecto del Coord
358
358
  | `PULSE_ESCALATION_MS` | `180000` | Cronómetro de la solicitud de permiso |
359
359
  | `PULSE_OPENCODE_MODEL` | del config | `proveedor/modelo` para OpenCode |
360
360
  | `PULSE_CLAUDE_USAGE` · `PULSE_OFFICIAL_QUOTA` | `0` · `1` | Cuota oficial de Claude (lee el llavero); `0` apaga todas las lecturas de proveedor |
361
- | `PULSE_GEMINI_IDLE_MS` · `PULSE_GEMINI_RETRIES` · `PULSE_GEMINI_FALLBACK_MODEL` | `90000` · `1` · `gemini-2.5-flash` | Gemini bajo carga |
361
+ | `PULSE_GEMINI_IDLE_MS` · `PULSE_GEMINI_RETRIES` · `PULSE_GEMINI_FALLBACK_MODEL` | `90000` · `1` · `gemini-3-flash-preview` (vacío: sin respaldo) | Gemini bajo carga |
362
362
 
363
363
  Cómo funcionan por dentro el ledger, el stream, la memoria, los adaptadores y la recuperación: [`docs/INTERNALS.md`](INTERNALS.md).
364
364
 
package/docs/SDK.md CHANGED
@@ -54,14 +54,14 @@ export default ({ defineModule }) => defineModule({
54
54
 
55
55
  ## Lo que un módulo puede declarar
56
56
 
57
- Esta tabla es **el contrato completo**: 38 campos, ni uno más. Cualquier otro que escribas MADRE
57
+ Esta tabla es **el contrato completo**: 39 campos, ni uno más. Cualquier otro que escribas MADRE
58
58
  te lo dice al instalar («no entendí estos campos») en vez de ignorarlo en silencio. Una prueba de
59
59
  la suite compara esta tabla contra el código, así que si alguna vez se separan, es un fallo.
60
60
 
61
61
 
62
62
  | Campo | Qué es |
63
63
  |---|---|
64
- | `id`, `name`, `vendor`, `summary`, `creates`, `requires` | Su ficha en MODULES. `summary` es una frase: qué hace. `creates` y `requires` son líneas cortas, una idea cada una |
64
+ | `id`, `name`, `vendor`, `summary`, `creates`, `requires` | Su ficha en MODULES. `summary` es una frase: qué hace. `creates` y `requires` son líneas cortas, una idea cada una. `name` y `summary` —y en `slash`, `summary`, `usage` y `title`— pueden ir en los dos idiomas, `{ es, en }`: MADRE muestra el de la sala. Lo que tu módulo escribe al correr (la tarjeta de un comando, una página) va en `ctx.language`, `'es'` o `'en'`, el idioma en que habla la sala |
65
65
  | `version` | La tuya, y empieza en `1.0.0`. Si no la declaras, la ficha muestra la fecha del archivo |
66
66
  | `tracks` | Si tu módulo envuelve algo de fuera, su versión no es la tuya: es la de esa cosa. Declara `{ name, npm }` o `{ name, github }` y devuelve la versión encontrada en `status(ctx)` como `runs: [{ name, version }]`. MADRE muestra esa versión y busca una más nueva sola, una vez al día, con el botón ↻ de la ficha para mirar ahora |
67
67
  | `updatePlan(ctx, { latest })` | Cómo se trae esa versión nueva a esta computadora: `{ command, args, display, note, after }`. MADRE enseña `display` y no corre nada hasta que la humana lo leyó; la salida cae en la sala línea por línea. Sin comando, devuelve `{ command: null, note, download }` y la ficha manda a descargarlo |
@@ -73,7 +73,8 @@ la suite compara esta tabla contra el código, así que si alguna vez se separan
73
73
  | `onToggle(ctx, enabled)` | Reacciona al interruptor |
74
74
  | `ready(ctx)` | Lo que pides antes de encender, en un proyecto o en todos (desde el Mercado también): `null` si está listo, `{ status, body: { error } }` si no. Apagar nunca lo pregunta |
75
75
  | `footer` | Hasta dos teclas junto a la versión de MADRE, abajo a la derecha, mientras tu módulo está encendido: `[{ icon: 'heart' \| 'star' \| 'link', label, text, action, url }]`. Los textos pueden ser una frase o `{ es, en }`; `url` tiene que ser https y se abre en otra pestaña. MADRE la dibuja: al pasar el ratón muestra `text` y un botón con `action` |
76
- | `slash` | Comandos `/nombre` que corren en el servidor con tu `ctx` y devuelven `{ ok, title, text }`. La sala los muestra como tarjeta y los agentes los leen |
76
+ | `credit` | De quién fue la idea, si no fue tuya: un nombre. MADRE lo dice en la ficha del módulo y en el Mercado («Idea de …») |
77
+ | `slash` | Comandos `/nombre` que corren en el servidor con tu `ctx` y devuelven `{ ok, title, text, link }`. La sala los muestra como tarjeta y los agentes los leen. `link` es opcional: `{ href, label }` con una ruta tuya (`/api/x/<id>/…`), y la tarjeta la ofrece como botón que abre otra pestaña; una dirección fuera de tus rutas se ignora |
77
78
  | `toolsForTurn(ctx, turn)` | Servidores MCP para el turno de un agente: `[{ name, command, args, env, tools, sends, brief }]`. MADRE los adjunta a la CLI en su corrida aislada y describe `brief` al agente. `turn` trae el agente, el modo, el arriendo, la carpeta, el puerto y `turn.turn`: el id de la respuesta que ese turno escribirá. Si tu servidor llama de vuelta a la sala en nombre del turno, manda ese id; `ctx.room.runningTurn(id)` dice si sigue corriendo y para qué agente |
78
79
  | `toolsForTurn` → `sends` | Cuáles de tus herramientas **mandan algo fuera**. El núcleo las retira por debajo de `#4` AIRLOCK: ni se le cuenta al modelo que existen. Ver abajo |
79
80
  | `reaches` | A dónde llega tu módulo, en las mismas cuatro respuestas que da MADRE de las suyas. Ver abajo |
@@ -263,11 +264,31 @@ ctx = {
263
264
  env, agents, room, // agentes detectados; la sala (room.capabilities(), room.record(...))
264
265
  readConfig(), updateConfig(patch),
265
266
  record(type, payload), // escribe un evento en el ledger; tipo "algo.algo", nunca message.* ni agent.*
266
- services: { imageKey, ollama, … }, // lo que el servidor ofrece
267
+ services: { history, imageKey, ollama, … }, // lo que el servidor ofrece
267
268
  vault: { get, held, keep, forget } // tus secretos, y solo los tuyos
268
269
  }
269
270
  ```
270
271
 
272
+ ### El historial del proyecto
273
+
274
+ `await ctx.services.history({ since, until })` devuelve lo que pasó en el proyecto en ese periodo (fechas ISO; sin ellas, todo). Solo lee, nunca escribe, y lo dicho en `#0` GHOST no aparece:
275
+
276
+ ```
277
+ {
278
+ project, since, until,
279
+ requests: [{ at, chat, to, mode, text }], // lo que pidió la humana y a quién
280
+ answers: [{ at, chat, agent, text }], // las respuestas de cada agente
281
+ changes: [{ at, chat, agent, mode, files: [{ status, path }], undone }],
282
+ files: [{ path, status }], // lo que cambió y se quedó (sin lo deshecho)
283
+ decisions: [{ at, text, agent }], // las decisiones que guardó la memoria
284
+ agents: { codex: { turns, failed, tokens, costUsd, local } },
285
+ conversations: [{ id, title, requests }],
286
+ totals: { requests, answers, tokens, costUsd }
287
+ }
288
+ ```
289
+
290
+ Los textos llegan recortados a 600 caracteres. Es la base de un módulo que informa sobre el trabajo, como el Informe de trabajo del Mercado.
291
+
271
292
  `turn`, en `toolsForTurn`: `{ agent, mode, lease, scratchDir, port, roomDir }`. `mode` va de 0 a 4; en 0 (GHOST) nada se guarda, decide si quieres entregar herramientas ahí.
272
293
 
273
294
  ## Reglas de la casa
@@ -358,7 +358,7 @@ Plans live in `bishop-plans.json` next to the record of the Coordinator's projec
358
358
  | `PULSE_ESCALATION_MS` | `180000` | Permission request timer |
359
359
  | `PULSE_OPENCODE_MODEL` | from the config | `proveedor/modelo` for OpenCode |
360
360
  | `PULSE_CLAUDE_USAGE` · `PULSE_OFFICIAL_QUOTA` | `0` · `1` | Claude's official quota (reads the keychain); `0` turns off all provider reads |
361
- | `PULSE_GEMINI_IDLE_MS` · `PULSE_GEMINI_RETRIES` · `PULSE_GEMINI_FALLBACK_MODEL` | `90000` · `1` · `gemini-2.5-flash` | Gemini under load |
361
+ | `PULSE_GEMINI_IDLE_MS` · `PULSE_GEMINI_RETRIES` · `PULSE_GEMINI_FALLBACK_MODEL` | `90000` · `1` · `gemini-3-flash-preview` (empty: no spare) | Gemini under load |
362
362
 
363
363
  How the ledger, the stream, the memory, the adapters and recovery work under the hood: [`docs/INTERNALS.md`](INTERNALS.md).
364
364
 
package/docs/en/SDK.md CHANGED
@@ -73,7 +73,7 @@ the suite compares this table against the code, so if they ever drift apart, it'
73
73
  | `onToggle(ctx, enabled)` | Reacts to the switch |
74
74
  | `ready(ctx)` | What you ask before turning on, in one project or in all (from the Market too): `null` when ready, `{ status, body: { error } }` when not. Turning off never asks it |
75
75
  | `footer` | Up to two keys beside MADRE's version, bottom right, while your module is on: `[{ icon: 'heart' \| 'star' \| 'link', label, text, action, url }]`. Words can be one sentence or `{ en, es }`; `url` must be https and opens in a new tab. MADRE draws it: on hover it shows `text` and a button with `action` |
76
- | `slash` | `/name` commands that run on the server with your `ctx` and return `{ ok, title, text }`. The room shows them as a card and the agents read them |
76
+ | `slash` | `/name` commands that run on the server with your `ctx` and return `{ ok, title, text, link }`. The room shows them as a card and the agents read them. `link` is optional: `{ href, label }` with a route of yours (`/api/x/<id>/…`), and the card offers it as a key that opens another tab; an address outside your routes is ignored |
77
77
  | `toolsForTurn(ctx, turn)` | MCP servers for an agent's turn: `[{ name, command, args, env, tools, sends, brief }]`. MADRE attaches them to the CLI in its isolated run and describes `brief` to the agent. `turn` carries the agent, the mode, the lease, the folder, the port, and `turn.turn`: the id of the reply that turn will write. If your server calls back to the room on behalf of the turn, send that id; `ctx.room.runningTurn(id)` tells you whether it is still running and for which agent |
78
78
  | `toolsForTurn` → `sends` | Which of your tools **send something outside**. The core withdraws them below `#4` AIRLOCK: the model isn't even told they exist. See below |
79
79
  | `reaches` | Where your module reaches, in the same four answers MADRE gives about its own. See below |
@@ -263,11 +263,31 @@ ctx = {
263
263
  env, agents, room, // agentes detectados; la sala (room.capabilities(), room.record(...))
264
264
  readConfig(), updateConfig(patch),
265
265
  record(type, payload), // escribe un evento en el ledger; tipo "algo.algo", nunca message.* ni agent.*
266
- services: { imageKey, ollama, … }, // lo que el servidor ofrece
266
+ services: { history, imageKey, ollama, … }, // lo que el servidor ofrece
267
267
  vault: { get, held, keep, forget } // tus secretos, y solo los tuyos
268
268
  }
269
269
  ```
270
270
 
271
+ ### The project's history
272
+
273
+ `await ctx.services.history({ since, until })` returns what happened in the project in that period (ISO dates; without them, all of it). It only reads, never writes, and what was said in `#0` GHOST is not there:
274
+
275
+ ```
276
+ {
277
+ project, since, until,
278
+ requests: [{ at, chat, to, mode, text }], // what the human asked, and of whom
279
+ answers: [{ at, chat, agent, text }], // each agent's answers
280
+ changes: [{ at, chat, agent, mode, files: [{ status, path }], undone }],
281
+ files: [{ path, status }], // what changed and stayed (without what was undone)
282
+ decisions: [{ at, text, agent }], // the decisions the memory kept
283
+ agents: { codex: { turns, failed, tokens, costUsd, local } },
284
+ conversations: [{ id, title, requests }],
285
+ totals: { requests, answers, tokens, costUsd }
286
+ }
287
+ ```
288
+
289
+ Texts come cut at 600 characters. It is the ground for a module that reports on the work, like the Market's Work report.
290
+
271
291
  `turn`, in `toolsForTurn`: `{ agent, mode, lease, scratchDir, port, roomDir }`. `mode` goes from 0 to 4; in 0 (GHOST) nothing is saved, so decide whether you want to hand over tools there.
272
292
 
273
293
  ## House rules
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jossuealcala/madre",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "MADRE · one local room where the AI coding agents already on your machine (Codex, Claude Code, Gemini CLI, OpenCode) work on your project together, share one memory you can see and explore, and answer to you. Read-only by default, with per-message permission modes and checkpoints you can undo. Nothing leaves your machine on its own.",
5
5
  "keywords": [
6
6
  "ai-agents",