@double_geste/agent-standup 1.47.1 → 1.49.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.
@@ -188,7 +188,7 @@ if (cmd === 'credits') {
188
188
  process.stdout.write(text + '\n', () => process.exit(0)); // the timelines leave timers behind: once written, it is done
189
189
  });
190
190
  } else if (cmd === 'statusline') {
191
- let raw = ''; const go = () => { let dir = ''; try { const j = JSON.parse(raw); dir = (j.workspace && j.workspace.current_dir) || j.cwd || ''; } catch {} console.log(line(snapshot(dir), true)); process.exit(0); };
191
+ let raw = ''; const go = () => { let dir = ''; try { const j = JSON.parse(raw); dir = (j.workspace && j.workspace.current_dir) || j.cwd || ''; server.saveLimits(j); } catch {} console.log(line(snapshot(dir), true)); process.exit(0); };
192
192
  if (process.stdin.isTTY) go(); else { process.stdin.setEncoding('utf8'); process.stdin.on('data', (d) => (raw += d)); process.stdin.on('end', go); setTimeout(go, 800); }
193
193
  } else if (cmd === 'serve') {
194
194
  const port = +process.env.PORT || 4747, srv = server.start(port);
package/codex.js CHANGED
@@ -389,4 +389,4 @@ function image(id, toolId, n, user, agent = 'main') { // { type, buf } or null
389
389
  return out;
390
390
  }
391
391
  const zPending = () => zBusy || zQueue.length > 0; // compressed threads still being read in the background (the day report waits for them)
392
- module.exports = { zPending, PROJ, SOURCE, home, dirKey, sessions, row, fileOf, cwd, inProject, projectLabel, title, boardRow, subFiles, subCount, state, parser, image };
392
+ module.exports = { files: () => scan().rows, zPending, PROJ, SOURCE, home, dirKey, sessions, row, fileOf, cwd, inProject, projectLabel, title, boardRow, subFiles, subCount, state, parser, image };
package/kokoro-worker.js CHANGED
@@ -6,6 +6,8 @@ const MODEL = 'onnx-community/Kokoro-82M-v1.0-ONNX';
6
6
  // Chinese is another model of the same family, Kokoro-82M-v1.1-zh, in full precision: on an M1 Pro the 8-bit file was twice as slow, and the half-precision one returned silence (NaN) for most voices.
7
7
  // kokoro.js puts its files, checked, where transformers.js keeps what it downloads, so loading it here reads them from disk. Its phonemes come from zh-g2p.js, its voices from <dir>/zh-voices.
8
8
  const ZH_MODEL = 'onnx-community/Kokoro-82M-v1.1-zh-ONNX', ZH_DTYPE = 'fp32';
9
+ const ORT_OPTS = { session_options: { enableCpuMemArena: false } }; // Chromium traps when ONNX's arena doubles to 2 GiB in Electron; plain tensor allocations stay below it
10
+ // kokoro-js' own from_pretrained passes only dtype, device and progress_callback on to transformers.js, so the session options would be dropped: build its KokoroTTS from the model and tokenizer loaded here
9
11
  const send = (o) => fs.writeSync(1, JSON.stringify(o) + '\n');
10
12
  const finite = (samples) => { for (let i = 0; i < samples.length; i++) if (samples[i] !== samples[i]) return false; return true; }; // a quantised model can return NaN for a whole line, which would be written as silence
11
13
  function wav(samples, rate) { // Float32 in [-1, 1] → 16-bit mono WAV
@@ -54,7 +56,7 @@ async function main() {
54
56
  const dir = process.env.AGENT_STANDUP_KOKORO_DIR, dtype = process.env.AGENT_STANDUP_KOKORO_DTYPE || 'q4';
55
57
  const req = createRequire(path.join(dir, 'node_modules', 'x.js')); // resolve from the install folder, not from the extension
56
58
  const tf = req('@huggingface/transformers'); tf.env.cacheDir = path.join(dir, 'models');
57
- const { KokoroTTS } = req('kokoro-js'), load = () => KokoroTTS.from_pretrained(MODEL, { dtype, device: 'cpu' });
59
+ const { KokoroTTS } = req('kokoro-js'), pretrained = async (m, d) => new KokoroTTS(...await Promise.all([tf.StyleTextToSpeech2Model.from_pretrained(m, { ...ORT_OPTS, dtype: d, device: 'cpu' }), tf.AutoTokenizer.from_pretrained(m)])), load = () => pretrained(MODEL, dtype);
58
60
  let tts; try { tts = await load(); } catch (e) {
59
61
  // transformers.js writes the model straight to its final name and never checks it again: a download cut short (the worker killed while the model
60
62
  // was being fetched, e.g. by a reload of the window) leaves a file that fails to load every time after. Drop this model's files and fetch them once more.
@@ -66,7 +68,7 @@ async function main() {
66
68
  strict(tts); // kokoro-js calls the tokenizer with truncation on, which drops every phoneme past the model's limit and says nothing: count them all here and refuse instead
67
69
  const packs = new Map(), pack = (n) => { if (!packs.has(n)) { const b = fs.readFileSync(/^z[fm]_/.test(n) ? path.join(dir, 'zh-voices', n + '.bin') : path.join(dir, 'node_modules', 'kokoro-js', 'voices', n + '.bin')); packs.set(n, new Float32Array(b.buffer.slice(b.byteOffset, b.byteOffset + b.length))); } return packs.get(n); }; // a voice: 510 styles of 256 numbers, one per length of line. All 54 of v1.0 come with kokoro-js; the Chinese ones are fetched by kokoro.js
68
70
  let zh = null; // the Chinese model and its phonemizer, loaded on the first Chinese line: whoever never hears one never loads them
69
- const zhLoad = async () => zh || (zh = { tts: strict(await KokoroTTS.from_pretrained(ZH_MODEL, { dtype: ZH_DTYPE, device: 'cpu' })), g2p: require(path.join(__dirname, 'zh-g2p.js')).make(req('pinyin-pro'), req('jieba-wasm'), req('opencc-js').Converter({ from: 'tw', to: 'cn' })) });
71
+ const zhLoad = async () => zh || (zh = { tts: strict(await pretrained(ZH_MODEL, ZH_DTYPE)), g2p: require(path.join(__dirname, 'zh-g2p.js')).make(req('pinyin-pro'), req('jieba-wasm'), req('opencc-js').Converter({ from: 'tw', to: 'cn' })) });
70
72
  const foreign = async (text, o) => { // what kokoro-js' generate_from_ids does, with a style that can be a mix of several voices (o.mix: [[voice, share], …])
71
73
  const z = o.lang === 'zh' ? await zhLoad() : null, m = z ? z.tts : tts; // Chinese: its own model; an English word inside the line is said from its English phonemes
72
74
  const ph = z ? await z.g2p(text, (w) => phonemes(dir, w, 'en-us')) : await phonemes(dir, text, o.lang);
package/limits.js ADDED
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+ // Plan limits: how much of a subscription's 5-hour and weekly windows is used, and when each resets. Read only from files on this computer; nothing is fetched.
3
+ // Claude Code (and Cowork, which runs on the same subscription), the freshest of:
4
+ // - limits.json beside the settings, written by `agent-standup statusline` from the rate_limits Claude Code hands its status line after each answer (subscribers only);
5
+ // - the copy Claude Code keeps in .claude.json (cachedUsageUtilization), written when it fetched your usage itself (/usage): often hours or days old.
6
+ // Codex: the rate_limits that every token_count record of its session files carries (primary and secondary windows, their length in minutes).
7
+ // A window whose reset time has passed is dropped (it started again from 0, and what it is at now is unknown), and so is a reading older than STALE.
8
+ const fs = require('fs'), path = require('path'), os = require('os');
9
+
10
+ const STALE = 12 * 3600e3;
11
+ const KEYS = { five_hour: '5h', seven_day: 'week' };
12
+ const pct = (v) => (typeof v === 'number' && isFinite(v) ? Math.max(0, Math.min(100, Math.round(v))) : null);
13
+ const when = (v) => (typeof v === 'number' ? (v < 1e12 ? v * 1000 : v) : typeof v === 'string' ? Date.parse(v) : NaN); // epoch seconds, epoch ms or an ISO date → ms
14
+ const keyOfMinutes = (m) => (m === 300 ? '5h' : m === 10080 ? 'week' : m >= 40000 && m <= 46000 ? 'month' : m > 0 && m < 1440 ? Math.round(m / 60) + 'h' : m > 0 ? Math.round(m / 1440) + 'd' : '');
15
+
16
+ function result(windows, asOf, src, now) { // the windows still running, or null when none is left or the reading is too old to say anything
17
+ if (!(asOf > 0) || now - asOf > STALE) return null;
18
+ const w = windows.filter((x) => x && x.key && x.pct != null && x.resetsAt > now);
19
+ return w.length ? { windows: w, asOf, src } : null;
20
+ }
21
+
22
+ // ---- Claude Code
23
+ const savedFile = (dir) => process.env.AGENT_STANDUP_LIMITS || path.join(dir, 'limits.json');
24
+ function save(dir, statusJson) { // from the status line's JSON: keep its rate_limits, if it has any. Written only when they changed or a minute went by, so a status line redrawn often costs nothing
25
+ const all = statusJson && statusJson.rate_limits; if (!all || typeof all !== 'object') return false;
26
+ const rl = {}; for (const k of Object.keys(KEYS)) { const w = all[k]; if (w && typeof w === 'object' && typeof w.used_percentage === 'number') rl[k] = { used_percentage: w.used_percentage, resets_at: typeof w.resets_at === 'number' ? w.resets_at : typeof w.resets_at === 'string' ? w.resets_at.slice(0, 40) : null }; } // only the percentages and reset times of the two windows, whatever else Claude Code may add
27
+ if (!Object.keys(rl).length) return false;
28
+ const f = savedFile(dir), body = JSON.stringify(rl);
29
+ try { const was = JSON.parse(fs.readFileSync(f, 'utf8')); if (was && JSON.stringify(was.rate_limits) === body && Date.now() - was.at < 60e3) return false; } catch {}
30
+ const tmp = f + '.' + process.pid + '.tmp';
31
+ try { fs.mkdirSync(path.dirname(f), { recursive: true }); fs.writeFileSync(tmp, JSON.stringify({ at: Date.now(), rate_limits: rl })); fs.renameSync(tmp, f); return true; } catch { try { fs.unlinkSync(tmp); } catch {} return false; } // a rename that failed leaves no temporary file behind
32
+ }
33
+ function fromSaved(dir, now) {
34
+ let v; try { v = JSON.parse(fs.readFileSync(savedFile(dir), 'utf8')); } catch { return null; }
35
+ const rl = (v && v.rate_limits) || {};
36
+ return result(Object.entries(KEYS).map(([k, key]) => rl[k] && { key, pct: pct(rl[k].used_percentage), resetsAt: when(rl[k].resets_at) }), v && v.at, 'statusline', now);
37
+ }
38
+ const claudeJson = () => (process.env.CLAUDE_CONFIG_DIR ? path.join(process.env.CLAUDE_CONFIG_DIR, '.claude.json') : path.join(os.homedir(), '.claude.json'));
39
+ let cacheMemo = { sig: '', v: null };
40
+ function fromCache(file, now) { // .claude.json can weigh megabytes: parsed again only when it changed
41
+ let sig = ''; try { const st = fs.statSync(file); sig = file + ':' + st.mtimeMs + ':' + st.size; } catch { return null; }
42
+ if (sig !== cacheMemo.sig) { let c = null; try { c = JSON.parse(fs.readFileSync(file, 'utf8')).cachedUsageUtilization || null; } catch {} cacheMemo = { sig, v: c }; }
43
+ const c = cacheMemo.v, u = (c && c.utilization) || {};
44
+ return result(Object.entries(KEYS).map(([k, key]) => u[k] && { key, pct: pct(u[k].utilization), resetsAt: when(u[k].resets_at) }), c && c.fetchedAtMs, 'claude', now);
45
+ }
46
+ function claude(dir, now = Date.now(), file = claudeJson()) {
47
+ const a = fromSaved(dir, now), b = fromCache(file, now);
48
+ return a && b ? (a.asOf >= b.asOf ? a : b) : a || b;
49
+ }
50
+
51
+ // ---- Codex: the last record with rate_limits, in the newest session files (the end of each, where the latest is)
52
+ function fromCodexFile(file, now) {
53
+ let text = ''; try { const st = fs.statSync(file), n = Math.min(st.size, 512 * 1024), fd = fs.openSync(file, 'r'); try { const buf = Buffer.alloc(n); fs.readSync(fd, buf, 0, n, st.size - n); text = buf.toString('utf8'); } finally { fs.closeSync(fd); } } catch { return null; }
54
+ const lines = text.split('\n');
55
+ for (let i = lines.length - 1; i >= 0; i--) {
56
+ const l = lines[i]; if (!l.includes('"rate_limits"')) continue;
57
+ let r; try { r = JSON.parse(l); } catch { continue; }
58
+ const p = r.payload || r, rl = p.rate_limits || (p.info && p.info.rate_limits); if (!rl || !(rl.primary || rl.secondary)) continue;
59
+ const at = when(r.timestamp) || now;
60
+ const win = (x) => x && { key: keyOfMinutes(x.window_minutes), pct: pct(x.used_percent), resetsAt: x.resets_at != null ? when(x.resets_at) : x.resets_in_seconds != null ? at + x.resets_in_seconds * 1000 : NaN }; // older Codex said resets_in_seconds, from the record's time
61
+ return result([win(rl.primary), win(rl.secondary)], at, 'codex', now);
62
+ }
63
+ return null;
64
+ }
65
+ function codex(files, now = Date.now()) { // files: newest first, as codex.js lists them; the compressed ones are old threads and are skipped
66
+ for (const f of files.filter((x) => !x.zst).slice(0, 3)) { const r = fromCodexFile(f.file, now); if (r) return r; }
67
+ return null;
68
+ }
69
+
70
+ module.exports = { save, claude, codex, keyOfMinutes, STALE };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@double_geste/agent-standup",
3
- "version": "1.47.1",
3
+ "version": "1.49.0",
4
4
  "description": "Your Claude Code, Codex and Mistral Vibe agents as a live video call, from the terminal: a local page in your browser, plus one-line status for status bars. Free, open source, zero token cost.",
5
5
  "bin": {
6
6
  "agent-standup": "bin/agent-standup.js"
@@ -12,6 +12,7 @@
12
12
  "boards.js",
13
13
  "codex.js",
14
14
  "vibe.js",
15
+ "limits.js",
15
16
  "reply.js",
16
17
  "kokoro.js",
17
18
  "kokoro-worker.js",
package/public/index.html CHANGED
@@ -19,7 +19,7 @@
19
19
  header { height:48px; flex:none; display:flex; align-items:center; gap:10px; padding:0 12px; border-bottom:1px solid var(--line); background:var(--bg) }
20
20
  .brand { display:flex; align-items:center; gap:9px; min-width:0; overflow:hidden } .brand .logo { flex:none } .brand > div { min-width:0 } .brand b { overflow:hidden; text-overflow:ellipsis }
21
21
  header > * { flex-shrink:0 } header .brand { flex-shrink:100; min-width:26px } header #board { flex-shrink:.01 } .tok, .ctxp { flex-shrink:2; min-width:0; overflow:hidden; text-overflow:ellipsis } #pill { flex-shrink:.05; min-width:min-content; overflow:hidden; text-overflow:ellipsis } /* in a narrow window the buttons (the gear above all) stay whole: the name gives way first (down to the logo), then the counters; the chips only when nothing else can (.01, not 0: the header must never overflow) */
22
- @media (max-width:720px) { .ctxp { display:none !important } } @media (max-width:620px) { .tok { display:none !important } } @media (max-width:299px) { #bCoffee { display:none !important } } @media (max-width:480px) { header { gap:6px; padding-left:8px; padding-right:8px } } /* very narrow (it fits down to 300 px, the sidebar's usual width): the coffee link stays in ⚙ › Tools */
22
+ @media (max-width:720px) { .ctxp { display:none !important } } @media (max-width:900px) { .ctxp.lim { display:none !important } } @media (max-width:620px) { .tok { display:none !important } } @media (max-width:299px) { #bCoffee { display:none !important } } @media (max-width:480px) { header { gap:6px; padding-left:8px; padding-right:8px } } /* very narrow (it fits down to 300 px, the sidebar's usual width): the coffee link stays in ⚙ › Tools */
23
23
  .logo { width:26px; height:26px; display:block; flex:none }
24
24
  .brand b { font:700 14px "Comic Sans MS","Chalkboard SE",system-ui,sans-serif; white-space:nowrap }
25
25
  .brand small { display:block; color:var(--dim); font-size:11px; max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
@@ -107,7 +107,7 @@
107
107
  .bdone summary { cursor:pointer; list-style:none } .bdone summary::-webkit-details-marker { display:none } .bdone summary::after { content:'▸' } .bdone[open] summary::after { content:'▾' } .bdone .bcard { opacity:.7 }
108
108
  .bdo, .bpr { flex:none; font:inherit; font-size:11.5px; line-height:1.5; color:var(--dim); background:none; border:1px solid var(--line); border-radius:99px; padding:0 8px; cursor:pointer } .bh .stc + .bpr, .bh .stc + .bdo { margin-left:auto } .bdo:hover, .bpr:hover, .bdo:focus-visible, .bpr:focus-visible { color:var(--text); border-color:var(--accent) }
109
109
  .stc { font-size:11.5px; padding:2px 9px; border-radius:99px; background:rgba(14,15,24,.6); white-space:nowrap } .stc.working { color:var(--gold) } .stc.waiting { color:#8fd3ff } .stc.blocked { color:#fff; background:#c0392b; font-weight:700 } .stc.stalled { color:#1b1d27; background:#ffb347; font-weight:700 } .stc.done, .stc.turn { color:var(--ok) } .stc.idle { color:var(--dim) }
110
- .ctxp { font-size:11px; font-weight:600; padding:3px 9px; border-radius:99px; background:var(--panel2); white-space:nowrap; cursor:default } .ctxp.lo, .cx.lo { color:#7ee2a8 } .ctxp.mid, .cx.mid { color:#ffc857 } .ctxp.hi, .cx.hi { color:#fff; background:#c0392b }
110
+ .ctxp { font-size:11px; font-weight:600; padding:3px 9px; border-radius:99px; background:var(--panel2); white-space:nowrap; cursor:default } .ctxp.lo, .cx.lo { color:#7ee2a8 } .ctxp.mid, .cx.mid { color:#ffc857 } .ctxp.hi, .cx.hi { color:#fff; background:#c0392b } .ctxp.old { opacity:.6 }
111
111
  .cx:empty { display:none } .tag .cx { font-size:10px }
112
112
  #hl { display:none; flex:0 0.01 auto; min-height:30px; max-height:66px; overflow-y:auto; scrollbar-width:thin; flex-wrap:wrap; gap:6px; padding:5px 12px; border-top:1px solid var(--line); background:var(--panel) } body.replay #hl.has { display:flex } body.board #hl, body.tree #hl { display:none !important }
113
113
  .hlc { font-size:11.5px; padding:3px 10px; border-radius:99px; background:var(--panel2); border:1px solid var(--line); color:var(--text) } .hlc:hover { border-color:var(--accent) }
@@ -301,6 +301,12 @@
301
301
  .tile.stretch:not(.speaking) .fig { animation:stretch 1.2s ease-in-out } @keyframes stretch { 40% { transform:scale(1.03,.97) translateY(.6px) } 65% { transform:scale(.98,1.035) translateY(-1.2px) } }
302
302
  .tile.inhale .brow { animation:browup .34s ease-out } .tile.wow .brow { animation:wow 1.1s ease-out } @keyframes browup { 50% { transform:translateY(-1.8px) } } @keyframes wow { 20%, 70% { transform:translateY(-1.9px) } }
303
303
  .tile.settle .smile, .tile.settle .grin { transform-box:fill-box; transform-origin:center; animation:settle .35s ease-out } @keyframes settle { from { transform:scale(.55,1.8) } }
304
+ /* the riso cast (?cast=2, public/riso.js): one drawing per tile holds every face with its marks (data-f) and every arm pose (data-a); the tile's state shows one of each, and turns the head */
305
+ .rz [data-f], .rz [data-a] { display:none } .rz .rtilt { transform-origin:50px 50px; transform:rotate(2.5deg); transition:transform .4s ease } .rz .rgaze { transition:transform .45s ease; transform:translate(calc(var(--lx,0) * .6px), calc(var(--ly,0) * .45px)) }
306
+ :not(.speaking):not(.done):not(.blocked):not(.stalled):not(.waiting):not(.working) > .rz [data-f=listening], .speaking > .rz [data-f=speaking], .done:not(.speaking) > .rz [data-f=done], .blocked:not(.speaking) > .rz [data-f=needs], .stalled:not(.speaking) > .rz [data-f=stuck], .waiting:not(.speaking) > .rz [data-f=waiting], .working:not(.speaking) > .rz [data-f=focused],
307
+ .blocked > .rz [data-a=handUp], .working:not(.blocked) > .rz [data-a=working], .speaking:not(.working):not(.blocked) > .rz [data-a=gesture], .waiting:not(.speaking):not(.blocked):not(.working) > .rz [data-a=waiting], :not(.blocked):not(.working):not(.speaking):not(.waiting) > .rz [data-a=idle] { display:inline }
308
+ .speaking > .rz .rtilt { transform:rotate(-2deg) } .working:not(.speaking) > .rz .rtilt { transform:none } .done:not(.speaking) > .rz .rtilt { transform:rotate(3.5deg) } .blocked:not(.speaking) > .rz .rtilt { transform:rotate(-3deg) } .stalled:not(.speaking) > .rz .rtilt { transform:rotate(-3.5deg) } .waiting:not(.speaking) > .rz .rtilt { transform:rotate(-6deg) }
309
+ .tile:has(> .rz) > .prop:not(.cheer) { display:none } /* the drawing raises its hand, sweats or waits chin in hand: no emoji over it */
304
310
  @media (prefers-reduced-motion:reduce) { *, *::before, *::after { animation:none !important; transition:none !important } .confetti, .fly { display:none !important } }
305
311
  .tile:focus-visible, .rr:focus-visible, .bcard:focus-visible { outline:2px solid var(--accent); outline-offset:2px }
306
312
  .fly { position:fixed; left:0; top:0; font-size:28px; z-index:8; pointer-events:none; filter:drop-shadow(0 3px 4px rgba(0,0,0,.5)) }
@@ -387,7 +393,7 @@
387
393
  <body>
388
394
  <header>
389
395
  <div class="brand"><img class="logo" src="icon.svg" alt=""><div><b>Agent Standup</b><small id="subtitle"></small></div></div>
390
- <span id="pill">REPLAY</span><button id="tok" class="tok" style="display:none"></button><button id="ctxp" class="ctxp" style="display:none"></button><span id="board" aria-live="polite"></span><span id="meet" class="meet"></span>
396
+ <span id="pill">REPLAY</span><button id="tok" class="tok" style="display:none"></button><button id="ctxp" class="ctxp" style="display:none"></button><button id="lim" class="ctxp lim" style="display:none"></button><span id="board" aria-live="polite"></span><span id="meet" class="meet"></span>
391
397
  <div class="sp"></div>
392
398
  <div class="seg" id="viewSeg"><button data-v="call" class="on" data-ic="👥" data-fr="Appel" data-en="Call">Appel</button><button data-v="tree" data-ic="🌳" data-fr="Arbre" data-en="Tree">Arbre</button><button data-v="board" data-ic="🗂" data-fr="Sessions" data-en="Sessions">Sessions</button></div>
393
399
  <button class="ic" id="bPlay" title="Pause / Lecture (espace)">⏸</button>
@@ -444,6 +450,7 @@
444
450
  <div class="phead"><h2 id="prefsT" data-fr="Réglages" data-en="Settings">Réglages</h2><button class="btn" id="prefsX" data-fr="Fermer" data-en="Close">Fermer</button></div>
445
451
  <div class="pcols"><div class="pcol">
446
452
  <h4 data-fr="Son et alertes" data-en="Sound and alerts">Son et alertes</h4>
453
+ <button class="mi" data-t="voiceYou"><span data-fr="Lire vos messages à voix haute" data-en="Read your messages aloud">Lire vos messages à voix haute</span><i class="sw"></i></button>
447
454
  <button class="mi" data-t="office"><span data-fr="Ambiance de bureau (clavier, café…)" data-en="Office ambience (keys, coffee…)">Ambiance de bureau (clavier, café…)</span><i class="sw"></i></button>
448
455
  <div class="box" id="officeBox" style="display:none"><input id="officeVol" type="range" min="0.1" max="1" step="0.05" style="width:100%" aria-label="Ambience volume"></div>
449
456
  <button class="mi" data-t="music"><span data-fr="Musique d’ambiance (radio FIP)" data-en="Office music (FIP radio)">Musique d’ambiance (radio FIP)</span><i class="sw"></i></button>
@@ -500,6 +507,7 @@
500
507
  <div id="card"></div><div id="recap"><div class="box"></div></div>
501
508
 
502
509
  <script src="/api/prefs.js"></script>
510
+ <script data-cast>if (/[?&]cast=2(&|$)/.test(location.search)) { window.RISO_ON = true; document.write('<script src="/riso.js"><\/script>'); } /* the two-ink print forced by the address; otherwise loadChars fetches it when ⚙ → Characters picks it */</script>
503
511
  <script>
504
512
  // =====================================================================
505
513
  // helpers, prefs, i18n
@@ -527,7 +535,7 @@ const Q = new URLSearchParams(location.search);
527
535
  const EMBED = Q.get('embed') === '1' || window.parent !== window;
528
536
  const APP = window.AS_APP && typeof window.AS_APP === 'object' && typeof window.AS_APP.rate === 'string' ? window.AS_APP : { kind: '', rate: 'https://github.com/Atoll92/agent-standup' }; // where this page runs (appKind in server.js)
529
537
 
530
- let prefs = { lang: 'en', voice: true, roster: false, banter: true, reactions: false, office: false, officeVol: 0.8, vstyle: 'kokoro', notify: false, epi: false, vanish: true, music: false, station: 'fip', musicVol: 0.35, view: 'call', hideCode: false, ownNames: true, visits: true, askCard: false, followTab: true, files: true, callTr: true, voiceVol: 1 };
538
+ let prefs = { lang: 'en', voice: true, voiceYou: false, roster: false, banter: true, reactions: false, office: false, officeVol: 0.8, vstyle: 'kokoro', notify: false, epi: false, vanish: true, music: false, station: 'fip', musicVol: 0.35, view: 'call', hideCode: false, ownNames: true, visits: true, askCard: false, followTab: true, files: true, callTr: true, voiceVol: 1 };
531
539
  const PREF_DEFAULTS = { ...prefs }; // for ⚙ → All settings → Reset to defaults
532
540
  let leadProject = null; // the project of the loaded live call or replay, supplied by the server before naming its agents
533
541
  let prefsBase = {}; // the settings file as this page last knew it: a save sends only what changed since (prefsPatch), so another window's newer choices are not written over
@@ -614,7 +622,8 @@ const hexRGB = (h) => [1, 3, 5].map((i) => parseInt(h.slice(i, i + 2), 16));
614
622
  const mix = (a, b, t) => { const A = hexRGB(a), B = hexRGB(b); return '#' + A.map((v, i) => Math.round(v + (B[i] - v) * t).toString(16).padStart(2, '0')).join(''); };
615
623
  // ---- custom characters: the person's own pixel art (folder served by /api/characters) replaces the drawn figure, scene and desk stay ----
616
624
  let CHARS = { lead: null, you: null, pool: [], dir: '', n: 0 };
617
- const CHAR_CHOICES = ['none', 'folder', 'cats', 'halloween']; // what ⚙ → Characters offers: the drawn characters, one's own folder, the built-in packs and the packs of the shop
625
+ const CHAR_CHOICES = ['none', 'folder', 'cats', 'halloween']; // what ⚙ → Characters offers: the drawn characters, one's own folder, the built-in packs and the packs of the shop. The two-ink print is the drawn characters ('none') with prefs.castStyle = 'riso', so that an older page sharing these settings keeps a choice it knows instead of resetting it
626
+ const risoLoad = () => (window.RISO ? Promise.resolve() : new Promise((res) => { const s = document.createElement('script'); s.src = '/riso.js'; s.onload = s.onerror = res; document.head.appendChild(s); })); /* public/riso.js, fetched from the app's own server only once the two-ink print is picked (or shown in ⚙ → Characters) */
618
627
  let SHOP = {}; // the packs of the shop, by name, as the server knows them: how many characters are here (none until it is bought), its price, the code of the purchase
619
628
  const toData = (url) => fetch(url).then((r) => r.blob()).then((b) => new Promise((res) => { const f = new FileReader(); f.onload = () => res(f.result); f.readAsDataURL(b); }));
620
629
  const imgSize = (src) => new Promise((res) => { const i = new Image(); i.onload = () => res([i.naturalWidth, i.naturalHeight]); i.onerror = () => res([0, 0]); i.src = src; }), isDrawing = (wh) => Math.max(wh[0], wh[1]) > 128; // a large image is a drawing, shown smooth; pixel art (32 or 64 px) keeps its hard pixels
@@ -632,7 +641,8 @@ async function loadChars() {
632
641
  if (!CHAR_CHOICES.includes(prefs.charPack)) { // drawn characters by default; someone who already had images in their folder keeps them (this is also where a choice of the starter pack, no longer shipped, ends up)
633
642
  let n = 0; try { n = ((await (await fetch('/api/characters')).json()).chars || []).length; } catch {} prefs.charPack = n ? 'folder' : 'none'; savePrefs();
634
643
  }
635
- const pack = prefs.charPack, next = { lead: null, you: null, pool: [], dir: '', n: 0, pack, youFrom: '', castYou: null }; // castYou: the cast's own human, for the window
644
+ const pack = prefs.charPack, riso = pack === 'none' && prefs.castStyle === 'riso', next = { lead: null, you: null, pool: [], dir: '', n: 0, pack: riso ? 'riso' : pack, youFrom: '', castYou: null }; // castYou: the cast's own human, for the window
645
+ window.RISO_ON = riso || /[?&]cast=2(&|$)/.test(location.search); if (window.RISO_ON) await risoLoad(); // the two-ink print: the drawn cast, drawn otherwise (avatarSVG hands it every character that is not a picture)
636
646
  try { SHOP = Object.fromEntries((await (await fetch('/api/packs')).json()).filter((p) => p.shop).map((p) => [p.name, p])); } catch {}
637
647
  try {
638
648
  const base = pack === 'folder' ? '/characters/' : '/packs/' + pack + '/', d = await (await fetch('/api/characters?pack=' + (pack === 'folder' || pack === 'none' ? '' : pack))).json(); next.dir = d.dir || ''; // with the drawn characters, only where the folder is
@@ -681,7 +691,7 @@ function renderShop(el, name, shop) {
681
691
  $('#shopGo').onclick = async () => { const code = $('#shopKey').value.trim(); if (!code) return; shopSay('…'); const r = await shopAsk('claim', { pack: name, code }); if (r.ok) shopDone(name); else shopSay(shopWhy(r.error)); };
682
692
  if (shop.waiting && !renderShop.tried) { renderShop.tried = true; shopAsk('claim', { pack: name }).then((r) => { if (r.ok) shopDone(name); }); } // a payment page was opened earlier (the app was closed meanwhile, say): asked once, in case it was paid since
683
693
  }
684
- const packLabel = (name) => ({ none: L('Personnages dessinés', 'Drawn characters'), folder: L('Mon dossier', 'My folder'), cats: L('Pack de chats', 'Cat pack'), halloween: L('Pack Halloween', 'Halloween pack') }[name] || String(name).replace(/^./, (c) => c.toUpperCase()));
694
+ const packLabel = (name) => ({ none: L('Personnages dessinés', 'Drawn characters'), riso: L('Impression deux encres', 'Two-ink print'), folder: L('Mon dossier', 'My folder'), cats: L('Pack de chats', 'Cat pack'), halloween: L('Pack Halloween', 'Halloween pack') }[name] || String(name).replace(/^./, (c) => c.toUpperCase()));
685
695
  function renderCharInfo() { // the line of ⚙ → Characters, and the window when it is open
686
696
  if (!$('#recap.on #chdlg')) renderMenuShop(); const el = $('#charNow'); if (el) el.textContent = packLabel(CHARS.pack || prefs.charPack || 'none') + ' · ' + (youMode() === 'vampire' ? L('Vous : le vampire', 'You: the vampire') : L('Vous : comme l’équipe', 'You: like the cast'));
687
697
  return $('#recap.on #chdlg') ? openChars() : Promise.resolve();
@@ -690,30 +700,34 @@ const CHPICK = { more: '' }; // what the window shows under the cast: the fold
690
700
  async function openChars() { // ⚙ → Characters: the whole cast (drawn, a pack, a pack of the shop, one's own pictures), then who you are
691
701
  let packs = [], mine = { chars: [], dir: CHARS.dir }; try { packs = await (await fetch('/api/packs')).json(); } catch {} try { mine = await (await fetch('/api/characters')).json(); } catch {}
692
702
  if (!VAMP) { try { VAMP = await vampEntry(); } catch {} }
703
+ await risoLoad(); // the two-ink print's card shows its own lead
693
704
  const files = {}; for (const p of packs.filter((x) => !x.shop && x.name !== 'vampire')) { try { files[p.name] = ((await (await fetch('/api/characters?pack=' + p.name)).json()).chars || []).map((c) => c.file); } catch { files[p.name] = []; } }
694
705
  const cast = CHARS.pack || prefs.charPack, more = CHPICK.more || cast, ym = youMode(); let k = 0;
695
706
  const tile = (id, custom) => avatarSVG({ ...persona0({ id, role: '' }), custom: custom || null }, undefined, 'cp' + k++ + '_'); // the very drawing of a tile
696
707
  const pics = (base, list, px) => `<span class="pics">${list.slice(0, 3).map((f) => `<img src="${base + encodeURIComponent(f)}" alt=""${px ? ' style="image-rendering:pixelated"' : ''}>`).join('')}</span>`;
697
708
  const many = (n) => `${n} ${n === 1 ? L('personnage', 'character') : L('personnages', 'characters')}`;
698
709
  const card = (on, pv, title, sub, tag, data) => `<button class="ccard${on ? ' on' : ''}" ${data}><span class="pv">${pv}${tag ? `<i class="ptag">${esc(tag)}</i>` : ''}</span><b>${esc(title)}</b><span class="sub">${esc(sub)}</span></button>`;
699
- const castCards = [card(cast === 'none', tile('main'), packLabel('none'), L('Ceux de l’app', 'The app’s own'), '', 'data-cast="none"'),
710
+ const tileAs = (on, id) => { const was = window.RISO_ON; window.RISO_ON = on; try { return tile(id); } finally { window.RISO_ON = was; } }; // each drawn card in its own style, whichever one the call uses
711
+ const castCards = [card(cast === 'none', tileAs(false, 'main'), packLabel('none'), L('Ceux de l’app', 'The app’s own'), '', 'data-cast="none"'),
712
+ ...(window.RISO ? [card(cast === 'riso', tileAs(true, 'main'), packLabel('riso'), L('Nouveau · la même équipe, redessinée', 'New · the same cast, redrawn'), '', 'data-cast="riso"')] : []),
700
713
  ...packs.filter((p) => p.shop).map((p) => card(cast === p.name && p.n, `<img src="pack-${esc(p.name)}.jpg" alt="">`, packLabel(p.name), p.n ? `✓ ${L('Le vôtre', 'Yours')} · ${many(p.n)}` : p.artist ? `${L('Dessinés par', 'Drawn by')} ${p.artist}` : L('Dessinés à la main, chacun dans sa pièce', 'Hand-drawn, each in its own room'), p.n ? '' : p.price, `data-cast="${esc(p.name)}"`)),
701
714
  ...packs.filter((p) => !p.shop && p.name !== 'vampire').map((p) => card(cast === p.name, pics('/packs/' + p.name + '/', files[p.name], true), packLabel(p.name), `${many(p.n)}`, '', `data-cast="${esc(p.name)}"`)),
702
715
  card(cast === 'folder', mine.chars.length ? pics('/characters/', mine.chars.map((c) => c.file)) : '<span class="pvx">🖼️</span>', packLabel('folder'), mine.chars.length ? many(mine.chars.length) : L('Vos propres images', 'Your own pictures'), '', 'data-cast="folder"')];
703
716
  const youCards = [card(ym === 'vampire', VAMP ? tile('user', VAMP) : '', L('Le vampire', 'The vampire'), L('Offert, du pack Halloween', 'Free, from the Halloween pack'), '', 'data-you="vampire"'),
704
- card(ym === 'cast', CHARS.castYou ? tile('user', CHARS.castYou) : tile('user'), L('Comme l’équipe', 'Like the cast'), cast === 'none' || !CHARS.castYou ? L('Le personnage dessiné', 'The drawn character') : packLabel(cast), '', 'data-you="cast"')];
717
+ card(ym === 'cast', CHARS.castYou ? tile('user', CHARS.castYou) : tile('user'), L('Comme l’équipe', 'Like the cast'), cast === 'none' || cast === 'riso' || !CHARS.castYou ? L('Le personnage dessiné', 'The drawn character') : packLabel(cast), '', 'data-you="cast"')];
705
718
  const box = $('#recap .box'), top = $('#recap').scrollTop; $('#menuShop').innerHTML = '';
706
719
  box.innerHTML = `<div id="chdlg"><h1>${esc(L('Personnages', 'Characters'))}</h1>
707
720
  <h3>${esc(L('L’équipe', 'The cast'))}</h3><div class="cgrid">${castCards.join('')}</div><div id="castMore" class="cmore"></div>
708
721
  <h3>${esc(L('Vous', 'You'))}</h3><div class="cgrid">${youCards.join('')}</div>
709
722
  <p style="text-align:right;margin:18px 0 0"><button class="btn" id="recapx">${esc(L('Fermer', 'Close'))}</button></p></div>`;
710
- box.querySelectorAll('[data-cast]').forEach((b) => (b.onclick = async () => { const v = b.dataset.cast, sp = SHOP[v]; CHPICK.more = v; if (sp && !sp.n) return openChars(); prefs.charPack = v; savePrefs(); await reloadChars(); })); // a pack not bought yet: its shop, and the cast stays as it is
723
+ box.querySelectorAll('[data-cast]').forEach((b) => (b.onclick = async () => { const v = b.dataset.cast, sp = SHOP[v]; CHPICK.more = v; if (sp && !sp.n) return openChars(); prefs.charPack = v === 'riso' ? 'none' : v; if (v === 'riso') prefs.castStyle = 'riso'; else delete prefs.castStyle; savePrefs(); await reloadChars(); })); // a pack not bought yet: its shop, and the cast stays as it is. The two-ink print: the drawn characters, drawn otherwise (CHAR_CHOICES)
711
724
  box.querySelectorAll('[data-you]').forEach((b) => (b.onclick = async () => { prefs.charYou = b.dataset.you; savePrefs(); await reloadChars(); }));
712
725
  $('#recapx').onclick = () => $('#recap').classList.remove('on');
713
726
  const el = $('#castMore'), sp = SHOP[more];
714
727
  if (sp && !sp.n) renderShop(el, more, sp);
715
728
  else if (more === 'folder') renderFolder(el, mine);
716
729
  else if (more === cast && more === 'none') el.textContent = L('Les personnages dessinés par l’application. Choisissez « Mon dossier » pour vos propres images, ou un pack.', 'The characters drawn by the app. Pick “My folder” for your own images, or a pack.');
730
+ else if (more === cast && more === 'riso') el.textContent = L('Les personnages de l’application, redessinés comme une impression en deux encres. C’est nouveau, et encore en finition.', 'The app’s characters, redrawn as a print in two inks. New, and still being refined.');
717
731
  else if (more === cast) {
718
732
  el.innerHTML = `✓ ${CHARS.n} ${esc(L('personnages du pack', 'characters from the pack'))} · ${esc(L('Pour les modifier, copiez-les dans votre dossier et choisissez « Mon dossier ».', 'To tweak them, copy them into your folder and pick “My folder”.'))}${sp && sp.artist ? `<br>${esc(L('Dessinés par', 'Drawn by'))} <a href="#" class="artist">${esc(sp.artist)}</a>` : ''}`;
719
733
  el.querySelectorAll('.artist').forEach((a) => (a.onclick = (e) => { e.preventDefault(); openExternal(sp.artistUrl); }));
@@ -837,6 +851,7 @@ const ACC = [
837
851
  const pumpkinDay = () => { const d = new Date(); return d.getMonth() === 9 && d.getDate() >= 30; }; // Halloween and its eve: the drawn characters bring a pumpkin (mine, not the pack's art)
838
852
  const pumpkin = (x) => `<g class="pumpkin"><ellipse cx="${x}" cy="58.3" rx="6.2" ry="4.4" fill="#f28c28"/><path d="M${x - 2.3} 54.2q-1.7 4.1 0 8.3M${x + 2.3} 54.2q1.7 4.1 0 8.3" fill="none" stroke="#c8650f" stroke-width=".7"/><path d="M${x} 54.3q.2-2 1.7-2.7" fill="none" stroke="#4f8a3a" stroke-width="1.3" stroke-linecap="round"/><path d="M${x - 3.5} 57.7l1.3-2 1.3 2zM${x + .9} 57.7l1.3-2 1.3 2z" fill="#ffd84a"/><path d="M${x - 3.3} 59.5q3.3 2.5 6.6 0l-1 1.5-1.1-.8-1.1.9-1.1-.9-1.1.8z" fill="#ffd84a"/></g>`;
839
853
  function avatarSVG(p, o, uid = '') { // uid keeps SVG ids unique per instance: duplicate ids made gradients vanish when the first copy was in a hidden element
854
+ if (window.RISO_ON && window.RISO && !p.custom) return RISO.svg(p, o, uid); /* ⚙ → Characters → Two-ink print (or ?cast=2): the riso cast (public/riso.js); a pack's character keeps its own pictures */
840
855
  const st = !!o, sh = SHAPES[p.shape], fy = sh.fy, top = sh.top, bot = p.shape === 4, c = p.shirt, c1 = mix(c, '#ffffff', .3), c2 = mix(c, '#000000', .2);
841
856
  const ink = bot ? '#8ff0ff' : '#2a2233', gid = uid + 'b' + p.gid, sc = SCENES[p.scene], eg = EYES[p.eye], ex = p.shape === 1 ? [43, 57] : [41.5, 58.5];
842
857
  const V = (cls, show, html) => (st ? (show ? html : '') : `<g class="${cls}">${html}</g>`);
@@ -1205,6 +1220,7 @@ function warmTTS(i) { // called by run() before each line (i is that line) and
1205
1220
  else if (isSub(e.agent)) { while (j < Math.min(len, k + 28) && group.length < 3) { const e2 = S.events[j]; if (quiet(e2)) j++; else if (e2.kind !== 'order' && isSub(e2.agent) && !group.some((g) => g.agent === e2.agent)) { group.push(e2); j++; } else break; } }
1206
1221
  const pl = paceAt(k), many = e.kind === 'order' && group.length > 1, rate = TTS.rateAt(many || !S.live ? k : j - 1, pl.boost);
1207
1222
  for (const g of many ? [e] : group) { // orders in a row: only the first is read out
1223
+ if (g.agent === 'user' && S.live && !prefs.voiceYou) continue; // your own lines: silent in the live call unless their switch is on (you just typed them); a replay or the demo reads them, as its listener did not
1208
1224
  n++; const p = S.agents[g.agent], bt = baseText(g); if ((pl.hurry && g.kind !== 'user') || !p || (TRL() && !trMem.has(bt) && langOf(bt) !== CALL())) continue; // not translated yet: what will be said is not known
1209
1225
  const said = clipSpeech(talkLine(g), pl.pace), text = speakable(said), voice = TTS.voiceFor(p, sessVoice(said, g)); if (text && voice) jobs.push({ k, text, voice, rate });
1210
1226
  }
@@ -1356,8 +1372,9 @@ function sessVoice(text, ev) { // for the lines that come from the session (ev
1356
1372
  }
1357
1373
  return inCall(lo ?? sessLang());
1358
1374
  }
1359
- async function speakLine(text, p, primary, token, lo = voiceLang(text), always = false) { // always: your own lines are voiced even when the call is behind
1375
+ async function speakLine(text, p, primary, token, lo = voiceLang(text), always = false) { // always: your own lines are voiced even when the call is behind, if their voice is on (always in a replay or the demo)
1360
1376
  captionRun(p.id, text, estMs(text));
1377
+ if (p.id === 'user' && S.live && !prefs.voiceYou) return sleep(estMs(text));
1361
1378
  if (AUD.calm() || !prefs.voice) { if (!AUD.calm() && prefs.office) AUD.murmur(0.5 + (p.vi % 5) / 10, estMs(text) / 1000); return sleep(estMs(text)); }
1362
1379
  if (S.hurry && !always) return sleep(estMs(text));
1363
1380
  const bab = babbles() || noNatural(lo); if (bab && AUD.ctx) { try { await speakBabble(text, p, primary ? 1 : 0.5, token); return; } catch {} }
@@ -1561,6 +1578,19 @@ function renderCtx() { // "context N% full": per agent chip (from 50%), a head
1561
1578
  else if (x && x.p < 60) delete S.ctxWarned[id]; }
1562
1579
  const lead = ctxInfo('main'), cp = $('#ctxp'); if (lead) { cp.style.display = ''; cp.textContent = `ctx ${lead.p}%`; cp.className = 'ctxp ' + lead.lvl; cp.title = `${L('Contexte du chef', 'Lead context')}: ${fmtTok(lead.c)} / ${fmtTok(lead.w)}${S.compacts.main ? ' · ' + S.compacts.main + '×🗜' : ''}`; } else cp.style.display = 'none';
1563
1580
  }
1581
+ async function renderLimits() { // plan limits (5-hour and weekly windows) of the subscription the call's session runs on, Claude's or Codex's, read by the server from local files (limits.js). Hidden in a replay, the demo and Mistral Vibe
1582
+ const b = $('#lim'); if (!b) return; const proj = S.cur && S.cur.proj, tool = proj === '_codex' ? 'codex' : proj === '_vibe' ? '' : 'claude';
1583
+ let r = null; if (S.live && !S.demo && S.cur && tool) { try { r = await (await fetch('/api/limits?tool=' + tool)).json(); } catch {} }
1584
+ if ((S.cur && S.cur.proj) !== proj) return; // the call moved to another session meanwhile: its own call draws it
1585
+ if (!r || !r.windows || !r.windows.length) { b.style.display = 'none'; return; }
1586
+ const name = (k) => (k === '5h' ? '5 h' : k === 'week' ? L('semaine', 'week') : k === 'month' ? L('mois', 'month') : k);
1587
+ const at = (ms) => { try { return new Date(ms).toLocaleString(document.documentElement.lang || undefined, ms - Date.now() > 20 * 3600e3 ? { weekday: 'short', hour: '2-digit', minute: '2-digit' } : { hour: '2-digit', minute: '2-digit' }); } catch { return ''; } };
1588
+ const hi = Math.max(...r.windows.map((w) => w.pct)), old = Date.now() - r.asOf > 30 * 60e3;
1589
+ b.style.display = ''; b.className = 'ctxp lim ' + (hi >= 90 ? 'hi' : hi >= 70 ? 'mid' : 'lo') + (old ? ' old' : '');
1590
+ b.textContent = '⏳ ' + r.windows.map((w) => `${name(w.key)} ${w.pct}%`).join(' · ');
1591
+ b.title = `${L('Limites du forfait', 'Plan limits')} (${tool === 'codex' ? 'Codex' : 'Claude'})\n` + r.windows.map((w) => `${name(w.key)}: ${w.pct}% ${L('utilisés', 'used')} · ${L('remise à zéro', 'resets')} ${at(w.resetsAt)}`).join('\n') + `\n${L('Lu à', 'Read at')} ${clockOf(r.asOf)}`;
1592
+ }
1593
+ setInterval(renderLimits, 20e3);
1564
1594
  function renderTokens() {
1565
1595
  renderCtx(); const mix = mixedModels();
1566
1596
  const all = { i: 0, o: 0, r: 0, w: 0 }; for (const id in S.usage) for (const k in all) all[k] += S.usage[id][k];
@@ -3179,7 +3209,7 @@ async function loadSession(proj, id) {
3179
3209
  if (mine !== S.loadN || data.error) return false;
3180
3210
  leadProject = data.project || null; clearTimeout(leadTimer); leadField(true);
3181
3211
  S.term = {}; S.camFor = null; S.focus = null; S.agents = {}; S.cost = data.cost || null; for (const k in nameBook) delete nameBook[k]; const all = [{ id: 'user' }, ...data.agents]; S.soon = all; for (const a of byBorn(all)) S.agents[a.id] = persona(twinOf(a)); S.soon = null; S.agents = Object.fromEntries(all.map((a) => [a.id, S.agents[a.id]])); // named in the order they started, kept in the server's order
3182
- clearThoughts(); Object.assign(TH, { since: {}, next: {}, said: {}, last: 0 }); S.events = data.events; stampT(0); S.byK = new Map(data.events.map((e) => [e.k, e])); S.seq = data.seq || 0; S.ep = data.ep || ''; S.sawEnd = !!data.marks || data.events.some((e) => e.end); S.late = []; S.pos = 0; S.joinAt = Date.now(); S.idx = 0; S.status = {}; S.tc = {}; S.cur = { proj, id }; S.logTo = 0; S.detail = null; $('#detail').classList.remove('on'); S.fgone = new Set(); S.fmade = new Map(); S.artOk = new Map(); S.artPin = null; S.artWhole = null; S.wholeSeen = new Set();
3212
+ clearThoughts(); Object.assign(TH, { since: {}, next: {}, said: {}, last: 0 }); S.events = data.events; stampT(0); S.byK = new Map(data.events.map((e) => [e.k, e])); S.seq = data.seq || 0; S.ep = data.ep || ''; S.sawEnd = !!data.marks || data.events.some((e) => e.end); S.late = []; S.pos = 0; S.joinAt = Date.now(); S.idx = 0; S.status = {}; S.tc = {}; S.cur = { proj, id }; setTimeout(renderLimits, 300); S.logTo = 0; S.detail = null; $('#detail').classList.remove('on'); S.fgone = new Set(); S.fmade = new Map(); S.artOk = new Map(); S.artPin = null; S.artWhole = null; S.wholeSeen = new Set();
3183
3213
  const opt = $('#sessions').selectedOptions[0]; S.title = (S.live ? niceProj(proj) : opt && opt.dataset.title) || '';
3184
3214
  if (proj === '_demo') S.events.forEach((e) => { if (e.fr) trMem.set(baseText(e), e.fr, 'fr'); }); // the demo ships its own French
3185
3215
  $('#subtitle').textContent = S.title; recomputeStatus(0); buildStage(); renderHighlights(); setFocus('main'); renderLog(true); computeGantt(); layout(); paintStatus(); prefetchTr(0); return true;
@@ -3622,7 +3652,7 @@ function openPrefs(target) { // ⚙ → All settings; target: one of its setti
3622
3652
  $('#menu').classList.remove('on'); $('#prefs').classList.add('on'); syncSwitches(); subField(); document.querySelectorAll('#prefs .mi[data-t]').forEach((b) => b.querySelector('.sw').classList.toggle('on', !!prefs[b.dataset.t]));
3623
3653
  if (target) { target.scrollIntoView({ block: 'center' }); target.classList.remove('flash'); void target.offsetWidth; target.classList.add('flash'); (target.matches('.mi') ? target : target.querySelector('select, input, textarea, button') || target).focus(); } else $('#prefsX').focus();
3624
3654
  }
3625
- const PANEL_KEYS = ['office', 'officeVol', 'music', 'station', 'musicVol', 'voiceVol', 'notify', 'customLaptop', 'ownNames', 'roster', 'reactions', 'banter', 'chat', 'vanish', 'epi', 'files', 'artNet', 'visits', 'askCard', 'followTab', 'leadName', 'subNames']; // what the panel holds, and so what Reset puts back
3655
+ const PANEL_KEYS = ['voiceYou', 'office', 'officeVol', 'music', 'station', 'musicVol', 'voiceVol', 'notify', 'customLaptop', 'ownNames', 'roster', 'reactions', 'banter', 'chat', 'vanish', 'epi', 'files', 'artNet', 'visits', 'askCard', 'followTab', 'leadName', 'subNames']; // what the panel holds, and so what Reset puts back
3626
3656
  $('#prefsReset').onclick = async () => {
3627
3657
  const b = $('#prefsReset'); if (!b.classList.contains('sure')) { b.classList.add('sure'); b.textContent = L('Cliquez encore pour tout remettre', 'Click again to reset them all'); setTimeout(() => { b.classList.remove('sure'); b.textContent = L('Réglages par défaut', 'Reset to defaults'); }, 4000); return; } // two clicks: nothing is lost by a stray one
3628
3658
  const keys = [...PANEL_KEYS, ...(projectLeadKey() ? [projectLeadKey()] : [])]; // reset the displayed project override, leaving other projects alone
@@ -13,6 +13,7 @@
13
13
  "🎬 Clip to share (25 s)": "🎬 Klip til deling (25 s)",
14
14
  "📋 Recap": "📋 Resumé",
15
15
  "Agent voices": "Agentstemmer",
16
+ "Read your messages aloud": "Læs dine beskeder højt",
16
17
  "Agents": "Agenter",
17
18
  "Agents list (left)": "Agentliste (til venstre)",
18
19
  "All projects (most recent)": "Alle projekter (nyeste)",
@@ -467,5 +468,14 @@
467
468
  "Zen mode: alerts, no voices": "Zen-tilstand: advarsler, ingen stemmer",
468
469
  "Hold the call in this language? Your Claude Code translates what the agents say.": "Holde opkaldet på dette sprog? Din Claude Code oversætter, hvad agenterne siger.",
469
470
  "Yes": "Ja",
470
- "Voices ready in English. This language has natural voices too: one more download.": "Stemmerne er klar på engelsk. Dette sprog har også naturlige stemmer: én download mere."
471
+ "Voices ready in English. This language has natural voices too: one more download.": "Stemmerne er klar på engelsk. Dette sprog har også naturlige stemmer: én download mere.",
472
+ "week": "uge",
473
+ "month": "måned",
474
+ "Plan limits": "Abonnementsgrænser",
475
+ "used": "brugt",
476
+ "resets": "nulstilles",
477
+ "Read at": "Læst kl.",
478
+ "Two-ink print": "Tofarvetryk",
479
+ "New · the same cast, redrawn": "Nyt · samme hold, tegnet igen",
480
+ "The app’s characters, redrawn as a print in two inks. New, and still being refined.": "Appens figurer, tegnet igen som et tryk i to farver. Nyt, og vi finpudser det stadig."
471
481
  }
@@ -13,6 +13,7 @@
13
13
  "🎬 Clip to share (25 s)": "🎬 Clip zum Teilen (25 s)",
14
14
  "📋 Recap": "📋 Zusammenfassung",
15
15
  "Agent voices": "Agenten-Stimmen",
16
+ "Read your messages aloud": "Deine Nachrichten vorlesen",
16
17
  "Agents": "Agenten",
17
18
  "Agents list (left)": "Agentenliste (links)",
18
19
  "All projects (most recent)": "Alle Projekte (neueste zuerst)",
@@ -468,5 +469,14 @@
468
469
  "Zen mode: alerts, no voices": "Zen-Modus: Hinweistöne, keine Stimmen",
469
470
  "Hold the call in this language? Your Claude Code translates what the agents say.": "Den Call in dieser Sprache führen? Dein Claude Code übersetzt, was die Agenten sagen.",
470
471
  "Yes": "Ja",
471
- "Voices ready in English. This language has natural voices too: one more download.": "Stimmen auf Englisch bereit. Diese Sprache hat auch natürliche Stimmen: ein Download mehr."
472
+ "Voices ready in English. This language has natural voices too: one more download.": "Stimmen auf Englisch bereit. Diese Sprache hat auch natürliche Stimmen: ein Download mehr.",
473
+ "week": "Woche",
474
+ "month": "Monat",
475
+ "Plan limits": "Plan-Limits",
476
+ "used": "genutzt",
477
+ "resets": "setzt zurück",
478
+ "Read at": "Gelesen um",
479
+ "Two-ink print": "Zweifarbendruck",
480
+ "New · the same cast, redrawn": "Neu · dasselbe Team, neu gezeichnet",
481
+ "The app’s characters, redrawn as a print in two inks. New, and still being refined.": "Die Figuren der App, neu gezeichnet als Druck in zwei Farben. Neu und noch im Feinschliff."
472
482
  }
@@ -214,6 +214,7 @@
214
214
  "may need you": "may need you",
215
215
  "medium": "medium",
216
216
  "Model": "Model",
217
+ "month": "month",
217
218
  "More": "More",
218
219
  "Music volume": "Music volume",
219
220
  "My folder": "My folder",
@@ -223,6 +224,7 @@
223
224
  "needs you": "needs you",
224
225
  "needs you ": "needs you ",
225
226
  "needs you? ": "needs you? ",
227
+ "New · the same cast, redrawn": "New · the same cast, redrawn",
226
228
  "Next / previous agent that needs you": "Next / previous agent that needs you",
227
229
  "Next time, start it with:": "Next time, start it with:",
228
230
  "No activity for {0}.": "No activity for {0}.",
@@ -271,6 +273,7 @@
271
273
  "pick one": "pick one",
272
274
  "pinned by you": "pinned by you",
273
275
  "Pinned: click to unpin": "Pinned: click to unpin",
276
+ "Plan limits": "Plan limits",
274
277
  "Presenting the plan": "Presenting the plan",
275
278
  "Privacy policy": "Privacy policy",
276
279
  "Project to follow": "Project to follow",
@@ -286,6 +289,8 @@
286
289
  "Reactions bar (👍 👏 ☕)": "Reactions bar (👍 👏 ☕)",
287
290
  "Read again": "Read again",
288
291
  "read again: {0}": "read again: {0}",
292
+ "Read at": "Read at",
293
+ "Read your messages aloud": "Read your messages aloud",
289
294
  "read-only": "read-only",
290
295
  "Reading ": "Reading ",
291
296
  "READY": "READY",
@@ -314,6 +319,7 @@
314
319
  "Reran a failing command": "Reran a failing command",
315
320
  "reran a failing command: {0}": "reran a failing command: {0}",
316
321
  "Reset to defaults": "Reset to defaults",
322
+ "resets": "resets",
317
323
  "resets {0}": "resets {0}",
318
324
  "Resumed where you left off": "Resumed where you left off",
319
325
  "Role": "Role",
@@ -367,6 +373,7 @@
367
373
  "task": "task",
368
374
  "Tasks": "Tasks",
369
375
  "Tell me when a new version is out (1 request a day)": "Tell me when a new version is out (1 request a day)",
376
+ "The app’s characters, redrawn as a print in two inks. New, and still being refined.": "The app’s characters, redrawn as a print in two inks. New, and still being refined.",
370
377
  "The app’s errors are kept in a file on this computer:": "The app’s errors are kept in a file on this computer:",
371
378
  "The app’s own": "The app’s own",
372
379
  "The call follows the session you last typed in. A click on a tab takes it there; a second click pins it there. G: what needs you.": "The call follows the session you last typed in. A click on a tab takes it there; a second click pins it there. G: what needs you.",
@@ -412,12 +419,14 @@
412
419
  "Tree view ↔ call": "Tree view ↔ call",
413
420
  "Tree view: T to go back, ? for help": "Tree view: T to go back, ? for help",
414
421
  "Turn off": "Turn off",
422
+ "Two-ink print": "Two-ink print",
415
423
  "Untitled session": "Untitled session",
416
424
  "Update it with:": "Update it with:",
417
425
  "Update the pack": "Update the pack",
418
426
  "Update the plugin in a terminal, then restart Claude Code:": "Update the plugin in a terminal, then restart Claude Code:",
419
427
  "Updating todo list": "Updating todo list",
420
428
  "usage limit": "usage limit",
429
+ "used": "used",
421
430
  "Using skill ": "Using skill ",
422
431
  "Voice style": "Voice style",
423
432
  "Voice volume": "Voice volume",
@@ -434,6 +443,7 @@
434
443
  "waiting on you for": "waiting on you for",
435
444
  "waits for your answer or approval (with “?”: probably, from how long it has waited)": "waits for your answer or approval (with “?”: probably, from how long it has waited)",
436
445
  "Web search": "Web search",
446
+ "week": "week",
437
447
  "What the session is waiting for from you": "What the session is waiting for from you",
438
448
  "What the states mean": "What the states mean",
439
449
  "What’s new": "What’s new",
@@ -13,6 +13,7 @@
13
13
  "🎬 Clip to share (25 s)": "🎬 Clip para compartir (25 s)",
14
14
  "📋 Recap": "📋 Resumen",
15
15
  "Agent voices": "Voces de los agentes",
16
+ "Read your messages aloud": "Leer tus mensajes en voz alta",
16
17
  "Agents": "Agentes",
17
18
  "Agents list (left)": "Lista de agentes (izquierda)",
18
19
  "All projects (most recent)": "Todos los proyectos (más recientes)",
@@ -468,5 +469,14 @@
468
469
  "Zen mode: alerts, no voices": "Modo zen: alertas, sin voces",
469
470
  "Hold the call in this language? Your Claude Code translates what the agents say.": "¿Hacer la llamada en este idioma? Tu Claude Code traduce lo que dicen los agentes.",
470
471
  "Yes": "Sí",
471
- "Voices ready in English. This language has natural voices too: one more download.": "Voces listas en inglés. Este idioma también tiene voces naturales: una descarga más."
472
+ "Voices ready in English. This language has natural voices too: one more download.": "Voces listas en inglés. Este idioma también tiene voces naturales: una descarga más.",
473
+ "week": "semana",
474
+ "month": "mes",
475
+ "Plan limits": "Límites del plan",
476
+ "used": "usado",
477
+ "resets": "se reinicia",
478
+ "Read at": "Leído a las",
479
+ "Two-ink print": "Impresión a dos tintas",
480
+ "New · the same cast, redrawn": "Nuevo · el mismo equipo, redibujado",
481
+ "The app’s characters, redrawn as a print in two inks. New, and still being refined.": "Los personajes de la app, redibujados como una impresión a dos tintas. Es nuevo y aún se está puliendo."
472
482
  }
@@ -13,6 +13,7 @@
13
13
  "🎬 Clip to share (25 s)": "🎬 シェア用クリップ(25秒)",
14
14
  "📋 Recap": "📋 まとめ",
15
15
  "Agent voices": "エージェントの声",
16
+ "Read your messages aloud": "あなたのメッセージを読み上げる",
16
17
  "Agents": "エージェント",
17
18
  "Agents list (left)": "エージェント一覧(左)",
18
19
  "All projects (most recent)": "すべてのプロジェクト(最新順)",
@@ -468,5 +469,14 @@
468
469
  "Zen mode: alerts, no voices": "Zenモード:通知音のみ、声なし",
469
470
  "Hold the call in this language? Your Claude Code translates what the agents say.": "通話をこの言語で行いますか?エージェントの発言はあなたの Claude Code が翻訳します。",
470
471
  "Yes": "はい",
471
- "Voices ready in English. This language has natural voices too: one more download.": "英語の音声は準備完了です。この言語にも自然な音声があります(追加のダウンロードが必要です)。"
472
+ "Voices ready in English. This language has natural voices too: one more download.": "英語の音声は準備完了です。この言語にも自然な音声があります(追加のダウンロードが必要です)。",
473
+ "week": "週",
474
+ "month": "月",
475
+ "Plan limits": "プランの上限",
476
+ "used": "使用",
477
+ "resets": "リセット",
478
+ "Read at": "取得時刻",
479
+ "Two-ink print": "2色刷り",
480
+ "New · the same cast, redrawn": "新しい · 同じメンバーを描き直し",
481
+ "The app’s characters, redrawn as a print in two inks. New, and still being refined.": "アプリのキャラクターを2色刷りの版画として描き直しました。新しく、まだ仕上げの途中です。"
472
482
  }
@@ -13,6 +13,7 @@
13
13
  "🎬 Clip to share (25 s)": "🎬 공유용 클립 (25초)",
14
14
  "📋 Recap": "📋 요약",
15
15
  "Agent voices": "에이전트 목소리",
16
+ "Read your messages aloud": "내 메시지 소리 내어 읽기",
16
17
  "Agents": "에이전트",
17
18
  "Agents list (left)": "에이전트 목록 (왼쪽)",
18
19
  "All projects (most recent)": "모든 프로젝트 (최신순)",
@@ -468,5 +469,14 @@
468
469
  "Zen mode: alerts, no voices": "젠 모드: 알림음만, 목소리 없음",
469
470
  "Hold the call in this language? Your Claude Code translates what the agents say.": "이 언어로 통화할까요? 에이전트가 하는 말은 내 Claude Code가 번역합니다.",
470
471
  "Yes": "예",
471
- "Voices ready in English. This language has natural voices too: one more download.": "영어 음성이 준비되었습니다. 이 언어에도 자연스러운 음성이 있습니다. 한 번 더 내려받으면 됩니다."
472
+ "Voices ready in English. This language has natural voices too: one more download.": "영어 음성이 준비되었습니다. 이 언어에도 자연스러운 음성이 있습니다. 한 번 더 내려받으면 됩니다.",
473
+ "week": "주간",
474
+ "month": "월간",
475
+ "Plan limits": "요금제 한도",
476
+ "used": "사용",
477
+ "resets": "초기화",
478
+ "Read at": "읽은 시각",
479
+ "Two-ink print": "2도 인쇄",
480
+ "New · the same cast, redrawn": "새로움 · 같은 팀, 새로 그림",
481
+ "The app’s characters, redrawn as a print in two inks. New, and still being refined.": "앱의 캐릭터를 두 가지 잉크의 인쇄물처럼 다시 그렸습니다. 새로 나왔고, 아직 다듬는 중입니다."
472
482
  }
@@ -5,6 +5,7 @@
5
5
  "note": "AI draft, native review welcome"
6
6
  },
7
7
  "Characters": "Personagens",
8
+ "Read your messages aloud": "Ler suas mensagens em voz alta",
8
9
  "exited with code {0}": "encerrado com código {0}",
9
10
  "failed": "falharam",
10
11
  "LIVE": "AO VIVO",
@@ -468,5 +469,14 @@
468
469
  "Zen mode: alerts, no voices": "Modo zen: alertas, sem vozes",
469
470
  "Hold the call in this language? Your Claude Code translates what the agents say.": "Fazer a chamada neste idioma? O seu Claude Code traduz o que os agentes dizem.",
470
471
  "Yes": "Sim",
471
- "Voices ready in English. This language has natural voices too: one more download.": "Vozes prontas em inglês. Este idioma também tem vozes naturais: mais um download."
472
+ "Voices ready in English. This language has natural voices too: one more download.": "Vozes prontas em inglês. Este idioma também tem vozes naturais: mais um download.",
473
+ "week": "semana",
474
+ "month": "mês",
475
+ "Plan limits": "Limites do plano",
476
+ "used": "usado",
477
+ "resets": "reinicia",
478
+ "Read at": "Lido às",
479
+ "Two-ink print": "Impressão em duas cores",
480
+ "New · the same cast, redrawn": "Novo · a mesma equipe, redesenhada",
481
+ "The app’s characters, redrawn as a print in two inks. New, and still being refined.": "Os personagens do app, redesenhados como uma impressão em duas cores. É novo e ainda está sendo refinado."
472
482
  }