@double_geste/agent-standup 1.36.0 → 1.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@double_geste/agent-standup",
3
- "version": "1.36.0",
3
+ "version": "1.37.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"
package/public/index.html CHANGED
@@ -19,14 +19,14 @@
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:560px) { #bCoffee { display:none !important } } @media (max-width:480px) { header { gap:6px; padding-left:8px; padding-right:8px } } /* narrow: the coffee link stays in ⚙ › Tools */
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 */
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 }
26
26
  .sp { flex:1 }
27
27
  .tok { font-size:11px; font-weight:600; padding:3px 9px; border-radius:99px; background:var(--panel2); color:#c3c6d4; white-space:nowrap } .tok:hover { color:#fff }
28
28
  .tbadge { position:absolute; top:30px; right:6px; display:flex; gap:4px; z-index:2; pointer-events:none } .tbadge span { font-size:10.5px; padding:1px 7px; border-radius:99px; background:rgba(14,15,24,.78); backdrop-filter:blur(6px) }
29
- .tbadge .e { color:#ff7b72 } .tbadge .s { color:#ffb347 } .tbadge .q { color:#9aa3bd }
29
+ .tbadge .e { color:#ff7b72 } .tbadge .w { color:#79c0ff } .tbadge .s { color:#ffb347 } .tbadge .q { color:#9aa3bd }
30
30
  .tile.slow { border-color:#ff9f1c !important; animation:slowp 1.6s ease-in-out infinite } @keyframes slowp { 50% { box-shadow:0 0 0 4px rgba(255,159,28,.35) } }
31
31
  .tile.quiet { opacity:.72 }
32
32
  .tag .tk { color:#aab2c5; font-size:10px } .tag .tk:empty { display:none }
@@ -288,6 +288,7 @@
288
288
  #prefs .flash { animation:flash 1.6s ease } @keyframes flash { 0%, 40% { background:rgba(124,156,255,.28) } }
289
289
  #prefs .pfoot { display:flex; justify-content:flex-end; padding:12px 10px 0; margin-top:8px; border-top:1px solid var(--line) } #prefsReset.sure { border-color:#ff7a6b; color:#ffb4a8 }
290
290
  #menuTip { position:fixed; z-index:13; max-width:260px; padding:10px 12px; border-radius:10px; background:#2b3352; border:1px solid var(--accent); box-shadow:0 10px 30px rgba(0,0,0,.5); font-size:12.5px; line-height:1.45; color:var(--text) } #menuTip::before { content:''; position:absolute; top:-7px; right:var(--ax,14px); width:12px; height:12px; background:#2b3352; border-left:1px solid var(--accent); border-top:1px solid var(--accent); transform:rotate(45deg) } #menuTip .btn { display:block; margin:8px 0 0 auto } /* once, after the menu moved */
291
+ #rateTip, #coffeeTip { position:fixed; z-index:13; max-width:280px; padding:10px 12px; border-radius:10px; background:#2b3352; border:1px solid var(--accent); box-shadow:0 10px 30px rgba(0,0,0,.5); font-size:12.5px; line-height:1.45; color:var(--text) } #rateTip::before, #coffeeTip::before { content:''; position:absolute; top:-7px; right:var(--ax,14px); width:12px; height:12px; background:#2b3352; border-left:1px solid var(--accent); border-top:1px solid var(--accent); transform:rotate(45deg) } #rateTip .rtb, #coffeeTip .rtb { display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; margin-top:8px } #rateYes, #coffeeYes { border-color:var(--accent) } /* once, on the third day: a star (desktop app, command line) */
291
292
  a.artist { color:#f5c04a; text-underline-offset:2px } #menuShop:empty { display:none } #menuShop { margin:2px 0 8px; font-size:12px; line-height:1.5; color:#c3c6d4 } /* the Halloween pack, for those who do not have it */
292
293
  #recap { position:fixed; inset:0; z-index:15; background:rgba(5,6,12,.88); display:none; overflow:auto; padding:28px 16px } #recap.on { display:block }
293
294
  #recap .box { max-width:860px; margin:0 auto; background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:22px 26px }
@@ -350,6 +351,7 @@
350
351
  <button class="mi" id="mPrefs"><span data-fr="⚙ Tous les réglages (affichage, alertes…)" data-en="⚙ All settings (display, alerts…)">⚙ Tous les réglages (affichage, alertes…)</span><span class="dim" aria-hidden="true">›</span></button>
351
352
  <h4 data-fr="Outils" data-en="Tools">Outils</h4>
352
353
  <button class="mi" id="mCoffee" style="display:none"><span id="mCoffeeT"></span></button>
354
+ <button class="mi" id="mRate"><span id="mRateT"></span></button>
353
355
  <button class="mi" id="mKeys"><span data-fr="⌨ Raccourcis clavier (?)" data-en="⌨ Keyboard shortcuts (?)">⌨ Raccourcis clavier (?)</span></button>
354
356
  <button class="mi" id="mRecap"><span data-fr="📋 Récapitulatif" data-en="📋 Recap">📋 Récapitulatif</span></button>
355
357
  <button class="mi" id="mExport"><span data-fr="🎞 Exporter la vidéo" data-en="🎞 Export video">🎞 Exporter la vidéo</span></button>
@@ -359,6 +361,8 @@
359
361
  <button class="mi" id="mReport"><span data-fr="🐞 Signaler un problème" data-en="🐞 Report a problem">🐞 Signaler un problème</span></button>
360
362
  </div>
361
363
  <div id="menuTip" role="status" style="display:none"><span id="menuTipT"></span><button class="btn" id="menuTipOk"></button></div>
364
+ <div id="coffeeTip" role="status" style="display:none"><span id="coffeeTipT"></span><div class="rtb"><button class="btn" id="coffeeNo"></button><button class="btn" id="coffeeYes"></button></div></div>
365
+ <div id="rateTip" role="status" style="display:none"><span id="rateTipT"></span><div class="rtb"><button class="btn" id="rateNo"></button><button class="btn" id="rateLater"></button><button class="btn" id="rateYes"></button></div></div>
362
366
  <div id="prefs" role="dialog" aria-modal="true" aria-labelledby="prefsT"><div class="pbox">
363
367
  <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>
364
368
  <div class="pcols"><div class="pcol">
@@ -436,6 +440,7 @@ const SUPPORT = { url: 'https://www.buymeacoffee.com/bored_dev_and_his_robots' }
436
440
  const CID = Math.random().toString(36).slice(2, 12); // identifies this window for the audio-ownership handshake
437
441
  const Q = new URLSearchParams(location.search);
438
442
  const EMBED = Q.get('embed') === '1' || window.parent !== window;
443
+ 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)
439
444
 
440
445
  let prefs = { lang: 'en', voice: true, roster: true, 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, followTab: true, files: true, callTr: true };
441
446
  const PREF_DEFAULTS = { ...prefs }; // for ⚙ → All settings → Reset to defaults
@@ -1292,7 +1297,7 @@ const applyStatus = (ev) => {
1292
1297
  };
1293
1298
  function recomputeStatus(upTo) {
1294
1299
  S.files = new Map(); S.cands = new Map(); S.turnN = 0; S.turnSaid = ''; S.arts = new Map(); S.artCalls = new Map();
1295
- S.term = {}; S.todos = {}; S.run = {}; S.act = {}; S.usage = {}; S.errs = {}; S.lastAct = {}; S.waitOn = {}; S.orderTs = {}; S.prevState = {}; S.lastTool = {}; S.mainBusyAt = 0; S.turnOver = false; S.th = {}; S.ctx = {}; S.model = {}; S.cw = {}; S.compacts = {}; S.ctxWarned = {}; S.rep = {}; S.loops = {}; S.recomputing = true; document.querySelectorAll('.tile').forEach((t) => { clearTimeout(t._byeT); t.classList.remove('bye'); }); hidePresent();
1300
+ S.term = {}; S.todos = {}; S.run = {}; S.act = {}; S.usage = {}; S.errs = {}; S.lastAct = {}; S.waitOn = {}; S.orderTs = {}; S.prevState = {}; S.lastTool = {}; S.mainBusyAt = 0; S.turnOver = false; S.th = {}; S.ctx = {}; S.model = {}; S.cw = {}; S.compacts = {}; S.ctxWarned = {}; S.rep = {}; S.loops = {}; S.wst = {}; S.recomputing = true; document.querySelectorAll('.tile').forEach((t) => { clearTimeout(t._byeT); t.classList.remove('bye'); }); hidePresent();
1296
1301
  S.status = {}; S.tc = {}; S.doneAt = {}; S.gone.clear(); S.leaving.clear(); document.querySelectorAll('.tile.vanishing').forEach((t) => t.classList.remove('vanishing')); const doneIdx = {}; document.querySelectorAll('.ticker').forEach((x) => { x.classList.remove('on'); x.innerHTML = ''; });
1297
1302
  for (let i = 0; i < upTo; i++) {
1298
1303
  const e = S.events[i]; applyStatus(e); tally(e); if (e.kind === 'tools') S.tc[e.agent] = (S.tc[e.agent] || 0) + e.tools.length;
@@ -1311,7 +1316,7 @@ function syncUI() {
1311
1316
 
1312
1317
  // ---------- tool ticker, shared screen, flying messages ----------
1313
1318
  // ---------- what each agent is doing: tool calls with their real outputs ----------
1314
- S.term = {}; S.todos = {}; S.run = {}; S.act = {}; S.usage = {}; S.errs = {}; S.lastAct = {}; S.waitOn = {}; S.orderTs = {}; S.prevState = {}; S.ctx = {}; S.model = {}; S.cw = {}; S.compacts = {}; S.ctxWarned = {}; S.rep = {}; S.loops = {}; S.present = null; S.camFor = null; let presentTimer = null;
1319
+ S.term = {}; S.todos = {}; S.run = {}; S.act = {}; S.usage = {}; S.errs = {}; S.lastAct = {}; S.waitOn = {}; S.orderTs = {}; S.prevState = {}; S.ctx = {}; S.model = {}; S.cw = {}; S.compacts = {}; S.ctxWarned = {}; S.rep = {}; S.loops = {}; S.wst = {}; S.present = null; S.camFor = null; let presentTimer = null;
1315
1320
  S.files = new Map(); S.cands = new Map(); S.turnN = 0; S.turnSaid = ''; S.fgone = new Set(); S.fmade = new Map(); S.arts = new Map(); S.artCalls = new Map(); S.artOk = new Map(); S.artPin = null; S.artWhole = null; S.wholeSeen = new Set(); // files: path → the Write call that created it, in the order they were written · cands: the documents the commands name (see candFile) · turnN: how many orders you gave so far · turnSaid: what you and the lead said in this turn · fgone: the files found missing on a click · fmade: what the server answered about a document a command names
1316
1321
  const later = (k, fn, ms = 160) => { later.p = later.p || {}; if (later.p[k]) return; later.p[k] = setTimeout(() => { later.p[k] = 0; fn(); }, ms); }; // coalesce bursts of repaints
1317
1322
  const fmtTok = (n) => (n < 1000 ? String(n) : n < 1e6 ? (n / 1000).toFixed(n < 1e4 ? 1 : 0) + 'k' : (n / 1e6).toFixed(n < 1e7 ? 2 : 1) + 'M');
@@ -1327,9 +1332,29 @@ function loopStep(R, ev) { // R: per-agent repetition state; returns a detecti
1327
1332
  }
1328
1333
  const WIN1M = /(opus-4-[78]|opus-5|sonnet-5|fable-5)/;
1329
1334
  function ctxWin(model, ctx) { const base = WIN1M.test(model || '') ? 1e6 : 2e5; return ctx > base ? 1e6 : base; } // the transcript does not say which window is in use: infer it, a bigger observed context proves the 1M window
1335
+ // Repeated work, from the session's own records and no model call: a file read again with no change in between, a file another agent has already read, the same search run twice, a failing command run again unchanged
1336
+ const fileOf = (f) => String(f || '').split(/[\\/]/).pop();
1337
+ function wasteStep(W, ev) { // W: the session's state (S.wst, or a fresh one for the recap); true when something was noted
1338
+ if (!W.reads) { const N = () => Object.create(null); Object.assign(W, { reads: N(), finds: N(), calls: N(), failed: N(), items: N() }); } /* no prototype: a file or a search named __proto__ is just a name */
1339
+ const a = ev.agent; let hit = false; const note = (it) => { const l = (W.items[a] = W.items[a] || []); l.push(it); if (l.length > 60) l.shift(); hit = true; };
1340
+ if (ev.kind === 'tools') for (const t of ev.tools) { const d = t.d || {};
1341
+ if (d.kind === 'read' && d.file) { const m = (W.reads[d.file] = W.reads[d.file] || Object.create(null)), part = (d.offset || '') + ':' + (d.limit || ''), o = Object.keys(m).find((x) => x !== a); /* a part of a long file is another read */
1342
+ if (m[a] && m[a].has(part)) note({ k: 'again', f: d.file }); else if (o) note({ k: 'other', f: d.file, by: o }); (m[a] = m[a] || new Set()).add(part); }
1343
+ else if ((d.kind === 'edit' || d.kind === 'write') && d.file) delete W.reads[d.file]; /* a file that changed is read again for a good reason */
1344
+ else if ((d.kind === 'grep' || d.kind === 'glob') && d.pattern) { const key = d.kind + '\u0000' + d.pattern + '\u0000' + (d.path || '') + '\u0000' + (d.glob || ''), m = (W.finds[key] = W.finds[key] || Object.create(null)), o = Object.keys(m).find((x) => x !== a);
1345
+ if (m[a]) note({ k: 'find', q: d.pattern }); else if (o) note({ k: 'findOther', q: d.pattern, by: o }); m[a] = 1; }
1346
+ else if (d.kind === 'cmd' && d.text && !POLLY.test(d.text)) { const key = a + '\u0000' + d.text.trim(); W.calls[t.id] = key; if (W.failed[key]) note({ k: 'retry', c: d.text.trim().split('\n')[0].slice(0, 80) }); }
1347
+ }
1348
+ else if (ev.kind === 'results') for (const it of ev.items) { const key = W.calls[it.id]; if (!key) continue; delete W.calls[it.id]; if (it.err) W.failed[key] = 1; else delete W.failed[key]; }
1349
+ return hit;
1350
+ }
1351
+ const wasteLine = (it) => it.k === 'again' ? L('relu : {0}', 'read again: {0}').replace('{0}', () => fileOf(it.f)) : it.k === 'other' ? L('déjà lu par {0} : {1}', 'already read by {0}: {1}').replace('{0}', () => nameOf(it.by)).replace('{1}', () => fileOf(it.f))
1352
+ : it.k === 'find' ? L('même recherche relancée : {0}', 'same search again: {0}').replace('{0}', () => '“' + it.q + '”') : it.k === 'findOther' ? L('même recherche que {0} : {1}', 'same search as {0}: {1}').replace('{0}', () => nameOf(it.by)).replace('{1}', () => '“' + it.q + '”')
1353
+ : L('relance une commande qui a échoué : {0}', 'reran a failing command: {0}').replace('{0}', () => it.c);
1330
1354
  function tally(ev) { // numbers that pile up over a session: token usage, errors, last sign of life, the files it created
1331
1355
  noteFiles(ev);
1332
1356
  if (ev.kind === 'compact') { S.compacts[ev.agent] = (S.compacts[ev.agent] || 0) + 1; delete S.ctxWarned[ev.agent]; }
1357
+ if (wasteStep(S.wst, ev)) later('badges', renderBadges, 300);
1333
1358
  const det = loopStep(S.rep, ev); if (det) { S.loops[ev.agent] = det; later('badges', renderBadges, 300); } else if (S.loops[ev.agent] && (ev.kind === 'results' ? (S.loops[ev.agent].kind === 'errors' && ev.items.every((it) => !it.err)) : (ev.kind === 'tools' && S.rep[ev.agent].n < 2))) { delete S.loops[ev.agent]; later('badges', renderBadges, 300); }
1334
1359
  if (ev.kind === 'usage') { const c = ev.u.i + ev.u.r + ev.u.w; if (c > 0 && ev.model !== '<synthetic>') { S.ctx[ev.agent] = c; S.model[ev.agent] = ev.model; if (ev.cw) S.cw[ev.agent] = ev.cw; } const u = (S.usage[ev.agent] = S.usage[ev.agent] || { i: 0, o: 0, r: 0, w: 0 }); u.i += ev.u.i; u.o += ev.u.o; u.r += ev.u.r; u.w += ev.u.w; later('tok', renderTokens, 300); } // which also redraws the context chips. Asking for those first, under the same name, left this one unasked: the counts on the tiles and in the header stood still during a live call
1335
1360
  else if (ev.kind === 'results') ev.items.forEach((it) => { if (it.err) { S.errs[ev.agent] = (S.errs[ev.agent] || 0) + 1; later('badges', renderBadges, 300); oops(ev.agent); noteTrouble(ev.agent, false); } else noteTrouble(ev.agent, true); });
@@ -1347,11 +1372,11 @@ function renderCtx() { // "context N% full": per agent chip (from 50%), a head
1347
1372
  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';
1348
1373
  }
1349
1374
  function renderTokens() {
1350
- renderCtx();
1375
+ renderCtx(); const mix = mixedModels();
1351
1376
  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];
1352
1377
  const b = $('#tok'), tot = tokTotal(all); b.style.display = tot ? '' : 'none';
1353
- if (tot) { b.textContent = `⚡ ${fmtTok(tot)} ${L('jetons', 'tokens')}`; b.title = tokTip(all) + '\n' + Object.keys(S.usage).filter((id) => S.agents[id] && tokTotal(S.usage[id])).sort((x, y) => tokTotal(S.usage[y]) - tokTotal(S.usage[x])).slice(0, 14).map((id) => `\n${nameOf(id)} ⚡${fmtTok(tokTotal(S.usage[id]))}`).join(''); } // and who used what, the biggest first
1354
- for (const id in S.agents) { const t = $('#t-' + id); if (!t) continue; const u = S.usage[id], el = t.querySelector('.tk'); el.textContent = u && tokTotal(u) ? `⚡${fmtTok(tokTotal(u))}` : ''; el.dataset.w = L('jetons', 'tokens'); if (u) t.title = tokTip(u); }
1378
+ if (tot) { b.textContent = `⚡ ${fmtTok(tot)} ${L('jetons', 'tokens')}`; b.title = tokTip(all) + '\n' + Object.keys(S.usage).filter((id) => S.agents[id] && tokTotal(S.usage[id])).sort((x, y) => tokTotal(S.usage[y]) - tokTotal(S.usage[x])).slice(0, 14).map((id) => `\n${nameOf(id)} ⚡${fmtTok(tokTotal(S.usage[id]))}${modelShort(S.model[id]) ? ' · ' + modelShort(S.model[id]) : ''}`).join(''); } // and who used what, the biggest first
1379
+ for (const id in S.agents) { const t = $('#t-' + id); if (!t) continue; const u = S.usage[id], el = t.querySelector('.tk'); el.textContent = u && tokTotal(u) ? `⚡${fmtTok(tokTotal(u))}${mix && modelShort(S.model[id]) ? ' · ' + modelShort(S.model[id]).split(' ')[0] : ''}` : ''; el.dataset.w = L('jetons', 'tokens'); if (u) t.title = tokTip(u) + modelTip(id); }
1355
1380
  camTok(); if (S.events.length && document.body.classList.contains('rost')) paintStates(); // the list of agents carries the counts too
1356
1381
  }
1357
1382
  function camTok() { // the one who shares a screen: what it has used so far, next to its name in the camera, as on its tile
@@ -1416,7 +1441,7 @@ function paintStates() {
1416
1441
  if (st.k === 'done' && was && was !== 'done' && was !== 'idle') { pr.textContent = '🎉'; pr.className = 'prop cheer'; setTimeout(() => { if (pr.classList.contains('cheer')) { pr.textContent = ''; pr.className = 'prop'; } }, 1200); }
1417
1442
  else if (!pr.classList.contains('cheer')) { if (pr.textContent !== want) pr.textContent = want; pr.className = 'prop ' + (want ? st.k : ''); }
1418
1443
  if (shown && !S.gone.has(p.id)) ros.push({ p, st });
1419
- if (p.id === 'main' && st.k === 'done' && was && was !== 'done' && was !== 'idle' && S.live && S.playing) { S.wrap = was; if (Date.now() - (S.mainBusyAt || 0) > 45000) confetti(); } // the lead is done, its face says so: it always has a word for it (see wrapUp, which needs to know what it was doing just before), and confetti after a long turn
1444
+ if (p.id === 'main' && st.k === 'done' && was && was !== 'done' && was !== 'idle' && S.live && S.playing) { S.wrap = was; if (Date.now() - (S.mainBusyAt || 0) > 45000) confetti(); if (S.mainBusyAt) coffeeAsk(S.mainBusyAt); } // the lead is done, its face says so: it always has a word for it (see wrapUp, which needs to know what it was doing just before), and confetti after a long turn
1420
1445
  if (p.id === 'main') { if (st.k === 'working' || st.k === 'waiting') S.mainBusyAt = S.mainBusyAt || Date.now(); else if (st.k === 'done') S.mainBusyAt = 0; }
1421
1446
  S.prevState[p.id] = st.k; const tip = `${p.name} — ${p.role}${st.txt ? '\n' + st.txt : ''}${S.lastTool[p.id] ? '\n' + S.lastTool[p.id] : ''}`; if (t.title !== tip) t.title = tip;
1422
1447
  }
@@ -1433,11 +1458,14 @@ function fitBoard(force) { // the chips lose their words when they do not all
1433
1458
  addEventListener('resize', () => fitBoard(true)); new ResizeObserver(() => requestAnimationFrame(() => fitBoard(true))).observe($('#board')); /* the room the chips have also changes when the texts beside them do (a title, a longer status) */
1434
1459
  const RORDER = { blocked: 0, stalled: 1, working: 2, waiting: 3, idle: 4, done: 5 };
1435
1460
  const TOOL = { _codex: 'Codex', _vibe: 'Vibe', _cowork: 'Cowork' }, leadTool = (p) => (p.id === 'main' && S.cur && TOOL[S.cur.proj] ? ' · ' + TOOL[S.cur.proj] : ''); // a session that is not a Claude Code one says which tool runs it: on its tab, and next to its lead, who has the same name in every call
1436
- const rosTok = (id) => { const u = S.usage[id]; return u && tokTotal(u) ? `<span class="rt" title="${esc(tokTip(u))}">⚡${fmtTok(tokTotal(u))}</span>` : ''; };
1461
+ const modelShort = (m) => { const v = String(m || ''); if (!v || v[0] === '<') return ''; const c = /(opus|sonnet|haiku|fable)[-_ ]?(\d{1,2})(?:[-.](\d{1,2})(?!\d))?(?!\d)/i.exec(v); const o = /claude-(\d)(?:-(\d))?-(opus|sonnet|haiku)/i.exec(v), cap = (w) => w[0].toUpperCase() + w.slice(1).toLowerCase(); if (o) return cap(o[3]) + ' ' + o[1] + (o[2] ? '.' + o[2] : ''); return c ? cap(c[1]) + ' ' + c[2] + (c[3] ? '.' + c[3] : '') : v.replace(/^.*\//, '').replace(/-\d{8}$/, '').slice(0, 24); }; /* older ids put the version first: claude-3-5-sonnet → Sonnet 3.5 */ // claude-haiku-4-5-20251001 → Haiku 4.5
1462
+ const mixedModels = () => new Set(Object.keys(S.usage).filter((id) => S.agents[id] && S.model[id] && tokTotal(S.usage[id])).map((id) => modelShort(S.model[id])).filter(Boolean)).size > 1; // only then is the model worth a place next to the count
1463
+ const modelTip = (id) => (S.model[id] && modelShort(S.model[id]) ? '\n' + L('Modèle', 'Model') + ' · ' + S.model[id] : '');
1464
+ const rosTok = (id) => { const u = S.usage[id]; return u && tokTotal(u) ? `<span class="rt" title="${esc(tokTip(u) + modelTip(id))}">⚡${fmtTok(tokTotal(u))}${mixedModels() && modelShort(S.model[id]) ? ' · ' + esc(modelShort(S.model[id])) : ''}</span>` : ''; };
1437
1465
  function paintRoster(ros) { // a fixed list beside the call: who is doing what, urgent first, readable even with dozens of agents
1438
1466
  const box = $('#roster'); if (!box || !document.body.classList.contains('rost')) return;
1439
1467
  ros.sort((a, b) => (a.p.id === 'main' ? -1 : b.p.id === 'main' ? 1 : (RORDER[a.st.k] - RORDER[b.st.k]) || (S.lastAct[b.p.id] || 0) - (S.lastAct[a.p.id] || 0)));
1440
- const rows = ros.slice(0, 60).map(({ p, st }) => `<div class="rr k-${st.k}${isTurn(p.id, st) ? ' turn' : ''}${S.focus === p.id ? ' sel' : ''}${S.speakers.has(p.id) ? ' speaking' : ''}" data-id="${esc(p.id)}" tabindex="0" role="button" aria-label="${esc(p.name)}, ${esc(st.txt || '')}"><div class="n"><span class="dot" style="background:${p.shirt}"></span><b>${esc(p.name)}</b><span class="ro">${esc(p.role + leadTool(p))}</span>${rosTok(p.id)}</div><div class="st">${esc(st.txt || L('en veille', 'standing by'))}${S.loops[p.id] ? ' 🔁' : ''}</div></div>`).join('');
1468
+ const rows = ros.slice(0, 60).map(({ p, st }) => `<div class="rr k-${st.k}${isTurn(p.id, st) ? ' turn' : ''}${S.focus === p.id ? ' sel' : ''}${S.speakers.has(p.id) ? ' speaking' : ''}" data-id="${esc(p.id)}" tabindex="0" role="button" aria-label="${esc(p.name)}, ${esc(st.txt || '')}"><div class="n"><span class="dot" style="background:${p.shirt}"></span><b>${esc(p.name)}</b><span class="ro">${esc(p.role + leadTool(p))}</span>${rosTok(p.id)}</div><div class="st">${esc(st.txt || L('en veille', 'standing by'))}${S.loops[p.id] ? ' 🔁' : ''}${S.wst.items && S.wst.items[p.id] && S.wst.items[p.id].length ? ' ♻' + S.wst.items[p.id].length : ''}</div></div>`).join('');
1441
1469
  const left = Object.values(S.agents).filter((p) => S.gone.has(p.id) && p.id !== 'main' && p.id !== 'user').sort((a, b) => (S.lastAct[b.id] || 0) - (S.lastAct[a.id] || 0)); // a finished agent's tile leaves the stage: its line stays here, with what it used
1442
1470
  const gone = left.slice(0, 40).map((p) => `<div class="rr left" data-id="${esc(p.id)}" tabindex="0" role="button" aria-label="${esc(p.name)}"><div class="n"><span class="dot" style="background:${p.shirt}"></span><b>${esc(p.name)}</b><span class="ro">${esc(p.role)}</span>${rosTok(p.id)}</div></div>`).join('');
1443
1471
  const html = `<h3>${L('Agents', 'Agents')} · ${ros.length}</h3>${rows}${ros.length > 60 ? `<div class="ro" style="padding:4px 8px">+${ros.length - 60}</div>` : ''}${left.length ? `<h3 style="margin-top:8px">${L('terminés', 'done')} · ${left.length}</h3>${gone}` : ''}`;
@@ -1451,6 +1479,7 @@ function renderBadges() { // per tile: failed tool calls, a command that has b
1451
1479
  for (const id in S.agents) {
1452
1480
  const t = $('#t-' + id); if (!t) continue; const b = t.querySelector('.tbadge'), parts = []; let slow = false, quiet = false;
1453
1481
  if (S.errs[id]) parts.push(`<span class="e">✗ ${S.errs[id]}</span>`);
1482
+ const ws = S.wst.items && S.wst.items[id]; if (ws && ws.length) parts.push(`<span class="w" title="${esc(L('Travail répété', 'Repeated work') + '\n' + ws.slice(-12).map(wasteLine).join('\n'))}">♻ ${ws.length}</span>`);
1454
1483
  if (S.loops[id]) parts.push(`<span class="l" title="${esc(S.loops[id].kind === 'errors' ? L('Échecs répétés', 'Repeated failures') : L('Même appel répété', 'Same call repeated'))}">🔁 ×${S.loops[id].n}</span>`);
1455
1484
  if (S.live && S.status[id] === 'working') {
1456
1485
  const r = S.run[id];
@@ -1928,7 +1957,7 @@ function renderDetail() {
1928
1957
  if (!S.detail) return; const id = S.detail, evs = S.events.slice(0, S.idx + 1).filter((e) => e.agent === id || e.to === id);
1929
1958
  const order = evs.find((e) => e.kind === 'order' && e.to === id), tools = evs.filter((e) => e.agent === id && e.kind === 'tools').flatMap((e) => e.tools);
1930
1959
  const counts = {}; tools.forEach((t) => (counts[t.name] = (counts[t.name] || 0) + 1));
1931
- const u = S.usage[id], tokHtml = u && tokTotal(u) ? `<h3>${L('Jetons', 'Tokens')} · ⚡ ${fmtTok(tokTotal(u))}</h3><div class="dim">${L('entrée', 'input')} ${fmtTok(u.i)} · ${L('sortie', 'output')} ${fmtTok(u.o)} · ${L('écriture cache', 'cache write')} ${fmtTok(u.w)} · ${L('lecture cache', 'cache read')} ${fmtTok(u.r)}</div>` : '';
1960
+ const u = S.usage[id], tokHtml = u && tokTotal(u) ? `<h3>${L('Jetons', 'Tokens')} · ⚡ ${fmtTok(tokTotal(u))}</h3><div class="dim">${L('entrée', 'input')} ${fmtTok(u.i)} · ${L('sortie', 'output')} ${fmtTok(u.o)} · ${L('écriture cache', 'cache write')} ${fmtTok(u.w)} · ${L('lecture cache', 'cache read')} ${fmtTok(u.r)}${modelShort(S.model[id]) ? ` · ${L('Modèle', 'Model')} ${esc(S.model[id])}` : ''}</div>` : '';
1932
1961
  $('#dbody').innerHTML = tokHtml + (order ? `<h3>${L('Consigne de', 'Prompt from')} ${esc(nameOf(order.agent))}</h3><pre>${esc(order.text)}</pre>` : '') +
1933
1962
  (id === 'user' ? (S.idleHtml = (S.idleFor === S.detailOpen && S.idleHtml) || idleHtml(), S.idleFor = S.detailOpen, S.idleHtml) : `<h3>${L('Outils', 'Tools')} (${tools.length})</h3><div>${Object.entries(counts).map(([n, c]) => `${esc(n)} ×${c}`).join(' · ') || '—'}</div>` +
1934
1963
  `<h3>${L('Activité récente', 'Recent activity')}</h3>` + (S.term[id] || []).slice(-30).reverse().map((e) => `<details><summary>${e.end == null ? '⠋' : e.err ? '✗' : '✓'} ${esc(e.tool.name)} <span class="dim">${e.end != null ? fmtDur(e.end - e.ts) : L('en cours', 'running')}</span> — ${esc((e.tool.arg || '').slice(-60))}</summary><pre>${esc((e.tool.d && e.tool.d.kind === 'cmd' ? '$ ' + e.tool.d.text + '\n' : '') + (e.out || ''))}</pre>${e.img && S.cur ? `<img class="dimg" src="${esc(mediaUrl(id, e.id, 0))}" alt="" loading="lazy">` : ''}</details>`).join('')) +
@@ -1970,9 +1999,52 @@ function openExternal(url) { if (EMBED) window.parent.postMessage({ agentStandup
1970
1999
  function renderCoffee() {
1971
2000
  const on = !!SUPPORT.url, b = $('#mCoffee'); b.style.display = on ? '' : 'none'; $('#mCoffeeT').textContent = L('☕ Offrir un café au développeur', '☕ Buy the (replaced) dev a coffee'); b.title = coffeeMsg();
1972
2001
  const h = $('#bCoffee'); h.style.display = on ? '' : 'none'; h.title = coffeeMsg(); h.setAttribute('aria-label', coffeeMsg());
2002
+ $('#mRateT').textContent = APP.kind === 'editor' ? L('⭐ Noter Agent Standup', '⭐ Rate Agent Standup') : L('⭐ Une étoile pour Agent Standup sur GitHub', '⭐ Star Agent Standup on GitHub');
1973
2003
  }
1974
2004
  $('#bCoffee').onclick = () => openExternal(SUPPORT.url);
1975
2005
  $('#mCoffee').onclick = () => { $('#menu').classList.remove('on'); openExternal(SUPPORT.url); };
2006
+ // ⚙ › Rate: the review page of the store the editor installs from, or a star on GitHub for the desktop app and the command line, which have no store (AS_APP: appKind in server.js).
2007
+ // In the editor, the extension opens the page itself (the store it installs from) and stops asking. The desktop app and the command line ask here, once: on the third day the page
2008
+ // is in view, a tip by the menu; "Later" asks again a week later, one time; the star and "No thanks" end it. The days are kept in the settings file; nothing is sent.
2009
+ $('#mRate').onclick = () => { $('#menu').classList.remove('on'); rateGo(); };
2010
+ function rateGo() { rateEnd(); if (EMBED && APP.kind === 'editor') window.parent.postMessage({ agentStandup: 'rate' }, '*'); else openExternal(APP.rate); }
2011
+ const rateEnd = () => { prefs.rateDone = utcDay(); savePrefs(); $('#rateTip').style.display = 'none'; };
2012
+ const RATE_ASKS = (APP.kind === 'desktop' || APP.kind === 'cli') && !EMBED && !Q.get('demo'), utcDay = () => new Date().toISOString().slice(0, 10);
2013
+ function rateDay() { // a day of use: the page in view that day
2014
+ if (!RATE_ASKS || prefs.rateDone || document.hidden) return;
2015
+ const day = utcDay(); if (prefs.rateLast !== day) { prefs.rateLast = day; prefs.rateDays = (+prefs.rateDays || 0) + 1; savePrefs(); }
2016
+ rateTip();
2017
+ }
2018
+ function rateTip() {
2019
+ const t = $('#rateTip'); if (!RATE_ASKS || prefs.rateDone || (+prefs.rateDays || 0) < 3 || (prefs.rateLater && utcDay() < prefs.rateLater) || $('#menuTip').style.display !== 'none' || $('#menu').classList.contains('on')) { t.style.display = 'none'; return; }
2020
+ const r = $('#bMenu').getBoundingClientRect(); if (!r.width) return;
2021
+ $('#rateTipT').textContent = L('Agent Standup vous plaît ? Une étoile sur GitHub aide d’autres personnes à le trouver.', 'Enjoying Agent Standup? A star on GitHub helps other people find it.');
2022
+ $('#rateYes').textContent = L('⭐ Mettre une étoile', '⭐ Star it'); $('#rateLater').textContent = L('Plus tard', 'Later'); $('#rateNo').textContent = L('Non merci', 'No thanks');
2023
+ rateTip.seen = utcDay(); t.style.display = ''; t.style.top = Math.round(r.bottom + 10) + 'px'; t.style.right = Math.max(8, Math.round(innerWidth - r.right - 6)) + 'px'; t.style.setProperty('--ax', Math.max(8, Math.round(r.width / 2 - 2)) + 'px');
2024
+ }
2025
+ $('#rateYes').onclick = rateGo; $('#rateNo').onclick = rateEnd;
2026
+ $('#rateLater').onclick = () => { if (prefs.rateLater) return rateEnd(); prefs.rateLater = new Date(Date.parse(utcDay()) + 7 * 864e5).toISOString().slice(0, 10); savePrefs(); $('#rateTip').style.display = 'none'; };
2027
+ document.addEventListener('visibilitychange', rateDay); setInterval(rateDay, 3600e3); // the desktop window can stay open for days
2028
+ // ☕ Once, at the end of a long run the call followed live (the lead at work for 10 minutes, or 3 agents at work in that turn), from the second day the call has been in view.
2029
+ // Never twice ("No thanks", the coffee or nothing at all end it), never the day the star is asked, never in a demo. The days are kept in the settings file; nothing is sent.
2030
+ function coffeeDay() { if (document.hidden || !SUPPORT.url || prefs.coffeeAsked || prefs.useFirst) return; prefs.useFirst = utcDay(); savePrefs(); } /* one write, ever: the first day the call is in view (a window left open overnight must not write its old settings over newer ones) */
2031
+ function coffeeAsk(busyAt) {
2032
+ if (!SUPPORT.url || prefs.coffeeAsked || Q.get('demo') || !prefs.useFirst || prefs.useFirst >= utcDay() || document.hidden) return;
2033
+ const now = Date.now(), team = Object.keys(S.agents).filter((id) => id !== 'main' && id !== 'user' && S.lastAct[id] >= busyAt).length;
2034
+ if (!(now - busyAt >= 10 * 60e3 || (team >= 3 && now - busyAt >= 2 * 60e3))) return;
2035
+ if ($('#rateTip').style.display !== 'none' || rateTip.seen === utcDay() || prefs.rateDone === utcDay() || (RATE_ASKS && !prefs.rateDone && prefs.rateLast === utcDay() && (+prefs.rateDays || 0) >= 3)) return; /* the star shown, given or declined today */
2036
+ clearTimeout(coffeeAsk.t); coffeeAsk.t = setTimeout(() => { if (prefs.coffeeAsked || document.hidden || $('#menu').classList.contains('on') || $('#menuTip').style.display !== 'none' || $('#rateTip').style.display !== 'none' || agentState('main', Date.now()).k !== 'done') return; coffeeTip(); }, 8000); /* after the confetti and the lead's last word */
2037
+ }
2038
+ function coffeeTip() {
2039
+ const at = [$('#bCoffee'), $('#bMenu')].find((b) => b.getBoundingClientRect().width), t = $('#coffeeTip'); if (!at) return;
2040
+ prefs.coffeeAsked = utcDay(); savePrefs(); const r = at.getBoundingClientRect();
2041
+ $('#coffeeTipT').textContent = L('{0} et l’équipe ont fini. Si l’appel vous a aidé à suivre ce long travail, un café aide Agent Standup à continuer. (On ne le demande qu’une fois.)', '{0} and the team are done. If the call helped you follow this long run, a coffee keeps Agent Standup going. (We only ask once.)').replace('{0}', () => nameOf('main'));
2042
+ $('#coffeeYes').textContent = L('☕ Offrir un café', '☕ Buy a coffee'); $('#coffeeNo').textContent = L('Non merci', 'No thanks');
2043
+ t.style.display = ''; t.style.top = Math.round(r.bottom + 10) + 'px'; t.style.right = Math.max(8, Math.round(innerWidth - r.right - 6)) + 'px'; t.style.setProperty('--ax', Math.max(8, Math.round(r.width / 2 - 2)) + 'px');
2044
+ clearTimeout(coffeeTip.t); coffeeTip.t = setTimeout(() => (t.style.display = 'none'), 60000);
2045
+ }
2046
+ $('#coffeeYes').onclick = () => { $('#coffeeTip').style.display = 'none'; openExternal(SUPPORT.url); }; $('#coffeeNo').onclick = () => ($('#coffeeTip').style.display = 'none');
2047
+ document.addEventListener('visibilitychange', coffeeDay); setInterval(coffeeDay, 3600e3);
1976
2048
 
1977
2049
  // =====================================================================
1978
2050
  // recap
@@ -2008,8 +2080,9 @@ function renderHighlights() {
2008
2080
  }
2009
2081
  $('#hl').onclick = (e) => { const b = e.target.closest('.hlc'); if (b && !S.live) seekTo(+b.dataset.i); };
2010
2082
  function openRecap() {
2011
- const per = {}, files = {}; let tools = 0, cmds = 0, errs = 0; const tk = {}, A = (id) => (per[id] = per[id] || { id, tools: 0, files: new Set(), t0: null, t1: null });
2083
+ const per = {}, files = {}, mdl = {}; let tools = 0, cmds = 0, errs = 0; const tk = {}, A = (id) => (per[id] = per[id] || { id, tools: 0, files: new Set(), t0: null, t1: null });
2012
2084
  S.events.forEach((e) => {
2085
+ if (e.kind === 'usage' && e.model && e.model[0] !== '<') mdl[e.agent] = e.model; /* not <synthetic>, as in tally */
2013
2086
  if (e.kind === 'usage') { const u = (tk[e.agent] = tk[e.agent] || { i: 0, o: 0, r: 0, w: 0 }); u.i += e.u.i; u.o += e.u.o; u.r += e.u.r; u.w += e.u.w; }
2014
2087
  if (e.kind === 'results') e.items.forEach((it) => { if (it.err) errs++; });
2015
2088
  if (e.kind === 'order') A(e.to).t0 = e.t; if (e.kind === 'report') A(e.agent).t1 = e.t;
@@ -2018,11 +2091,13 @@ function openRecap() {
2018
2091
  });
2019
2092
  const last = S.events.length ? S.events[S.events.length - 1].t : 0, rows = Object.values(per).filter((a) => a.id !== 'user' && S.agents[a.id]).sort((a, b) => b.tools - a.tools).slice(0, 18), fl = Object.entries(files).sort((a, b) => b[1].n - a[1].n).slice(0, 25);
2020
2093
  const k = (v, l) => `<div class="kpi"><b>${v}</b><span>${l}</span></div>`, totTok = Object.values(tk).reduce((n, u) => n + tokTotal(u), 0);
2094
+ const RW = {}; S.events.forEach((e) => wasteStep(RW, e)); const wl = Object.entries(RW.items || {}).filter(([id]) => S.agents[id]).flatMap(([id, l]) => l.map((it) => [id, it]));
2021
2095
  $('#recap .box').innerHTML = `<h1>${L('Récap de l’épisode', 'Episode recap')}</h1>
2022
- <div class="kpis">${k(Math.max(0, Object.keys(S.agents).length - 2), 'agents')}${k(tools, L('appels d’outils', 'tool calls'))}${k(cmds, L('commandes', 'commands'))}${k(errs, L('outils en erreur', 'tool errors'))}${totTok ? k('⚡ ' + fmtTok(totTok), L('jetons', 'tokens')) : ''}${k(Object.keys(files).length, L('fichiers modifiés', 'files changed'))}${k(fmt(last), L('durée', 'duration'))}</div>
2023
- <h3>${L('Agents les plus actifs', 'Busiest agents')}</h3><table><tr><th></th><th>${L('Rôle', 'Role')}</th><th>${L('Outils', 'Tools')}</th><th>${L('Fichiers', 'Files')}</th><th>${L('Jetons', 'Tokens')}</th><th>${L('Durée', 'Time')}</th></tr>
2024
- ${rows.map((a) => `<tr><td><b>${esc(nameOf(a.id))}</b></td><td>${esc(S.agents[a.id].role)}</td><td>${a.tools}</td><td>${a.files.size || ''}</td><td title="${tk[a.id] ? esc(tokTip(tk[a.id])) : ''}">${tk[a.id] ? '⚡ ' + fmtTok(tokTotal(tk[a.id])) : ''}</td><td>${a.t0 != null && a.t1 != null ? fmt(a.t1 - a.t0) : ''}</td></tr>`).join('')}</table>
2096
+ <div class="kpis">${k(Math.max(0, Object.keys(S.agents).length - 2), 'agents')}${k(tools, L('appels d’outils', 'tool calls'))}${k(cmds, L('commandes', 'commands'))}${k(errs, L('outils en erreur', 'tool errors'))}${wl.length ? k('♻ ' + wl.length, L('travail répété', 'repeated work')) : ''}${totTok ? k('⚡ ' + fmtTok(totTok), L('jetons', 'tokens')) : ''}${k(Object.keys(files).length, L('fichiers modifiés', 'files changed'))}${k(fmt(last), L('durée', 'duration'))}</div>
2097
+ <h3>${L('Agents les plus actifs', 'Busiest agents')}</h3><table><tr><th></th><th>${L('Rôle', 'Role')}</th><th>${L('Outils', 'Tools')}</th><th>${L('Fichiers', 'Files')}</th><th>${L('Jetons', 'Tokens')}</th><th>${L('Modèle', 'Model')}</th><th>${L('Durée', 'Time')}</th></tr>
2098
+ ${rows.map((a) => `<tr><td><b>${esc(nameOf(a.id))}</b></td><td>${esc(S.agents[a.id].role)}</td><td>${a.tools}</td><td>${a.files.size || ''}</td><td title="${tk[a.id] ? esc(tokTip(tk[a.id])) : ''}">${tk[a.id] ? '⚡ ' + fmtTok(tokTotal(tk[a.id])) : ''}</td><td>${esc(modelShort(mdl[a.id]))}</td><td>${a.t0 != null && a.t1 != null ? fmt(a.t1 - a.t0) : ''}</td></tr>`).join('')}</table>
2025
2099
  <h3>${L('Fichiers touchés', 'Files touched')}</h3>${fl.length ? `<table>${fl.map(([f, v]) => `<tr><td class="f">${esc(f)}</td><td>×${v.n}</td><td>${esc([...v.who].join(', '))}</td></tr>`).join('')}</table>` : `<div class="dim">${L('Aucune modification.', 'No edits.')}</div>`}
2100
+ ${wl.length ? `<h3>${L('Travail répété', 'Repeated work')}</h3><table>${wl.slice(0, 30).map(([id, it]) => `<tr><td><b>${esc(nameOf(id))}</b></td><td>${esc(wasteLine(it))}</td></tr>`).join('')}</table>` : ''}
2026
2101
  ${SUPPORT.url ? `<div class="coffee"><span>${esc(coffeeMsg())}</span><button class="btn" id="recapCoffee">☕ ${L('Offrir un café', 'Buy a coffee')}</button></div>` : ''}
2027
2102
  <p style="text-align:right;margin:18px 0 0"><button class="btn" id="recapMd">📋 ${L('Copier en Markdown', 'Copy as Markdown')}</button> <button class="cta" id="recapx">${L('Fermer', 'Close')}</button></p>`;
2028
2103
  const md = [`# Agent Standup — ${S.title || L('épisode', 'session')}`, `_${new Date().toLocaleString()}_ · ${Math.max(0, Object.keys(S.agents).length - 2)} agents · ${tools} ${L('appels d’outils', 'tool calls')} · ${cmds} ${L('commandes', 'commands')} · ${errs} ${L('erreurs', 'errors')}${totTok ? ' · ⚡ ' + fmtTok(totTok) + ' tokens' : ''}`, '', '## Standup'];
@@ -2729,7 +2804,7 @@ async function exportVideo(from = 0, to = 0, clip = 0) { // clip: length in ms
2729
2804
  // UI wiring
2730
2805
  // =====================================================================
2731
2806
  function applyLang() {
2732
- renderCharInfo(); packNote(); menuTip();
2807
+ renderCharInfo(); packNote(); menuTip(); rateDay(); coffeeDay();
2733
2808
  try { for (const id in S.act) { const b = S.term[id], t = b && b[b.length - 1]; if (t && t.tool) S.act[id] = activityLabel(t.tool); } if (S.live) fillProjects(); } catch {} // what each agent is doing, and the list of projects, were written in the language before
2734
2809
  document.documentElement.lang = (LANGS.find((l) => l[0] === prefs.lang) || LANGS[0])[2];
2735
2810
  document.querySelectorAll('[data-fr]').forEach((el) => (el.textContent = FR() ? el.dataset.fr : tr(el.dataset.en)));
@@ -2948,7 +3023,7 @@ for (const q of ['#gate', '#empty']) new MutationObserver(focusDoor).observe($(q
2948
3023
  function syncSwitches() { document.querySelectorAll('#menu .mi[data-t], #prefs .mi[data-t]').forEach((b) => { b.setAttribute('role', 'switch'); b.setAttribute('aria-checked', String(!!prefs[b.dataset.t])); }); }
2949
3024
  new MutationObserver(() => { // the menu opens under the header and the status line, not over them
2950
3025
  const m = $('#menu'), on = m.classList.contains('on'), h = Math.round($('main').getBoundingClientRect().top); $('#bMenu').setAttribute('aria-expanded', String(on)); if (!on) return;
2951
- syncSwitches(); menuTipDone(); if (!$('#menuShop').innerHTML) renderMenuShop(); m.style.top = h + 3 + 'px'; m.style.maxHeight = `calc(100dvh - ${h + 13}px)`;
3026
+ syncSwitches(); menuTipDone(); $('#rateTip').style.display = 'none'; $('#coffeeTip').style.display = 'none'; if (!$('#menuShop').innerHTML) renderMenuShop(); m.style.top = h + 3 + 'px'; m.style.maxHeight = `calc(100dvh - ${h + 13}px)`;
2952
3027
  }).observe($('#menu'), { attributes: true, attributeFilter: ['class'] });
2953
3028
  $('#menu').addEventListener('click', () => setTimeout(syncSwitches)); $('#bMenu').setAttribute('aria-expanded', 'false'); syncSwitches();
2954
3029
  addEventListener('keydown', (e) => { // on the way down: Escape also works from the search box and the selects of the menu, which the shortcuts below ignore
@@ -327,5 +327,21 @@
327
327
  "is waiting for your answer": "venter på dit svar",
328
328
  "A menu is open in Claude Code.": "En menu er åben i Claude Code.",
329
329
  "Speed presets": "Hastighedsforvalg",
330
- "pages": "sider"
330
+ "pages": "sider",
331
+ "⭐ Rate Agent Standup": "⭐ Bedøm Agent Standup",
332
+ "⭐ Star Agent Standup on GitHub": "⭐ Giv Agent Standup en stjerne på GitHub",
333
+ "⭐ Star it": "⭐ Giv en stjerne",
334
+ "Enjoying Agent Standup? A star on GitHub helps other people find it.": "Kan du lide Agent Standup? En stjerne på GitHub hjælper andre med at finde det.",
335
+ "Later": "Senere",
336
+ "No thanks": "Nej tak",
337
+ "Model": "Model",
338
+ "Repeated work": "Gentaget arbejde",
339
+ "repeated work": "gentaget arbejde",
340
+ "read again: {0}": "læst igen: {0}",
341
+ "already read by {0}: {1}": "allerede læst af {0}: {1}",
342
+ "same search again: {0}": "samme søgning igen: {0}",
343
+ "same search as {0}: {1}": "samme søgning som {0}: {1}",
344
+ "reran a failing command: {0}": "kørte en fejlet kommando igen: {0}",
345
+ "☕ Buy a coffee": "☕ Giv en kop kaffe",
346
+ "{0} and the team are done. If the call helped you follow this long run, a coffee keeps Agent Standup going. (We only ask once.)": "{0} og holdet er færdige. Hvis opkaldet hjalp dig med at følge dette lange stykke arbejde, holder en kop kaffe Agent Standup i gang. (Vi spørger kun én gang.)"
331
347
  }
@@ -328,5 +328,21 @@
328
328
  "is waiting for your answer": "wartet auf deine Antwort",
329
329
  "A menu is open in Claude Code.": "In Claude Code ist ein Menü offen.",
330
330
  "Speed presets": "Geschwindigkeitsvorgaben",
331
- "pages": "Seiten"
331
+ "pages": "Seiten",
332
+ "⭐ Rate Agent Standup": "⭐ Agent Standup bewerten",
333
+ "⭐ Star Agent Standup on GitHub": "⭐ Agent Standup auf GitHub einen Stern geben",
334
+ "⭐ Star it": "⭐ Stern geben",
335
+ "Enjoying Agent Standup? A star on GitHub helps other people find it.": "Gefällt dir Agent Standup? Ein Stern auf GitHub hilft anderen, es zu finden.",
336
+ "Later": "Später",
337
+ "No thanks": "Nein danke",
338
+ "Model": "Modell",
339
+ "Repeated work": "Wiederholte Arbeit",
340
+ "repeated work": "wiederholte Arbeit",
341
+ "read again: {0}": "erneut gelesen: {0}",
342
+ "already read by {0}: {1}": "schon gelesen von {0}: {1}",
343
+ "same search again: {0}": "gleiche Suche noch einmal: {0}",
344
+ "same search as {0}: {1}": "gleiche Suche wie {0}: {1}",
345
+ "reran a failing command: {0}": "fehlgeschlagenen Befehl wiederholt: {0}",
346
+ "☕ Buy a coffee": "☕ Einen Kaffee spendieren",
347
+ "{0} and the team are done. If the call helped you follow this long run, a coffee keeps Agent Standup going. (We only ask once.)": "{0} und das Team sind fertig. Wenn dir der Call geholfen hat, diesen langen Lauf zu verfolgen, hält ein Kaffee Agent Standup am Laufen. (Wir fragen nur einmal.)"
332
348
  }
@@ -4,12 +4,17 @@
4
4
  "”": "”",
5
5
  "(one or more)": "(one or more)",
6
6
  "(pick one)": "(pick one)",
7
+ "{0} and the team are done. If the call helped you follow this long run, a coffee keeps Agent Standup going. (We only ask once.)": "{0} and the team are done. If the call helped you follow this long run, a coffee keeps Agent Standup going. (We only ask once.)",
7
8
  "↗ Open in browser": "↗ Open in browser",
8
9
  "⌨ Keyboard shortcuts (?)": "⌨ Keyboard shortcuts (?)",
9
10
  "▶ Join": "▶ Join",
10
11
  "▶ Watch the demo": "▶ Watch the demo",
12
+ "☕ Buy a coffee": "☕ Buy a coffee",
11
13
  "☕ Buy the (replaced) dev a coffee": "☕ Buy the (replaced) dev a coffee",
12
14
  "⚙ All settings (display, alerts…)": "⚙ All settings (display, alerts…)",
15
+ "⭐ Rate Agent Standup": "⭐ Rate Agent Standup",
16
+ "⭐ Star Agent Standup on GitHub": "⭐ Star Agent Standup on GitHub",
17
+ "⭐ Star it": "⭐ Star it",
13
18
  "🎞 Export video": "🎞 Export video",
14
19
  "🎬 Clip to share (25 s)": "🎬 Clip to share (25 s)",
15
20
  "🐞 Report a problem": "🐞 Report a problem",
@@ -25,6 +30,7 @@
25
30
  "Agents list (left)": "Agents list (left)",
26
31
  "All projects (most recent)": "All projects (most recent)",
27
32
  "All settings": "All settings",
33
+ "already read by {0}: {1}": "already read by {0}: {1}",
28
34
  "Also ": "Also ",
29
35
  "Ambience volume": "Ambience volume",
30
36
  "An agent may be waiting for you ✋": "An agent may be waiting for you ✋",
@@ -82,6 +88,7 @@
82
88
  "duration": "duration",
83
89
  "Editing ": "Editing ",
84
90
  "Editor": "Editor",
91
+ "Enjoying Agent Standup? A star on GitHub helps other people find it.": "Enjoying Agent Standup? A star on GitHub helps other people find it.",
85
92
  "Entirely optional: the app stays free. It is a way to support the artist and the developer.": "Entirely optional: the app stays free. It is a way to support the artist and the developer.",
86
93
  "EPISODE 1": "EPISODE 1",
87
94
  "Episode recap": "Episode recap",
@@ -128,6 +135,7 @@
128
135
  "Keyboard shortcuts": "Keyboard shortcuts",
129
136
  "Language": "Language",
130
137
  "Laptop in front of your own characters": "Laptop in front of your own characters",
138
+ "Later": "Later",
131
139
  "Lead": "Lead",
132
140
  "Lead context": "Lead context",
133
141
  "lead.png = the lead · you.png = you · others = the sub-agents · name-talk.png = open mouth": "lead.png = the lead · you.png = you · others = the sub-agents · name-talk.png = open mouth",
@@ -147,6 +155,7 @@
147
155
  "may be waiting for your approval": "may be waiting for your approval",
148
156
  "may be waiting for your go-ahead on this command": "may be waiting for your go-ahead on this command",
149
157
  "may be waiting for your go-ahead to edit this file": "may be waiting for your go-ahead to edit this file",
158
+ "Model": "Model",
150
159
  "More": "More",
151
160
  "Music volume": "Music volume",
152
161
  "Mute / unmute": "Mute / unmute",
@@ -165,6 +174,7 @@
165
174
  "No recent session": "No recent session",
166
175
  "No setting found": "No setting found",
167
176
  "No system voice found: agents will mumble.": "No system voice found: agents will mumble.",
177
+ "No thanks": "No thanks",
168
178
  "Nobody needs you right now": "Nobody needs you right now",
169
179
  "Normal": "Normal",
170
180
  "Nothing is sent from here. The button opens a draft on GitHub with the text below: read it, say what happened, then send it yourself.": "Nothing is sent from here. The button opens a draft on GitHub with the text below: read it, say what happened, then send it yourself.",
@@ -198,6 +208,7 @@
198
208
  "Reactions": "Reactions",
199
209
  "Reactions & jokes": "Reactions & jokes",
200
210
  "Reactions bar (👍 👏 ☕)": "Reactions bar (👍 👏 ☕)",
211
+ "read again: {0}": "read again: {0}",
201
212
  "read-only": "read-only",
202
213
  "Reading ": "Reading ",
203
214
  "READY": "READY",
@@ -208,6 +219,8 @@
208
219
  "Remove finished agents (2 min)": "Remove finished agents (2 min)",
209
220
  "Reopen": "Reopen",
210
221
  "Repeated failures": "Repeated failures",
222
+ "repeated work": "repeated work",
223
+ "Repeated work": "Repeated work",
211
224
  "Replay": "Replay",
212
225
  "REPLAY": "REPLAY",
213
226
  "Replay: next / previous highlight": "Replay: next / previous highlight",
@@ -215,6 +228,7 @@
215
228
  "report": "report",
216
229
  "Report a problem": "Report a problem",
217
230
  "report to": "report to",
231
+ "reran a failing command: {0}": "reran a failing command: {0}",
218
232
  "Reset to defaults": "Reset to defaults",
219
233
  "Resumed where you left off": "Resumed where you left off",
220
234
  "Role": "Role",
@@ -223,6 +237,8 @@
223
237
  "running…": "running…",
224
238
  "Said": "Said",
225
239
  "Same call repeated": "Same call repeated",
240
+ "same search again: {0}": "same search again: {0}",
241
+ "same search as {0}: {1}": "same search as {0}: {1}",
226
242
  "Search settings…": "Search settings…",
227
243
  "Search the transcript": "Search the transcript",
228
244
  "Search…": "Search…",
@@ -328,5 +328,21 @@
328
328
  "is waiting for your answer": "espera tu respuesta",
329
329
  "A menu is open in Claude Code.": "Hay un menú abierto en Claude Code.",
330
330
  "Speed presets": "Velocidades predefinidas",
331
- "pages": "páginas"
331
+ "pages": "páginas",
332
+ "⭐ Rate Agent Standup": "⭐ Valorar Agent Standup",
333
+ "⭐ Star Agent Standup on GitHub": "⭐ Dar una estrella a Agent Standup en GitHub",
334
+ "⭐ Star it": "⭐ Dar una estrella",
335
+ "Enjoying Agent Standup? A star on GitHub helps other people find it.": "¿Te gusta Agent Standup? Una estrella en GitHub ayuda a que otros lo encuentren.",
336
+ "Later": "Más tarde",
337
+ "No thanks": "No, gracias",
338
+ "Model": "Modelo",
339
+ "Repeated work": "Trabajo repetido",
340
+ "repeated work": "trabajo repetido",
341
+ "read again: {0}": "leído otra vez: {0}",
342
+ "already read by {0}: {1}": "ya lo leyó {0}: {1}",
343
+ "same search again: {0}": "misma búsqueda otra vez: {0}",
344
+ "same search as {0}: {1}": "misma búsqueda que {0}: {1}",
345
+ "reran a failing command: {0}": "repitió un comando que falló: {0}",
346
+ "☕ Buy a coffee": "☕ Invitar a un café",
347
+ "{0} and the team are done. If the call helped you follow this long run, a coffee keeps Agent Standup going. (We only ask once.)": "{0} y el equipo han terminado. Si la llamada te ayudó a seguir este trabajo largo, un café ayuda a que Agent Standup siga adelante. (Solo lo pedimos una vez.)"
332
348
  }
@@ -328,5 +328,21 @@
328
328
  "is waiting for your answer": "があなたの回答を待っています",
329
329
  "A menu is open in Claude Code.": "Claude Code でメニューが開いています。",
330
330
  "Speed presets": "速度プリセット",
331
- "pages": "ページ"
331
+ "pages": "ページ",
332
+ "⭐ Rate Agent Standup": "⭐ Agent Standup を評価する",
333
+ "⭐ Star Agent Standup on GitHub": "⭐ GitHub で Agent Standup にスターを付ける",
334
+ "⭐ Star it": "⭐ スターを付ける",
335
+ "Enjoying Agent Standup? A star on GitHub helps other people find it.": "Agent Standup を気に入っていただけましたか?GitHub でスターを付けていただけると、ほかの人が見つけやすくなります。",
336
+ "Later": "後で",
337
+ "No thanks": "結構です",
338
+ "Model": "モデル",
339
+ "Repeated work": "重複した作業",
340
+ "repeated work": "重複した作業",
341
+ "read again: {0}": "再読み込み: {0}",
342
+ "already read by {0}: {1}": "{0} が既に読んだファイル: {1}",
343
+ "same search again: {0}": "同じ検索をもう一度: {0}",
344
+ "same search as {0}: {1}": "{0} と同じ検索: {1}",
345
+ "reran a failing command: {0}": "失敗したコマンドを再実行: {0}",
346
+ "☕ Buy a coffee": "☕ コーヒーをおごる",
347
+ "{0} and the team are done. If the call helped you follow this long run, a coffee keeps Agent Standup going. (We only ask once.)": "{0}とチームの作業が終わりました。この長い作業を追うのに通話が役立ったなら、コーヒー1杯で Agent Standup の開発を支えられます。(お願いするのはこの一度だけです)"
332
348
  }
@@ -328,5 +328,21 @@
328
328
  "is waiting for your answer": "— 답을 기다리고 있습니다",
329
329
  "A menu is open in Claude Code.": "Claude Code에 메뉴가 열려 있습니다.",
330
330
  "Speed presets": "속도 프리셋",
331
- "pages": "페이지"
331
+ "pages": "페이지",
332
+ "⭐ Rate Agent Standup": "⭐ Agent Standup 평가하기",
333
+ "⭐ Star Agent Standup on GitHub": "⭐ GitHub에서 Agent Standup에 별 주기",
334
+ "⭐ Star it": "⭐ 별 주기",
335
+ "Enjoying Agent Standup? A star on GitHub helps other people find it.": "Agent Standup이 마음에 드시나요? GitHub에 별을 남겨 주시면 다른 분들이 찾는 데 도움이 됩니다.",
336
+ "Later": "나중에",
337
+ "No thanks": "괜찮습니다",
338
+ "Model": "모델",
339
+ "Repeated work": "반복된 작업",
340
+ "repeated work": "반복된 작업",
341
+ "read again: {0}": "다시 읽음: {0}",
342
+ "already read by {0}: {1}": "{0}이(가) 이미 읽음: {1}",
343
+ "same search again: {0}": "같은 검색을 다시: {0}",
344
+ "same search as {0}: {1}": "{0}와(과) 같은 검색: {1}",
345
+ "reran a failing command: {0}": "실패한 명령을 다시 실행: {0}",
346
+ "☕ Buy a coffee": "☕ 커피 한 잔 사기",
347
+ "{0} and the team are done. If the call helped you follow this long run, a coffee keeps Agent Standup going. (We only ask once.)": "{0}와 팀이 작업을 마쳤어요. 이 긴 작업을 따라가는 데 통화가 도움이 됐다면, 커피 한 잔이 Agent Standup을 계속 이어가게 해요. (딱 한 번만 여쭤볼게요.)"
332
348
  }
@@ -328,5 +328,21 @@
328
328
  "is waiting for your answer": "espera sua resposta",
329
329
  "A menu is open in Claude Code.": "Há um menu aberto no Claude Code.",
330
330
  "Speed presets": "Velocidades predefinidas",
331
- "pages": "páginas"
331
+ "pages": "páginas",
332
+ "⭐ Rate Agent Standup": "⭐ Avaliar o Agent Standup",
333
+ "⭐ Star Agent Standup on GitHub": "⭐ Dar uma estrela ao Agent Standup no GitHub",
334
+ "⭐ Star it": "⭐ Dar uma estrela",
335
+ "Enjoying Agent Standup? A star on GitHub helps other people find it.": "Está gostando do Agent Standup? Uma estrela no GitHub ajuda outras pessoas a encontrá-lo.",
336
+ "Later": "Mais tarde",
337
+ "No thanks": "Não, obrigado",
338
+ "Model": "Modelo",
339
+ "Repeated work": "Trabalho repetido",
340
+ "repeated work": "trabalho repetido",
341
+ "read again: {0}": "lido de novo: {0}",
342
+ "already read by {0}: {1}": "já lido por {0}: {1}",
343
+ "same search again: {0}": "mesma busca de novo: {0}",
344
+ "same search as {0}: {1}": "mesma busca que {0}: {1}",
345
+ "reran a failing command: {0}": "repetiu um comando que falhou: {0}",
346
+ "☕ Buy a coffee": "☕ Pagar um café",
347
+ "{0} and the team are done. If the call helped you follow this long run, a coffee keeps Agent Standup going. (We only ask once.)": "{0} e a equipe terminaram. Se a chamada ajudou você a acompanhar esse trabalho longo, um café ajuda o Agent Standup a continuar. (Só pedimos uma vez.)"
332
348
  }
@@ -328,5 +328,21 @@
328
328
  "is waiting for your answer": "在等你的回答",
329
329
  "A menu is open in Claude Code.": "Claude Code 中有一个打开的菜单。",
330
330
  "Speed presets": "速度预设",
331
- "pages": "页"
331
+ "pages": "页",
332
+ "⭐ Rate Agent Standup": "⭐ 为 Agent Standup 评分",
333
+ "⭐ Star Agent Standup on GitHub": "⭐ 在 GitHub 上为 Agent Standup 加星",
334
+ "⭐ Star it": "⭐ 加星",
335
+ "Enjoying Agent Standup? A star on GitHub helps other people find it.": "喜欢 Agent Standup 吗?在 GitHub 上加颗星能帮助更多人发现它。",
336
+ "Later": "以后再说",
337
+ "No thanks": "不用了",
338
+ "Model": "模型",
339
+ "Repeated work": "重复的工作",
340
+ "repeated work": "重复的工作",
341
+ "read again: {0}": "再次读取:{0}",
342
+ "already read by {0}: {1}": "{0} 已读过:{1}",
343
+ "same search again: {0}": "再次进行相同的搜索:{0}",
344
+ "same search as {0}: {1}": "与 {0} 相同的搜索:{1}",
345
+ "reran a failing command: {0}": "重新运行失败的命令:{0}",
346
+ "☕ Buy a coffee": "☕ 请喝杯咖啡",
347
+ "{0} and the team are done. If the call helped you follow this long run, a coffee keeps Agent Standup going. (We only ask once.)": "{0} 和团队已经完成。如果这次通话帮你跟上了这段长时间的工作,一杯咖啡能让 Agent Standup 继续下去。(我们只问这一次。)"
332
348
  }
@@ -328,5 +328,21 @@
328
328
  "is waiting for your answer": "在等你的回答",
329
329
  "A menu is open in Claude Code.": "Claude Code 中有一個開啟的選單。",
330
330
  "Speed presets": "速度預設",
331
- "pages": "頁"
331
+ "pages": "頁",
332
+ "⭐ Rate Agent Standup": "⭐ 為 Agent Standup 評分",
333
+ "⭐ Star Agent Standup on GitHub": "⭐ 在 GitHub 上為 Agent Standup 加星",
334
+ "⭐ Star it": "⭐ 加星",
335
+ "Enjoying Agent Standup? A star on GitHub helps other people find it.": "喜歡 Agent Standup 嗎?在 GitHub 上加顆星能幫助更多人發現它。",
336
+ "Later": "以後再說",
337
+ "No thanks": "不用了",
338
+ "Model": "模型",
339
+ "Repeated work": "重複的工作",
340
+ "repeated work": "重複的工作",
341
+ "read again: {0}": "再次讀取:{0}",
342
+ "already read by {0}: {1}": "{0} 已讀過:{1}",
343
+ "same search again: {0}": "再次進行相同的搜尋:{0}",
344
+ "same search as {0}: {1}": "與 {0} 相同的搜尋:{1}",
345
+ "reran a failing command: {0}": "重新執行失敗的指令:{0}",
346
+ "☕ Buy a coffee": "☕ 請喝杯咖啡",
347
+ "{0} and the team are done. If the call helped you follow this long run, a coffee keeps Agent Standup going. (We only ask once.)": "{0} 和團隊已經完成。如果這次通話幫你跟上了這段長時間的工作,一杯咖啡能讓 Agent Standup 繼續下去。(我們只問這一次。)"
332
348
  }
package/server.js CHANGED
@@ -539,6 +539,14 @@ function logError(where, e) {
539
539
  fs.appendFileSync(ERRLOG, JSON.stringify({ t: new Date().toISOString(), v: VERSION, where: tidy(where, 80), msg, stack }) + '\n');
540
540
  } catch {}
541
541
  }
542
+ // Where this server runs, for ⚙ › Rate in the page: the editor (it sets AGENT_STANDUP_RATE to the review page of the store it installs from), the desktop app or the command line
543
+ // (a star on GitHub: they have no store). Only the desktop app and the command line ask on their own, on the third day: the extension asks in its own way (extension.js, noteUse).
544
+ const RATE_STORES = /^https:\/\/(marketplace\.visualstudio\.com|open-vsx\.org)\//, GITHUB_REPO = 'https://github.com/Atoll92/agent-standup';
545
+ function appKind() {
546
+ const h = String(process.env.AGENT_STANDUP_HOST || ''), rate = String(process.env.AGENT_STANDUP_RATE || '');
547
+ const kind = h === 'desktop app' ? 'desktop' : h === 'command line' ? 'cli' : h ? 'editor' : '';
548
+ return { kind, rate: kind === 'editor' && RATE_STORES.test(rate) ? rate : GITHUB_REPO };
549
+ }
542
550
  function errorReport() { // what ⚙ › Report a problem shows: the app, the system and the last errors of the log
543
551
  let errors = []; try { errors = fs.readFileSync(ERRLOG, 'utf8').split('\n').filter(Boolean).slice(-40).map((l) => { try { return JSON.parse(l); } catch { return null; } }).filter((x) => x && typeof x === 'object'); } catch {}
544
552
  return { version: VERSION, host: String(process.env.AGENT_STANDUP_HOST || '').slice(0, 80), platform: `${process.platform} ${os.release()} ${process.arch}`, node: process.version, electron: process.versions.electron || '', file: tidy(ERRLOG, 300), errors };
@@ -1111,7 +1119,7 @@ function start(port = PORT) {
1111
1119
  .then((f) => { res.writeHead(200, { 'content-type': 'audio/wav', 'cache-control': 'max-age=86400' }); sendFile(f); })
1112
1120
  .catch((e) => json({ error: String(e.message) }, 400));
1113
1121
  }
1114
- if (url.pathname === '/api/prefs.js') { res.writeHead(200, { 'content-type': 'application/javascript', 'cache-control': 'no-store' }); return res.end('window.SAVED_PREFS = ' + JSON.stringify(readPrefs()).replace(/</g, '\\u003c') + ';'); }
1122
+ if (url.pathname === '/api/prefs.js') { res.writeHead(200, { 'content-type': 'application/javascript', 'cache-control': 'no-store' }); return res.end('window.SAVED_PREFS = ' + JSON.stringify(readPrefs()).replace(/</g, '\\u003c') + '; window.AS_APP = ' + JSON.stringify(appKind()).replace(/</g, '\\u003c') + ';'); }
1115
1123
  if (url.pathname === '/api/prefs' && req.method === 'PUT') return readBody((body) => { try { const v = JSON.parse(body); if (!v || typeof v !== 'object' || Array.isArray(v)) throw new Error('prefs must be an object'); writePrefs(v); json({ ok: true }); } catch (e) { json({ error: String(e.message || e) }, 400); } });
1116
1124
  if (url.pathname === '/api/prefs') return json(readPrefs() || {});
1117
1125
  if (url.pathname === '/api/done' && req.method === 'POST') return readBody((body) => { try { const v = JSON.parse(body); json({ ok: setDone(String(v.proj || ''), String(v.id || ''), v.on !== false) }); } catch (e) { logError('done', e); json({ error: String(e.message || e) }, 400); } });