@jossuealcala/madre 1.1.2 → 1.1.3

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 (101) hide show
  1. package/CHANGELOG.en.md +21 -1
  2. package/CHANGELOG.md +21 -1
  3. package/README.en.md +3 -3
  4. package/README.md +3 -3
  5. package/SECURITY.md +11 -6
  6. package/bin/madre.mjs +74 -11
  7. package/docs/REFERENCE.md +13 -7
  8. package/docs/SDK.md +8 -8
  9. package/docs/en/REFERENCE.md +10 -6
  10. package/docs/en/SDK.md +8 -8
  11. package/docs/en/training/README.md +1 -1
  12. package/docs/sdk/connector-module.mjs +1 -1
  13. package/docs/sdk/hello-module.mjs +1 -1
  14. package/docs/training/README.md +1 -1
  15. package/docs/training/train.sh +3 -0
  16. package/package.json +4 -2
  17. package/public/activity.js +9 -0
  18. package/public/app.js +988 -171
  19. package/public/attribution.js +9 -0
  20. package/public/brands.js +27 -13
  21. package/public/en.js +1 -2
  22. package/public/es.js +834 -257
  23. package/public/index.html +3 -0
  24. package/public/macroverso.js +24 -5
  25. package/public/manual-content.js +32 -2
  26. package/public/market-view.js +116 -9
  27. package/public/market.js +15 -0
  28. package/public/news-scenes.js +185 -0
  29. package/public/notices.js +66 -0
  30. package/public/power.js +1 -1
  31. package/public/resay.js +3 -0
  32. package/public/salas-mac.css +229 -26
  33. package/public/salas-mac.html +3 -0
  34. package/public/salas-mac.js +454 -37
  35. package/public/styles.css +393 -17
  36. package/public/tips.js +124 -0
  37. package/public/tour-chapters.js +75 -75
  38. package/public/tour.js +36 -8
  39. package/public/troubleshooting.js +215 -22
  40. package/public/welcome-scene.js +358 -0
  41. package/public/welcome.js +514 -273
  42. package/src/adapters/gemini-rest.mjs +236 -0
  43. package/src/adapters/gemini.mjs +9 -7
  44. package/src/adapters/grok.mjs +288 -0
  45. package/src/adapters/process.mjs +14 -3
  46. package/src/auth-probe.mjs +32 -0
  47. package/src/bridge/policy.mjs +1 -1
  48. package/src/capabilities.mjs +30 -0
  49. package/src/checkpoint.mjs +115 -1
  50. package/src/codex-route.mjs +113 -0
  51. package/src/credentials.mjs +46 -8
  52. package/src/dataset.mjs +18 -7
  53. package/src/event-store.mjs +10 -2
  54. package/src/ficha.mjs +142 -0
  55. package/src/files.mjs +36 -2
  56. package/src/lease.mjs +5 -0
  57. package/src/market-check.mjs +1 -1
  58. package/src/market-remote.mjs +135 -1
  59. package/src/mcp/image-server.mjs +1 -1
  60. package/src/mcp/memory-server.mjs +10 -0
  61. package/src/memory-tools.mjs +3 -0
  62. package/src/memory.mjs +29 -4
  63. package/src/models.mjs +21 -3
  64. package/src/modules/ahp.mjs +8 -3
  65. package/src/modules/bishop-exam.mjs +41 -12
  66. package/src/modules/bishop.mjs +2 -2
  67. package/src/modules/choices.mjs +12 -10
  68. package/src/modules/fetch-alone.mjs +7 -0
  69. package/src/modules/helpers.mjs +23 -5
  70. package/src/modules/image-studio.mjs +13 -27
  71. package/src/modules/index.mjs +54 -11
  72. package/src/modules/isolated.mjs +160 -0
  73. package/src/modules/ollama.mjs +35 -6
  74. package/src/modules/playwright.mjs +46 -17
  75. package/src/modules/run-alone.mjs +122 -0
  76. package/src/modules/runs.mjs +11 -8
  77. package/src/modules/sdk.mjs +4 -2
  78. package/src/notices-key.mjs +8 -0
  79. package/src/notices.mjs +185 -0
  80. package/src/ollama.mjs +57 -15
  81. package/src/outbound.mjs +45 -8
  82. package/src/room/archivist.mjs +30 -5
  83. package/src/room/busy.mjs +16 -0
  84. package/src/room/control.mjs +36 -6
  85. package/src/room/guard.mjs +32 -2
  86. package/src/room/prompt.mjs +32 -5
  87. package/src/room/vectors.mjs +7 -1
  88. package/src/room.mjs +94 -28
  89. package/src/router.mjs +1 -1
  90. package/src/runs.mjs +39 -0
  91. package/src/runtime-detection.mjs +46 -6
  92. package/src/salas.mjs +151 -15
  93. package/src/server.mjs +577 -80
  94. package/src/service.mjs +116 -0
  95. package/src/setup-trouble.mjs +20 -1
  96. package/src/skill-check.mjs +269 -0
  97. package/src/skills-import.mjs +128 -0
  98. package/src/skills.mjs +492 -0
  99. package/src/tour.mjs +14 -3
  100. package/src/whats-new.mjs +48 -0
  101. package/src/rumbo.mjs +0 -337
