@jossuealcala/madre 0.7.2 → 1.0.0
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.md +773 -1
- package/README.md +92 -28
- package/bin/madre.mjs +30 -10
- package/docs/REFERENCE.md +157 -81
- package/docs/SDK.md +23 -19
- package/package.json +1 -1
- package/public/app.js +11207 -4196
- package/public/assets/brand/Geist-latin-ext.woff2 +0 -0
- package/public/assets/brand/Geist-latin.woff2 +0 -0
- package/public/assets/brand/GeistMono-latin-ext.woff2 +0 -0
- package/public/assets/brand/GeistMono-latin.woff2 +0 -0
- package/public/assets/brand/JetBrainsMono-latin-ext.woff2 +0 -0
- package/public/assets/brand/JetBrainsMono-latin.woff2 +0 -0
- package/public/assets/brand/OFL-Geist.txt +93 -0
- package/public/assets/brand/OFL-GeistMono.txt +93 -0
- package/public/assets/brand/OFL-JetBrainsMono.txt +93 -0
- package/public/assets/brand/OFL-Sora.txt +93 -0
- package/public/assets/brand/Sora-latin-ext.woff2 +0 -0
- package/public/assets/brand/Sora-latin.woff2 +0 -0
- package/public/assets/brand/madre-app-180.png +0 -0
- package/public/assets/brand/madre-app-192.png +0 -0
- package/public/assets/brand/madre-app-512.png +0 -0
- package/public/assets/brand/madre-app.svg +1 -0
- package/public/assets/brand/madre-favicon.svg +1 -0
- package/public/assets/news/1.0/alerts.webp +0 -0
- package/public/assets/news/1.0/bar.webp +0 -0
- package/public/assets/news/1.0/finder.webp +0 -0
- package/public/assets/news/1.0/github.webp +0 -0
- package/public/assets/news/1.0/intents.webp +0 -0
- package/public/assets/news/1.0/looks.webp +0 -0
- package/public/assets/news/1.0/modules.webp +0 -0
- package/public/assets/news/1.0/mother.webp +0 -0
- package/public/assets/news/1.0/nostromo.webp +0 -0
- package/public/assets/news/1.0/permissions.webp +0 -0
- package/public/assets/news/1.0/room.webp +0 -0
- package/public/assets/news/1.0/settings.webp +0 -0
- package/public/assets/wallpapers/biznaga.webp +0 -0
- package/public/assets/wallpapers/canela.webp +0 -0
- package/public/assets/wallpapers/jarrito.webp +0 -0
- package/public/assets/wallpapers/magna.webp +0 -0
- package/public/assets/wallpapers/oceano.webp +0 -0
- package/public/assets/wallpapers/paraiso.webp +0 -0
- package/public/assets/wallpapers/quila.webp +0 -0
- package/public/assets/wallpapers/tradicion.webp +0 -0
- package/public/assets/wallpapers/tropical.webp +0 -0
- package/public/assets/wallpapers/urbania.webp +0 -0
- package/public/assets/wallpapers/ventura.webp +0 -0
- package/public/assets/wallpapers/xico.webp +0 -0
- package/public/brands.js +28 -2
- package/public/editor.js +744 -0
- package/public/es.js +2784 -1026
- package/public/i18n.js +1 -1
- package/public/index.html +201 -175
- package/public/inquiry.js +11 -11
- package/public/loader.js +79 -0
- package/public/macroverso.js +1497 -0
- package/public/manifest.webmanifest +14 -0
- package/public/nostromo-engine.js +2222 -0
- package/public/resay.js +24 -0
- package/public/review-ask.js +85 -0
- package/public/salas-mac.css +787 -0
- package/public/salas-mac.html +154 -0
- package/public/salas-mac.js +3264 -0
- package/public/salas.css +85 -0
- package/public/salas.html +47 -0
- package/public/salas.js +200 -0
- package/public/styles.css +6207 -425
- package/public/touch.js +83 -0
- package/public/tour-chapters.js +342 -0
- package/public/tour.js +510 -0
- package/public/troubleshooting.js +159 -140
- package/src/adapters/codex.mjs +46 -6
- package/src/adapters/gemini.mjs +30 -10
- package/src/adapters/madre.mjs +110 -18
- package/src/adapters/process.mjs +42 -2
- package/src/auth-probe.mjs +2 -2
- package/src/bridge/devices.mjs +202 -0
- package/src/bridge/handoff.mjs +45 -0
- package/src/bridge/host.mjs +82 -0
- package/src/bridge/network.mjs +133 -0
- package/src/bridge/policy.mjs +89 -0
- package/src/bridge/qr.mjs +287 -0
- package/src/bridge/server.mjs +269 -0
- package/src/capabilities.mjs +5 -9
- package/src/chats.mjs +59 -22
- package/src/checkpoint.mjs +137 -35
- package/src/choices.mjs +18 -3
- package/src/cli-args.mjs +12 -1
- package/src/commands.mjs +15 -15
- package/src/config.mjs +73 -9
- package/src/conversation-context.mjs +5 -2
- package/src/dataset.mjs +3 -1
- package/src/directives.mjs +0 -5
- package/src/enlaces.mjs +451 -0
- package/src/event-store.mjs +55 -10
- package/src/exam.mjs +5 -5
- package/src/extensions.mjs +0 -2
- package/src/file-ops.mjs +23 -0
- package/src/files.mjs +52 -2
- package/src/github.mjs +407 -0
- package/src/json-file.mjs +63 -0
- package/src/lease.mjs +2 -2
- package/src/lobby-work.mjs +103 -0
- package/src/looks.mjs +55 -0
- package/src/maturity.mjs +3 -3
- package/src/mcp/github-server.mjs +164 -0
- package/src/mcp/image-server.mjs +1 -1
- package/src/mcp/memory-server.mjs +11 -3
- package/src/memory.mjs +38 -12
- package/src/models.mjs +89 -5
- package/src/modules/ahp.mjs +4 -4
- package/src/modules/ash.mjs +1 -1
- package/src/modules/bishop-plan.mjs +207 -0
- package/src/modules/bishop.mjs +645 -0
- package/src/modules/choices.mjs +2 -2
- package/src/modules/correo.mjs +1 -1
- package/src/modules/enlaces.mjs +255 -0
- package/src/modules/git-pulse.mjs +2 -2
- package/src/modules/github.mjs +322 -0
- package/src/modules/image-studio.mjs +3 -3
- package/src/modules/index.mjs +18 -4
- package/src/modules/intents-calibration.mjs +338 -0
- package/src/modules/intents-desk.mjs +481 -0
- package/src/modules/intents-observe.mjs +266 -0
- package/src/modules/intents-policy.mjs +414 -0
- package/src/modules/intents-try.mjs +91 -0
- package/src/modules/intents.mjs +145 -0
- package/src/modules/ollama.mjs +4 -4
- package/src/modules/playwright.mjs +121 -11
- package/src/modules/ripley.mjs +1 -1
- package/src/modules/runs.mjs +2 -2
- package/src/modules/sdk.mjs +10 -4
- package/src/ollama.mjs +6 -1
- package/src/outbound.mjs +19 -17
- package/src/override.mjs +100 -0
- package/src/ports.mjs +23 -1
- package/src/prices.mjs +72 -0
- package/src/privacy.mjs +30 -11
- package/src/quota-sources.mjs +0 -8
- package/src/request-guard.mjs +1 -1
- package/src/review-ask.mjs +111 -0
- package/src/room/archivist.mjs +55 -37
- package/src/room/budget.mjs +17 -5
- package/src/room/control.mjs +70 -7
- package/src/room/economy.mjs +35 -7
- package/src/room/escalation.mjs +2 -0
- package/src/room/guard.mjs +26 -2
- package/src/room/prompt.mjs +22 -15
- package/src/room/runs.mjs +84 -21
- package/src/room/vectors.mjs +19 -4
- package/src/room.mjs +351 -65
- package/src/router.mjs +3 -1
- package/src/runs.mjs +23 -5
- package/src/salas.mjs +313 -0
- package/src/sentinel-errors.mjs +1 -1
- package/src/server-sentinel.mjs +124 -0
- package/src/server.mjs +1526 -163
- package/src/setup.mjs +1 -0
- package/src/tour.mjs +159 -0
- package/src/updates.mjs +48 -8
- package/src/usage-sentinel.mjs +1 -1
- package/src/verdict.mjs +7 -7
- package/src/whats-new.mjs +160 -0
package/public/resay.js
CHANGED
|
@@ -23,6 +23,7 @@ const SAID = [
|
|
|
23
23
|
'has used {pct}% of its {label}.',
|
|
24
24
|
' Continue with {who}.',
|
|
25
25
|
' Prepare a handoff before the current agent becomes unavailable.',
|
|
26
|
+
"local project token budget (MADRE's own soft limit, not the provider's quota; cache reads count a tenth)",
|
|
26
27
|
"local room token budget (MADRE's own soft limit, not the provider's quota; cache reads count a tenth)",
|
|
27
28
|
'simulated provider usage window',
|
|
28
29
|
'provider usage window',
|
|
@@ -32,6 +33,29 @@ const SAID = [
|
|
|
32
33
|
' Last output: {output}',
|
|
33
34
|
'MADRE is shutting down',
|
|
34
35
|
'STOPALL by the human',
|
|
36
|
+
'{label} does not know the model `{model}`.',
|
|
37
|
+
'{label} does not know the model it was asked to use.',
|
|
38
|
+
' Choose another on the model chip beside TO @{agent}, or the default; permissions and modes have nothing to do with it.',
|
|
39
|
+
'A plan by @{agent} is still running. Your message will be answered, but no second plan will start.',
|
|
40
|
+
' Type STOPALL to halt every agent.',
|
|
41
|
+
'{n} agents are working at once. If this is not what you asked for, type STOPALL.',
|
|
42
|
+
'@{agent} is already answering another turn; answers may cross.',
|
|
43
|
+
' STOPALL halts everything.',
|
|
44
|
+
'The plan by @{agent} has been running for {n} min.',
|
|
45
|
+
' STOPALL halts it.',
|
|
46
|
+
'@{holder} still holds EDIT; @{agent} answers read-only this turn.',
|
|
47
|
+
'@{holder} still holds CONTROL; @{agent} answers read-only this turn.',
|
|
48
|
+
'Stopped while waiting for the project: another turn was writing in it.',
|
|
49
|
+
'@{agent} tried to open a plan from inside a plan. It was ignored; the sequence stays under @{who}.',
|
|
50
|
+
' STOPALL if the project drifts.',
|
|
51
|
+
' STOPALL if the room drifts.',
|
|
52
|
+
'@{agent} is capped at #{n} {label}; raise its max mode to #{wanted} in Settings › Permissions to unlock {mode}.',
|
|
53
|
+
'@{agent} is capped at #{n} {label}; raise its max mode to #{wanted} in Settings › Permissions to arm {mode}.',
|
|
54
|
+
'@{agent} is capped at #{n} {label}; raise its MAX MODE to #{wanted} in CONNECTIONS to unlock {mode}.',
|
|
55
|
+
'@{agent} is capped at #{n} {label}; raise its MAX MODE to #{wanted} in CONNECTIONS to arm {mode}.',
|
|
56
|
+
'@{agent} already holds {mode} of this project; one holder at a time. STOPALL revokes it.',
|
|
57
|
+
'@{agent} left the project: Ollama is not running. Start Ollama, or open Local AI in Modules.',
|
|
58
|
+
'@{agent} left the room: Ollama is not running. Start Ollama, or open Ollama in Modules.',
|
|
35
59
|
'Google reported the model as unavailable (HTTP 503) and the CLI kept retrying.',
|
|
36
60
|
'Try again shortly or choose another model.',
|
|
37
61
|
'Google says the AI Studio project behind this Gemini key has no prepaid credits left; every request is refused (HTTP 429) until it is topped up.',
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// Asking for a star or a review (2026-10-10), in the room and in Home: the server keeps when to
|
|
2
|
+
// ask (src/review-ask.mjs); this page says once a minute that it is in view, and when a moment is
|
|
3
|
+
// due it asks — only when nothing is going on: no turn running, nothing half written, no other
|
|
4
|
+
// window open. Otherwise it waits for the next minute. The sheet is the room's question
|
|
5
|
+
// (styles.css, dialog.room-ask): a star on GitHub, a review on madre.run, not now, or never again.
|
|
6
|
+
// Both links open in the person's browser; MADRE itself sends nothing.
|
|
7
|
+
|
|
8
|
+
import { language, t } from './i18n.js';
|
|
9
|
+
|
|
10
|
+
export const STAR_URL = 'https://github.com/jossuealcacao-exe/madre';
|
|
11
|
+
export const REVIEW_URLS = { es: 'https://madre.run/resenas/', en: 'https://madre.run/en/reviews/' };
|
|
12
|
+
const TICK_MS = 60 * 1000;
|
|
13
|
+
const STAR = '<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M10 2.8l2.2 4.6 5 .7-3.6 3.5.9 5-4.5-2.4-4.5 2.4.9-5L2.8 8.1l5-.7z" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"/></svg>';
|
|
14
|
+
|
|
15
|
+
const post = (url, payload) => fetch(url, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(payload ?? {}) })
|
|
16
|
+
.then((response) => (response.ok ? response.json() : null)).catch(() => null);
|
|
17
|
+
|
|
18
|
+
export function startReviewAsk({ busy = () => false } = {}) {
|
|
19
|
+
if (typeof document === 'undefined' || typeof setInterval !== 'function') return null;
|
|
20
|
+
let dialog = null;
|
|
21
|
+
async function tick() {
|
|
22
|
+
if (document.hidden || dialog?.open) return;
|
|
23
|
+
const answer = await post('/api/review-ask/tick');
|
|
24
|
+
if (!answer?.due || document.hidden || busy() || document.querySelector('dialog[open], .reload-curtain')) return;
|
|
25
|
+
ask(answer.due);
|
|
26
|
+
}
|
|
27
|
+
function ask(moment) {
|
|
28
|
+
dialog?.remove();
|
|
29
|
+
dialog = document.createElement('dialog');
|
|
30
|
+
dialog.className = 'room-ask review-ask';
|
|
31
|
+
dialog.setAttribute('aria-labelledby', 'review-ask-title');
|
|
32
|
+
const card = document.createElement('form');
|
|
33
|
+
card.className = 'room-ask-card';
|
|
34
|
+
card.method = 'dialog';
|
|
35
|
+
const icon = document.createElement('span');
|
|
36
|
+
icon.className = 'room-ask-icon';
|
|
37
|
+
icon.innerHTML = STAR; // trusted: our own SVG string
|
|
38
|
+
const title = document.createElement('h2');
|
|
39
|
+
title.className = 'room-ask-title';
|
|
40
|
+
title.id = 'review-ask-title';
|
|
41
|
+
title.textContent = t('Are you enjoying MADRE?');
|
|
42
|
+
const body = document.createElement('p');
|
|
43
|
+
body.className = 'room-ask-body';
|
|
44
|
+
body.textContent = t('If MADRE saves you work, a star on GitHub or a few words about it help more people find it. It takes a minute.');
|
|
45
|
+
const actions = document.createElement('div');
|
|
46
|
+
actions.className = 'room-ask-actions review-ask-actions';
|
|
47
|
+
const choice = (words, tone, answer, href = null) => {
|
|
48
|
+
const key = document.createElement(href ? 'a' : 'button');
|
|
49
|
+
key.className = `room-ask-choice${tone ? ` ${tone}` : ''}`;
|
|
50
|
+
key.textContent = words;
|
|
51
|
+
if (href) { key.href = href; key.target = '_blank'; key.rel = 'noopener'; } else key.type = 'button';
|
|
52
|
+
key.addEventListener('click', () => { settle(answer); });
|
|
53
|
+
return key;
|
|
54
|
+
};
|
|
55
|
+
const quiet = document.createElement('div');
|
|
56
|
+
quiet.className = 'review-ask-quiet';
|
|
57
|
+
quiet.append(choice(t('Not now'), 'quiet', 'later'), choice(t('Don\'t ask again'), 'quiet', 'never'));
|
|
58
|
+
actions.append(
|
|
59
|
+
choice(t('Write a review'), null, 'review', REVIEW_URLS[language()] ?? REVIEW_URLS.es),
|
|
60
|
+
choice(t('Give it a star on GitHub'), 'primary', 'star', STAR_URL),
|
|
61
|
+
);
|
|
62
|
+
const note = document.createElement('p');
|
|
63
|
+
note.className = 'review-ask-note';
|
|
64
|
+
note.textContent = t('Both open in your browser. MADRE sends nothing.');
|
|
65
|
+
card.append(icon, title, body, actions, quiet, note);
|
|
66
|
+
dialog.append(card);
|
|
67
|
+
let settled = false;
|
|
68
|
+
function settle(answer) {
|
|
69
|
+
if (settled) return;
|
|
70
|
+
settled = true;
|
|
71
|
+
void post('/api/review-ask/answer', { moment, answer });
|
|
72
|
+
dialog.close();
|
|
73
|
+
}
|
|
74
|
+
// It waits for an answer: a press on the dim ground around it does nothing (2026-10-11, it went
|
|
75
|
+
// away under a stray click). Esc is an answer, «not now».
|
|
76
|
+
dialog.addEventListener('cancel', () => settle('later'));
|
|
77
|
+
dialog.addEventListener('close', () => { settle('later'); setTimeout(() => dialog?.remove(), 300); });
|
|
78
|
+
document.body.append(dialog);
|
|
79
|
+
dialog.showModal();
|
|
80
|
+
}
|
|
81
|
+
setTimeout(() => void tick(), 4000).unref?.();
|
|
82
|
+
const timer = setInterval(() => void tick(), TICK_MS);
|
|
83
|
+
timer.unref?.();
|
|
84
|
+
return { tick, ask };
|
|
85
|
+
}
|