@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.
- package/CHANGELOG.en.md +21 -1
- package/CHANGELOG.md +21 -1
- package/README.en.md +3 -3
- package/README.md +3 -3
- package/SECURITY.md +11 -6
- package/bin/madre.mjs +74 -11
- package/docs/REFERENCE.md +13 -7
- package/docs/SDK.md +8 -8
- package/docs/en/REFERENCE.md +10 -6
- package/docs/en/SDK.md +8 -8
- package/docs/en/training/README.md +1 -1
- package/docs/sdk/connector-module.mjs +1 -1
- package/docs/sdk/hello-module.mjs +1 -1
- package/docs/training/README.md +1 -1
- package/docs/training/train.sh +3 -0
- package/package.json +4 -2
- package/public/activity.js +9 -0
- package/public/app.js +988 -171
- package/public/attribution.js +9 -0
- package/public/brands.js +27 -13
- package/public/en.js +1 -2
- package/public/es.js +834 -257
- package/public/index.html +3 -0
- package/public/macroverso.js +24 -5
- package/public/manual-content.js +32 -2
- package/public/market-view.js +116 -9
- package/public/market.js +15 -0
- package/public/news-scenes.js +185 -0
- package/public/notices.js +66 -0
- package/public/power.js +1 -1
- package/public/resay.js +3 -0
- package/public/salas-mac.css +229 -26
- package/public/salas-mac.html +3 -0
- package/public/salas-mac.js +454 -37
- package/public/styles.css +393 -17
- package/public/tips.js +124 -0
- package/public/tour-chapters.js +75 -75
- package/public/tour.js +36 -8
- package/public/troubleshooting.js +215 -22
- package/public/welcome-scene.js +358 -0
- package/public/welcome.js +514 -273
- package/src/adapters/gemini-rest.mjs +236 -0
- package/src/adapters/gemini.mjs +9 -7
- package/src/adapters/grok.mjs +288 -0
- package/src/adapters/process.mjs +14 -3
- package/src/auth-probe.mjs +32 -0
- package/src/bridge/policy.mjs +1 -1
- package/src/capabilities.mjs +30 -0
- package/src/checkpoint.mjs +115 -1
- package/src/codex-route.mjs +113 -0
- package/src/credentials.mjs +46 -8
- package/src/dataset.mjs +18 -7
- package/src/event-store.mjs +10 -2
- package/src/ficha.mjs +142 -0
- package/src/files.mjs +36 -2
- package/src/lease.mjs +5 -0
- package/src/market-check.mjs +1 -1
- package/src/market-remote.mjs +135 -1
- package/src/mcp/image-server.mjs +1 -1
- package/src/mcp/memory-server.mjs +10 -0
- package/src/memory-tools.mjs +3 -0
- package/src/memory.mjs +29 -4
- package/src/models.mjs +21 -3
- package/src/modules/ahp.mjs +8 -3
- package/src/modules/bishop-exam.mjs +41 -12
- package/src/modules/bishop.mjs +2 -2
- package/src/modules/choices.mjs +12 -10
- package/src/modules/fetch-alone.mjs +7 -0
- package/src/modules/helpers.mjs +23 -5
- package/src/modules/image-studio.mjs +13 -27
- package/src/modules/index.mjs +54 -11
- package/src/modules/isolated.mjs +160 -0
- package/src/modules/ollama.mjs +35 -6
- package/src/modules/playwright.mjs +46 -17
- package/src/modules/run-alone.mjs +122 -0
- package/src/modules/runs.mjs +11 -8
- package/src/modules/sdk.mjs +4 -2
- package/src/notices-key.mjs +8 -0
- package/src/notices.mjs +185 -0
- package/src/ollama.mjs +57 -15
- package/src/outbound.mjs +45 -8
- package/src/room/archivist.mjs +30 -5
- package/src/room/busy.mjs +16 -0
- package/src/room/control.mjs +36 -6
- package/src/room/guard.mjs +32 -2
- package/src/room/prompt.mjs +32 -5
- package/src/room/vectors.mjs +7 -1
- package/src/room.mjs +94 -28
- package/src/router.mjs +1 -1
- package/src/runs.mjs +39 -0
- package/src/runtime-detection.mjs +46 -6
- package/src/salas.mjs +151 -15
- package/src/server.mjs +577 -80
- package/src/service.mjs +116 -0
- package/src/setup-trouble.mjs +20 -1
- package/src/skill-check.mjs +269 -0
- package/src/skills-import.mjs +128 -0
- package/src/skills.mjs +492 -0
- package/src/tour.mjs +14 -3
- package/src/whats-new.mjs +48 -0
- package/src/rumbo.mjs +0 -337
package/CHANGELOG.en.md
CHANGED
|
@@ -4,7 +4,27 @@ Every published version of `@jossuealcala/madre`. Dates in ISO format.
|
|
|
4
4
|
|
|
5
5
|
A version closes when it is on npm: until then its section is called **Unreleased** and it can keep growing. Each published version has exactly one `vX.Y.Z` tag, one GitHub release and one section here; the patch number can reach two digits (`0.2.10`) before the minor goes up. See `docs/ROADMAP.md` for the criteria on what bumps each number. This is the English translation of [CHANGELOG.md](CHANGELOG.md); the Spanish file is the original.
|
|
6
6
|
|
|
7
|
-
## 1.1.
|
|
7
|
+
## 1.1.4 · Unreleased
|
|
8
|
+
|
|
9
|
+
## 1.1.3 · 2026-11-09
|
|
10
|
+
|
|
11
|
+
- **A welcome like setting up a new phone.** Six steps, each with one question in everyday words and an animation, made with the logo's pulse, that shows what is happening. MADRE looks over your computer while you read the greeting; it asks what you want it for and gives you examples of your own, not a programmer's; it recognises the AIs that already have a session and tells you which is which («Pay for ChatGPT Plus? Here it's called Codex»); it brings ticked the folders you already opened with Claude Code, Codex, Gemini, Cursor or VS Code (it only reads where they are, never what they say); it downloads the AI on your computer and its memory with one touch while you carry on, and lets you talk to it as soon as it arrives. It ends inside your project with the first message already written, so you only send it.
|
|
12
|
+
- **Skills: teach MADRE once how you work.** A skill is a page with your way of doing something (quoting, writing an email, reviewing a contract) that MADRE hands to whichever AI answers, Claude, Codex, Gemini, OpenCode or Grok. It comes in on its own when what you ask fits, and the room says why it came in («because you said quote»); you can also keep it always on or off, for all your projects or just one. It never grants permissions: it does not raise the mode or let anyone read, write or run more. You can ask your agent to write one (`/skill` at #2) and you decide whether it is kept; bring the ones you already have in Claude or Codex; find them in the Market, on their own tab, where you read what they will tell your agents before keeping them; send yours to the Market, or share it hand to hand: whoever gets the file drags it into their conversation and MADRE offers to keep it. They are in Market › Skills and in the manual.
|
|
13
|
+
- **MADRE explains each thing.** The first time you touch something important (Running now, the Market, Modules, your AIs, Attach, the model, the copilot) a short note says what it is for, once. Each AI's window shows in bars how much of your plan you have used, when it renews and what it can do. Settings › Memory, training your own AI and the «Getting to know MADRE» tour are told in everyday words.
|
|
14
|
+
- **Notices from the author.** When there is something you need to know (a known fault, an urgent fix), it reaches your MADRE as a card on Home, or as a strip in the project if it is important. They are signed: your copy checks the signature and decides on its own whether the notice is for its version and system, without saying anything about you. «Got it» keeps it. Information notices can be turned off in Settings › Version; security ones cannot.
|
|
15
|
+
- **Interface details.** In Settings, the agents are a quick way in: their logo and their session, three to a row, and each opens its agent. The connectors have a search, and «Add a tool» appears once, at the top. Home's Settings widen by dragging their edge, as a project's do. The connections are compact, centred rows that unfold when pressed, and inside they read in order (what crosses, terms, what it allows). The map also shows the Coordinator's memories. Secondary keys such as «Cancel» have a quieter shade, and the keys show a small, solid tip, inside the projects too. What each turn changed folds into a dot like the other notes, with Undo inside, and a module's answer opens downward. «Bring over what you already have» is also in Market › Skills.
|
|
16
|
+
- **Codex, Claude, Gemini, OpenCode and Grok show their official logos.** Unaltered, in their one-colour version and only to identify each service. Settings › License and authorship says whose each trademark is. Cursor keeps MADRE's own drawing.
|
|
17
|
+
- **Grok, xAI's AI, joins your agents.** It installs from Settings › Agents with its official CLI and connects with your Grok account through a code you confirm on xAI's page. It works at every mode: at #1 it only reads (it is given only the tools that read, and your system keeps it from writing), at #2 and #3 it writes with no terminal, and at #4 it runs commands too. At no mode does it touch `.env`, `.git` or MADRE's folders. With Web access on, it searches and opens pages. It also generates images: at #2 they land in the turn's draft folder, and at #3 and #4 in `imagenes/`. It does not load the hooks, skills or servers you have in Claude or Cursor. If xAI refuses your account, MADRE tells you how to fix it. An AI that only reads (Grok, or Gemini when it answers through its API) no longer asks for a mode it cannot use, and MADRE no longer offers «Create» for it.
|
|
18
|
+
- **No other program on your computer can use MADRE in your name.** Until now any program on the computer (of any user and, in WSL2, Windows' too) could read your projects, install a module or open #4 by talking to MADRE directly. Now every request carries a ficha: a secret only your user can read. The browser MADRE opens gets it in the address and keeps it; nothing changes for you. If you open MADRE in another browser, paste the full address it wrote in the terminal. Home makes a new ficha each time it starts.
|
|
19
|
+
- **«What is sent» says rightly where the signal that MADRE is open goes.** The five-minute notice that is part of the anonymous diagnostics was logged as if it went to the error-report collector, with the wrong switch. It now has its own line and says it turns off with the diagnostics. The README also names the three sends to madre.run (the daily notice, the diagnostics and the automatic error report), not two.
|
|
20
|
+
- **Gemini with a key, nothing to install.** With a Google API key (free or paid), Gemini answers even if its program is not installed, and if the credits of the model you chose run out, it tries a fallback one. That way it only answers: to write in your project it still needs its program.
|
|
21
|
+
- **Clearer permissions.** With #3 open, your next message stays at #3 instead of going back to #1 and asking again. If the same AI asks for #3 a second time, the card offers you the copilot. On a narrow screen the mode says its short name («#1 Chat»). Undo and edit say so once, in your language.
|
|
22
|
+
- **MADRE on a Linux server.** Each project remembers its port, so it comes back on the same one after a restart. And from Home › Settings, or with `madre servicio activar`, MADRE starts with the computer, comes back on its own if it closes and reopens the projects you had open (Linux with systemd only, no administrator rights).
|
|
23
|
+
- **Safer modules.** A module you install runs in a separate process with limited permissions: it cannot write your files or start other programs directly. It is not a barrier against a module made to do harm, so review what you install. Installing one by hand needs the #4 key: no other program on your computer can install one for you. A module that is off does not hear the conversation.
|
|
24
|
+
- **A more honest memory.** A note says who wrote it down and whether you confirmed it; one an AI saved without sources says so, and no longer overturns what you confirmed. Summarising the memory is no longer given to an AI without a session. What the project's memory sends to Gemini shows in «What is sent».
|
|
25
|
+
- **The AI on your computer, without cut-offs.** On a computer without a graphics card, tidying the memory and the Coordinator no longer stop at five minutes. If the computer is already very busy, that background work waits a few minutes instead of slowing you down. When Ollama fails because of the network, the site's name or a cut download, MADRE says which; and @madre without Ollama tells you how to start it. The exam of your trained AI only asks what it did not see in training, and training no longer ends in an error.
|
|
26
|
+
- **Attachments and files.** A PDF or a photo from the conversation is saved in the project folder you choose. A text too long for a message is sent as an attachment instead of being refused. Attachment names keep their accents. Undo also removes what an AI created in folders git ignores, and a `.env` a turn changes goes back to how it was.
|
|
27
|
+
- **Fixes the diagnostics asked for.** Codex no longer offers models your account refuses. Claude's key is checked with Anthropic when you save it, so a bad key is said before the first message. Codex cannot write to places MADRE cannot identify. «MADRE is already open for this project» is said in your language, and opening it again opens it instead of failing. A repository git refuses to read is no longer taken for a project without git. Closing the copilot's window while it prepares its turn no longer makes it fail. The commands card shows the real command from `package.json`. «Stop everything» no longer reaches the diagnostics as a fault. And scrolling on at the end of the chat, as a trackpad's momentum does, no longer writes «end of record» or marks your next message.
|
|
8
28
|
|
|
9
29
|
## 1.1.2 · 2026-11-02
|
|
10
30
|
|
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,27 @@ Todas las versiones publicadas de `@jossuealcala/madre`. Fechas en ISO.
|
|
|
4
4
|
|
|
5
5
|
Una versión se cierra cuando está en npm: hasta entonces su sección se llama **Sin publicar** y puede crecer. Cada versión publicada tiene exactamente una etiqueta `vX.Y.Z`, una release en GitHub y una sección aquí; el parche puede llegar a dos dígitos (`0.2.10`) antes de subir el menor. Ver `docs/ROADMAP.md` para el criterio de qué sube cada número.
|
|
6
6
|
|
|
7
|
-
## 1.1.
|
|
7
|
+
## 1.1.4 · Sin publicar
|
|
8
|
+
|
|
9
|
+
## 1.1.3 · 2026-11-09
|
|
10
|
+
|
|
11
|
+
- **Una bienvenida como estrenar teléfono.** Seis pasos, cada uno con una sola pregunta en palabras de todos los días y una animación que enseña qué está pasando, hecha con el pulso del logo. MADRE revisa tu computadora mientras lees el saludo; te pregunta para qué la quieres y con eso te da ejemplos tuyos, no de programador; reconoce las IAs que ya tienen sesión y te dice cuál es cuál («¿Pagas ChatGPT Plus? Aquí se llama Codex»); trae marcadas las carpetas que ya abriste con Claude Code, Codex, Gemini, Cursor o VS Code (solo lee dónde están, nunca lo que dicen); baja la IA de tu computadora y su memoria de un solo toque mientras sigues, y te deja platicar con ella en cuanto llega. Termina dentro de tu proyecto con el primer mensaje ya escrito, para que solo lo mandes.
|
|
12
|
+
- **Habilidades: enséñale una vez a MADRE cómo trabajas.** Una habilidad es una página con tu forma de hacer algo (cotizar, escribir un correo, revisar un contrato) que MADRE le pasa a la IA que conteste, sea Claude, Codex, Gemini, OpenCode o Grok. Entra sola cuando lo que pides viene al caso y la sala dice por qué entró («porque dijiste cotización»); también puedes dejarla siempre encendida o apagada, para todos tus proyectos o solo para uno. Nunca da permisos: no sube el modo ni deja leer, escribir o ejecutar más. Puedes pedirle a tu agente que escriba una (`/habilidad` en #2) y tú decides si se guarda; traer las que ya tienes en Claude o en Codex; buscarlas en el Mercado, en su propia pestaña, donde lees lo que le dirán a tus agentes antes de guardarlas; mandar la tuya al Mercado, o compartirla de mano en mano: quien recibe el archivo lo arrastra a su conversación y MADRE le ofrece guardarlo. Están en Mercado › Habilidades y en el manual.
|
|
13
|
+
- **MADRE te explica cada cosa.** La primera vez que tocas algo importante (Plan actual, el Mercado, Módulos, tus IAs, Adjuntar, el modelo, el copiloto) sale una nota corta que dice para qué sirve, una sola vez. La ventana de cada IA enseña con barras cuánto de tu plan llevas, cuándo se renueva y qué puede hacer. Ajustes › Memoria, entrenar tu propia IA y el recorrido «Conoce MADRE» están dichos con palabras de todos los días. «En marcha» se llama ahora «Plan actual», y en español una orden se «ejecuta»: MADRE ya no dice «correr».
|
|
14
|
+
- **Avisos del autor.** Cuando haya algo que tengas que saber (una falla conocida, un arreglo urgente), llega a tu MADRE como una tarjeta en Inicio, o como una franja en el proyecto si es importante. Van firmados: tu copia comprueba la firma y decide sola si el aviso es para su versión y su sistema, sin decir nada de ti. «Entendido» lo guarda. Los de información se apagan en Ajustes › Versión; los de seguridad, no.
|
|
15
|
+
- **Detalles de la interfaz.** En Ajustes, los agentes son un acceso rápido: su logo y su sesión, tres por fila, y cada uno abre su agente. Los conectores tienen buscador y «Agregar conector» aparece una sola vez, arriba. Los Ajustes de Inicio se ensanchan arrastrando su borde, como los de un proyecto. Las conexiones son filas compactas y centradas que se despliegan al pulsarlas, y adentro se leen en orden (qué se comparte, condiciones, qué permite). El mapa muestra también las memorias del Coordinador. Los botones secundarios, como «Cancelar», tienen una sombra más discreta, y los botones muestran un globo de ayuda pequeño y sólido, también dentro de los proyectos. Lo que cambió cada turno se pliega en un punto como las demás notas, con Deshacer adentro, y la respuesta de un módulo se abre hacia abajo. «Trae las que ya tienes» también está en Mercado › Habilidades.
|
|
16
|
+
- **Codex, Claude, Gemini, OpenCode y Grok se ven con sus logos oficiales.** Sin alterar, en su versión de un solo color y solo para identificar cada servicio. Ajustes › Licencia y autoría dice de quién es cada marca. Cursor conserva el dibujo de MADRE.
|
|
17
|
+
- **Grok, la IA de xAI, se suma a tus agentes.** Se instala desde Ajustes › Agentes con su CLI oficial y se conecta con tu cuenta de Grok con un código que confirmas en la página de xAI. Trabaja en todos los modos: en #1 solo lee (recibe solo las herramientas que leen y tu sistema le impide escribir), en #2 y #3 escribe sin terminal, y en #4 también corre comandos. En ningún modo toca `.env`, `.git` ni las carpetas de MADRE. Con «Acceso a la web» encendido, busca y abre páginas. También genera imágenes: en #2 quedan en la carpeta de borrador del turno y en #3 y #4, en `imagenes/`. No carga los ganchos, habilidades ni servidores que tengas en Claude o Cursor. Si xAI rechaza tu cuenta, MADRE te dice cómo arreglarlo. Una IA que solo lee (Grok, o Gemini cuando contesta por su API) ya no pide un modo que no puede usar, ni MADRE te ofrece «Crear» para ella.
|
|
18
|
+
- **Ningún otro programa de tu computadora puede usar MADRE por ti.** Hasta ahora, cualquier programa de la computadora (de cualquier usuario y, en WSL2, también los de Windows) podía leer tus proyectos, instalar un módulo o abrir #4 hablándole directo a MADRE. Ahora cada petición lleva una ficha: un secreto que solo tu usuario puede leer. El navegador que MADRE abre la recibe en la dirección y la guarda; para ti nada cambia. Si abres MADRE en otro navegador, pega la dirección completa que escribió en la terminal. Inicio hace una ficha nueva cada vez que arranca.
|
|
19
|
+
- **«Lo que se envía» dice bien a dónde va la señal de que MADRE está abierta.** El aviso de cada cinco minutos que forma parte del diagnóstico anónimo se anotaba como si fuera al servicio de reportes de errores, con el interruptor equivocado. Ahora tiene su propia línea y dice que se apaga con el diagnóstico. El README también nombra los tres envíos a madre.run (el aviso diario, el diagnóstico y el reporte automático de errores), no dos.
|
|
20
|
+
- **Gemini con una llave, sin instalar nada.** Con una llave de la API de Google (gratuita o de paga), Gemini contesta aunque no tengas su programa instalado, y si se acaban los créditos del modelo que elegiste, prueba con uno de respaldo. Así solo contesta: para escribir en tu proyecto sigue haciendo falta su programa.
|
|
21
|
+
- **Permisos más claros.** Con #3 abierto, tu siguiente mensaje sigue en #3 en vez de volver a #1 y pedirlo otra vez. Si la misma IA pide #3 por segunda vez, la tarjeta te ofrece el copiloto. En una pantalla angosta el modo dice su nombre corto («#1 Conversar»). Deshacer y editar avisan una sola vez, en tu idioma.
|
|
22
|
+
- **MADRE en un servidor Linux.** Cada proyecto recuerda su puerto, así que vuelve en el mismo al reiniciar. Y desde Inicio › Ajustes, o con `madre servicio activar`, MADRE arranca con la computadora, vuelve sola si se cierra y reabre los proyectos que tenías abiertos (solo Linux con systemd, sin permisos de administrador).
|
|
23
|
+
- **Módulos más seguros.** Un módulo que instalas se ejecuta en un proceso aparte, con permisos limitados: no puede escribir tus archivos ni abrir otros programas directamente. No es una barrera contra un módulo hecho para dañar, así que revisa lo que instalas. Para instalar uno a mano hace falta la llave de #4: ningún otro programa de tu computadora puede instalarlo por ti. Un módulo apagado no oye la conversación.
|
|
24
|
+
- **La memoria, más honesta.** Una nota dice quién la anotó y si tú la confirmaste; la que una IA guardó sin fuentes lo dice, y ya no tumba lo que tú confirmaste. Resumir la memoria ya no se le encarga a una IA sin sesión. Lo que la memoria del proyecto manda a Gemini aparece en «Lo que se envía».
|
|
25
|
+
- **La IA de tu computadora, sin cortes.** En una computadora sin tarjeta de video, ordenar la memoria y el Coordinador ya no se cortan a los cinco minutos. Si la computadora ya está muy ocupada, ese trabajo de fondo espera unos minutos en vez de quitarte velocidad. Cuando Ollama falla por la red, por el nombre del sitio o porque cortó la descarga, MADRE dice cuál fue; y @madre sin Ollama te dice cómo encenderlo. El examen de tu IA entrenada solo pregunta lo que no vio al entrenar, y el entrenamiento ya no termina en error.
|
|
26
|
+
- **Adjuntos y archivos.** Un PDF o una foto de la conversación se guardan en la carpeta del proyecto que elijas. Un texto demasiado largo para un mensaje se manda como adjunto en vez de rechazarse. Los nombres de los adjuntos conservan sus acentos. Deshacer borra también lo que una IA creó en carpetas que git ignora, y un `.env` que un turno cambia vuelve a como estaba.
|
|
27
|
+
- **Arreglos que pidió el diagnóstico.** Codex ya no ofrece modelos que tu cuenta rechaza. La llave de Claude se comprueba con Anthropic al guardarla, así que una llave mala se dice antes del primer mensaje. Codex no puede escribir en lugares que MADRE no logra identificar. «MADRE ya está abierta para este proyecto» se dice en tu idioma, y abrirla otra vez la abre en vez de fallar. Un repositorio que git se niega a leer ya no se toma por un proyecto sin git. Cerrar la ventana del copiloto mientras prepara su turno ya no lo hace fallar. La tarjeta de comandos muestra la orden real de `package.json`. «Detener todo» ya no llega al diagnóstico como una falla. Y seguir desplazando hacia abajo al final del chat, como hace la inercia de un trackpad, ya no escribe «fin del registro» ni marca tu siguiente mensaje.
|
|
8
28
|
|
|
9
29
|
## 1.1.2 · 2026-11-02
|
|
10
30
|
|
package/README.en.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
# All your AIs in one chat.
|
|
15
15
|
|
|
16
|
-
**MADRE is not another AI.** It is an app that runs on your computer and brings the AIs you already use (Codex, Claude Code, Gemini, Cursor and
|
|
16
|
+
**MADRE is not another AI.** It is an app that runs on your computer and brings the AIs you already use (Codex, Claude Code, Gemini, Cursor, OpenCode and Grok) into one chat, inside your project. You write to them in your own words, each one reads what the others said, and you decide what they may change. What gets decided is kept.
|
|
17
17
|
|
|
18
18
|
<p align="center">
|
|
19
19
|
<img src="https://raw.githubusercontent.com/jossuealcacao-exe/madre/main/public/assets/news/1.1/en/chats.webp" alt="A project in MADRE 1.1: chats on the left and OpenCode checking a shop's cart" width="100%">
|
|
@@ -44,7 +44,7 @@ You need Node 22.5 or newer and at least one AI you are signed in to. There is n
|
|
|
44
44
|
</tr>
|
|
45
45
|
</table>
|
|
46
46
|
|
|
47
|
-
Also: chats to one side like in chat apps, Windows through WSL2, and project maps that grow with what they know. The details are in the [CHANGELOG](CHANGELOG.en.md).
|
|
47
|
+
Also: skills, to teach MADRE once how you work so all your AIs follow it; Grok among your AIs; chats to one side like in chat apps, Windows through WSL2, and project maps that grow with what they know. The details are in the [CHANGELOG](CHANGELOG.en.md).
|
|
48
48
|
|
|
49
49
|
## If something fails
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ Open **Diagnostics** and type what you see, like "Gemini does not answer". It te
|
|
|
54
54
|
|
|
55
55
|
- **It runs on your computer.** MADRE has no account and no cloud: it opens on `127.0.0.1`.
|
|
56
56
|
- **Your keys are not copied.** Each AI keeps its own sign-in.
|
|
57
|
-
- **You know what leaves.** What an AI reads goes to its provider, with your account, just as in your Terminal.
|
|
57
|
+
- **You know what leaves.** What an AI reads goes to its provider, with your account, just as in your Terminal. Three things go to madre.run, never what you write or your projects: a daily notice that the copy is still in use (a random identifier, the version, the system and Node), which is always on; anonymous diagnostics (what failed, how much it is used and, every five minutes, that the copy is open), which you turn off in Settings; and the automatic report of an error MADRE does not know (what failed and where in MADRE), which comes on with the diagnostics and has its own switch. Every send is written down on your computer, in «What is sent». The details are in [what leaves the machine](docs/en/REFERENCE.md#what-leaves-the-machine).
|
|
58
58
|
|
|
59
59
|
## License
|
|
60
60
|
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
# Todas tus IAs en un mismo chat.
|
|
15
15
|
|
|
16
|
-
**MADRE no es otra IA.** Es una app que corre en tu computadora y junta a las IAs que ya usas (Codex, Claude Code, Gemini, Cursor y
|
|
16
|
+
**MADRE no es otra IA.** Es una app que corre en tu computadora y junta a las IAs que ya usas (Codex, Claude Code, Gemini, Cursor, OpenCode y Grok) en un solo chat, dentro de tu proyecto. Les escribes con tus palabras, cada una lee lo que dijeron las otras y tú decides qué pueden cambiar. Lo que se decide queda guardado.
|
|
17
17
|
|
|
18
18
|
<p align="center">
|
|
19
19
|
<img src="https://raw.githubusercontent.com/jossuealcacao-exe/madre/main/public/assets/news/1.1/es/chats.webp" alt="Un proyecto en MADRE 1.1: los chats a la izquierda y OpenCode revisando el carrito de una tienda" width="100%">
|
|
@@ -44,7 +44,7 @@ Necesitas Node 22.5 o más nuevo y al menos una IA con sesión. No hay cuenta qu
|
|
|
44
44
|
</tr>
|
|
45
45
|
</table>
|
|
46
46
|
|
|
47
|
-
También: chats a un lado como en las apps de chat, Windows con WSL2 y mapas de proyectos que crecen con lo que saben. El detalle está en el [CHANGELOG](CHANGELOG.md).
|
|
47
|
+
También: habilidades, para enseñarle una vez a MADRE cómo trabajas y que todas tus IAs lo sigan; Grok entre tus IAs; chats a un lado como en las apps de chat, Windows con WSL2 y mapas de proyectos que crecen con lo que saben. El detalle está en el [CHANGELOG](CHANGELOG.md).
|
|
48
48
|
|
|
49
49
|
## Si algo falla
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ Abre **Diagnóstico** y escribe lo que ves, como «Gemini no contesta». Te dice
|
|
|
54
54
|
|
|
55
55
|
- **Corre en tu computadora.** MADRE no tiene cuenta ni nube: abre en `127.0.0.1`.
|
|
56
56
|
- **Tus llaves no se copian.** Cada IA guarda su propia sesión.
|
|
57
|
-
- **Sabes qué sale.** Lo que lee una IA va a su proveedor, con tu cuenta, igual que en tu Terminal.
|
|
57
|
+
- **Sabes qué sale.** Lo que lee una IA va a su proveedor, con tu cuenta, igual que en tu Terminal. A madre.run van tres cosas, nunca lo que escribes ni tus proyectos: un aviso diario de que la copia sigue en uso (un identificador al azar, la versión, el sistema y Node), que siempre está encendido; un diagnóstico anónimo (qué falló, cuánto se usa y, cada cinco minutos, que la copia está abierta), que apagas en Ajustes; y el reporte automático de un error que MADRE no conoce (qué falló y en qué parte de MADRE), que viene encendido con el diagnóstico y tiene su propio interruptor. Cada envío queda anotado en tu computadora, en «Lo que se envía». El detalle está en [lo que sale de la máquina](docs/REFERENCE.md#lo-que-sale-de-la-máquina).
|
|
58
58
|
|
|
59
59
|
## Licencia
|
|
60
60
|
|
package/SECURITY.md
CHANGED
|
@@ -4,19 +4,24 @@ MADRE runs on your machine, talks to no cloud of its own and stores no credentia
|
|
|
4
4
|
|
|
5
5
|
## Reporting
|
|
6
6
|
|
|
7
|
-
If you find a way for an agent to write outside its lease, to keep
|
|
7
|
+
If you find a way for an agent to write outside its lease, to keep EDIT it should not have, to reach the memory of a room it is not in, or to make MADRE send anything you did not allow, tell the author privately first:
|
|
8
8
|
|
|
9
9
|
- GitHub: open a **private security advisory** at https://github.com/jossuealcacao-exe/madre/security/advisories/new
|
|
10
|
-
- Or
|
|
10
|
+
- Or use the private form at https://madre.run/report and choose «Something else»
|
|
11
11
|
|
|
12
|
-
Please include the MADRE version (`madre doctor --json`), the platform, which agent and mode were involved, and the smallest sequence of messages that reproduces it. A fix ships as a patch release and the advisory is published once it is out. Reports that are about a CLI's own behaviour (Codex, Claude Code, Gemini CLI, OpenCode) are forwarded to that project.
|
|
12
|
+
Please include the MADRE version (`madre doctor --json`), the platform, which agent and mode were involved, and the smallest sequence of messages that reproduces it. A fix ships as a patch release and the advisory is published once it is out. Reports that are about a CLI's own behaviour (Codex, Claude Code, Gemini CLI, OpenCode, Cursor) are forwarded to that project.
|
|
13
13
|
|
|
14
14
|
## Known, accepted for the beta
|
|
15
15
|
|
|
16
|
-
- In `#3
|
|
17
|
-
-
|
|
16
|
+
- In `#3 EDIT`, `.env` files, `.pulse/`, `.madre/` and `.claude/settings.local.json` are made read-only for the length of the turn and restored from the checkpoint afterwards; `.git/` stays writable because the CLIs need it and is only restored after the turn. A `.env` that git ignores is not in the checkpoint: MADRE keeps its own copy of it for the turn and puts it back if the turn changed it, deleted it or swapped it for a link. An agent that changes permissions on purpose is caught by that restoration, not prevented.
|
|
17
|
+
- **Files changed where git does not look are outside the restore point.** In a folder your `.gitignore` excludes, `UNDO` removes the files the turn created there (not in heavy folders such as `node_modules`, `dist` or `.venv`), and only while each is as the turn left it; when those folders hold more files than MADRE photographs before a turn (5,000), it cannot tell new from old and `UNDO` leaves them all. A file someone else creates there while the turn runs is taken as the turn's. A file that was already there and was changed, other than `.env`, is not in the checkpoint and `UNDO` cannot bring its old content back; the turn's card lists both kinds so you know. Keep anything you could not lose (records, data) under version control or backed up.
|
|
18
|
+
- **`#3` and `#4` are unlocked from MADRE's own page.** `#3` takes one confirmation and `#4` two, or your own phrase (once for `#3`, twice for `#4`) if you set one in Settings › Permissions; the phrase is never stored, only its salted SHA-256. The key is checked by the project itself, not by the browser. The agent's max mode in Settings › Permissions must already reach the mode, which is a separate deliberate act; no agent can raise its own ceiling, and a permission an agent writes into its own answer is not a permission.
|
|
19
|
+
- `#4 FULL ACCESS` runs commands with the CLIs and sessions already on the machine: tests, builds, `git push`, deploys. Files come back with `UNDO`; **what leaves the machine does not**. Treat `#4` as handing that agent your shell.
|
|
20
|
+
- **COPILOT** (turned on with the `#3` key, for up to 24 hours) lets the agent you write to edit the project without asking each time. The only commands it runs by itself are ones that read (files and git); tests, builds, commits and everything else wait for your button. What it deletes is put back after the turn, and anything that leaves the machine is still `#4` with its own key. After 8 rounds in a row of running and asking again it stops and asks you; STOP ALL or a restart ends it.
|
|
18
21
|
- **Runs** (a module, off until you switch it on) lets an agent below `#4` ask you to run a command. Nothing runs until you press its button, and the server runs the line it recorded the agent asking for, never one sent by the page. Each line runs alone from the project root with no shell, so the line you read is the argv that runs; lines that would need a shell (`|`, `&&`, redirections, variables, globs) are shown and refused. A checkpoint is taken first and `UNDO` restores files; what the command sends off the machine does not come back. Read a command before you press it as you would before pasting it into a terminal.
|
|
22
|
+
- **Modules you install run in separate Node processes with limited permissions.** The ordinary file and process APIs can read the module file and MADRE's SDK, but cannot directly write files or start another process. Calls to MADRE's settings, room and credential vault pass through a narrow bridge. A one-file MCP server gets the same limits, with write access to the turn's scratch folder when the turn allows it. When Node offers `--allow-net`, MADRE grants network access only to modules that declare a destination; on older Node versions, the permission model does not restrict network access. A declaration does not limit which host the module can contact. **[Node's permission model is not a security boundary against malicious code](https://nodejs.org/api/permissions.html#permissions).** Review the code and destinations before installing it. Installing one by hand (a file, an upload, or confirming a refresh) asks for the `#4` key from MADRE's page; the Market's catalog is signed.
|
|
19
23
|
- **Windows (from 1.1.0) is supported inside WSL2 only**, where MADRE works as on any Linux. Keep your projects inside Linux (`~/…`), not in `/mnt/c`: on the Windows drive the write bit MADRE uses to keep `#1`–`#3` read-only does not hold the same way. Started on Windows itself, MADRE explains how to get to WSL2 and stops.
|
|
20
|
-
-
|
|
24
|
+
- **The local API asks for a ficha** (from 1.1.3). Every request carries a random secret kept in `~/.pulse/credentials/ficha.json`, readable only by your user: the browser gets it once in the address MADRE opens and keeps it in an `HttpOnly`, `SameSite=Strict` cookie, and MADRE's own processes send it in the `x-madre-ficha` header. The address with the ficha is never written to MADRE's start, restart or update logs in a way another user can read: those files are only yours. Without the ficha MADRE says only that it is MADRE and its version. It keeps out programs that cannot read that file: other users of the computer, and anything that only reaches the port. It does not keep out a program running as you, which can read the file as it reads everything else of yours, and the browser sends the cookie to every port of `127.0.0.1` it opens.
|
|
25
|
+
- Everything said outside `#0 INCOGNITO` is kept in the room's memory and reaches every agent of that room. Use INCOGNITO for what must not be remembered.
|
|
21
26
|
|
|
22
27
|
NOBODY DELETES MOTHER'S MEMORY. EVERYTHING ELSE IS FAIR GAME.
|
package/bin/madre.mjs
CHANGED
|
@@ -13,8 +13,9 @@ import { probeAll } from '../src/auth-probe.mjs';
|
|
|
13
13
|
import { applyConfigToEnv, loadConfig } from '../src/config.mjs';
|
|
14
14
|
import { isOnline, runSetup } from '../src/setup.mjs';
|
|
15
15
|
import { parseArgs } from '../src/cli-args.mjs';
|
|
16
|
-
import { ensureSalasProject, isSalasRoom, projectRootFor } from '../src/salas.mjs';
|
|
16
|
+
import { choosePort, ensureSalasProject, isSalasRoom, keptPorts, projectRootFor } from '../src/salas.mjs';
|
|
17
17
|
import { forgetNpxLaunch } from '../src/npm-launch.mjs';
|
|
18
|
+
import { fichaHeaders, readFicha, withFicha } from '../src/ficha.mjs';
|
|
18
19
|
import { createServer } from 'node:net';
|
|
19
20
|
|
|
20
21
|
// Before anything is run: what npx left about the call that started MADRE is not passed on to the
|
|
@@ -61,13 +62,25 @@ Prefer the terminal? Inside Ubuntu (WSL2):
|
|
|
61
62
|
}
|
|
62
63
|
const option = (name, fallback) => cli.option(name.replace(/^--/, ''), fallback);
|
|
63
64
|
|
|
65
|
+
// A MADRE already open for this project: its address with the ficha, said in the language MADRE
|
|
66
|
+
// speaks (Q-1; Home reads the address after it in either, src/server.mjs ALREADY_OPEN), and its page
|
|
67
|
+
// opened unless --no-open.
|
|
68
|
+
async function showOpen(url, { openBrowser = true, openPath = '' } = {}) {
|
|
69
|
+
const address = withFicha(`${url}${openPath}`, await readFicha(salasHome));
|
|
70
|
+
console.log(`\n${t('MADRE is already open for this project')}\n\n ${address}\n ${t('Project:')} ${projectRoot}\n ${t('Close that room first if you want a fresh one.')}\n`);
|
|
71
|
+
if (openBrowser) await openUrl(address);
|
|
72
|
+
}
|
|
73
|
+
|
|
64
74
|
// Is a MADRE already serving this very project nearby? `start` walks ports, so look along the
|
|
65
75
|
// same short stretch and compare the project each one reports.
|
|
66
76
|
async function roomAlreadyOpen(port, projectRoot, span = 8) {
|
|
67
77
|
const mine = await realpath(projectRoot).catch(() => resolve(projectRoot));
|
|
68
78
|
for (let candidate = port; candidate < port + span; candidate += 1) {
|
|
69
79
|
try {
|
|
70
|
-
|
|
80
|
+
// With the ficha (src/ficha.mjs): without it a MADRE says only that it is one, not which project.
|
|
81
|
+
// Two seconds (Q-3): a Linux that is just starting (WSL after Windows boots) took longer than
|
|
82
|
+
// the half second this had, and the CLI walked past the MADRE that was already open.
|
|
83
|
+
const response = await fetch(`http://127.0.0.1:${candidate}/api/version`, { headers: await fichaHeaders(), signal: AbortSignal.timeout(2000) });
|
|
71
84
|
if (!response.ok) continue;
|
|
72
85
|
const info = await response.json();
|
|
73
86
|
const theirs = info?.project ? await realpath(info.project).catch(() => info.project) : null;
|
|
@@ -93,11 +106,13 @@ const HELP_TEXT = `MADRE
|
|
|
93
106
|
Opens Home: every project on this computer, in one place.
|
|
94
107
|
madre start [--project PATH] [--port 4317] [--no-open] [--setup]
|
|
95
108
|
Opens the project in this folder (or PATH) directly.
|
|
96
|
-
Without --port,
|
|
109
|
+
Without --port, the project opens on the port it kept, or the next free one.
|
|
97
110
|
madre lobby [--port 4317] [--no-open] (also: madre salas; opens Home)
|
|
98
111
|
madre setup [--project PATH] [--port 4317] [--no-open]
|
|
99
112
|
madre doctor [--project PATH] [--json]
|
|
100
113
|
madre check-module --file <module.mjs> [--entry <entrada.json>] [--json] [--lang es]
|
|
114
|
+
madre check-skill --folder <habilidades/id> [--json] [--lang es]
|
|
115
|
+
madre servicio [activar|quitar|estado] (Linux)
|
|
101
116
|
|
|
102
117
|
(none) Opens Home. From there you add projects, connect the agents
|
|
103
118
|
and enter any project. The Coordinator lives there.
|
|
@@ -105,6 +120,8 @@ const HELP_TEXT = `MADRE
|
|
|
105
120
|
setup Detects the agents on this computer, shows who has a session,
|
|
106
121
|
and runs each agent's own sign-in from here.
|
|
107
122
|
doctor Prints the same diagnosis without the wizard.
|
|
123
|
+
servicio Home starts with this Linux and comes back if it falls,
|
|
124
|
+
with the projects that were open.
|
|
108
125
|
`;
|
|
109
126
|
|
|
110
127
|
// Where a room without --port starts looking (QA 1.1.0, GEN-02): 4317, or PULSE_PORT_BASE for the
|
|
@@ -128,19 +145,34 @@ async function openRoom(options) {
|
|
|
128
145
|
console.error(`\n MADRE › port ${port} is already in use. Another MADRE may be open there; try --port ${port + 1} or omit --port to pick one automatically.\n`);
|
|
129
146
|
process.exit(2);
|
|
130
147
|
}
|
|
148
|
+
// Without --port, a project asks for the port it kept, and one with none skips the ports other
|
|
149
|
+
// projects keep (src/salas.mjs, L-6): a project's number no longer depends on what opened first.
|
|
150
|
+
let others = new Set();
|
|
151
|
+
if (!explicit) {
|
|
152
|
+
const kept = await keptPorts(salasHome, await realpath(projectRoot).catch(() => resolve(projectRoot)));
|
|
153
|
+
others = kept.others;
|
|
154
|
+
port = await choosePort({ base: port, mine: kept.mine, others, taken: portTaken });
|
|
155
|
+
}
|
|
131
156
|
for (let attempt = 0; attempt < 20; attempt += 1) {
|
|
132
157
|
try {
|
|
133
158
|
return await startPulse({ ...options, port });
|
|
134
159
|
} catch (error) {
|
|
135
|
-
// The room itself says it is taken, whatever port this attempt used.
|
|
136
|
-
|
|
160
|
+
// The room itself says it is taken, whatever port this attempt used. Where it says it is open,
|
|
161
|
+
// that page is shown, as a MADRE found before starting is (Q-3: the Windows shortcut opened a
|
|
162
|
+
// second time, in a Linux slow to answer the look below, left the person with nothing).
|
|
163
|
+
if (error.code === 'ROOM_IN_USE') {
|
|
164
|
+
if (Number.isInteger(error.port)) { await showOpen(`http://127.0.0.1:${error.port}`, options); process.exit(0); }
|
|
165
|
+
console.error(`\n MADRE › ${error.message}\n`);
|
|
166
|
+
process.exit(2);
|
|
167
|
+
}
|
|
137
168
|
if (error.code !== 'EADDRINUSE') throw error;
|
|
138
169
|
if (explicit) {
|
|
139
170
|
console.error(`\n MADRE › port ${port} is already in use. Another MADRE may be open there; try --port ${port + 1} or omit --port to pick one automatically.\n`);
|
|
140
171
|
process.exit(2);
|
|
141
172
|
}
|
|
142
|
-
|
|
143
|
-
port += 1;
|
|
173
|
+
const busy = port;
|
|
174
|
+
do port += 1; while (others.has(port));
|
|
175
|
+
console.error(` MADRE › port ${busy} in use, trying ${port}.`);
|
|
144
176
|
}
|
|
145
177
|
}
|
|
146
178
|
console.error(`\n MADRE › no free port between ${options.port} and ${port}. Pass --port explicitly.\n`);
|
|
@@ -171,7 +203,7 @@ if (has('--version') || has('-v') || command === 'version') {
|
|
|
171
203
|
}
|
|
172
204
|
// A command that only reads leaves nothing behind (QA 1.1.0, NUE-37): after uninstalling, `madre
|
|
173
205
|
// doctor` made ~/.pulse again, with Home's folder and the update cache in it.
|
|
174
|
-
const onlyReads = command === 'doctor' || command === 'check-module';
|
|
206
|
+
const onlyReads = command === 'doctor' || command === 'check-module' || command === 'check-skill';
|
|
175
207
|
if (command !== 'help' && !(onlyReads && isSalasRoom(projectRoot, salasHome))) {
|
|
176
208
|
// The notebook of Salas is MADRE's own folder: made here, empty, the first time it is opened
|
|
177
209
|
// (D-S08). If it cannot be made, the check below says so, as for any folder that is not there.
|
|
@@ -225,7 +257,7 @@ if (command === 'doctor' && (has('--catalog') || has('--conditions'))) {
|
|
|
225
257
|
const result = await exportDataset({ events: await store.readAll(), notes: memory ? memory.memories({ limit: 5000 }) : [], dir: join(roomDir, 'dataset'), project: basename(canonical), home: homedir() });
|
|
226
258
|
memory?.close();
|
|
227
259
|
if (has('--json')) console.log(JSON.stringify(result, null, 2));
|
|
228
|
-
else console.log(`\nMADRE dataset · ${result.project}\n\n pairs ${result.pairs} (${result.turns} turns · ${result.notes} notes)\n train ${result.train}\n valid ${result.valid}\n by agent ${Object.entries(result.byAgent).map(([id, n]) => `@${id} ${n}`).join(' · ') || '-'}\n folder ${result.dir}\n\n Train it: docs/training/README.md (mlx-lm on Apple Silicon), then \`ollama create madre-${result.project.toLowerCase().replace(/[^a-z0-9]+/g, '-')}\` and @madre picks it up.\n`);
|
|
260
|
+
else console.log(`\nMADRE dataset · ${result.project}\n\n pairs ${result.pairs} (${result.turns} turns · ${result.notes} notes)\n train ${result.train}\n valid ${result.valid}\n test ${result.test}\n by agent ${Object.entries(result.byAgent).map(([id, n]) => `@${id} ${n}`).join(' · ') || '-'}\n folder ${result.dir}\n\n Train it: docs/training/README.md (mlx-lm on Apple Silicon), then \`ollama create madre-${result.project.toLowerCase().replace(/[^a-z0-9]+/g, '-')}\` and @madre picks it up.\n`);
|
|
229
261
|
process.exitCode = 0;
|
|
230
262
|
} else if (command === 'doctor') {
|
|
231
263
|
const agents = await detectAgents();
|
|
@@ -287,8 +319,7 @@ if (command === 'doctor' && (has('--catalog') || has('--conditions'))) {
|
|
|
287
319
|
// A room for this project may already be open. Show that one instead of starting a second.
|
|
288
320
|
const running = await roomAlreadyOpen(port, projectRoot);
|
|
289
321
|
if (running) {
|
|
290
|
-
|
|
291
|
-
if (!noOpen) await openUrl(`${running.url}${openPath}`);
|
|
322
|
+
await showOpen(running.url, { openBrowser: !noOpen, openPath });
|
|
292
323
|
process.exit(0);
|
|
293
324
|
}
|
|
294
325
|
await openRoom({ port, projectRoot, openBrowser: !noOpen, openPath });
|
|
@@ -309,6 +340,38 @@ if (command === 'doctor' && (has('--catalog') || has('--conditions'))) {
|
|
|
309
340
|
if (has('--json')) console.log(JSON.stringify({ ...result, markdown: undefined }, null, 2));
|
|
310
341
|
else console.log(result.markdown);
|
|
311
342
|
process.exitCode = result.ok ? 0 : 1;
|
|
343
|
+
} else if (command === 'check-skill') {
|
|
344
|
+
// The same check for a skill (src/skill-check.mjs): what the madre-mercado repository's CI runs on
|
|
345
|
+
// every pull request that adds habilidades/<id>/, and what anyone can run before sending one.
|
|
346
|
+
const folder = option('--folder', null) ?? option('--dir', null);
|
|
347
|
+
if (!folder) { console.error('Usage: madre check-skill --folder <habilidades/id> [--json] [--lang es]'); process.exit(2); }
|
|
348
|
+
(await import('../src/i18n.mjs')).setLanguage(option('--lang', 'en'));
|
|
349
|
+
const { checkSkillFolder } = await import('../src/skill-check.mjs');
|
|
350
|
+
const result = await checkSkillFolder(folder);
|
|
351
|
+
if (has('--json')) console.log(JSON.stringify({ ...result, markdown: undefined }, null, 2));
|
|
352
|
+
else console.log(result.markdown);
|
|
353
|
+
process.exitCode = result.ok ? 0 : 1;
|
|
354
|
+
} else if (command === 'servicio' || command === 'service') {
|
|
355
|
+
// MADRE as a service of this Linux (src/service.mjs, L-3): the same switch as Home › Settings.
|
|
356
|
+
const { disableService, enableService, launcherScript, serviceState } = await import('../src/service.mjs');
|
|
357
|
+
const { detectInstall } = await import('../src/updates.mjs');
|
|
358
|
+
const pkg = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8'));
|
|
359
|
+
const action = process.argv.slice(3).find((word) => !word.startsWith('-')) ?? 'estado';
|
|
360
|
+
const launcher = launcherScript({ install: detectInstall({ projectRoot: process.cwd() }), name: pkg.name, version: pkg.version, port: Number(option('--port', DEFAULT_PORT)) });
|
|
361
|
+
const state = ['activar', 'on', 'enable'].includes(action) ? await enableService({ stateRoot: salasHome, launcher })
|
|
362
|
+
: ['quitar', 'off', 'disable'].includes(action) ? await disableService({ stateRoot: salasHome })
|
|
363
|
+
: ['estado', 'status'].includes(action) ? await serviceState()
|
|
364
|
+
: null;
|
|
365
|
+
if (!state) { console.error(t('Usage: madre servicio [activar|quitar|estado]')); process.exit(2); }
|
|
366
|
+
if (!state.supported) console.log(`\n ${state.why === 'linux' ? t('MADRE starts with the computer only on Linux, as a systemd service.') : t('This Linux has no systemd for your user, so MADRE cannot start with it.')}\n`);
|
|
367
|
+
else if (state.refused === 'install') console.log(`\n ${t('This copy of MADRE was installed inside a project; install it with npx or npm -g to start it with the computer.')}\n`);
|
|
368
|
+
else if (state.refused) console.log(`\n ${t('systemd did not turn the service on: {detail}', { detail: state.detail ?? '' })}\n`);
|
|
369
|
+
else {
|
|
370
|
+
console.log(`\n ${state.enabled ? t('On: Home starts when this computer does, and again if it falls, with the projects that were open.') : t('Off: MADRE starts only when you open it.')}`);
|
|
371
|
+
if (state.enabled && !state.linger) console.log(` ${t('For it to start before anyone signs in, run this once: {command}', { command: state.lingerCommand })}`);
|
|
372
|
+
console.log('');
|
|
373
|
+
}
|
|
374
|
+
process.exitCode = state.supported && !state.refused ? 0 : 1;
|
|
312
375
|
} else if (command === 'help') {
|
|
313
376
|
console.log(t(HELP_TEXT));
|
|
314
377
|
} else {
|
package/docs/REFERENCE.md
CHANGED
|
@@ -14,7 +14,7 @@ Todo lo que MADRE hace, con los números exactos. Para empezar en cinco minutos,
|
|
|
14
14
|
Necesitas Node 22.5 o superior y al menos una de estas CLIs con sesión iniciada: **Codex**, **Claude Code**, **Gemini CLI**, **OpenCode**. Si además corre **Ollama** con un modelo de chat, el proyecto tiene un quinto agente local.
|
|
15
15
|
|
|
16
16
|
1. Corre `npx @jossuealcala/madre` desde cualquier carpeta: abre Inicio, con todos tus proyectos y el Coordinador arriba. La primera vez lo acompaña un asistente de tres pasos: conectar los agentes (cada uno con su botón para instalarlo y firmarlo, ahí mismo; una vez para todos los proyectos), agregar los proyectos (eliges carpetas dentro de tu carpeta de usuario; agregar no abre) y abrir los que vas a usar. `npx @jossuealcala/madre start` dentro de una carpeta sigue abriendo ese proyecto directo; si no hay agentes, el proyecto abre igual en Conecta tus agentes para instalarlos y firmarlos.
|
|
17
|
-
2. El proyecto abre en `http://127.0.0.1:4317`. Elige un agente en el selector o escribe `@claude …`. El chip junto a `to @agente` dice en qué modo sale el mensaje; `#1 SOLO CONVERSAR`, solo lectura, es el predeterminado.
|
|
17
|
+
2. El proyecto abre en `http://127.0.0.1:4317`. MADRE abre el navegador con su ficha en la dirección (`?ficha=…`): el navegador la guarda y la dirección queda limpia. Elige un agente en el selector o escribe `@claude …`. El chip junto a `to @agente` dice en qué modo sale el mensaje; `#1 SOLO CONVERSAR`, solo lectura, es el predeterminado.
|
|
18
18
|
3. Para sumar o reconectar una IA más tarde: Ajustes → Agentes (el botón de ajustes de la barra, o ⌘, / Ctrl+,), donde los agentes viven junto al resto de los ajustes. Codex, Claude Code, Gemini (con tu cuenta de Google) y OpenCode (con GitHub Copilot) se firman con un clic; Gemini y OpenCode también aceptan su llave ahí mismo. Debajo de cada agente, «¿Prefieres tu terminal?» despliega el mismo paso escrito como comando, para quien prefiera hacerlo a mano. MADRE no guarda credenciales de proveedores: cada sesión y cada llave van al archivo de su propio CLI.
|
|
19
19
|
4. Con Ollama, el módulo IA local (Módulos, en la barra) ya está encendido: la memoria se embebe localmente y `@madre` aparece en la fila.
|
|
20
20
|
5. Ajustes → Memoria decide quién destila la memoria y cada cuánto. El Mapa de memoria, desde la cabecera de Diagnóstico, muestra lo que el proyecto recuerda.
|
|
@@ -25,7 +25,7 @@ npx @jossuealcala/madre setup # el mismo alta, desde la terminal, si la pr
|
|
|
25
25
|
npx @jossuealcala/madre start --no-open --project RUTA
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
**En un servidor, sin pantalla.** MADRE escucha solo en `127.0.0.1` de la máquina donde corre, y es a propósito:
|
|
28
|
+
**En un servidor, sin pantalla.** MADRE escucha solo en `127.0.0.1` de la máquina donde corre, y es a propósito: quien llegara a ella podría poner a trabajar a los agentes ahí. No abras sus puertos a la red. Para usarla en un servidor, ábrela por un túnel SSH desde tu computadora. Inicio usa el 4317 y cada proyecto que abras toma el siguiente puerto libre (4318, 4319…), así que el túnel lleva varios; si abres más proyectos, agrega más `-L`.
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
31
|
# en tu computadora: entra al servidor con el túnel
|
|
@@ -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
|
-
Luego abre
|
|
37
|
+
Luego abre en el navegador de tu computadora la dirección que MADRE escribió en la terminal del servidor, la que termina en `?ficha=…`. Los agentes se instalan en el servidor y se conectan desde Ajustes › Agentes: Claude te da un enlace y un código que pegas ahí mismo, y Gemini y OpenCode aceptan su llave. Usa tu usuario y no root: los agentes trabajan con los permisos de quien corre MADRE.
|
|
38
|
+
|
|
39
|
+
**La ficha.** Cada petición a MADRE lleva su ficha: un secreto al azar en `~/.pulse/credentials/ficha.json`, que solo tu usuario puede leer. El navegador la recibe una vez, en la dirección que MADRE abre, y la guarda en una cookie; los procesos de MADRE la mandan en la cabecera `x-madre-ficha`. Sin ella, MADRE solo dice que es MADRE y su versión: no deja leer tus proyectos, ni instalar módulos, ni abrir #4. Inicio hace una nueva cada vez que arranca y abre el navegador; un reinicio sin navegador (una actualización, un proyecto que abre Inicio) conserva la de antes. Una pestaña sin ficha te dice desde dónde abrir MADRE. Lo que no frena: un programa que corre con tu usuario puede leer el archivo, como lee todo lo tuyo, y la cookie también viaja a otros puertos de `127.0.0.1` que abras en el mismo navegador.
|
|
38
40
|
|
|
39
41
|
**Tres nombres.** **MADRE** es el producto. **Diagnóstico** es su voz operativa: fallas, conexiones, ajustes. **Historial** es el canal sobre el que corre el proyecto: el registro de eventos, el bloque del plan, la carpeta `.pulse/` donde caen los artefactos; esos identificadores conservan su nombre de antes, PULSE.
|
|
40
42
|
|
|
@@ -129,7 +131,7 @@ Desde 1.1.0, de **#1 a #3**, Claude, OpenCode y Codex pueden repartir su trabajo
|
|
|
129
131
|
| **Claude** | Herramienta `Agent`: el subagente hereda las mismas herramientas y reglas (`--tools`, `--allowedTools`, `dontAsk`) | Sin `Agent` |
|
|
130
132
|
| **OpenCode** | Solo `explore` y `general`, cada uno con los permisos del turno y sin poder llamar a otro (los de fábrica de OpenCode escriben y corren comandos) | `task` negado |
|
|
131
133
|
| **Codex** | Sus subagentes quedan dentro de la misma caja de arena | Límite de un hilo: `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
|
Probado con las IAs reales (Claude 2.1.267, OpenCode 1.18.4, Codex 0.161): en #1 el subagente lee y no escribe; en #3 escribe en el proyecto, `.pulse/` lo rechaza y no hay comandos; en #4 Codex responde «agent thread limit reached».
|
|
135
137
|
|
|
@@ -153,7 +155,7 @@ MADRE ejecuta los pasos como turnos normales: cada uno queda en el ledger, pasa
|
|
|
153
155
|
|
|
154
156
|
**TURNOS.** En Diagnóstico, junto al centinela. Encendido por defecto: una conversación que sigue trabajando cuando abres otra no se detiene, sigue escribiendo su registro y el panel de conversaciones la marca hasta que termina. Dos límites: conversaciones trabajando a la vez (2) y turnos a la vez en cada una (3); un mensaje que los pasaría se rechaza con el motivo antes de empezar. Todas las conversaciones comparten un solo titular de EDITAR o ACCESO TOTAL. Apagado, una sola conversación maneja a los agentes y no se puede cambiar de una que está trabajando. `DETENER TODO` detiene todas.
|
|
155
157
|
|
|
156
|
-
**DETENER TODO.** El botón de la barra, `STOPALL` en la caja de Escribir o `curl -X POST http://127.0.0.1:4317/api/stop-all` detienen todos los planes y matan todos los procesos de agente. Diagnóstico avisa en rojo cuando el proyecto se escapa: tres agentes a la vez, un agente con dos turnos cruzados, un plan de más de cinco minutos.
|
|
158
|
+
**DETENER TODO.** El botón de la barra, `STOPALL` en la caja de Escribir o `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` detienen todos los planes y matan todos los procesos de agente. Diagnóstico avisa en rojo cuando el proyecto se escapa: tres agentes a la vez, un agente con dos turnos cruzados, un plan de más de cinco minutos.
|
|
157
159
|
|
|
158
160
|
---
|
|
159
161
|
|
|
@@ -199,7 +201,7 @@ Cambia a quién va y las palabras cambian; sube el modo y aparece el permiso que
|
|
|
199
201
|
|
|
200
202
|
**THE LAUNCH.** Debajo del documento, el comando exacto que MADRE correría para entregarlo: el ejecutable, el directorio, cada bandera y el lugar donde entra el briefing. No es una descripción — lo arman los mismos adaptadores que lo armarían de verdad. Debajo, lo que mantiene la corrida dentro del turno (la sesión que no persiste, el hogar temporal que se borra al terminar) y los servidores MCP que podría llamar, con sus herramientas contadas. **De ese comando nunca se imprime un valor de entorno, solo los nombres**: una línea de comandos es algo que la gente fotografía.
|
|
201
203
|
|
|
202
|
-
**Envíos.** El registro de
|
|
204
|
+
**Envíos.** El registro de llamadas `fetch` de MADRE y de sus módulos, incluidos los módulos aislados y sus servidores MCP de un solo archivo. No observa otros protocolos de Node ni las conexiones de las CLI de los agentes. Nunca guarda cuerpos, cabeceras ni valores de consulta: solo el destino y cuántas veces se llamó.
|
|
203
205
|
|
|
204
206
|
**La consola.** Dentro del núcleo, Diagnóstico contesta desde lo que el proyecto ya tiene. Tres respuestas que no entiende y la interfaz se cierra.
|
|
205
207
|
|
|
@@ -342,8 +344,10 @@ La carpeta de MADRE se borra entera solo si es suya sin duda: ruta absoluta, nun
|
|
|
342
344
|
## LO QUE SALE DE LA MÁQUINA
|
|
343
345
|
|
|
344
346
|
- **Sin nube ni cuenta.** MADRE no tiene cuenta ni backend que guarde lo tuyo. No guarda credenciales de proveedores.
|
|
345
|
-
- **Lo que un agente lee, viaja a su proveedor.** Codex a OpenAI, Claude Code a Anthropic, Gemini CLI a Google, OpenCode a quien tenga configurado. Si `OPENAI_BASE_URL
|
|
347
|
+
- **Lo que un agente lee, viaja a su proveedor.** Codex a OpenAI, Claude Code a Anthropic, Gemini CLI a Google, OpenCode a quien tenga configurado. Si `OPENAI_BASE_URL`, `ANTHROPIC_BASE_URL` o la configuración de usuario de Codex cambia ese destino, MADRE enseña solo el hostname y bloquea el turno antes de armar el briefing; un gateway verificado se autoriza por agente con `PULSE_ALLOW_CUSTOM_AGENT_ENDPOINTS`. Una ruta de Codex que MADRE no pueda identificar también se bloquea. Aplican la cuenta, los límites y los términos del destino efectivo. `@madre` y el archivista con Ollama no salen de la máquina.
|
|
348
|
+
- **Gemini sin su CLI.** Con solo una llave de Gemini (`GEMINI_API_KEY` o la que pegas en Ajustes › Agentes, que se guarda en `~/.gemini/.env`) y sin el CLI instalado, `@gemini` contesta por la API de Google: el propio proceso de MADRE envía el informe con tu llave en una cabecera, y la salida queda en el registro como «Google · Gemini, por su API». Así solo contesta (#1 como máximo): no lee el proyecto ni los adjuntos, y no escribe. Al instalar el CLI de Gemini, sus turnos vuelven al CLI. Antes de guardar una llave, MADRE le pregunta a Google si la acepta.
|
|
346
349
|
- **Un aviso diario de que sigue en uso, siempre encendido.** Una vez al día cada copia le dice a madre.run que está en uso: un identificador al azar que la copia creó para sí (`~/.pulse/install-id`), la versión de MADRE, el sistema y la versión mayor de Node. Nada más: ni nombre, ni correo, ni proyecto, ni rutas, ni agentes, ni nada de lo que se dice en un proyecto; madre.run no guarda la IP. Es la forma en que el autor sabe cuántas personas usan MADRE, qué versiones corren y si regresan. Sale por el mismo registro que todo lo demás, así que aparece en «Lo que se envía». Sin red, falla en silencio. (`src/heartbeat.mjs`)
|
|
350
|
+
- **Los avisos del autor.** Al abrir y a lo más cada 15 minutos, MADRE le pide a madre.run los avisos que su autor escribió para todas las copias (una versión con un arreglo de seguridad, un servicio que se detiene). No envía nada de ti: ni identificador ni versión; cada copia decide por su cuenta qué avisos son para ella. Cada aviso viene firmado con la llave del autor, y MADRE no muestra ninguno cuya firma no compruebe (`src/notices-key.mjs`), así que madre.run no puede inventar ni cambiar uno. No depende del diagnóstico. Los de información y los importantes se apagan en Ajustes › Versión › Avisos de MADRE; los de seguridad se muestran siempre. Si tienes el diagnóstico encendido, se cuenta que se vio un aviso, nunca quién lo vio. (`src/notices.mjs`)
|
|
347
351
|
- **Diagnóstico anónimo, encendido salvo que lo apagues.** Desde 2026-10-28, cada copia guarda en `~/.pulse/telemetry/` las fallas que encuentra (las que Diagnóstico conoce, con su código MU, y las que nadie ha catalogado; fallos del proceso, rutas que se rompen, errores de la página, instalaciones que no terminan) y cuántos turnos, modos y funciones se usaron. Una vez al día, y poco después de una falla nunca vista, lo manda a madre.run con los mismos cuatro datos del aviso diario, su arquitectura y si corre en WSL; después lo borra. Los mensajes van sin rutas (cada una sale como `<path>`), sin nombres de usuario, llaves ni correos, y de cada falla solo las líneas del código de MADRE por donde pasó. Nunca lo que escribes, tus proyectos ni tus archivos. Se apaga en Ajustes › Versión e informes › «Enviar diagnóstico anónimo» (y se borra lo que esperaba) o con `PULSE_TELEMETRY=0`; ahí mismo se ve el lote exacto que saldría. (`src/telemetry.mjs`, `public/page-errors.js`)
|
|
348
352
|
- **Cómo corre cada copia, su ciclo de vida y si está encendida ahora (desde 1.1.0, dentro del diagnóstico anónimo y con su mismo interruptor).**
|
|
349
353
|
- **Entorno**, como números y nombres de partes de MADRE:
|
|
@@ -405,6 +409,8 @@ La carpeta de MADRE se borra entera solo si es suya sin duda: ruta absoluta, nun
|
|
|
405
409
|
| `PULSE_DELEGATION` · `PULSE_MAX_PLAN_STEPS` | `1` · `4` | Planes |
|
|
406
410
|
| `PULSE_ESCALATION_MS` | `180000` | Cronómetro de la solicitud de permiso |
|
|
407
411
|
| `PULSE_OPENCODE_MODEL` | del config | `proveedor/modelo` para OpenCode |
|
|
412
|
+
| `PULSE_GROK_MODEL` | el de Grok | Modelo de Grok cuando no se elige uno (`grok models` los lista) |
|
|
413
|
+
| `PULSE_GROK_SANDBOX` | `read-only` | `off` quita `--sandbox` donde el aislamiento de Grok no arranca; `--tools` sigue limitándolo a leer |
|
|
408
414
|
| `PULSE_CLAUDE_USAGE` · `PULSE_OFFICIAL_QUOTA` | `0` · `1` | Cuota oficial de Claude (lee el llavero); `0` apaga todas las lecturas de proveedor |
|
|
409
415
|
| `PULSE_GEMINI_IDLE_MS` · `PULSE_GEMINI_RETRIES` · `PULSE_GEMINI_FALLBACK_MODEL` | `90000` · `1` · `gemini-3-flash-preview` (vacío: sin respaldo) | Gemini bajo carga |
|
|
410
416
|
|
package/docs/SDK.md
CHANGED
|
@@ -36,9 +36,9 @@ export default {
|
|
|
36
36
|
};
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
**Tu módulo no importa paquetes.** Ni a MADRE, ni al SDK, ni nada de npm. Antes de instalarlo, MADRE copia tu archivo a una carpeta temporal aparte y lo carga
|
|
39
|
+
**Tu módulo no importa paquetes.** Ni a MADRE, ni al SDK, ni nada de npm. Antes de instalarlo, MADRE copia tu archivo a una carpeta temporal aparte y lo carga en un proceso con permisos limitados; en esa carpeta no hay `node_modules`: un `import` por nombre de paquete no resuelve y la instalación falla. Ya instalado, cada llamada al módulo también corre en un proceso separado.
|
|
40
40
|
|
|
41
|
-
Los **builtins de Node
|
|
41
|
+
Los **builtins de Node se pueden importar**: `node:fs`, `node:url`, `node:tls`, `node:child_process`. El cerco limita lo que hacen: un módulo tuyo no puede leer archivos ajenos, escribir directamente ni abrir procesos. Para hablar con un servicio externo puede usar `fetch` o los protocolos de Node según las reglas de red de la versión de Node. No hay paquetes que instalar.
|
|
42
42
|
|
|
43
43
|
Si necesitas `defineModule` —para calcular algo antes de definir el módulo, por ejemplo— **MADRE te lo entrega**: exporta una función y lo recibes como argumento.
|
|
44
44
|
|
|
@@ -77,12 +77,12 @@ la suite compara esta tabla contra el código, así que si alguna vez se separan
|
|
|
77
77
|
| `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 …») |
|
|
78
78
|
| `icon` | El ícono de tu módulo: `{ svg, color }`. `svg` es el dibujo —sus formas (`<path d="…"/>`) o un `<svg>` entero, en la cuadrícula que quieras— y `color` el de su mosaico, `#rrggbb`. MADRE lo ajusta solo para que se vea como los suyos: lo centra y lo escala al mismo cuadro, lo pinta en blanco y de un solo color, usa el color de MADRE más parecido al tuyo y quita lo que no sea dibujo (scripts, imágenes, enlaces, estilos, degradados). Sin `icon`, tu módulo lleva la pieza de rompecabezas en gris. Hasta 8000 caracteres |
|
|
79
79
|
| `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 |
|
|
80
|
-
| `toolsForTurn(ctx, turn)` | Servidores MCP para el turno de un agente: `[{ name, command, args, env, tools, sends, brief }]`. MADRE
|
|
80
|
+
| `toolsForTurn(ctx, turn)` | Servidores MCP para el turno de un agente: `[{ name, command, args, env, tools, sends, brief }]`. Para un módulo tuyo, `command` debe ser Node y el primer argumento debe ser **el mismo archivo del módulo**; MADRE lo arranca con el mismo cerco de permisos. Un ejecutable diferente no se ofrece 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á |
|
|
81
81
|
| `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 |
|
|
82
82
|
| `reaches` | A dónde llega tu módulo, en las mismas cuatro respuestas que da MADRE de las suyas. Ver abajo |
|
|
83
83
|
| `secrets` | Las llaves que necesitas, declaradas en vez de dibujadas: `[{ name, label, note, where }]`. MADRE pinta el campo, la guarda en su bodega bajo tu id y te la devuelve por `ctx.vault`. Ver abajo |
|
|
84
84
|
| `routes` | Rutas HTTP propias: `{ method, path, handler(ctx, { payload, params, url, request, viaPhone }) }` → `{ status, body }`. `viaPhone` es `true` cuando la petición llega desde un teléfono emparejado: niégalo tú si tu ruta es de la Mac |
|
|
85
|
-
| `onEvent(ctx, event)` | Cada evento del ledger de cada conversación viva de la sala, mientras tu módulo está encendido. `ctx.room` y `ctx.chat` son los de esa conversación y `ctx.record` escribe en ella. Corre aparte: lo que tarde o falle no detiene a la sala. Como siempre, un módulo no fabrica mensajes ni turnos |
|
|
85
|
+
| `onEvent(ctx, event)` | Cada evento del ledger de cada conversación viva de la sala, mientras tu módulo está encendido. `ctx.room` y `ctx.chat` son los de esa conversación y `ctx.record` escribe en ella. Corre aparte: lo que tarde o falle no detiene a la sala. En un módulo que instala una persona, cada evento abre un proceso nuevo: lo que guardes en una variable no llega al siguiente (guárdalo con `ctx.updateConfig`), y también llegan los avisos de cuánto queda del plan de cada IA, aunque nadie escriba; mira `event.type` primero y termina pronto. Como siempre, un módulo no fabrica mensajes ni turnos |
|
|
86
86
|
| `controls` | Los ajustes de tu módulo, declarados en vez de dibujados: `[{ key, label, type: 'select' \| 'switch' \| 'text', options, choices, note, invert }]`. MADRE los pinta en la ficha y los guarda en tu bloque de `config.json`. En un `select`, `choices: [{ value, label }]` dice qué frase lee la persona por cada valor que se guarda (si lo das, `options` sale de ahí); sin él, la persona lee el valor tal cual |
|
|
87
87
|
| `onSettings(ctx, settings)` | Te avisa cuando la humana cambió uno de tus `controls`, por si algo vivo tiene que enterarse |
|
|
88
88
|
| `conditions` | Entradas para el catálogo de MU/TH/UR, con remedio por plataforma |
|
|
@@ -236,7 +236,7 @@ terminando, y mientras tanto solo se activa a propósito con `PULSE_LABS=correo`
|
|
|
236
236
|
|
|
237
237
|
La ficha de un módulo tuyo trae **GET A NEWER FILE**: MADRE va por el archivo —a la `url` que declaraste o al archivo desde el que lo instalaste—, lo verifica en una copia aparte y solo reemplaza al instalado si carga, respeta las reglas de la casa y dice una versión distinta. Verificar no instala nada.
|
|
238
238
|
|
|
239
|
-
Y en la cabecera de MODULES hay **+ ADD A MODULE** para instalar el `.mjs` de alguien más. Pasa por la misma puerta que todo lo demás.
|
|
239
|
+
Y en la cabecera de MODULES hay **+ ADD A MODULE** para instalar el `.mjs` de alguien más. Pasa por la misma puerta que todo lo demás. MADRE lo carga y ejecuta aparte: las API ordinarias pueden leer su archivo y el código del SDK, pero no escribir tus archivos ni abrir procesos. Si ofrece una herramienta MCP, también debe ser ese mismo archivo y corre con esos límites. Cuando Node ofrece `--allow-net`, solo un módulo que declara un destino recibe acceso a la red; en versiones anteriores, el modelo de permisos no restringe la red. La declaración no limita los dominios a los que puede llamar. **El modelo de permisos de Node no es una barrera de seguridad contra código malicioso.** Revisa el código y los destinos antes de instalarlo.
|
|
240
240
|
|
|
241
241
|
### En el Mercado, para todos
|
|
242
242
|
|
|
@@ -276,12 +276,12 @@ Un módulo que se instala en el proyecto en vez de encenderse conserva su tarjet
|
|
|
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;
|
|
279
|
+
env, agents, room, // env vacío para módulos tuyos; agentes detectados; sala mediada
|
|
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), // el idioma de la sala, 'es' o 'en', y tus palabras en él (sdk: 2):
|
|
283
283
|
// una frase en inglés que MADRE ya conoce, o la tuya en { es, en }
|
|
284
|
-
services: { history,
|
|
284
|
+
services: { history, ollama: { state, generate } }, // lo que el servidor ofrece a módulos tuyos;
|
|
285
285
|
// ollama.generate({ system, prompt, json }) contesta con el modelo local (sdk: 2)
|
|
286
286
|
vault: { get, held, keep, forget } // tus secretos, y solo los tuyos
|
|
287
287
|
}
|
|
@@ -329,7 +329,7 @@ Un módulo tuyo lleva la etiqueta «Tuyo» y se quita desde su ficha con «Quita
|
|
|
329
329
|
|
|
330
330
|
## Lo que un módulo no puede tocar
|
|
331
331
|
|
|
332
|
-
Un módulo corre
|
|
332
|
+
Un módulo tuyo corre en un proceso separado. El modelo de permisos de Node limita las API ordinarias a su archivo y el código del SDK, sin escritura directa ni apertura de otros procesos. Las funciones de `ctx` pasan por MADRE: la bodega solo entrega los secretos de ese módulo y `updateConfig` solo acepta su bloque de ajustes. Una herramienta MCP del módulo usa el mismo archivo y cerco; si el turno tiene carpeta de borrador, puede escribir allí. El modelo de Node no garantiza contener código malicioso: revisa el código y los destinos de red antes de instalarlo. MADRE protege su núcleo así:
|
|
333
333
|
|
|
334
334
|
- Sus rutas HTTP viven bajo `/api/x/<id>/`; un módulo con rutas fuera de ahí no carga, así ninguno puede suplantar `/api/state`, `/api/messages` o cualquier ruta propia de MADRE.
|
|
335
335
|
- No puede usar el `id` de un módulo integrado ni de otro ya cargado.
|