@@ -14,7 +14,7 @@ Everything MADRE does, with the exact numbers. To get started in five minutes, s
14
14
  You need Node 22.5 or later and at least one of these CLIs with a signed-in session: **Codex**, **Claude Code**, **Gemini CLI**, **OpenCode**. If **Ollama** is also running with a chat model, the project gets a fifth, local agent.
15
15
 
16
16
  1. Run `npx @jossuealcala/madre` from any folder: it opens Home, with all your projects and the Coordinator at the top. The first time, a three-step assistant walks you through it: connect the agents (each with its own button to install it and sign in, right there; once for all projects), add the projects (you choose folders inside your user folder; adding does not open them) and open the ones you are going to use. `npx @jossuealcala/madre start` inside a folder still opens that project directly; if there are no agents, the project opens anyway on Connect your agents so you can install them and sign in.
17
- 2. The project opens at `http://127.0.0.1:4317`. Pick an agent in the selector or type `@claude …`. The chip next to `to @agente` says which mode the message goes out in; `#1 CHAT ONLY`, read-only, is the default.
17
+ 2. The project opens at `http://127.0.0.1:4317`. MADRE opens the browser with its ficha in the address (`?ficha=…`): the browser keeps it and the address is left clean. Pick an agent in the selector or type `@claude …`. The chip next to `to @agente` says which mode the message goes out in; `#1 CHAT ONLY`, read-only, is the default.
18
18
  3. To add or reconnect an AI later: Settings → Agents (the settings button in the bar, or ⌘, / Ctrl+,), where the agents live alongside the rest of the settings. Codex, Claude Code, Gemini (with your Google account) and OpenCode (with GitHub Copilot) sign in with one click; Gemini and OpenCode also accept their key right there. Under each agent, "Prefer your terminal?" unfolds the same step written as a command, for whoever prefers to do it by hand. MADRE does not store provider credentials: each session and each key goes to its own CLI's file.
19
19
  4. With Ollama, the Local AI module (Modules, in the bar) is already on: memory is embedded locally and `@madre` appears in the row.
20
20
  5. Settings → Memory decides who distills the memory and how often. The Memory map, from the Diagnostics header, shows what the project remembers.
@@ -25,7 +25,7 @@ npx @jossuealcala/madre setup # the same setup, from the terminal, if you
25
25
  npx @jossuealcala/madre start --no-open --project RUTA
26
26
  ```
27
27
 
28
- **On a server, with no screen.** MADRE listens only on `127.0.0.1` of the machine it runs on, and on purpose: it has no password, and whoever reached it could set the agents to work there. Do not open its ports to the network. To use it on a server, open it through an SSH tunnel from your computer. Home uses 4317 and every project you open takes the next free port (4318, 4319…), so the tunnel carries several; if you open more projects, add more `-L`.
28
+ **On a server, with no screen.** MADRE listens only on `127.0.0.1` of the machine it runs on, and on purpose: whoever reached it could set the agents to work there. Do not open its ports to the network. To use it on a server, open it through an SSH tunnel from your computer. Home uses 4317 and every project you open takes the next free port (4318, 4319…), so the tunnel carries several; if you open more projects, add more `-L`.
29
29
 
30
30
  ```bash
31
31
  # on your computer: reach the server with the tunnel
@@ -34,7 +34,9 @@ ssh -L 4317:127.0.0.1:4317 -L 4318:127.0.0.1:4318 -L 4319:127.0.0.1:4319 -L 4320
34
34
  npx @jossuealcala/madre --no-open
