@jossuealcala/madre 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/CHANGELOG.en.md +40 -1
  2. package/CHANGELOG.md +40 -1
  3. package/README.en.md +3 -3
  4. package/README.md +3 -3
  5. package/SECURITY.md +11 -6
  6. package/TRADEMARKS.md +6 -2
  7. package/bin/madre.mjs +76 -11
  8. package/docs/REFERENCE.md +16 -10
  9. package/docs/SDK.md +36 -9
  10. package/docs/en/REFERENCE.md +12 -8
  11. package/docs/en/SDK.md +34 -8
  12. package/docs/en/training/README.md +1 -1
  13. package/docs/sdk/connector-module.mjs +1 -1
  14. package/docs/sdk/hello-module.mjs +39 -4
  15. package/docs/training/README.md +1 -1
  16. package/docs/training/train.sh +3 -0
  17. package/habilidades/explicamelo-facil/HABILIDAD.md +19 -0
  18. package/habilidades/hojas-de-calculo/HABILIDAD.md +18 -0
  19. package/habilidades/mensajes-a-clientes/HABILIDAD.md +19 -0
  20. package/habilidades/publicaciones-para-redes/HABILIDAD.md +19 -0
  21. package/habilidades/resumen-y-pendientes/HABILIDAD.md +18 -0
  22. package/habilidades/tu-pagina-paso-a-paso/HABILIDAD.md +19 -0
  23. package/package.json +7 -4
  24. package/public/activity.js +66 -22
  25. package/public/app.js +4947 -894
  26. package/public/assets/brand/OFL-SpaceGrotesk.txt +93 -0
  27. package/public/assets/brand/SpaceGrotesk-latin-ext.woff2 +0 -0
  28. package/public/assets/brand/SpaceGrotesk-latin.woff2 +0 -0
  29. package/public/assets/brand/madre-app-180.png +0 -0
  30. package/public/assets/brand/madre-app-192.png +0 -0
  31. package/public/assets/brand/madre-app-512.png +0 -0
  32. package/public/assets/brand/madre-app.svg +1 -1
  33. package/public/assets/brand/madre-favicon.svg +1 -1
  34. package/public/attribution.js +29 -19
  35. package/public/auto-open.js +102 -0
  36. package/public/brands.js +36 -19
  37. package/public/changes.js +63 -0
  38. package/public/en.js +1085 -102
  39. package/public/es.js +2940 -1656
  40. package/public/i18n.js +11 -0
  41. package/public/index.html +31 -27
  42. package/public/loader.js +322 -117
  43. package/public/macroverso.js +57 -355
  44. package/public/manual-content.js +69 -9
  45. package/public/manual.js +21 -6
  46. package/public/market-view.js +298 -84
  47. package/public/market.js +25 -2
  48. package/public/mcp-catalog.js +7 -2
  49. package/public/missions.js +169 -0
  50. package/public/news-scenes.js +292 -0
  51. package/public/nostromo-engine.js +935 -654
  52. package/public/notices.js +78 -0
  53. package/public/notifications.js +119 -0
  54. package/public/power.js +1 -1
  55. package/public/provider-marks.js +170 -0
  56. package/public/provider-pick.js +147 -0
  57. package/public/resay.js +4 -0
  58. package/public/review-ask.js +16 -13
  59. package/public/routing.js +29 -3
  60. package/public/salas-mac.css +467 -47
  61. package/public/salas-mac.html +8 -5
  62. package/public/salas-mac.js +805 -109
  63. package/public/salas.css +2 -2
  64. package/public/salas.html +2 -2
  65. package/public/salas.js +1 -1
  66. package/public/starters.js +128 -0
  67. package/public/styles.css +3036 -340
  68. package/public/subscription.js +303 -0
  69. package/public/terms-field.js +170 -0
  70. package/public/terms.js +117 -19
  71. package/public/tips.js +158 -0
  72. package/public/tour-chapters.js +88 -88
  73. package/public/tour.js +364 -46
  74. package/public/troubleshooting.js +313 -27
  75. package/public/welcome-scene.js +446 -0
  76. package/public/welcome.js +827 -282
  77. package/src/adapters/claude.mjs +2 -1
  78. package/src/adapters/codex.mjs +2 -1
  79. package/src/adapters/cursor.mjs +9 -6
  80. package/src/adapters/gemini-rest.mjs +236 -0
  81. package/src/adapters/gemini.mjs +13 -7
  82. package/src/adapters/grok.mjs +290 -0
  83. package/src/adapters/madre.mjs +71 -23
  84. package/src/adapters/opencode.mjs +15 -2
  85. package/src/adapters/process.mjs +14 -3
  86. package/src/adapters/steps.mjs +176 -0
  87. package/src/app-invite.mjs +90 -0
  88. package/src/auth-probe.mjs +32 -0
  89. package/src/billing-key.mjs +8 -0
  90. package/src/billing.mjs +317 -0
  91. package/src/bridge/policy.mjs +1 -1
  92. package/src/capabilities.mjs +46 -10
  93. package/src/chats.mjs +44 -2
  94. package/src/checkpoint.mjs +119 -1
  95. package/src/codex-route.mjs +113 -0
  96. package/src/commands.mjs +5 -2
  97. package/src/credentials.mjs +46 -8
  98. package/src/dataset.mjs +18 -7
  99. package/src/directives.mjs +1 -0
  100. package/src/event-store.mjs +25 -2
  101. package/src/extensions.mjs +5 -1
  102. package/src/ficha.mjs +158 -0
  103. package/src/files.mjs +36 -2
  104. package/src/image-studio.mjs +13 -3
  105. package/src/install-metrics.mjs +9 -3
  106. package/src/lease.mjs +6 -1
  107. package/src/looks.mjs +4 -1
  108. package/src/market-check.mjs +1 -1
  109. package/src/market-remote.mjs +135 -1
  110. package/src/mcp/image-server.mjs +59 -90
  111. package/src/mcp/memory-server.mjs +10 -0
  112. package/src/memory-tools.mjs +3 -0
  113. package/src/memory.mjs +29 -4
  114. package/src/models.mjs +21 -3
  115. package/src/modules/ahp.mjs +10 -4
  116. package/src/modules/bishop-exam.mjs +41 -12
  117. package/src/modules/bishop.mjs +2 -2
  118. package/src/modules/choices.mjs +12 -10
  119. package/src/modules/fetch-alone.mjs +7 -0
  120. package/src/modules/github.mjs +6 -2
  121. package/src/modules/helpers.mjs +23 -5
  122. package/src/modules/image-providers.mjs +281 -0
  123. package/src/modules/image-studio.mjs +106 -39
  124. package/src/modules/index.mjs +61 -12
  125. package/src/modules/intents-observe.mjs +3 -1
  126. package/src/modules/isolated.mjs +160 -0
  127. package/src/modules/ollama.mjs +35 -6
  128. package/src/modules/playwright.mjs +78 -20
  129. package/src/modules/reminders.mjs +42 -2
  130. package/src/modules/ripley.mjs +2 -1
  131. package/src/modules/run-alone.mjs +122 -0
  132. package/src/modules/runs.mjs +11 -8
  133. package/src/modules/sdk.mjs +10 -3
  134. package/src/notices-key.mjs +8 -0
  135. package/src/notices.mjs +185 -0
  136. package/src/ollama.mjs +57 -15
  137. package/src/opencode-health.mjs +1 -1
  138. package/src/outbound.mjs +124 -13
  139. package/src/quota-sources.mjs +148 -3
  140. package/src/review-ask.mjs +55 -31
  141. package/src/room/archivist.mjs +30 -5
  142. package/src/room/busy.mjs +16 -0
  143. package/src/room/changes.mjs +79 -0
  144. package/src/room/control.mjs +36 -6
  145. package/src/room/economy.mjs +1 -1
  146. package/src/room/guard.mjs +39 -2
  147. package/src/room/prompt.mjs +49 -6
  148. package/src/room/vectors.mjs +7 -1
  149. package/src/room.mjs +181 -49
  150. package/src/router.mjs +1 -1
  151. package/src/runs.mjs +39 -0
  152. package/src/runtime-detection.mjs +46 -6
  153. package/src/salas.mjs +181 -18
  154. package/src/server.mjs +1101 -118
  155. package/src/service.mjs +116 -0
  156. package/src/setup-trouble.mjs +20 -1
  157. package/src/setup.mjs +1 -1
  158. package/src/skill-check.mjs +269 -0
  159. package/src/skills-import.mjs +128 -0
  160. package/src/skills.mjs +502 -0
  161. package/src/terms.mjs +23 -5
  162. package/src/tour.mjs +31 -5
  163. package/src/updates.mjs +47 -4
  164. package/src/web-preview.mjs +181 -0
  165. package/src/whats-new.mjs +121 -1
  166. package/src/rumbo.mjs +0 -337
