@jossuealcala/madre 1.0.0 → 1.0.1
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 +45 -1
- package/CONTRIBUTING.md +5 -1
- package/NOTICE +20 -1
- package/README.md +8 -7
- package/TRADEMARKS.md +65 -0
- package/docs/INTERNALS.md +2 -2
- package/docs/REFERENCE.md +6 -5
- package/docs/madre-banner.png +0 -0
- package/package.json +4 -3
- package/public/app.js +529 -91
- package/public/es.js +1330 -1070
- package/public/macroverso.js +22 -2
- package/public/salas-mac.css +518 -24
- package/public/salas-mac.html +25 -21
- package/public/salas-mac.js +1454 -125
- package/public/styles.css +167 -3
- package/public/tour-chapters.js +162 -52
- package/public/tour.js +48 -12
- package/public/troubleshooting.js +2 -2
- package/src/auth-probe.mjs +29 -6
- package/src/credentials.mjs +80 -0
- package/src/directives.mjs +6 -6
- package/src/extensions.mjs +31 -10
- package/src/heartbeat.mjs +55 -0
- package/src/local-ai.mjs +48 -0
- package/src/looks.mjs +38 -5
- package/src/models.mjs +38 -0
- package/src/modules/ollama.mjs +14 -2
- package/src/outbound.mjs +17 -0
- package/src/room/escalation.mjs +1 -0
- package/src/room.mjs +60 -19
- package/src/server.mjs +350 -27
- package/src/tour.mjs +24 -9
- package/src/whats-new.mjs +10 -10
- package/docs/madre-banner.svg +0 -25
package/public/macroverso.js
CHANGED
|
@@ -573,6 +573,15 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
573
573
|
now[key] = answer ?? { unreachable: true };
|
|
574
574
|
if (now.loading) delete now.loading[key];
|
|
575
575
|
if (!full) { now.dirty = true; redraw(); }
|
|
576
|
+
// A saturated machine can miss one read while the room is still alive. Do not keep
|
|
577
|
+
// that transient failure as the universe's permanent texture.
|
|
578
|
+
if (now[key].unreachable || now[key].outdated) setTimeout(() => {
|
|
579
|
+
const current = universes.find((item) => item.room.id === one.room.id);
|
|
580
|
+
if (!current || current.face !== one.face || (!current[key]?.unreachable && !current[key]?.outdated)) return;
|
|
581
|
+
current[key] = null;
|
|
582
|
+
if (full) { if (focus === current && !live) enterLive(current); }
|
|
583
|
+
else { current.dirty = true; redraw(); }
|
|
584
|
+
}, 5000);
|
|
576
585
|
return now[key];
|
|
577
586
|
});
|
|
578
587
|
one.loading = { ...(one.loading ?? {}), [key]: asked };
|
|
@@ -1345,8 +1354,16 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
1345
1354
|
|
|
1346
1355
|
// Pointer: a drag on the space moves it; a drag on the chosen universe turns it; a click picks a
|
|
1347
1356
|
// universe, or a memory inside the chosen one; the wheel brings the space closer round the pointer.
|
|
1357
|
+
const covered = (event) => {
|
|
1358
|
+
const panels = [...windows.map((win) => win.el), card, ...document.querySelectorAll('dialog[open], .tree.window, .surface.window, .conv-window, .browser-dock.window')];
|
|
1359
|
+
return panels.some((panel) => {
|
|
1360
|
+
if (panel.hidden || panel.contains(canvas)) return false;
|
|
1361
|
+
const rect = panel.getBoundingClientRect();
|
|
1362
|
+
return event.clientX >= rect.left && event.clientX <= rect.right && event.clientY >= rect.top && event.clientY <= rect.bottom;
|
|
1363
|
+
});
|
|
1364
|
+
};
|
|
1348
1365
|
canvas.addEventListener('pointerdown', (event) => {
|
|
1349
|
-
if (event.button !== 0) return;
|
|
1366
|
+
if (event.button !== 0 || covered(event)) return;
|
|
1350
1367
|
drag.active = true;
|
|
1351
1368
|
drag.moved = false;
|
|
1352
1369
|
drag.turning = Boolean(liveAt(event)?.inside);
|
|
@@ -1357,6 +1374,7 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
1357
1374
|
try { canvas.setPointerCapture(event.pointerId); } catch { /* the pointer already left */ }
|
|
1358
1375
|
});
|
|
1359
1376
|
canvas.addEventListener('pointermove', (event) => {
|
|
1377
|
+
if (covered(event)) return;
|
|
1360
1378
|
const box = canvas.getBoundingClientRect();
|
|
1361
1379
|
pointer = { x: event.clientX - box.left, y: event.clientY - box.top };
|
|
1362
1380
|
if (drag.active) {
|
|
@@ -1400,7 +1418,7 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
1400
1418
|
});
|
|
1401
1419
|
const release = (event) => {
|
|
1402
1420
|
// Let go over another universe: the notes of the one carried would travel to it.
|
|
1403
|
-
if (linking?.over && event?.type === 'pointerup') actions.link?.(linking.from.room, linking.over.room);
|
|
1421
|
+
if (linking?.over && event?.type === 'pointerup' && !covered(event)) actions.link?.(linking.from.room, linking.over.room);
|
|
1404
1422
|
linking = null;
|
|
1405
1423
|
drag.active = false;
|
|
1406
1424
|
drag.turning = false;
|
|
@@ -1412,6 +1430,7 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
1412
1430
|
canvas.addEventListener('pointercancel', release);
|
|
1413
1431
|
canvas.addEventListener('pointerleave', () => { hover = null; pointer = null; if (live) live.scene.hover = null; redraw(); });
|
|
1414
1432
|
canvas.addEventListener('click', (event) => {
|
|
1433
|
+
if (covered(event)) return;
|
|
1415
1434
|
if (drag.moved) { drag.moved = false; return; }
|
|
1416
1435
|
const over = liveAt(event);
|
|
1417
1436
|
if (over?.inside && live) {
|
|
@@ -1428,6 +1447,7 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
1428
1447
|
choose(one && one !== focus ? one : focus && !one ? null : one);
|
|
1429
1448
|
});
|
|
1430
1449
|
canvas.addEventListener('wheel', (event) => {
|
|
1450
|
+
if (covered(event)) return;
|
|
1431
1451
|
event.preventDefault();
|
|
1432
1452
|
const rect = canvas.getBoundingClientRect();
|
|
1433
1453
|
const px = event.clientX - rect.left, py = event.clientY - rect.top;
|