35
35
  ```
36
36
 
37
- Then open `http://127.0.0.1:4317/salas` in your computer's browser. The agents are installed on the server and connected from Settings › Agents: Claude gives you a link and a code you paste right there, and Gemini and OpenCode take their key. Use your own user, not root: the agents work with the permissions of whoever runs MADRE.
37
+ Then open, in your computer's browser, the address MADRE wrote in the server's terminal, the one that ends in `?ficha=…`. The agents are installed on the server and connected from Settings › Agents: Claude gives you a link and a code you paste right there, and Gemini and OpenCode take their key. Use your own user, not root: the agents work with the permissions of whoever runs MADRE.
38
+
39
+ **The ficha.** Every request to MADRE carries its ficha (Spanish for «token»): a random secret in `~/.pulse/credentials/ficha.json` that only your user can read. The browser gets it once, in the address MADRE opens, and keeps it in a cookie; MADRE's own processes send it in the `x-madre-ficha` header. Without it, MADRE only says that it is MADRE and its version: it lets nobody read your projects, install modules or open #4. Home makes a new one each time it starts and opens the browser; a restart with no browser (an update, a project Home opens) keeps the one before. A tab without the ficha tells you where to open MADRE from. What it does not stop: a program running as your user can read the file, as it reads everything of yours, and the cookie also travels to other ports of `127.0.0.1` you open in the same browser.
38
40
 
39
41
  **Three names.** **MADRE** is the product. **Diagnostics** is its operational voice: failures, connections, settings. **Log** is the channel the project runs on: the event record, the plan block, the `.pulse/` folder where artifacts land; those identifiers keep their old name, PULSE.
40
42
 
@@ -129,7 +131,7 @@ Since 1.1.0, from **#1 to #3**, Claude, OpenCode and Codex may split their work
129
131
  | **Claude** | The `Agent` tool: the subagent inherits the same tools and rules (`--tools`, `--allowedTools`, `dontAsk`) | No `Agent` |
130
132
  | **OpenCode** | Only `explore` and `general`, each with the turn's permissions and unable to call another (OpenCode's own write and run commands) | `task` denied |
131
133
  | **Codex** | Its subagents stay inside the same sandbox | A one-thread limit: `features.multi_agent_v2.max_concurrent_threads_per_session=1` |
132
- | **Gemini** · **Cursor** | No | No |
134
+ | **Gemini** · **Cursor** · **Grok** | No | No |
133
135
 
134
136
  Tried with the real AIs (Claude 2.1.267, OpenCode 1.18.4, Codex 0.161): in #1 the subagent reads and does not write; in #3 it writes in the project, `.pulse/` refuses it and there are no commands; in #4 Codex answers «agent thread limit reached».
135
137
 
@@ -153,7 +155,7 @@ MADRE runs the steps as normal turns: each one stays in the ledger and goes thro
153
155
 
154
156
  **TURNS.** In Diagnostics, next to the sentinel. On by default: a conversation that is still working when you open another one does not stop, it keeps writing its record and the conversations panel marks it until it finishes. Two limits: conversations working at the same time (2) and turns at the same time in each one (3); a message that would exceed them is rejected with the reason before it starts. All conversations share a single holder of EDIT or FULL ACCESS. When it is off, a single conversation drives the agents and you cannot switch away from one that is working. `STOP ALL` stops them all.
155
157
 
156
- **STOP ALL.** The button in the bar, `STOPALL` in the Write box or `curl -X POST http://127.0.0.1:4317/api/stop-all` stop all plans and kill all agent processes. Diagnostics warns in red when the project gets out of hand: three agents at once, one agent with two overlapping turns, a plan longer than five minutes.
158
+ **STOP ALL.** The button in the bar, `STOPALL` in the Write box or `curl -X POST -H "x-madre-ficha: $(node -p "require(require('os').homedir() + '/.pulse/credentials/ficha.json').ficha")" http://127.0.0.1:4317/api/stop-all` stop all plans and kill all agent processes. Diagnostics warns in red when the project gets out of hand: three agents at once, one agent with two overlapping turns, a plan longer than five minutes.
157
159
 
158
160
  ---
159
161
 
@@ -199,7 +201,7 @@ Change who it goes to and the words change; raise the mode and the permission it
199
201
 