@@ -0,0 +1,93 @@
1
+ Copyright 2020 The Space Grotesk Project Authors (https://github.com/floriankarsten/space-grotesk)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 32 32"><rect width="32" height="32" fill="#050605"/><g transform="translate(16 16) scale(0.72) translate(-15.5 -16)"><path d="M3.5 16h5.5l2.3-5.5 4 11 3.2-7.5 1.8 2h2.2" fill="none" stroke="#9bff66" stroke-width="2.3" stroke-linejoin="round" stroke-linecap="round"/><circle cx="26.4" cy="16" r="2.4" fill="#9bff66"/></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 100 100"><rect width="100" height="100" fill="#0B0B0E"/><g transform="translate(16 15) scale(.68)"><path d="M20 82V42C20 21 41 21 46 39L50 52L54 39C59 21 80 21 80 42V60" fill="none" stroke="#FFFFFF" stroke-width="14.5" stroke-linecap="round" stroke-linejoin="round"/><circle cx="80" cy="81" r="9.5" fill="#34D399"/></g></svg>
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><rect width="32" height="32" rx="7.04" fill="#050605"/><g transform="scale(1)"><path d="M3.5 16h5.5l2.3-5.5 4 11 3.2-7.5 1.8 2h2.2" fill="none" stroke="#9bff66" stroke-width="2.3" stroke-linejoin="round" stroke-linecap="round"/><circle cx="26.4" cy="16" r="2.4" fill="#9bff66"/></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 100 100"><defs><linearGradient id="m" gradientUnits="userSpaceOnUse" x1="16" y1="86" x2="84" y2="22"><stop offset="0" stop-color="#A78BFA"/><stop offset=".5" stop-color="#7C3AED"/><stop offset="1" stop-color="#34D399"/></linearGradient></defs><rect width="100" height="100" rx="22" fill="#0B0B0E"/><g transform="translate(16 15) scale(.68)"><path d="M20 82V42C20 21 41 21 46 39L50 52L54 39C59 21 80 21 80 42V57" fill="none" stroke="url(#m)" stroke-width="18" stroke-linecap="round" stroke-linejoin="round"/><circle cx="80" cy="81" r="10.8" fill="#34D399"/></g></svg>
@@ -81,32 +81,42 @@ export async function drawColophonKeys(host) {
81
81
  // The legal notices (1.1.0, Business Source License 1.1): the copyright, who may use MADRE for free,
82
82
  // that there is no warranty, how to read the license and where the code is — and the author's
83
83
  // attribution, which NOTICE asks every copy to keep. Built with the Settings blocks both pages share.
84
- export function drawLegal(host) {
84
+ export const TRADEMARKS = () => t('Codex is a trademark of OpenAI, Claude of Anthropic, Gemini of Google, Grok of xAI and OpenCode of its authors. Their logos, and those of the providers OpenCode connects to, belong to their owners and appear unaltered only to identify each service; MADRE is not affiliated with them or endorsed by them.');
85
+
86
+ // The license this copy is used under (2026-11-17, the author): inside the desktop app, the app's own
87
+ // personal license; from npm or the source code, the Business Source License. Only what the person
88
+ // needs: what the license says and where to read it whole. Who made MADRE stays in every corner
89
+ // (drawAttribution); the marks of the AIs are said at the foot, as the law asks.
90
+ export const APP_LICENSE_LINKS = { es: 'https://madre.run/app/licencia/', en: 'https://madre.run/en/app/license/' };
91
+ export const SOURCE_LICENSE_LINKS = { es: 'https://madre.run/licencia/', en: 'https://madre.run/en/license/' };
92
+ export function drawLegal(host, { app = false } = {}) {
85
93
  if (!host) return null;
86
94
  const make = (tag, className, text) => { const node = document.createElement(tag); if (className) node.className = className; if (text != null) node.textContent = text; return node; };
87
95
  const block = make('section', 'sx-block sx-legal');
88
96
  const head = make('header', 'sx-head');
89
97
  const words = make('div', 'sx-words');
90
- words.append(make('h3', null, t('License and authorship')), make('p', null, t('© {year} {author}. MADRE\'s code is public. Under the {license} it is free for individuals and for organizations of up to 10 people, also to provide services to others; larger organizations, or offering it to others as a service, need a commercial license. Each version becomes GNU AGPL v3 four years after it is published. It comes with no warranty of any kind.', { year: YEAR, author: AUTHOR, license: LICENSE_NAME })));
98
+ // Short and calm (2026-11-17, the author: «no se entiende y da miedo»): what the person gets, in two
99
+ // lines; the whole text lives on madre.run for whoever wants to read it.
100
+ words.append(make('h3', null, t('License')), make('p', null, app
101
+ ? t('A personal license. What you make with MADRE is yours.')
102
+ : t('Free for individuals and teams of up to 10. What you make with MADRE is yours.')));
91
103
  head.append(words);
92
104
  const rows = make('div', 'sx-rows');
93
- const row = (label, hint, url, words) => {
94
- const line = make('div', 'sx-row');
95
- const text = make('div', 'sx-words');
96
- text.append(make('b', null, label));
97
- if (hint) text.append(make('span', 'sx-hint', hint));
98
- const box = make('div', 'sx-control');
99
- const link = make('a', 'sx-btn', words);
100
- link.href = url;
101
- link.target = '_blank';
102
- link.rel = 'noopener';
103
- box.append(link);
104
- line.append(text, box);
105
- rows.append(line);
106
- };
107
- row(t('Made by {author}', { author: AUTHOR }), t('MADRE shows its author in the corner. Please keep it in every copy.'), AUTHOR_URL, 'jossuealcala.com');
108
- row(t('The license'), t('{license} · free for individuals and teams of up to 10', { license: LICENSE_NAME }), LEGAL_LINKS.license, t('Read'));
109
- row(t('The source code'), t('On GitHub, to read and to change.'), LEGAL_LINKS.source, 'GitHub');
105
+ const line = make('div', 'sx-row');
106
+ const text = make('div', 'sx-words');
107
+ text.append(make('b', null, t('The license')), make('span', 'sx-hint', t('The details, on madre.run')));
108
+ const box = make('div', 'sx-control');
109
+ const link = make('a', 'sx-btn', t('Read'));
110
+ const links = app ? APP_LICENSE_LINKS : SOURCE_LICENSE_LINKS;
111
+ link.href = links[language()] ?? links.es;
112
+ link.target = '_blank';
113
+ link.rel = 'noopener';
114
+ box.append(link);
115
+ line.append(text, box);
116
+ rows.append(line);
117
+ // Whose the AIs' logos are (2026-11-06): their owners' official marks, shown unaltered only to say
118
+ // which service each one is (public/brands.js).
119
+ rows.append(make('p', 'sx-foot sx-marks', TRADEMARKS()));
110
120
  block.append(head, rows);
111
121
  host.append(block);
112
122
  return block;
@@ -0,0 +1,102 @@
1
+ // SPDX-License-Identifier: BUSL-1.1
2
+ // MADRE · © 2026 Jossue Alcalá · Business Source License 1.1: LICENSE
3
+ // What an answer made opens on its own (2026-11-11).
4
+ //
5
+ // A person who asks for a page wants to see the page, not to go looking for a file. When an answer
6
+ // creates or changes something that can be looked at — a page, a picture, a PDF, a sheet, a
7
+ // document — the room opens it beside the conversation. Of several, the one that matters most: a
8
+ // page before a picture, the main page before the others. The rest stay a click away, on the
9
+ // answer's own tiles.
10
+ //
11
+ // This file only chooses. Opening, and whether the person is already looking at something else,
12
+ // is the room's (public/app.js, autoOpenMade).
13
+
14
+ export const AUTO_OPEN_KEY = 'madre.autoOpen';
15
+
16
+ // The kinds that can be looked at, in the order they win. Code, settings and data files are not
17
+ // here: they are read, not looked at, and a person who did not ask to read them is not shown them.
18
+ const KINDS = [
19
+ ['page', /\.(html?|xhtml)$/i],
20
+ ['image', /\.(png|jpe?g|gif|webp|avif|svg)$/i],
21
+ ['pdf', /\.pdf$/i],
22
+ ['sheet', /\.(csv|xlsx)$/i],
23
+ ['document', /\.(md|markdown)$/i],
24
+ ];
25
+
26
+ // A way of working an agent proposes (*.habilidad.md) or a module (*.module.mjs) has its own card
27
+ // to install it; what MADRE keeps for itself (.pulse/) is not the person's work.
28
+ const NOT_WORK = /(^|\/)\.pulse\/|\.habilidad\.md$/i;
29
+
30
+ export function kindOf(path) {
31
+ const name = String(path ?? '');
32
+ if (!name || NOT_WORK.test(name)) return null;
33
+ return KINDS.find(([, test]) => test.test(name))?.[0] ?? null;
34
+ }
35
+
36
+ // Gone is not something to look at: «D» from an edit, «deleted» wherever it is said in words.
37
+ const gone = (file) => ['D', 'deleted'].includes(file?.status);
38
+
39
+ // The main page is the one a site opens on: index.html, nearest the project's top.
40
+ function mainness(path) {
41
+ const name = path.split('/').pop().toLowerCase();
42
+ return /^index\.(html?|xhtml)$/.test(name) ? 0 : 1;
43
+ }
44
+
45
+ // { first, rest }: the file to open, and the others that could be looked at, in the same order.
46
+ export function pickToOpen(files = []) {
47
+ const order = KINDS.map(([kind]) => kind);
48
+ const seen = new Set();
49
+ const showable = [];
50
+ for (const file of Array.isArray(files) ? files : []) {
51
+ const path = String(file?.path ?? '');
52
+ if (!path || gone(file) || seen.has(path)) continue;
53
+ const kind = kindOf(path);
54
+ if (!kind) continue;
55
+ seen.add(path);
56
+ showable.push({ ...file, path, kind });
57
+ }
58
+ showable.sort((a, b) => order.indexOf(a.kind) - order.indexOf(b.kind)
59
+ || mainness(a.path) - mainness(b.path)
60
+ || a.path.split('/').length - b.path.split('/').length
61
+ || a.path.localeCompare(b.path));
62
+ return { first: showable[0] ?? null, rest: showable.slice(1) };
63
+ }
64
+
65
+ // On unless the person turned it off in Settings. Storage that cannot be read leaves it on.
66
+ export function autoOpenOn(storage = globalThis.localStorage) {
67
+ try { return storage?.getItem(AUTO_OPEN_KEY) !== 'off'; } catch { return true; }
68
+ }
69
+ export function setAutoOpen(on, storage = globalThis.localStorage) {
70
+ try { if (on) storage?.removeItem(AUTO_OPEN_KEY); else storage?.setItem(AUTO_OPEN_KEY, 'off'); } catch { /* this page only */ }
71
+ }
72
+
73
+ // A CSV read into rows, quotes and all, for the viewer's table. Only the first rows: a sheet is
74
+ // looked at, not loaded whole.
75
+ export function csvRows(text, { limit = 200 } = {}) {
76
+ const rows = [];
77
+ let row = [];
78
+ let cell = '';
79
+ let quoted = false;
80
+ const source = String(text ?? '').replace(/^/, '');
81
+ // A sheet saved with semicolons (as spreadsheets do where the comma is the decimal mark).
82
+ const firstLine = source.split('\n', 1)[0];
83
+ const separator = (firstLine.match(/;/g)?.length ?? 0) > (firstLine.match(/,/g)?.length ?? 0) ? ';' : ',';
84
+ for (let index = 0; index < source.length && rows.length < limit; index += 1) {
85
+ const char = source[index];
86
+ if (quoted) {
87
+ if (char === '"' && source[index + 1] === '"') { cell += '"'; index += 1; }
88
+ else if (char === '"') quoted = false;
89
+ else cell += char;
90
+ continue;
91
+ }
92
+ if (char === '"') quoted = true;
93
+ else if (char === separator) { row.push(cell); cell = ''; }
94
+ else if (char === '\n' || char === '\r') {
95
+ if (char === '\r' && source[index + 1] === '\n') index += 1;
96
+ row.push(cell); cell = '';
97
+ rows.push(row); row = [];
98
+ } else cell += char;
99
+ }
100
+ if ((cell || row.length) && rows.length < limit) { row.push(cell); rows.push(row); }
101
+ return rows;
102
+ }
package/public/brands.js CHANGED
@@ -3,16 +3,20 @@
3
3
  // Visual identity per agent.
4
4
  //
5
5
  // Colors follow each vendor's public palette so a Codex bubble reads as Codex
6
- // and a Claude bubble as Claude. The marks are drawn by MADRE: free takes that
7
- // recall each vendor's mark without reproducing it (2026-10-17), because the
8
- // vendors' logos are registered trademarks and their brand guidelines do not
9
- // allow embedding them in third-party products without permission. To use an
10
- // official asset under a license you hold, set `mark` to that inline SVG.
6
+ // and a Claude bubble as Claude. Since 2026-11-06, by the author's decision, Codex, Claude, Gemini,
7
+ // OpenCode and Grok show their owners' official marks, in their one-colour version and unaltered
8
+ // (taken from the Lobe Icons collection, @lobehub/icons-static-svg 1.102.0, the set most multi-model
9
+ // apps use), only to identify each service; the room says whose trademarks they are. Cursor keeps
10
+ // MADRE's own drawing (2026-10-17). A mark is never redrawn or retouched: an official one goes in
11
+ // whole, or MADRE draws its own.
11
12
  //
12
13
  // `mark` receives no arguments and must return an SVG string with
13
14
  // `fill="currentColor"` so the monogram inherits the agent color.
14
15
 
15
16
  const glyph = (body) => `<svg viewBox="0 0 32 32" aria-hidden="true" focusable="false">${body}</svg>`;
17
+ // An official mark, one colour, exactly as its owner draws it (24 × 24, as published): the paths are
18
+ // never edited. The wider box is only the clear space around it, so it sits like the others.
19
+ const official = (body) => `<svg viewBox="-3 -3 30 30" fill="currentColor" fill-rule="evenodd" aria-hidden="true" focusable="false">${body}</svg>`;
16
20
 
17
21
  export const BRANDS = {
18
22
  codex: {
@@ -21,8 +25,8 @@ export const BRANDS = {
21
25
  color: '#10A37F',
22
26
  colorLight: '#0B7A5F',
23
27
  ink: '#FFFFFF',
24
- // A free take on OpenAI's blossom (2026-10-17): three rounded links turned 60° and knotted.
25
- mark: () => glyph('<g fill="none" stroke="currentColor" stroke-width="2.4"><rect x="11.2" y="4.4" width="9.6" height="23.2" rx="4.8"/><rect x="11.2" y="4.4" width="9.6" height="23.2" rx="4.8" transform="rotate(60 16 16)"/><rect x="11.2" y="4.4" width="9.6" height="23.2" rx="4.8" transform="rotate(120 16 16)"/></g>'),
28
+ // OpenAI's Codex mark, official and unaltered (2026-11-06, the author's choice): the monochrome one.
29
+ mark: () => official("<path clip-rule=\"evenodd\" d=\"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z\"></path>"),
26
30
  },
27
31
  claude: {
28
32
  label: 'Claude',
@@ -30,8 +34,8 @@ export const BRANDS = {
30
34
  color: '#D97757',
31
35
  colorLight: '#B85C3C',
32
36
  ink: '#FFFFFF',
33
- // A free take on Claude's spark (2026-10-17): ten tapered rays of uneven length round a heart.
34
- mark: () => glyph('<circle cx="16" cy="16" r="3" fill="currentColor"/><path fill="currentColor" d="M15.5 14.48L16.4 2.61L17.4 2.07L18.27 2.79L16.8 14.61ZM16.49 14.48L22.85 7.14L23.85 7.19L24.02 8.18L17.46 15.34ZM17.29 15.05L28.29 12.41L29.09 13.15L28.67 14.16L17.57 16.33ZM17.6 15.99L25.98 19.58L26.25 20.51L25.38 20.93L17.07 17.19ZM17.3 16.93L23.66 27.24L23.16 28.26L22.02 28.2L16.17 17.59ZM16.5 17.52L15.65 27.59L14.78 28.14L14.04 27.43L15.2 17.39ZM15.51 17.52L8.41 25.81L7.35 25.7L7.12 24.65L14.54 16.66ZM14.71 16.95L6.02 18.92L5.25 18.34L5.71 17.49L14.43 15.67ZM14.4 16.01L3.57 11.55L3.37 10.45L4.32 9.86L14.93 14.81ZM14.7 15.07L9.8 6.91L10.15 5.98L11.13 6.14L15.83 14.41Z"/>'),
37
+ // Anthropic's Claude mark, official and unaltered (2026-11-06, the author's choice).
38
+ mark: () => official("<path d=\"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z\"></path>"),
35
39
  },
36
40
  gemini: {
37
41
  label: 'Gemini',
@@ -40,8 +44,9 @@ export const BRANDS = {
40
44
  colorLight: '#5B45B8',
41
45
  ink: '#FFFFFF',
42
46
  gradient: 'linear-gradient(135deg, #4796E3 0%, #8E75E8 55%, #D96570 100%)',
43
- // A free take on Gemini's sparkle (2026-10-17): four points in long curves, taller than wide.
44
- mark: () => glyph('<path fill="currentColor" d="M16 2.4C16.8 10.2 21.4 15 29 16 21.4 17 16.8 21.8 16 29.6 15.2 21.8 10.6 17 3 16 10.6 15 15.2 10.2 16 2.4z"/>'),
47
+ // Google's Gemini mark, official and unaltered (2026-11-06, the author's choice): its one-colour version,
48
+ // on Gemini's own gradient.
49
+ mark: () => official("<path d=\"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z\"></path>"),
45
50
  },
46
51
  opencode: {
47
52
  label: 'OpenCode',
@@ -49,8 +54,8 @@ export const BRANDS = {
49
54
  color: '#F2C94C',
50
55
  colorLight: '#9A7A12',
51
56
  ink: '#111111',
52
- // A free take on OpenCode's block letter (2026-10-17): a square ring with a lighter block inside.
53
- mark: () => glyph('<path fill="currentColor" fill-rule="evenodd" d="M6 6h20v20H6zM10.4 10.4v11.2h11.2V10.4z"/><path fill="currentColor" opacity=".5" d="M10.4 15.2h11.2v6.4H10.4z"/>'),
57
+ // OpenCode's mark, official and unaltered (2026-11-06, the author's choice).
58
+ mark: () => official("<path d=\"M16 6H8v12h8V6zm4 16H4V2h16v20z\"></path>"),
54
59
  },
55
60
  // MADRE's own drawing for Cursor (2026-10-17), a free take on its mark rather than the mark: a
56
61
  // cube seen from above, its three faces in three weights, and a pointer cut out of the right face.
@@ -62,16 +67,28 @@ export const BRANDS = {
62
67
  ink: '#111111',
63
68
  mark: () => glyph('<path fill="currentColor" d="M16 3.2 27.4 9.6 16 16 4.6 9.6z"/><path fill="currentColor" opacity=".42" d="M4.6 9.6 16 16v12.8L4.6 22.4z"/><path fill="currentColor" fill-rule="evenodd" opacity=".7" d="M27.4 9.6v12.8L16 28.8V16zM16 16l11.4-6.4-6.2 12-1.9-3.9z"/>'),
64
69
  },
70
+ grok: {
71
+ label: 'Grok',
72
+ vendor: 'xAI',
73
+ color: '#E6E6E6',
74
+ colorLight: '#262626',
75
+ ink: '#111111',
76
+ // xAI's Grok mark, official and unaltered (2026-11-06, the author's choice).
77
+ mark: () => official("<path d=\"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815\"></path>"),
78
+ },
65
79
  };
66
80
 
67
81
  BRANDS.madre = {
68
- label: 'MADRE',
82
+ // The local AI is called as it is called in a chat (2026-11-14, the author): MADRE is the place.
83
+ label: '@madre',
69
84
  vendor: 'the project · local',
70
- color: '#9bff66',
71
- colorLight: '#2f8a1c',
72
- ink: '#0a1405',
73
- // The brand kit's compact pulse, the one drawn for 64 px and under (favicon, icon), with its dot.
74
- mark: () => glyph('<path d="M3.5 16h5.5l2.3-5.5 4 11 3.2-7.5 1.8 2h2.2" fill="none" stroke="currentColor" stroke-width="2.3" stroke-linecap="round" stroke-linejoin="round"/><circle cx="26.4" cy="16" r="2.4" fill="currentColor"/>'),
85
+ color: '#34d399',
86
+ // On white, the green one step deeper (2026-11-17): #10b981 read 2.5:1 as a name in «Tus IAs» and
87
+ // the AIs' window, and #059669 still 3.8; this one reads 5.5, as the other AIs' light tones do.
88
+ colorLight: '#047857',
89
+ ink: '#04261a',
90
+ // MADRE's M of one stroke and its dot (the rebranding, 2026-11-13), on the 32 grid of the marks.
91
+ mark: () => glyph('<path d="M6.1 25.24V12.04C6.1 5.11 13.03 5.11 14.68 11.05L16.0 15.34L17.32 11.05C18.97 5.11 25.9 5.11 25.9 12.04V17.98" fill="none" stroke="currentColor" stroke-width="4.8" stroke-linecap="round" stroke-linejoin="round"/><circle cx="25.9" cy="24.91" r="3.1" fill="currentColor"/>'),
75
92
  };
76
93
 
77
94
  BRANDS.ollama = {
@@ -0,0 +1,63 @@
1
+ // SPDX-License-Identifier: BUSL-1.1
2
+ // MADRE · © 2026 Jossue Alcalá · Business Source License 1.1: LICENSE
3
+ // «What changed» (2026-11-11): what a reply changed in the project, said in one sentence for
4
+ // someone who does not program. The sentence is the agent's own when it gave one and nothing it did
5
+ // was put back (src/room/changes.mjs); otherwise it is said from the files alone, and never more
6
+ // than the files say. The card that carries it is drawn in app.js (changesCard).
7
+
8
+ import { t } from './i18n.js';
9
+
10
+ // What git says (A, M, D, R) and what a CREATE turn says (created, changed), as one word.
11
+ const KINDS = { A: 'created', created: 'created', M: 'changed', changed: 'changed', modified: 'changed', D: 'deleted', deleted: 'deleted', R: 'renamed', renamed: 'renamed' };
12
+ const ORDER = ['created', 'changed', 'deleted', 'renamed'];
13
+ const NAMES_SHOWN = 3;
14
+
15
+ export function changeKind(status) {
16
+ return KINDS[String(status ?? '')] ?? 'changed';
17
+ }
18
+
19
+ // One row per path, in the order the turn reported them; the last word about a path wins.
20
+ export function changedFiles(list = []) {
21
+ const byPath = new Map();
22
+ for (const file of list ?? []) {
23
+ const path = String(file?.path ?? '').trim();
24
+ if (!path) continue;
25
+ byPath.set(path, { path, name: path.split('/').pop(), kind: changeKind(file.status) });
26
+ }
27
+ return [...byPath.values()];
28
+ }
29
+
30
+ // «a», «a and b», «a, b and c»: the language says where the last «and» goes.
31
+ function joined(items) {
32
+ if (items.length <= 1) return items[0] ?? '';
33
+ return t('{a} and {b}', { a: items.slice(0, -1).join(', '), b: items.at(-1) });
34
+ }
35
+
36
+ // «Created gastos.html and changed index.html.» Up to three names a kind; more are counted.
37
+ export function filesSummary(list = []) {
38
+ const files = changedFiles(list);
39
+ if (!files.length) return '';
40
+ const parts = [];
41
+ for (const kind of ORDER) {
42
+ const mine = files.filter((file) => file.kind === kind);
43
+ if (!mine.length) continue;
44
+ const what = mine.length > NAMES_SHOWN ? t('{n} files', { n: mine.length }) : joined(mine.map((file) => file.name));
45
+ parts.push(kind === 'created' ? t('created {files}', { files: what })
46
+ : kind === 'deleted' ? t('deleted {files}', { files: what })
47
+ : kind === 'renamed' ? t('renamed {files}', { files: what })
48
+ : t('changed {files}', { files: what }));
49
+ }
50
+ const sentence = joined(parts);
51
+ return `${sentence.charAt(0).toLocaleUpperCase()}${sentence.slice(1)}.`;
52
+ }
53
+
54
+ // The sentence the card shows: the agent's, or the files'.
55
+ export function changeSentence({ summary = null, files = [] } = {}) {
56
+ const said = String(summary ?? '').trim();
57
+ return said || filesSummary(files);
58
+ }
59
+
60
+ // What «See» opens: the first file that is still there.
61
+ export function fileToSee(list = []) {
62
+ return changedFiles(list).find((file) => file.kind !== 'deleted') ?? null;
63
+ }