@jossuealcala/madre 1.1.3 → 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.
- package/CHANGELOG.en.md +20 -1
- package/CHANGELOG.md +20 -1
- package/TRADEMARKS.md +6 -2
- package/bin/madre.mjs +4 -2
- package/docs/REFERENCE.md +3 -3
- package/docs/SDK.md +28 -1
- package/docs/en/REFERENCE.md +2 -2
- package/docs/en/SDK.md +26 -0
- package/docs/sdk/hello-module.mjs +38 -3
- package/habilidades/explicamelo-facil/HABILIDAD.md +19 -0
- package/habilidades/hojas-de-calculo/HABILIDAD.md +18 -0
- package/habilidades/mensajes-a-clientes/HABILIDAD.md +19 -0
- package/habilidades/publicaciones-para-redes/HABILIDAD.md +19 -0
- package/habilidades/resumen-y-pendientes/HABILIDAD.md +18 -0
- package/habilidades/tu-pagina-paso-a-paso/HABILIDAD.md +19 -0
- package/package.json +4 -3
- package/public/activity.js +57 -22
- package/public/app.js +3998 -762
- package/public/assets/brand/OFL-SpaceGrotesk.txt +93 -0
- package/public/assets/brand/SpaceGrotesk-latin-ext.woff2 +0 -0
- package/public/assets/brand/SpaceGrotesk-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 -1
- package/public/assets/brand/madre-favicon.svg +1 -1
- package/public/attribution.js +28 -27
- package/public/auto-open.js +102 -0
- package/public/brands.js +9 -6
- package/public/changes.js +63 -0
- package/public/en.js +1085 -101
- package/public/es.js +2395 -1688
- package/public/i18n.js +11 -0
- package/public/index.html +28 -27
- package/public/loader.js +322 -117
- package/public/macroverso.js +33 -350
- package/public/manual-content.js +37 -7
- package/public/manual.js +21 -6
- package/public/market-view.js +212 -105
- package/public/market.js +10 -2
- package/public/mcp-catalog.js +7 -2
- package/public/missions.js +169 -0
- package/public/news-scenes.js +110 -3
- package/public/nostromo-engine.js +935 -654
- package/public/notices.js +14 -2
- package/public/notifications.js +119 -0
- package/public/provider-marks.js +170 -0
- package/public/provider-pick.js +147 -0
- package/public/resay.js +1 -0
- package/public/review-ask.js +16 -13
- package/public/routing.js +29 -3
- package/public/salas-mac.css +257 -40
- package/public/salas-mac.html +5 -5
- package/public/salas-mac.js +376 -97
- package/public/salas.css +2 -2
- package/public/salas.html +2 -2
- package/public/salas.js +1 -1
- package/public/starters.js +128 -0
- package/public/styles.css +2656 -336
- package/public/subscription.js +303 -0
- package/public/terms-field.js +170 -0
- package/public/terms.js +117 -19
- package/public/tips.js +41 -7
- package/public/tour-chapters.js +35 -35
- package/public/tour.js +333 -43
- package/public/troubleshooting.js +100 -7
- package/public/welcome-scene.js +117 -29
- package/public/welcome.js +364 -60
- package/src/adapters/claude.mjs +2 -1
- package/src/adapters/codex.mjs +2 -1
- package/src/adapters/cursor.mjs +9 -6
- package/src/adapters/gemini.mjs +4 -0
- package/src/adapters/grok.mjs +6 -4
- package/src/adapters/madre.mjs +71 -23
- package/src/adapters/opencode.mjs +15 -2
- package/src/adapters/steps.mjs +176 -0
- package/src/app-invite.mjs +90 -0
- package/src/billing-key.mjs +8 -0
- package/src/billing.mjs +317 -0
- package/src/bridge/policy.mjs +1 -1
- package/src/capabilities.mjs +17 -11
- package/src/chats.mjs +44 -2
- package/src/checkpoint.mjs +5 -1
- package/src/commands.mjs +5 -2
- package/src/directives.mjs +1 -0
- package/src/event-store.mjs +15 -0
- package/src/extensions.mjs +5 -1
- package/src/ficha.mjs +16 -0
- package/src/image-studio.mjs +13 -3
- package/src/install-metrics.mjs +9 -3
- package/src/lease.mjs +1 -1
- package/src/looks.mjs +4 -1
- package/src/mcp/image-server.mjs +59 -90
- package/src/modules/ahp.mjs +2 -1
- package/src/modules/github.mjs +6 -2
- package/src/modules/image-providers.mjs +281 -0
- package/src/modules/image-studio.mjs +100 -19
- package/src/modules/index.mjs +7 -1
- package/src/modules/intents-observe.mjs +3 -1
- package/src/modules/playwright.mjs +33 -4
- package/src/modules/reminders.mjs +42 -2
- package/src/modules/ripley.mjs +2 -1
- package/src/modules/sdk.mjs +6 -1
- package/src/opencode-health.mjs +1 -1
- package/src/outbound.mjs +80 -6
- package/src/quota-sources.mjs +148 -3
- package/src/review-ask.mjs +55 -31
- package/src/room/changes.mjs +79 -0
- package/src/room/economy.mjs +1 -1
- package/src/room/guard.mjs +8 -1
- package/src/room/prompt.mjs +20 -4
- package/src/room.mjs +87 -21
- package/src/salas.mjs +30 -3
- package/src/server.mjs +545 -59
- package/src/setup.mjs +1 -1
- package/src/skills.mjs +10 -0
- package/src/terms.mjs +23 -5
- package/src/tour.mjs +18 -3
- package/src/updates.mjs +47 -4
- package/src/web-preview.mjs +181 -0
- package/src/whats-new.mjs +76 -4
package/public/macroverso.js
CHANGED
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
// for less motion gets one still frame redrawn when something changes. No line joins two universes
|
|
25
25
|
// until a link exists (phase 3c).
|
|
26
26
|
|
|
27
|
-
import { COLLAPSED, FOCUS_VEIL, MEMORY_COLORS, NEURAL_AXON, NEURAL_COLORS, NEURAL_CROSSFADE, NEURAL_IGNITION, PITCH_LIMIT, TURN_PER_PIXEL, alongCurve, collapsedChip, createNostromo, currentAlong, drawNeuralBulb,
|
|
27
|
+
import { COLLAPSED, FOCUS_VEIL, MEMORY_COLORS, NEURAL_AXON, NEURAL_COLORS, NEURAL_CROSSFADE, NEURAL_IGNITION, PITCH_LIMIT, TURN_PER_PIXEL, alongCurve, buildPlanets, collapsedChip, createNostromo, currentAlong, drawNeuralBulb, drawSun, hexAlpha, hexMix, magmaMap, neuralGround, neuronChip, neuronGlow, planetChip, sunOrb, texturesReady } from './nostromo-engine.js';
|
|
28
28
|
import { createStrain, inviteNeural, neuralKey, paintNeuralKey, tellViews } from './neural.js';
|
|
29
29
|
import { trazo } from './icons.js';
|
|
30
|
+
import { dateWords } from './i18n.js';
|
|
30
31
|
|
|
31
32
|
const KINDS = Object.keys(MEMORY_COLORS);
|
|
32
33
|
const TILT = 0.42; // how flat the orbits read: the plane seen a little from above
|
|
@@ -65,242 +66,7 @@ function canvasOf(width, height) {
|
|
|
65
66
|
return canvas;
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
// with one eye that sees everything, in violets, purples and blues. Drawn here, on canvas 2D, from
|
|
70
|
-
// nothing but noise generated here:
|
|
71
|
-
// the sphere — gas warped by gas (a nebula, not a marble), magenta and cyan drifting through the
|
|
72
|
-
// violet, dark lanes of dust, knots of light; lit from the top left, so it has a day side, a
|
|
73
|
-
// terminator and a night side, a soft sheen and a rim lit from behind: round, not a disc;
|
|
74
|
-
// the eye — on the sphere itself, so it foreshortens as it looks aside: an iris of fibres and
|
|
75
|
-
// crypts with a darker limbal ring and a corona, a pupil that opens a little when a universe is
|
|
76
|
-
// carried to it, the light's reflection in it, lids of gas that blink now and then; it follows
|
|
77
|
-
// the person (the pointer), with the small jumps of a living eye;
|
|
78
|
-
// round it — an atmosphere that breathes, wisps of nebula turning two ways, motes of light.
|
|
79
|
-
// The sphere is painted small and scaled up (gas is soft), at most ORB_FPS times a second; the
|
|
80
|
-
// wisps are painted once.
|
|
81
|
-
const ORB_SIDE = 176; // px of the sphere's own canvas
|
|
82
|
-
const ORB_FPS = 30; // the most the sphere is painted again in a second
|
|
83
|
-
const ORB_MOTES = 18; // motes of light in orbit round it
|
|
84
|
-
// The gas, from the deep to the lit: indigo, violet, purple, blue, a pale lilac at the brightest.
|
|
85
|
-
const ORB_GAS = [[0, 7, 3, 24], [0.18, 28, 10, 74], [0.36, 62, 24, 152], [0.52, 108, 50, 222], [0.66, 146, 80, 250], [0.78, 92, 118, 255], [0.9, 158, 188, 255], [1, 236, 228, 255]];
|
|
86
|
-
const ORB_LIGHT = (() => { const l = [-0.46, 0.56, 0.69]; const n = Math.hypot(...l); return l.map((v) => v / n); })();
|
|
87
|
-
|
|
88
|
-
// Fractal value noise on a band that wraps round in x (a sphere's longitude), 0..1, stretched.
|
|
89
|
-
function orbNoise(width, height, seed, octaves, stretch = 0.5) {
|
|
90
|
-
const field = new Float32Array(width * height);
|
|
91
|
-
const cell = (x, y, o) => {
|
|
92
|
-
let h = Math.imul(x + 1, 374761393) ^ Math.imul(y + 7, 668265263) ^ Math.imul(seed * 31 + o, 2246822519);
|
|
93
|
-
h = Math.imul(h ^ (h >>> 13), 1274126177);
|
|
94
|
-
return ((h ^ (h >>> 16)) >>> 0) / 4294967295;
|
|
95
|
-
};
|
|
96
|
-
let amp = 1;
|
|
97
|
-
for (let o = 0; o < octaves; o += 1) {
|
|
98
|
-
const cols = Math.min(6 << o, Math.floor(width / 3));
|
|
99
|
-
const rows = Math.max(2, Math.min(Math.round(cols * stretch), Math.floor(height / 4)));
|
|
100
|
-
for (let y = 0; y < height; y += 1) {
|
|
101
|
-
const fy = (y / height) * rows, y0 = Math.floor(fy), ty = fy - y0, sy = ty * ty * (3 - 2 * ty);
|
|
102
|
-
for (let x = 0; x < width; x += 1) {
|
|
103
|
-
const fx = (x / width) * cols, x0 = Math.floor(fx) % cols, tx = fx - Math.floor(fx), sx = tx * tx * (3 - 2 * tx);
|
|
104
|
-
const x1 = (x0 + 1) % cols;
|
|
105
|
-
const a = cell(x0, y0, o), b = cell(x1, y0, o), c = cell(x0, y0 + 1, o), d = cell(x1, y0 + 1, o);
|
|
106
|
-
field[y * width + x] += amp * (a + (b - a) * sx + (c - a) * sy + (a - b - c + d) * sx * sy);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
amp *= 0.52;
|
|
110
|
-
}
|
|
111
|
-
let low = Infinity, high = -Infinity;
|
|
112
|
-
for (const value of field) { low = Math.min(low, value); high = Math.max(high, value); }
|
|
113
|
-
for (let i = 0; i < field.length; i += 1) field[i] = (field[i] - low) / (high - low || 1);
|
|
114
|
-
return field;
|
|
115
|
-
}
|
|
116
|
-
const smooth = (edge0, edge1, x) => { const k = clamp((x - edge0) / (edge1 - edge0), 0, 1); return k * k * (3 - 2 * k); };
|
|
117
|
-
|
|
118
|
-
function bishopOrb() {
|
|
119
|
-
const side = ORB_SIDE;
|
|
120
|
-
const W = 256, H = 128;
|
|
121
|
-
const gas = orbNoise(W, H, 7, 5, 1.1);
|
|
122
|
-
const fine = orbNoise(W, H, 13, 4, 0.9);
|
|
123
|
-
const warp = orbNoise(W, H, 29, 3, 0.8);
|
|
124
|
-
const tint = orbNoise(W, H, 41, 3, 0.7);
|
|
125
|
-
const air = orbNoise(W, H, 19, 4);
|
|
126
|
-
// Knots of light in the gas: a few bright points, soft.
|
|
127
|
-
const knots = new Float32Array(W * H);
|
|
128
|
-
{
|
|
129
|
-
const rnd = random(77);
|
|
130
|
-
for (let k = 0; k < 80; k += 1) {
|
|
131
|
-
const kx = Math.floor(rnd() * W), ky = 6 + Math.floor(rnd() * (H - 12)), bright = 0.35 + rnd() * 0.65;
|
|
132
|
-
for (let dy = -2; dy <= 2; dy += 1) for (let dx = -2; dx <= 2; dx += 1) {
|
|
133
|
-
const at = (ky + dy) * W + ((kx + dx + W) % W);
|
|
134
|
-
knots[at] = Math.max(knots[at], bright * Math.exp(-(dx * dx + dy * dy) / 1.3));
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
const sample = (field, u, v) => {
|
|
139
|
-
const x = (((u % 1) + 1) % 1) * W, y = clamp(v, 0, 0.999) * (H - 1);
|
|
140
|
-
const x0 = Math.floor(x), y0 = Math.floor(y), tx = x - x0, ty = y - y0;
|
|
141
|
-
const x1 = (x0 + 1) % W, y1 = Math.min(H - 1, y0 + 1);
|
|
142
|
-
const a = field[y0 * W + x0], b = field[y0 * W + x1], c = field[y1 * W + x0], d = field[y1 * W + x1];
|
|
143
|
-
return a + (b - a) * tx + (c - a) * ty + (a - b - c + d) * tx * ty;
|
|
144
|
-
};
|
|
145
|
-
const lut = new Float32Array(256 * 3);
|
|
146
|
-
for (let i = 0; i < 256; i += 1) {
|
|
147
|
-
const k = i / 255;
|
|
148
|
-
const at = ORB_GAS.findIndex((stop) => stop[0] >= k);
|
|
149
|
-
const hi = ORB_GAS[Math.max(1, at)], lo = ORB_GAS[Math.max(0, at - 1)];
|
|
150
|
-
const f = hi[0] === lo[0] ? 0 : (k - lo[0]) / (hi[0] - lo[0]);
|
|
151
|
-
for (let c = 0; c < 3; c += 1) lut[i * 3 + c] = lo[c + 1] + (hi[c + 1] - lo[c + 1]) * f;
|
|
152
|
-
}
|
|
153
|
-
// The disc, once: for every pixel inside it, its normal, where on the sphere it looks, and how
|
|
154
|
-
// the light falls on it (diffuse, sheen, rim).
|
|
155
|
-
const N = side * side;
|
|
156
|
-
const nxs = new Float32Array(N), nys = new Float32Array(N), nzs = new Float32Array(N);
|
|
157
|
-
const lon = new Float32Array(N), lat = new Float32Array(N), inside = new Uint8Array(N);
|
|
158
|
-
const lit = new Float32Array(N), sheen = new Float32Array(N), rimOf = new Float32Array(N);
|
|
159
|
-
const [Lx, Ly, Lz] = ORB_LIGHT;
|
|
160
|
-
for (let py = 0; py < side; py += 1) {
|
|
161
|
-
for (let px = 0; px < side; px += 1) {
|
|
162
|
-
const i = py * side + px;
|
|
163
|
-
const sx = ((px + 0.5) / side) * 2 - 1, sy = ((py + 0.5) / side) * 2 - 1;
|
|
164
|
-
const d2 = sx * sx + sy * sy;
|
|
165
|
-
if (d2 > 1) continue;
|
|
166
|
-
const z = Math.sqrt(1 - d2);
|
|
167
|
-
inside[i] = 1;
|
|
168
|
-
nxs[i] = sx; nys[i] = -sy; nzs[i] = z;
|
|
169
|
-
lon[i] = Math.atan2(sx, z); lat[i] = Math.asin(clamp(-sy, -1, 1));
|
|
170
|
-
const dot = sx * Lx - sy * Ly + z * Lz;
|
|
171
|
-
lit[i] = Math.max(0, dot);
|
|
172
|
-
sheen[i] = Math.max(0, 2 * dot * z - Lz) ** 18;
|
|
173
|
-
rimOf[i] = (1 - z) ** 2.4;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
const canvas = canvasOf(side, side);
|
|
177
|
-
const ctx = canvas.getContext('2d');
|
|
178
|
-
const image = ctx.createImageData(side, side);
|
|
179
|
-
const data = image.data;
|
|
180
|
-
|
|
181
|
-
// The wisps round it, painted once: a nebula in a ring from the rim outward, thinning away.
|
|
182
|
-
const WS = 340, REACH = 2.6;
|
|
183
|
-
const wisps = canvasOf(WS, WS);
|
|
184
|
-
{
|
|
185
|
-
const wctx = wisps.getContext('2d');
|
|
186
|
-
const out = wctx.createImageData(WS, WS);
|
|
187
|
-
for (let py = 0; py < WS; py += 1) {
|
|
188
|
-
for (let px = 0; px < WS; px += 1) {
|
|
189
|
-
const dx = (px - WS / 2) / (WS / 2), dy = (py - WS / 2) / (WS / 2);
|
|
190
|
-
const rr = Math.hypot(dx, dy) * REACH;
|
|
191
|
-
if (rr < 0.82 || rr > REACH) continue;
|
|
192
|
-
const angle = Math.atan2(dy, dx) / (Math.PI * 2) + 0.5;
|
|
193
|
-
const radial = rr / REACH;
|
|
194
|
-
const bend = sample(warp, angle * 2, radial) - 0.5;
|
|
195
|
-
const f = sample(air, angle * 2 + bend * 0.3, radial + bend * 0.2) * 0.6 + sample(fine, angle * 4 + 0.21, radial * 0.7 + 0.2) * 0.4;
|
|
196
|
-
const fall = smooth(0.86, 1.06, rr) * (1 - smooth(1.15, REACH, rr));
|
|
197
|
-
const a = fall * f ** 2.3;
|
|
198
|
-
const h = sample(tint, angle * 2, radial);
|
|
199
|
-
const mag = smooth(0.6, 0.9, h), cyan = smooth(0.6, 0.9, 1 - h);
|
|
200
|
-
const o = (py * WS + px) * 4;
|
|
201
|
-
out.data[o] = 112 + 90 * mag - 40 * cyan; out.data[o + 1] = 58 + 40 * cyan; out.data[o + 2] = 240 + 15 * cyan; out.data[o + 3] = 255 * a;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
wctx.putImageData(out, 0, 0);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// One frame of the sphere. `eye`: where it looks (x, y: -1..1 across the screen), how open its
|
|
208
|
-
// pupil is (`open`, 0..1), how closed its lids are (`lid`, 0..1), and whether BISHOP sleeps.
|
|
209
|
-
function paint(t, eye) {
|
|
210
|
-
// The eye's direction on the sphere and the frame round it.
|
|
211
|
-
let gx = eye.x * 0.62, gy = -eye.y * 0.62;
|
|
212
|
-
const gz = Math.sqrt(Math.max(0.05, 1 - gx * gx - gy * gy));
|
|
213
|
-
const gl = Math.hypot(gx, gy, gz); gx /= gl; gy /= gl; const gzn = gz / gl;
|
|
214
|
-
const rl = Math.hypot(gzn, gx) || 1;
|
|
215
|
-
const Rx = gzn / rl, Rz = -gx / rl; // right: up × gaze
|
|
216
|
-
const Ux = gy * Rz, Uy = gzn * Rx - gx * Rz, Uz = -gy * Rx; // up: gaze × right
|
|
217
|
-
const ex = gx, ey = -gy; // the eye's centre on the disc
|
|
218
|
-
const turn = t * 0.02;
|
|
219
|
-
const life = eye.asleep ? 0.45 : 1;
|
|
220
|
-
const pupilR = 0.082 + 0.05 * eye.open + 0.004 * Math.sin(t * 1.3);
|
|
221
|
-
const irisR = 0.3;
|
|
222
|
-
const lidHalf = (1 - eye.lid) * 0.36;
|
|
223
|
-
for (let i = 0; i < N; i += 1) {
|
|
224
|
-
const o = i * 4;
|
|
225
|
-
if (!inside[i]) { data[o + 3] = 0; continue; }
|
|
226
|
-
const nx = nxs[i], ny = nys[i], nz = nzs[i];
|
|
227
|
-
const c = nx * gx + ny * gy + nz * gzn;
|
|
228
|
-
const d2 = Math.max(0, 2 * (1 - c)); // chord² from the eye's centre
|
|
229
|
-
// The vortex: the gas winds into the eye, a little, faster near it.
|
|
230
|
-
const wind = 0.9 / (1 + d2 * 26) + t * 0.22 / (1 + d2 * 60);
|
|
231
|
-
const sxp = nx, syp = -ny;
|
|
232
|
-
const dx = sxp - ex, dy = syp - ey;
|
|
233
|
-
const cw = Math.cos(wind), sw = Math.sin(wind);
|
|
234
|
-
const qx = ex + dx * cw - dy * sw, qy = ey + dx * sw + dy * cw;
|
|
235
|
-
let j = Math.round(((qy + 1) / 2) * side - 0.5) * side + Math.round(((qx + 1) / 2) * side - 0.5);
|
|
236
|
-
if (j < 0 || j >= N || !inside[j]) j = i;
|
|
237
|
-
const u = lon[j] / (Math.PI * 2), v = lat[j] / Math.PI + 0.5;
|
|
238
|
-
// A nebula: the gas warped by gas.
|
|
239
|
-
const wu = sample(warp, u * 2, v * 2) - 0.5, wv = sample(warp, u * 2 + 0.31, v * 2 + 0.17) - 0.5;
|
|
240
|
-
const gu = u + turn + wu * 0.18, gv = v + wv * 0.12;
|
|
241
|
-
let g = sample(gas, gu, gv) * 0.6 + sample(fine, gu * 3 + 0.37, gv * 2.6) * 0.4;
|
|
242
|
-
g = smooth(0.1, 0.9, g) + (sample(fine, gu * 7 + 0.11, gv * 5.2) - 0.5) * 0.18;
|
|
243
|
-
const k = clamp(Math.round(g * 255), 0, 255) * 3;
|
|
244
|
-
let r = lut[k], gr = lut[k + 1], b = lut[k + 2];
|
|
245
|
-
// Magenta and cyan drifting through the violet; lanes of dust.
|
|
246
|
-
const h = sample(tint, gu * 1.4, gv * 1.4);
|
|
247
|
-
const mag = smooth(0.62, 0.92, h) * 0.38, cyan = smooth(0.62, 0.92, 1 - h) * 0.3;
|
|
248
|
-
r += (198 * g - r) * mag + (80 * g - r) * cyan; gr += (70 * g - gr) * mag + (196 * g - gr) * cyan; b += (226 * g - b) * mag + (255 * g - b) * cyan;
|
|
249
|
-
const dust = 1 - smooth(0.6, 0.82, sample(warp, gu * 3.3 + 0.6, gv * 2.9)) * 0.55;
|
|
250
|
-
// The light: a day side and a night side, a sheen, a rim lit from behind; the gas glows a little of its own.
|
|
251
|
-
const shade = (0.14 + 0.95 * lit[i]) * dust;
|
|
252
|
-
const glow = 0.1 + 0.2 * g;
|
|
253
|
-
r = r * (shade + glow) * life; gr = gr * (shade + glow) * life; b = b * (shade + glow) * life;
|
|
254
|
-
const knot = sample(knots, gu, gv) * life;
|
|
255
|
-
r += 255 * knot; gr += 214 * knot; b += 255 * knot;
|
|
256
|
-
const s = sheen[i] * 0.4 * life;
|
|
257
|
-
r += 170 * s; gr += 180 * s; b += 255 * s;
|
|
258
|
-
const rim = rimOf[i] * life;
|
|
259
|
-
r += 60 * rim; gr += 96 * rim; b += 255 * rim;
|
|
260
|
-
// The eye, on the sphere.
|
|
261
|
-
if (c > 0.6 && life > 0.5) {
|
|
262
|
-
const lx = nx * Rx + nz * Rz, ly = nx * Ux + ny * Uy + nz * Uz;
|
|
263
|
-
const e = Math.sqrt(d2);
|
|
264
|
-
const ay = Math.abs(ly);
|
|
265
|
-
const open = 1 - smooth(lidHalf - 0.035, lidHalf + 0.008, ay);
|
|
266
|
-
// The lids' crease, where gas meets the eye.
|
|
267
|
-
const crease = eye.lid > 0.02 || lidHalf < 0.34 ? Math.exp(-(((ay - lidHalf) / 0.025) ** 2)) * 0.35 * (e < irisR + 0.12 ? 1 : 0) : 0;
|
|
268
|
-
if (open > 0) {
|
|
269
|
-
const angle = Math.atan2(ly, lx) / (Math.PI * 2) + 0.5;
|
|
270
|
-
const fibre = 0.55 + 0.45 * sample(fine, angle * 9, e * 1.6 + 0.3);
|
|
271
|
-
// Crypts: soft hollows in the middle of the iris, never ticks at its rim.
|
|
272
|
-
const crypt = smooth(0.62, 0.86, sample(warp, angle * 3 + 0.2, e * 1.8 + 0.4)) * Math.exp(-(((e - irisR * 0.55) / (irisR * 0.28)) ** 2));
|
|
273
|
-
const irisIn = 1 - smooth(irisR - 0.018, irisR + 0.01, e);
|
|
274
|
-
const limbal = smooth(irisR - 0.075, irisR - 0.005, e);
|
|
275
|
-
const collar = Math.exp(-(((e - pupilR * 1.75) / 0.022) ** 2));
|
|
276
|
-
const depthIn = e / irisR;
|
|
277
|
-
let ir = 150 + 70 * (1 - depthIn), ig = 150 + 60 * (1 - depthIn), ib = 255;
|
|
278
|
-
const fibreLight = (0.55 + 0.6 * fibre) * (1 - 0.3 * crypt) * (1 - 0.45 * limbal) + 0.35 * collar;
|
|
279
|
-
ir *= fibreLight; ig *= fibreLight; ib *= Math.min(1.2, fibreLight + 0.15);
|
|
280
|
-
// The iris is lit by the same light, a little: a curved thing, not a sticker.
|
|
281
|
-
const irisLit = 0.62 + 0.45 * lit[i];
|
|
282
|
-
ir *= irisLit; ig *= irisLit; ib *= irisLit;
|
|
283
|
-
const mix = irisIn * open;
|
|
284
|
-
r += (ir - r) * mix; gr += (ig - gr) * mix; b += (ib - b) * mix;
|
|
285
|
-
const pupil = (1 - smooth(pupilR - 0.012, pupilR + 0.004, e)) * open;
|
|
286
|
-
r += (5 - r) * pupil; gr += (2 - gr) * pupil; b += (16 - b) * pupil;
|
|
287
|
-
const corona = Math.exp(-(((e - irisR) / 0.075) ** 2)) * 0.42 * open;
|
|
288
|
-
r += 70 * corona; gr += 116 * corona; b += 255 * corona;
|
|
289
|
-
// The light's reflection: where the light would glint, not where the eye looks.
|
|
290
|
-
const glint = Math.max(0, 1 - Math.hypot(sxp - (ex - 0.075), syp - (ey - 0.085)) / 0.028) * irisIn * open;
|
|
291
|
-
const glint2 = Math.max(0, 1 - Math.hypot(sxp - (ex + 0.045), syp - (ey + 0.06)) / 0.012) * irisIn * open * 0.5;
|
|
292
|
-
r += 255 * (glint + glint2); gr += 255 * (glint + glint2); b += 255 * (glint + glint2);
|
|
293
|
-
}
|
|
294
|
-
r *= 1 - crease; gr *= 1 - crease; b *= 1 - crease;
|
|
295
|
-
}
|
|
296
|
-
data[o] = r; data[o + 1] = gr; data[o + 2] = b;
|
|
297
|
-
// The edge is gas, not a line: it thins out, ragged with the gas itself.
|
|
298
|
-
data[o + 3] = 255 * (1 - smooth(0.92 + (g - 0.5) * 0.06, 1.0, Math.sqrt(1 - nz * nz)));
|
|
299
|
-
}
|
|
300
|
-
ctx.putImageData(image, 0, 0);
|
|
301
|
-
}
|
|
302
|
-
return { canvas, wisps, reach: REACH, paint, paintedAt: -1 };
|
|
303
|
-
}
|
|
69
|
+
const ORB_FPS = 30; // the most the centre's sun is painted again in a second
|
|
304
70
|
|
|
305
71
|
// How big a universe reads at zoom 1, in css px of radius: the more it knows, the bigger
|
|
306
72
|
// (2026-10-28), plainly enough to tell one project from another, and never past a size that looks
|
|
@@ -350,6 +116,8 @@ function paintUniverse(one, dpr, shown = null, neural = false) {
|
|
|
350
116
|
for (let step = 0; step < (one.settled ? 8 : RELAX_STEPS); step += 1) { t += 1 / 60; engine.stepNostromo(1, t); }
|
|
351
117
|
}
|
|
352
118
|
scene.cam = { x: 0, y: 0, scale: (css / 2 - 4) / BODY_REACH, manual: true };
|
|
119
|
+
// The Coordinator's memories ride round the sun drawn here (sunOrb): its own core is not drawn.
|
|
120
|
+
scene.noCore = Boolean(one.centre) && !neural;
|
|
353
121
|
if (data?.sealed) scene.cage = { at: 0, closed: true };
|
|
354
122
|
// Neural mode (public/neural.js): the universe drawn as a cluster of neurons round its bulb.
|
|
355
123
|
scene.neural = neural;
|
|
@@ -416,7 +184,7 @@ function paintStars(seed, count, biggest, dpr) {
|
|
|
416
184
|
return { canvas, side };
|
|
417
185
|
}
|
|
418
186
|
|
|
419
|
-
export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#
|
|
187
|
+
export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#34d399', accentInk = '#022c22', bishop = null, words, actions, neural: neuralStart = false }) {
|
|
420
188
|
const reduced = reducedMotion();
|
|
421
189
|
const layer = document.createElement('section');
|
|
422
190
|
layer.className = 'mv';
|
|
@@ -427,8 +195,8 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
427
195
|
canvas.className = 'mv-canvas';
|
|
428
196
|
canvas.tabIndex = 0;
|
|
429
197
|
// Its head is the Memory map's (styles.css, .nostromo-head; 2026-10-10): the name in small mono,
|
|
430
|
-
// what it holds in a line beside it, its keys at the end
|
|
431
|
-
//
|
|
198
|
+
// what it holds in a line beside it, its keys at the end; the kinds of memory, as the same planets
|
|
199
|
+
// (nostromo-engine.js, planetChip), along the bottom. The two maps read as one family.
|
|
432
200
|
const head = document.createElement('header');
|
|
433
201
|
head.className = 'mv-head nostromo-head';
|
|
434
202
|
const title = document.createElement('h2');
|
|
@@ -448,14 +216,14 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
448
216
|
chip.className = `k ${kind}`;
|
|
449
217
|
const said = document.createElement('i');
|
|
450
218
|
said.textContent = words.kinds?.[kind] ?? kind;
|
|
451
|
-
chip.append(asNeurons ? neuronChip(NEURAL_COLORS[kind] ?? hex, 16, kind === COLLAPSED ? 'dead' : 'alive') : kind === COLLAPSED ? collapsedChip(hex, 14) :
|
|
219
|
+
chip.append(asNeurons ? neuronChip(NEURAL_COLORS[kind] ?? hex, 16, kind === COLLAPSED ? 'dead' : 'alive') : kind === COLLAPSED ? collapsedChip(hex, 14) : planetChip(kind, 14), said);
|
|
452
220
|
chips.push(chip);
|
|
453
221
|
}
|
|
454
222
|
const chip = document.createElement('span');
|
|
455
223
|
chip.className = 'k dim';
|
|
456
224
|
const said = document.createElement('i');
|
|
457
225
|
said.textContent = words.kinds?.dim ?? 'Out of circulation';
|
|
458
|
-
chip.append(asNeurons ? neuronChip(NEURAL_COLORS.fact, 16, 'spent') :
|
|
226
|
+
chip.append(asNeurons ? neuronChip(NEURAL_COLORS.fact, 16, 'spent') : planetChip('fact', 14, { faded: true }), said);
|
|
459
227
|
chips.push(chip);
|
|
460
228
|
legend.replaceChildren(...chips);
|
|
461
229
|
};
|
|
@@ -484,7 +252,7 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
484
252
|
neuralButton.className = 'mother-close neural-key';
|
|
485
253
|
neuralKey(neuralButton);
|
|
486
254
|
keys.append(neuralButton, recenter, backTrack);
|
|
487
|
-
head.append(title, sub,
|
|
255
|
+
head.append(title, sub, keys);
|
|
488
256
|
const card = document.createElement('aside');
|
|
489
257
|
card.className = 'mv-card';
|
|
490
258
|
card.hidden = true;
|
|
@@ -492,7 +260,12 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
492
260
|
hint.className = 'mv-hint';
|
|
493
261
|
// A line of words, or the keys to move round it (public/neural.js, mapKeys).
|
|
494
262
|
if (typeof Node === 'function' && words.hint instanceof Node) hint.append(words.hint); else hint.textContent = words.hint;
|
|
495
|
-
|
|
263
|
+
// The kinds of memory and the ways to move sit along the bottom edge (2026-11-10), as in the
|
|
264
|
+
// Memory map: the head keeps only the name, what it holds and its keys.
|
|
265
|
+
const foot = document.createElement('div');
|
|
266
|
+
foot.className = 'nostromo-foot';
|
|
267
|
+
foot.append(legend, hint);
|
|
268
|
+
layer.append(canvas, head, card, foot);
|
|
496
269
|
host.append(layer);
|
|
497
270
|
|
|
498
271
|
const view = { w: 0, h: 0, dpr: 1 };
|
|
@@ -519,11 +292,10 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
519
292
|
let queued = false;
|
|
520
293
|
let resizeTimer = 0;
|
|
521
294
|
const drag = { active: false, moved: false, turning: false, link: null, x: 0, y: 0, x0: 0, y0: 0 };
|
|
522
|
-
// BISHOP at the centre: its room when the lobby knows it, and its
|
|
523
|
-
//
|
|
295
|
+
// BISHOP at the centre: its room when the lobby knows it, and its sun (sunOrb), made on first sight;
|
|
296
|
+
// and where the pointer is over the space.
|
|
524
297
|
const core = { centre: true, room: null, screen: null };
|
|
525
|
-
let
|
|
526
|
-
const gaze = { x: 0, y: 0, open: 0, at: 0, jumpAt: 0, jx: 0, jy: 0, blinkAt: -1, nextBlink: 3 + Math.random() * 4, twice: false };
|
|
298
|
+
let sun = null;
|
|
527
299
|
let pointer = null;
|
|
528
300
|
// Neural mode, switched from its key or because a project switched it: the space as it was fades
|
|
529
301
|
// over the new drawing, the light runs out from the centre, every universe is drawn again its new
|
|
@@ -562,7 +334,6 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
562
334
|
if (!layer.isConnected || !actions.mayTellViews?.()) return;
|
|
563
335
|
if (tellViews({ key: neuralButton, host: layer, neural, onSwitch: () => setNeuralMode(!neural) })) actions.toldViews?.();
|
|
564
336
|
}, 2200);
|
|
565
|
-
const motes = Array.from({ length: ORB_MOTES }, (_, i) => { const rnd = random(hash(`mote${i}`)); return { phase: rnd() * Math.PI * 2, reach: 1.3 + rnd() * 0.65, speed: 0.12 + rnd() * 0.2, tilt: (rnd() - 0.5) * 0.5, size: 0.35 + rnd() * 0.6 }; });
|
|
566
337
|
|
|
567
338
|
function layout(all) {
|
|
568
339
|
// BISHOP's own room is the centre, not a universe on an orbit.
|
|
@@ -679,6 +450,7 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
679
450
|
function tick() {
|
|
680
451
|
if (!textures.ready) {
|
|
681
452
|
magmaMap(12);
|
|
453
|
+
buildPlanets();
|
|
682
454
|
if (texturesReady()) {
|
|
683
455
|
textures.ready = true;
|
|
684
456
|
for (const one of [core, ...universes]) if (one.sprite && !one.sprite.ready) one.dirty = true;
|
|
@@ -974,13 +746,11 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
974
746
|
ctx.globalAlpha = 1;
|
|
975
747
|
}
|
|
976
748
|
|
|
977
|
-
// BISHOP at the centre: a
|
|
978
|
-
//
|
|
979
|
-
//
|
|
980
|
-
// carried onto it. Dim and slow while its room sleeps. Its name and its state under it.
|
|
749
|
+
// BISHOP at the centre: a sun in the planets view (sunOrb, 2026-11-10; it was a nebula with an eye),
|
|
750
|
+
// the bulb of the brain in the neural one. Dimmer while its room sleeps. Its name and its state
|
|
751
|
+
// under it.
|
|
981
752
|
function drawCentre(ctx, beat) {
|
|
982
753
|
if (!bishop) return;
|
|
983
|
-
if (!orb) orb = bishopOrb();
|
|
984
754
|
const room = core.room;
|
|
985
755
|
const awake = Boolean(room?.open);
|
|
986
756
|
const float = reduced ? 0 : Math.sin(clock * 0.8) * 3;
|
|
@@ -1002,101 +772,14 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
1002
772
|
const ignite = neuralSince === null ? 1 : clamp((clock - neuralSince) / NEURAL_IGNITION, 0, 1);
|
|
1003
773
|
drawNeuralBulb(ctx, p.x, p.y, r * 1.6, clock, { beat, light: awake ? 1 : 0.6, ignite, tone: 'bishop', still: reduced });
|
|
1004
774
|
} else {
|
|
1005
|
-
//
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
if (!reduced && clock > gaze.jumpAt) { gaze.jumpAt = clock + 0.6 + Math.random() * 1.2; gaze.jx = (Math.random() - 0.5) * 0.07; gaze.jy = (Math.random() - 0.5) * 0.05; }
|
|
1012
|
-
const toward = target ? { x: target.x - p.x, y: target.y - p.y } : { x: 0, y: 0 };
|
|
1013
|
-
const far = Math.hypot(toward.x, toward.y) + 180;
|
|
1014
|
-
const step = reduced ? 1 : clamp((clock - gaze.at) * 6, 0, 1);
|
|
1015
|
-
gaze.at = clock;
|
|
1016
|
-
gaze.x += (clamp(toward.x / far + gaze.jx, -1, 1) - gaze.x) * step;
|
|
1017
|
-
gaze.y += (clamp(toward.y / far + gaze.jy, -1, 1) - gaze.y) * step;
|
|
1018
|
-
gaze.open += ((linking?.over === core ? 1 : hover === core ? 0.45 : 0) - gaze.open) * step;
|
|
1019
|
-
// A blink now and then, sometimes two; the lids close fast and open a little slower.
|
|
1020
|
-
if (!reduced && awake && clock > gaze.nextBlink) {
|
|
1021
|
-
gaze.blinkAt = clock;
|
|
1022
|
-
gaze.twice = !gaze.twice && Math.random() < 0.25;
|
|
1023
|
-
gaze.nextBlink = clock + (gaze.twice ? 0.32 : 4 + Math.random() * 6);
|
|
1024
|
-
}
|
|
1025
|
-
const since = clock - gaze.blinkAt;
|
|
1026
|
-
const lid = gaze.blinkAt < 0 || since > 0.26 ? 0 : since < 0.09 ? since / 0.09 : 1 - (since - 0.09) / 0.17;
|
|
1027
|
-
if (clock - orb.paintedAt >= 1 / ORB_FPS || orb.paintedAt < 0 || lid > 0) {
|
|
1028
|
-
orb.paint(reduced ? 0 : clock, { x: gaze.x, y: gaze.y, open: gaze.open, lid: clamp(lid, 0, 1) * 0.94, asleep: !awake });
|
|
1029
|
-
orb.paintedAt = clock;
|
|
1030
|
-
}
|
|
1031
|
-
const life = awake ? 1 : 0.5;
|
|
1032
|
-
// The atmosphere: violet into blue, breathing slowly.
|
|
1033
|
-
ctx.globalCompositeOperation = 'lighter';
|
|
1034
|
-
const air = ctx.createRadialGradient(p.x, p.y, r * 0.8, p.x, p.y, r * (2.7 + 0.12 * beat));
|
|
1035
|
-
air.addColorStop(0, `rgba(122, 58, 238, ${0.3 * life})`);
|
|
1036
|
-
air.addColorStop(0.45, `rgba(72, 112, 255, ${0.12 * life})`);
|
|
1037
|
-
air.addColorStop(1, 'rgba(40, 20, 120, 0)');
|
|
1038
|
-
ctx.fillStyle = air;
|
|
1039
|
-
ctx.beginPath(); ctx.arc(p.x, p.y, r * (2.7 + 0.12 * beat), 0, Math.PI * 2); ctx.fill();
|
|
1040
|
-
// The wisps, turning two ways at once, as gas does.
|
|
1041
|
-
const span = r * orb.reach * 2;
|
|
1042
|
-
for (const [speed, alpha] of [[0.05, 0.8], [-0.033, 0.5]]) {
|
|
1043
|
-
ctx.save();
|
|
1044
|
-
ctx.translate(p.x, p.y);
|
|
1045
|
-
ctx.rotate(reduced ? 0 : clock * speed);
|
|
1046
|
-
ctx.globalAlpha = alpha * life;
|
|
1047
|
-
ctx.drawImage(orb.wisps, -span / 2, -span / 2, span, span);
|
|
1048
|
-
ctx.restore();
|
|
775
|
+
// The planets view: a sun (sunOrb). It turns slowly; asleep, it burns lower.
|
|
776
|
+
if (!sun) sun = sunOrb();
|
|
777
|
+
const life = awake ? 1 : 0.62;
|
|
778
|
+
if (clock - sun.paintedAt >= 1 / ORB_FPS || sun.paintedAt < 0) {
|
|
779
|
+
sun.paint(reduced ? 0 : clock * 0.035, life);
|
|
780
|
+
sun.paintedAt = clock;
|
|
1049
781
|
}
|
|
1050
|
-
|
|
1051
|
-
const drawMotes = (front) => {
|
|
1052
|
-
for (const mote of motes) {
|
|
1053
|
-
const a = mote.phase + (reduced ? 0 : clock * mote.speed);
|
|
1054
|
-
const ahead = Math.sin(a) > 0;
|
|
1055
|
-
if (ahead !== front) continue;
|
|
1056
|
-
const mx = p.x + Math.cos(a) * r * mote.reach;
|
|
1057
|
-
const my = p.y + Math.sin(a) * r * mote.reach * 0.3 + mote.tilt * r * Math.cos(a);
|
|
1058
|
-
const size = mote.size * (ahead ? 1 : 0.7) * clamp(camera.zoom, 0.7, 1.4);
|
|
1059
|
-
const glow = ctx.createRadialGradient(mx, my, 0, mx, my, size * 3);
|
|
1060
|
-
glow.addColorStop(0, `rgba(214, 206, 255, ${(ahead ? 0.6 : 0.25) * life})`);
|
|
1061
|
-
glow.addColorStop(1, 'rgba(120, 140, 255, 0)');
|
|
1062
|
-
ctx.fillStyle = glow;
|
|
1063
|
-
ctx.beginPath(); ctx.arc(mx, my, size * 3, 0, Math.PI * 2); ctx.fill();
|
|
1064
|
-
}
|
|
1065
|
-
};
|
|
1066
|
-
drawMotes(false);
|
|
1067
|
-
ctx.globalCompositeOperation = 'source-over';
|
|
1068
|
-
ctx.globalAlpha = awake ? 1 : 0.8;
|
|
1069
|
-
ctx.drawImage(orb.canvas, p.x - r, p.y - r, r * 2, r * 2);
|
|
1070
|
-
ctx.globalAlpha = 1;
|
|
1071
|
-
// Volume (2026-10-28): the light comes from the upper left, as its atmosphere says; the far side
|
|
1072
|
-
// falls into a soft night and a sheen sits where the light strikes, so it reads as a sphere.
|
|
1073
|
-
ctx.save();
|
|
1074
|
-
ctx.beginPath(); ctx.arc(p.x, p.y, r, 0, Math.PI * 2); ctx.clip();
|
|
1075
|
-
const night = ctx.createLinearGradient(p.x - r * 0.72, p.y - r * 0.78, p.x + r * 0.82, p.y + r * 0.88);
|
|
1076
|
-
night.addColorStop(0, 'rgba(6, 4, 20, 0)');
|
|
1077
|
-
night.addColorStop(0.5, 'rgba(6, 4, 20, 0.08)');
|
|
1078
|
-
night.addColorStop(1, `rgba(6, 4, 20, ${0.55 * (awake ? 1 : 0.8)})`);
|
|
1079
|
-
ctx.fillStyle = night;
|
|
1080
|
-
ctx.fillRect(p.x - r, p.y - r, r * 2, r * 2);
|
|
1081
|
-
ctx.globalCompositeOperation = 'lighter';
|
|
1082
|
-
const sheen = ctx.createRadialGradient(p.x - r * 0.4, p.y - r * 0.44, 0, p.x - r * 0.4, p.y - r * 0.44, r * 0.6);
|
|
1083
|
-
sheen.addColorStop(0, `rgba(236, 228, 255, ${0.24 * life})`);
|
|
1084
|
-
sheen.addColorStop(1, 'rgba(236, 228, 255, 0)');
|
|
1085
|
-
ctx.fillStyle = sheen;
|
|
1086
|
-
ctx.fillRect(p.x - r, p.y - r, r * 2, r * 2);
|
|
1087
|
-
ctx.restore();
|
|
1088
|
-
// Its own thin atmosphere, brighter on the side the light comes from.
|
|
1089
|
-
ctx.globalCompositeOperation = 'lighter';
|
|
1090
|
-
const limb = ctx.createRadialGradient(p.x - r * 0.1, p.y - r * 0.12, r * 0.9, p.x, p.y, r * 1.14);
|
|
1091
|
-
limb.addColorStop(0, 'rgba(120, 150, 255, 0)');
|
|
1092
|
-
limb.addColorStop(0.55, `rgba(130, 160, 255, ${0.28 * life})`);
|
|
1093
|
-
limb.addColorStop(1, 'rgba(90, 60, 220, 0)');
|
|
1094
|
-
ctx.fillStyle = limb;
|
|
1095
|
-
ctx.beginPath(); ctx.arc(p.x, p.y, r * 1.14, 0, Math.PI * 2); ctx.fill();
|
|
1096
|
-
ctx.globalCompositeOperation = 'source-over';
|
|
1097
|
-
ctx.globalCompositeOperation = 'lighter';
|
|
1098
|
-
drawMotes(true);
|
|
1099
|
-
ctx.globalCompositeOperation = 'source-over';
|
|
782
|
+
drawSun(ctx, p.x, p.y, r, sun, { life, beat });
|
|
1100
783
|
}
|
|
1101
784
|
// A ring in the accent while a universe is carried onto it, and while it waits for the person;
|
|
1102
785
|
// a white one while it is pointed at or chosen.
|
|
@@ -1112,7 +795,7 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
1112
795
|
ctx.lineWidth = core === focus ? 1.4 : 1;
|
|
1113
796
|
ctx.beginPath(); ctx.arc(p.x, p.y, r * (neural ? 2.2 : 1.5), 0, Math.PI * 2); ctx.stroke();
|
|
1114
797
|
}
|
|
1115
|
-
// The bulb's stem reaches lower than the
|
|
798
|
+
// The bulb's stem reaches lower than the sun: its name stands under the stem.
|
|
1116
799
|
const below = p.y + r * (neural ? 3.25 : 1.62) + 8;
|
|
1117
800
|
ctx.textAlign = 'center';
|
|
1118
801
|
ctx.textBaseline = 'top';
|
|
@@ -1295,7 +978,7 @@ export function openMacroverso({ host, rooms, here, enlaces = [], accent = '#9bf
|
|
|
1295
978
|
const meta = document.createElement('p');
|
|
1296
979
|
meta.className = 'mv-mem-meta';
|
|
1297
980
|
const span = memory.fromSequence ? (memory.fromSequence === memory.throughSequence ? `#${memory.fromSequence}` : `#${memory.fromSequence}–#${memory.throughSequence}`) : null;
|
|
1298
|
-
meta.textContent = [span, memory.agent ? `@${memory.agent}` : null, memory.created ?
|
|
981
|
+
meta.textContent = [span, memory.agent ? `@${memory.agent}` : null, memory.created ? dateWords(memory.created) : null].filter(Boolean).join(' · ');
|
|
1299
982
|
el.append(head, text);
|
|
1300
983
|
if (meta.textContent) el.append(meta);
|
|
1301
984
|
shelf.append(el);
|
package/public/manual-content.js
CHANGED
|
@@ -427,13 +427,13 @@ export const MANUAL = {
|
|
|
427
427
|
title: 'Problemas comunes',
|
|
428
428
|
lead: 'Lo que más suele pasar y cómo se arregla. Si lo tuyo no está aquí, abre Diagnóstico y escribe lo que ves.',
|
|
429
429
|
problems: [
|
|
430
|
-
['
|
|
431
|
-
['MADRE no encuentra
|
|
432
|
-
['Gemini dice que llegó a su límite (429) o que está saturado (503).', 'Espera un minuto y vuelve a preguntar, elige otro modelo en el menú de modelo o pásale la pregunta a
|
|
433
|
-
['Gemini rechaza tu cuenta personal de Google.', 'Pega una llave de acceso (API key) de Google AI Studio en Ajustes ›
|
|
434
|
-
['Cursor dice que llegó al límite de su plan.', 'Es el límite de tu plan de Cursor, no de MADRE. Espera a que se renueve o pregúntale a
|
|
435
|
-
['«La cuenta de API se quedó sin saldo».', 'Recarga esa cuenta o, en Ajustes ›
|
|
436
|
-
['
|
|
430
|
+
['Una IA dice «Sin iniciar sesión».', 'Ajustes › Tus IAs: ábrela y pulsa su botón para entrar con tu cuenta.'],
|
|
431
|
+
['MADRE no encuentra una IA.', 'Ajustes › Tus IAs › Instalar. MADRE ejecuta el comando por ti.'],
|
|
432
|
+
['Gemini dice que llegó a su límite (429) o que está saturado (503).', 'Espera un minuto y vuelve a preguntar, elige otro modelo en el menú de modelo o pásale la pregunta a otra IA.'],
|
|
433
|
+
['Gemini rechaza tu cuenta personal de Google.', 'Pega una llave de acceso (API key) de Google AI Studio en Ajustes › Tus IAs › Gemini.'],
|
|
434
|
+
['Cursor dice que llegó al límite de su plan.', 'Es el límite de tu plan de Cursor, no de MADRE. Espera a que se renueve o pregúntale a otra IA.'],
|
|
435
|
+
['«La cuenta de API se quedó sin saldo».', 'Recarga esa cuenta o, en Ajustes › Tus IAs, elige un modelo que use tu plan, como ChatGPT o GitHub Copilot.'],
|
|
436
|
+
['La IA no contestó a tiempo.', 'Vuelve a preguntar. Si pasa seguido, sube el tiempo límite en Ajustes › Trabajo y límites.'],
|
|
437
437
|
['«El puerto ya está en uso».', 'Ya hay otra MADRE abierta: usa esa, o abre esta en otro puerto con `npx @jossuealcala/madre --port 4800`.'],
|
|
438
438
|
['La Terminal dice que tu Node es muy viejo.', 'Instala Node 22.5 o más nuevo desde nodejs.org y vuelve a correr el comando.'],
|
|
439
439
|
['Abriste MADRE en Windows y te dice que se detiene.', 'En Windows, MADRE funciona dentro de WSL2. Usa su instalador: «Windows, con su instalador» en «Empieza aquí».'],
|
|
@@ -474,6 +474,22 @@ export const MANUAL = {
|
|
|
474
474
|
},
|
|
475
475
|
],
|
|
476
476
|
closing: 'MADRE es gratis para personas y equipos de hasta 10 (licencia BSL 1.1). Ayuda y novedades en madre.run.',
|
|
477
|
+
// Inside MADRE App (Q-26): its own license in place of the source code's. `trial` goes first only
|
|
478
|
+
// while the author's switch gives days (public/manual.js).
|
|
479
|
+
appLicense: {
|
|
480
|
+
id: 'licencia',
|
|
481
|
+
part: 'help',
|
|
482
|
+
icon: 'book',
|
|
483
|
+
title: 'La licencia, en corto',
|
|
484
|
+
lead: 'MADRE App usa una licencia personal: es para ti, en tus computadoras y en tus proyectos, también si trabajas por tu cuenta para tus clientes.',
|
|
485
|
+
trial: 'Los primeros {days} días tienes todo MADRE App. Después sigue gratis con un proyecto activo a la vez, o te suscribes y lo tienes todo. Nada de lo tuyo se borra.',
|
|
486
|
+
steps: [
|
|
487
|
+
'Lo que haces con MADRE App es tuyo.',
|
|
488
|
+
'Una empresa u organización necesita una licencia aparte: escríbenos desde madre.run.',
|
|
489
|
+
],
|
|
490
|
+
expert: 'El texto completo está en madre.run/app/licencia. El código de MADRE en npm y GitHub sigue con su propia licencia, la Business Source License 1.1.',
|
|
491
|
+
},
|
|
492
|
+
appClosing: 'MADRE App, con licencia personal. Ayuda y novedades en madre.run.',
|
|
477
493
|
pdf: 'Descargar en PDF',
|
|
478
494
|
language: 'English',
|
|
479
495
|
},
|
|
@@ -928,6 +944,20 @@ export const MANUAL = {
|
|
|
928
944
|
},
|
|
929
945
|
],
|
|
930
946
|
closing: 'MADRE is free for individuals and teams of up to 10 (BSL 1.1 license). Help and news at madre.run.',
|
|
947
|
+
appLicense: {
|
|
948
|
+
id: 'licencia',
|
|
949
|
+
part: 'help',
|
|
950
|
+
icon: 'book',
|
|
951
|
+
title: 'The license, briefly',
|
|
952
|
+
lead: 'MADRE App has a personal license: it is for you, on your computers and in your projects, also when you work on your own for your clients.',
|
|
953
|
+
trial: 'The first {days} days you have all of MADRE App. Then it stays free with one active project at a time, or you subscribe and have everything. Nothing of yours is deleted.',
|
|
954
|
+
steps: [
|
|
955
|
+
'What you make with MADRE App is yours.',
|
|
956
|
+
'A company or organization needs a license of its own: write to us from madre.run.',
|
|
957
|
+
],
|
|
958
|
+
expert: 'The full text is at madre.run/en/app/license. MADRE\'s code on npm and GitHub keeps its own license, the Business Source License 1.1.',
|
|
959
|
+
},
|
|
960
|
+
appClosing: 'MADRE App, with a personal license. Help and news at madre.run.',
|
|
931
961
|
pdf: 'Download as PDF',
|
|
932
962
|
language: 'Español',
|
|
933
963
|
},
|
package/public/manual.js
CHANGED
|
@@ -214,8 +214,23 @@ async function version() {
|
|
|
214
214
|
} catch { return null; }
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
// Inside MADRE App (Q-26) the license chapter and the closing are the app's own; its first days are
|
|
218
|
+
// named only while the author's switch gives them (src/server.mjs, /api/terms `trialDays`).
|
|
219
|
+
async function license() {
|
|
220
|
+
try {
|
|
221
|
+
const answer = await fetch('/api/terms', { cache: 'no-store' }).then((response) => (response.ok ? response.json() : null));
|
|
222
|
+
return { app: answer?.kind === 'app', days: Number.isInteger(answer?.trialDays) && answer.trialDays > 0 ? answer.trialDays : null };
|
|
223
|
+
} catch { return { app: false, days: null }; }
|
|
224
|
+
}
|
|
225
|
+
function forApp(copy, { app, days }) {
|
|
226
|
+
if (!app || !copy.appLicense) return copy;
|
|
227
|
+
const { trial, ...chapter } = copy.appLicense;
|
|
228
|
+
chapter.steps = [...(days ? [trial.replace('{days}', String(days))] : []), ...chapter.steps];
|
|
229
|
+
return { ...copy, sections: copy.sections.map((one) => (one.id === 'licencia' ? chapter : one)), closing: copy.appClosing };
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function draw(lang, madre, kind = { app: false, days: null }) {
|
|
233
|
+
const copy = forApp(MANUAL[lang], kind);
|
|
219
234
|
const other = lang === 'es' ? 'en' : 'es';
|
|
220
235
|
document.documentElement.lang = lang;
|
|
221
236
|
document.title = `MADRE · ${copy.title}`;
|
|
@@ -226,7 +241,7 @@ function draw(lang, madre) {
|
|
|
226
241
|
if (!printing) {
|
|
227
242
|
const bar = el('nav', 'manual-bar');
|
|
228
243
|
const brand = el('span', 'manual-brand');
|
|
229
|
-
brand.innerHTML = '<img src="/assets/brand/madre-app.svg" alt="" width="22" height="22">'; // trusted: our own markup
|
|
244
|
+
brand.innerHTML = '<img src="/assets/brand/madre-app.svg?v=2" alt="" width="22" height="22">'; // trusted: our own markup
|
|
230
245
|
brand.append(el('b', null, 'MADRE'));
|
|
231
246
|
const keys = el('div', 'manual-keys');
|
|
232
247
|
const swap = el('a', 'manual-key', copy.language);
|
|
@@ -242,7 +257,7 @@ function draw(lang, madre) {
|
|
|
242
257
|
// The cover.
|
|
243
258
|
const cover = el('header', 'manual-cover');
|
|
244
259
|
const mark = el('img', 'manual-mark');
|
|
245
|
-
mark.src = '/assets/brand/madre-app.svg';
|
|
260
|
+
mark.src = '/assets/brand/madre-app.svg?v=2';
|
|
246
261
|
mark.alt = '';
|
|
247
262
|
cover.append(mark, el('h1', null, copy.title), el('p', 'manual-subtitle', copy.subtitle));
|
|
248
263
|
if (madre) cover.append(el('p', 'manual-version', `MADRE ${madre}`));
|
|
@@ -423,5 +438,5 @@ function draw(lang, madre) {
|
|
|
423
438
|
}
|
|
424
439
|
|
|
425
440
|
if (printing) document.documentElement.classList.add('printing');
|
|
426
|
-
const [room, madre] = await Promise.all([roomLanguage(), version()]);
|
|
427
|
-
draw(pick(asked.get('lang')) ?? room ?? browser, asked.get('version') ?? madre);
|
|
441
|
+
const [room, madre, kind] = await Promise.all([roomLanguage(), version(), license()]);
|
|
442
|
+
draw(pick(asked.get('lang')) ?? room ?? browser, asked.get('version') ?? madre, kind);
|