200
202
  **THE LAUNCH.** Below the document, the exact command MADRE would run to deliver it: the executable, the directory, every flag and the place where the briefing goes in. It is not a description — it is built by the same adapters that would build it for real. Below that, what keeps the run inside the turn (the session that does not persist, the temporary home that is deleted when it ends) and the MCP servers it could call, with their tools counted. **No environment value from that command is ever printed, only the names**: a command line is something people take photos of.
201
203
 
202
- **Outbound.** The record of what went out: every destination MADRE or an agent called, with its count. Never bodies, headers or query values — only where and how many times.
204
+ **Outbound.** The record of MADRE's and its modules' `fetch` calls, including isolated modules and their one-file MCP servers. It does not observe other Node protocols or agent CLI connections. It never stores bodies, headers or query values: only destinations and call counts.
203
205
 
204
206
  **The console.** Inside the core, Diagnostics answers from what the project already has. Three answers it does not understand and the interface closes.
205
207
 
@@ -405,6 +407,8 @@ MADRE's folder is only taken away whole when it is MADRE's beyond doubt: an abso
405
407
  | `PULSE_DELEGATION` · `PULSE_MAX_PLAN_STEPS` | `1` · `4` | Plans |
406
408
  | `PULSE_ESCALATION_MS` | `180000` | Permission request timer |
407
409
  | `PULSE_OPENCODE_MODEL` | from the config | `proveedor/modelo` for OpenCode |
410
+ | `PULSE_GROK_MODEL` | Grok's own | Grok's model when none is chosen (`grok models` lists them) |
411
+ | `PULSE_GROK_SANDBOX` | `read-only` | `off` drops `--sandbox` where Grok's isolation cannot start; `--tools` still keeps it to reading |
408
412
  | `PULSE_CLAUDE_USAGE` · `PULSE_OFFICIAL_QUOTA` | `0` · `1` | Claude's official quota (reads the keychain); `0` turns off all provider reads |
409
413
  | `PULSE_GEMINI_IDLE_MS` · `PULSE_GEMINI_RETRIES` · `PULSE_GEMINI_FALLBACK_MODEL` | `90000` · `1` · `gemini-3-flash-preview` (empty: no spare) | Gemini under load |
410
414
 
package/docs/en/SDK.md CHANGED
@@ -36,9 +36,9 @@ export default {
36
36
  };
37
37
  ```
38
38
 
39
- **Your module does not import packages.** Not MADRE, not the SDK, nothing from npm. Before installing it, MADRE copies your file to a separate temporary folder and loads it there —that way it checks what it is without running it where it lives— and that folder has no `node_modules`: an `import` by package name doesn't resolve and the installation fails.
39
+ **Your module does not import packages.** Not MADRE, not the SDK, nothing from npm. Before installing it, MADRE copies your file to a separate temporary folder and loads it in a restricted process. That folder has no `node_modules`: an `import` by package name doesn't resolve and the installation fails. Once installed, each call also runs in a separate process.
40
40
 
41
- **Node builtins do work**, always: `node:fs`, `node:url`, `node:tls`, `node:child_process`. That's enough to speak any protocol. What there isn't is anything to install.
41
+ **Node builtins can be imported**: `node:fs`, `node:url`, `node:tls`, `node:child_process`. The fence limits what they can do: your module cannot read other files, write directly or start processes. It can use `fetch` or Node protocols for an outside service under the network rules of the installed Node version. There are no packages to install.
42
42
 
43
43
  If you need `defineModule` —to compute something before defining the module, for example— **MADRE hands it to you**: export a function and you receive it as an argument.
44
44
 
@@ -77,12 +77,12 @@ the suite compares this table against the code, so if they ever drift apart, it'
77
77
  | `credit` | Whose idea it was, if it was not yours: a name. MADRE says it on the module's card and in the Market («Idea by …») |
78
78
  | `icon` | Your module's icon: `{ svg, color }`. `svg` is the drawing — its shapes (`<path d="…"/>`) or a whole `<svg>`, on whatever grid you like — and `color` its tile's, `#rrggbb`. MADRE fits it on its own so it looks like MADRE's: centred and scaled to the same square, drawn in white in one color, on the MADRE color nearest to yours, with anything that is not drawing taken out (scripts, images, links, styles, gradients). Without `icon`, your module wears the grey puzzle piece. Up to 8000 characters |
79
79
  | `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 |
80
- | `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 |
80
+ | `toolsForTurn(ctx, turn)` | MCP servers for an agent's turn: `[{ name, command, args, env, tools, sends, brief }]`. For a module of yours, `command` must be Node and the first argument must be **the module's own file**; MADRE starts it with the same permission fence. Another executable is withheld. `turn` carries the agent, mode, lease, folder, port and `turn.turn`: the id of the reply the turn will write |
81
81
  | `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 |
82
82
  | `reaches` | Where your module reaches, in the same four answers MADRE gives about its own. See below |
83
83
  | `secrets` | The keys you need, declared instead of drawn: `[{ name, label, note, where }]`. MADRE draws the field, keeps it in its vault under your id, and gives it back to you through `ctx.vault`. See below |
84
84
  | `routes` | Your own HTTP routes: `{ method, path, handler(ctx, { payload, params, url, request, viaPhone }) }` → `{ status, body }`. `viaPhone` is `true` when the request comes from a paired phone: deny it yourself if your route belongs to the Mac |
85
- | `onEvent(ctx, event)` | Every ledger event of every live conversation in the room, while your module is on. `ctx.room` and `ctx.chat` are that conversation's, and `ctx.record` writes into it. It runs separately: whatever it takes long on or fails at doesn't stop the room. As always, a module doesn't fabricate messages or turns |
85
+ | `onEvent(ctx, event)` | Every ledger event of every live conversation in the room, while your module is on. `ctx.room` and `ctx.chat` are that conversation's, and `ctx.record` writes into it. It runs separately: whatever it takes long on or fails at doesn't stop the room. In a module a person installs, each event starts a new process: what you keep in a variable doesn't reach the next one (keep it with `ctx.updateConfig`), and the notices of how much is left of each AI's plan arrive too, even when nobody writes; check `event.type` first and finish quickly. As always, a module doesn't fabricate messages or turns |
86
86
  | `controls` | Your module's settings, declared instead of drawn: `[{ key, label, type: 'select' \| 'switch' \| 'text', options, choices, note, invert }]`. MADRE draws them on the page and saves them in your block of `config.json`. In a `select`, `choices: [{ value, label }]` says which phrase the person reads for each value that gets saved (if you give it, `options` comes from there); without it, the person reads the value as is |
87
87
  | `onSettings(ctx, settings)` | Tells you when the human changed one of your `controls`, in case something live needs to know |
88
88
  | `conditions` | Entries for the MU/TH/UR catalog, with a remedy per platform |
@@ -236,7 +236,7 @@ finishing it, and in the meantime it can only be turned on deliberately with `PU
236
236
 
237
237
  The page of a module of yours has **GET A NEWER FILE**: MADRE fetches the file —from the `url` you declared or from the file you installed it from—, verifies it in a separate copy, and only replaces the installed one if it loads, follows the house rules, and states a different version. Verifying installs nothing.
238
238
 
239
- And in the MODULES header there is **+ ADD A MODULE** to install someone else's `.mjs`. It goes through the same door as everything else. Said plainly, because it is what it is: a module runs **inside MADRE, with the permissions of whoever opens it**. MADRE checks that it loads and that it doesn't leave its pen —its own id, routes only under `/api/x/<id>/`, never on top of a MADRE module—; what the code *intends* is something nobody but you can check.
239
+ And in the MODULES header there is **+ ADD A MODULE** to install someone else's `.mjs`. It goes through the same door as everything else. MADRE loads and runs it separately: ordinary APIs can read the module file and SDK code, but cannot directly write your files or start processes. An MCP tool it offers must use that same file and limits. Where Node offers `--allow-net`, only modules declaring an outside destination receive network access; older versions do not restrict network access. A declaration does not limit the hosts it can contact. **Node's permission model is not a security boundary against malicious code.** Review the code and destinations before installing it.
240
240
 
241
241
  ### In the Market, for everyone
242
242
 
@@ -276,12 +276,12 @@ A module that installs into the project instead of being turned on keeps its ins
276
276
  ctx = {
277
277
  projectRoot, stateRoot, // el proyecto y ~/.pulse
278
278
  config, settings, // config.json completo y tus ajustes con defaults
279
- env, agents, room, // agentes detectados; la sala (room.capabilities(), room.record(...))
279
+ env, agents, room, // empty env for your modules; detected agents; mediated room
280
280
  readConfig(), updateConfig(patch),
281
281
  record(type, payload), // escribe un evento en el ledger; tipo "algo.algo", nunca message.* ni agent.*
282
282
  language, t(text, vars), // the room's language, 'es' or 'en', and your words in it (sdk: 2):
283
283
  // an English sentence MADRE already knows, or your own { es, en }
284
- services: { history, imageKey, ollama: { state, generate }, … }, // what the server offers;
284
+ services: { history, ollama: { state, generate } }, // what the server offers your modules;
285
285
  // ollama.generate({ system, prompt, json }) answers with the local model (sdk: 2)
286
286
  vault: { get, held, keep, forget } // tus secretos, y solo los tuyos
287
287
  }
@@ -329,7 +329,7 @@ A module of yours carries the «Yours» tag and is removed from its page with «
329
329
 
330
330
  ## What a module cannot touch
331
331
 
332
- A module runs inside MADRE's process with your permissions: install only what you've read. MADRE, for its part, protects its core like this:
332
+ A module of yours runs in a separate process. Node limits ordinary APIs to its file and the SDK code and denies direct writes and child processes. The `ctx` functions pass through MADRE: the vault returns only that module's secrets, and `updateConfig` accepts only its settings block. Its one-file MCP server uses the same limits and may write to the turn's scratch folder when one exists. Node does not guarantee containment of malicious code: review its code and network destinations before installing it. MADRE also protects its core like this:
333
333
 
334
334
  - Its HTTP routes live under `/api/x/<id>/`; a module with routes outside that doesn't load, so none can impersonate `/api/state`, `/api/messages`, or any route of MADRE's own.
335
335
  - It cannot use the `id` of a built-in module or of another one already loaded.
@@ -10,7 +10,7 @@ From **Settings › What it remembers › Train your own AI › Export** (when i
10
10
  npx @jossuealcala/madre dataset # in the project folder
11
11
  ```
12
12
 
13
- It writes `~/.pulse/rooms/<project>/dataset/{train.jsonl, valid.jsonl, manifest.json}`. Each line is `{"messages":[{role:"system"},{role:"user"},{role:"assistant"}]}`: the project's real answers, redacted (no paths, names, emails or keys), plus the summarized notes as recall pairs. Messages sent in #0 INCOGNITO are never there.
13
+ It writes `~/.pulse/rooms/<project>/dataset/{train.jsonl, valid.jsonl, test.jsonl, manifest.json}`: one pair in ten goes to `valid.jsonl`, to measure while it trains, and another one in ten to `test.jsonl`, never trained on, for the test at the end. Each line is `{"messages":[{role:"system"},{role:"user"},{role:"assistant"}]}`: the project's real answers, redacted (no paths, names, emails or keys), plus the summarized notes as recall pairs. Messages sent in #0 INCOGNITO are never there.
14
14
 
15
15
  How much you need: with fewer than ~200 pairs the model learns the tone and little more; from ~1000 on it starts to be worth it. Export every so often; the split is deterministic, so lines don't switch sides.
16
16
 
@@ -10,7 +10,7 @@
10
10
  //
11
11
  // ─── The one shape worth copying ──────────────────────────────────────────────────────────────
12
12
  //
13
- // A connector needs two things that look like they need two files: a module MADRE imports, and
13
+ // A connector needs two things that look like they need two files: a module MADRE loads separately, and
14
14
  // an MCP server MADRE runs as its own process. They are the same file. It is the spec when
15
15
  // imported and the server when executed, and it tells the two apart at the bottom.
16
16
  //
@@ -33,7 +33,7 @@ export default {
33
33
  return { status: { installed: Boolean(ctx.settings.enabled), detail: ctx.settings.enabled ? `on · says "${ctx.settings.greeting}"` : 'off' } };
34
34
  },
35
35
 
36
- // Slash commands: they run on the server, inside MADRE, and their answer lands in the room as a
36
+ // Slash commands: they run in a separate process, and their answer lands in the room as a
37
37
  // fact card that the human and every agent read. Only while the module is on.
38
38
  slash: [
39
39
  {
@@ -10,7 +10,7 @@ Desde **Ajustes › Lo que recuerda › Entrena tu propia IA › Exportar** (al
10
10
  npx @jossuealcala/madre dataset # en la carpeta del proyecto
11
11
  ```
12
12
 
13
- Escribe `~/.pulse/rooms/<proyecto>/dataset/{train.jsonl, valid.jsonl, manifest.json}`. Cada línea es `{"messages":[{role:"system"},{role:"user"},{role:"assistant"}]}`: las respuestas reales del proyecto, redactados (sin rutas, nombres, correos ni claves), más las notas resumidas como pares de recuerdo. Lo que se envió en #0 INCÓGNITO nunca está.
13
+ Escribe `~/.pulse/rooms/<proyecto>/dataset/{train.jsonl, valid.jsonl, test.jsonl, manifest.json}`: uno de cada diez pares va a `valid.jsonl`, para medir mientras entrena, y otro de cada diez a `test.jsonl`, que nunca se entrena, para la prueba del final. Cada línea es `{"messages":[{role:"system"},{role:"user"},{role:"assistant"}]}`: las respuestas reales del proyecto, redactados (sin rutas, nombres, correos ni claves), más las notas resumidas como pares de recuerdo. Lo que se envió en #0 INCÓGNITO nunca está.
14
14
 
15
15
  Cuánto hace falta: con menos de ~200 pares el modelo aprende el tono y poco más; a partir de ~1000 empieza a valer. Exporta cada tanto; el split es determinista, así que las líneas no cambian de lado.
16
16
 
@@ -7,6 +7,9 @@ ROOM="${1:?room dir, e.g. ~/.pulse/rooms/<sala>}"
7
7
  BASE="${2:-Qwen/Qwen2.5-1.5B-Instruct}"
8
8
  ITERS="${3:-600}"
9
9
  [ -f "$ROOM/dataset/train.jsonl" ] || { echo "no dataset: run 'madre dataset' first"; exit 2; }
10
+ # The test at the end reads test.jsonl, never trained on; a dataset exported before MADRE wrote it
11
+ # has none, and mlx-lm stops there (RX-30).
12
+ [ -s "$ROOM/dataset/test.jsonl" ] || { echo "no test.jsonl: export the dataset again with 'madre dataset'"; exit 2; }
10
13
  PAIRS=$(wc -l < "$ROOM/dataset/train.jsonl")
11
14
  [ "$PAIRS" -ge 50 ] || { echo "only $PAIRS training pairs; let the room grow (aim for a few hundred)"; exit 3; }
12
15
  python3 -c "import mlx_lm" 2>/dev/null || { echo "pip install mlx-lm (inside a venv) first"; exit 4; }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jossuealcala/madre",
3
- "version": "1.1.2",
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.",
3
+ "version": "1.1.3",
4
+ "description": "MADRE · one local room where the AI coding agents already on your machine (Codex, Claude Code, Gemini CLI, Cursor, OpenCode, Grok) 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",
7
7
  "codex",
@@ -40,6 +40,8 @@
40
40
  "files": [
41
41
  "bin",
42
42
  "src",
43
+ "!src/madre-logs.mjs",
44
+ "!src/rumbo.mjs",
43
45
  "public",
44
46
  "!public/assets/manual/*.pdf",
45
47
  "README.md",
@@ -276,10 +276,19 @@ export function mountActivity({ key, badge, openChat, toast = () => {} }) {
276
276
  const title = what.startsWith('agent:') ? t('Installing {name}', { name: brandOf(what.slice(6)).label })
277
277
  : what === 'ollama' ? (item.model ? t('Downloading {name}', { name: item.model }) : t('Installing {name}', { name: 'Ollama' }))
278
278
  : t('Installing the module {name}', { name: what });
279
+ // Opened, it says what the installer said last and how far it got; a model downloading can be
280
+ // stopped from here, as in the welcome. It opened onto nothing before (2026-11-06, the author).
281
+ const percent = (() => { const all = [...String(item.line ?? '').matchAll(/(\d{1,3}(?:\.\d+)?)\s?%/g)]; return all.length ? Math.min(100, Number(all.at(-1)[1])) : null; })();
279
282
  return row({
280
283
  id: uid, face: sysAvatar('download', { busy: true }), title,
281
284
  sub: `${project.home ? t('Home') : whereOf(project)} · ${t('It ends on its own; you can keep working.')}`,
282
285
  time: item.startedAt ? () => clock(since(item.startedAt)()) : '',
286
+ progress: percent === null ? null : () => percent / 100,
287
+ more: (inside) => {
288
+ inside.append(el('p', 'ap-meta', t('It ends on its own; you can keep working.')));
289
+ if (item.line) inside.append(el('pre', 'ap-out', item.line));
290
+ if (item.stoppable) inside.append(actions([t('Stop the download'), 'stop', () => stop(project, item)]));
291
+ },
283
292
  });
284
293
  }
285
294