@double_geste/agent-standup 1.35.0 → 1.36.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/codex.js CHANGED
@@ -66,7 +66,8 @@ function sessions(limit = 80) {
66
66
  const out = []; for (const r of scan().rows) { const h = head(r.file); if (!h.ok || h.child) continue; out.push({ ...r, cwd: h.cwd, dir: h.dir }); if (out.length >= limit) break; }
67
67
  return out;
68
68
  }
69
- const inProject = (id, key) => { const r = row(id); if (!r || !key) return false; if (key === PROJ) return true; const d = head(r.file).dir; return d === key || d.startsWith(key + '-'); };
69
+ const under = (cwd, key) => { for (let d = String(cwd || ''); d;) { if (dirKey(d) === key) return true; const up = path.dirname(d); if (up === d) return false; d = up; } return false; }; // key is the folder itself or one above it: a dashed name alone cannot tell app/old (inside app) from app-old (beside it)
70
+ const inProject = (id, key) => { const r = row(id); if (!r || !key) return false; if (key === PROJ) return true; const h = head(r.file), d = h.dir; return d === key || (d.startsWith(key + '-') && under(h.cwd, key)); };
70
71
  const cwd = (id) => { const r = row(id); return r ? head(r.file).cwd : ''; }; // the folder the session was started in: where a file it names by a relative path is
71
72
  const projectLabel = (cwd) => { const h = os.homedir(), rel = cwd && cwd.startsWith(h + path.sep) ? cwd.slice(h.length + 1) : cwd; return 'Codex' + (rel ? ' · ' + rel.split(path.sep).join('/') : ''); };
72
73
 
package/kokoro.js CHANGED
@@ -76,8 +76,9 @@ function warm() { if (installed() && !worker && restarts < MAX_RESTARTS) try { s
76
76
  function pump() {
77
77
  if (busy || !queue.length) return;
78
78
  const j = queue.shift(); let w; try { w = startWorker(); } catch (e) { j.reject(e); return pump(); }
79
- const id = ++seq, next = (fn) => (v) => { busy = false; fn(v); pump(); }; busy = true;
80
- w.pending.set(id, { resolve: next(j.resolve), reject: next(j.reject) });
79
+ const id = ++seq, late = setTimeout(() => { if (w.pending.has(id)) { lastError = 'kokoro worker: no answer'; try { w.p.kill(); } catch {} } }, w.ready ? 60e3 : 180e3); // a worker that hangs is stopped (and started again on the next line): every line after it waited for ever
80
+ const next = (fn, ok) => (v) => { clearTimeout(late); busy = false; if (ok) restarts = 0; fn(v); pump(); }; busy = true; // ok: a line spoken, the count of crashes starts again (three over days of an open editor turned the voices off)
81
+ w.pending.set(id, { resolve: next(j.resolve, true), reject: next(j.reject) });
81
82
  const v = find(j.voice);
82
83
  w.p.stdin.write(JSON.stringify({ id, text: j.text, voice: j.voice, speed: j.speed, out: j.out, lang: v.lang, mix: v.mix }) + '\n');
83
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@double_geste/agent-standup",
3
- "version": "1.35.0",
3
+ "version": "1.36.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
@@ -45,6 +45,12 @@
45
45
  .stab.on { flex-shrink:0; max-width:min(320px,62vw); background:var(--panel2); color:var(--text); font-weight:600; border-color:var(--accent) } .stab.turn:not(.on) { color:var(--accent) } .stab.blocked:not(.on) { color:#fff; background:#c0392b; border-color:#ff8a80; font-weight:600 } .stab.all { flex:none; min-width:0; padding:2px 8px } /* a narrow panel: the tabs keep a readable width and the row scrolls */
46
46
  #visit { position:absolute; right:12px; bottom:14px; z-index:6; display:none; align-items:flex-end; gap:8px; max-width:min(380px,calc(100% - 24px)); cursor:pointer } #visit.on { display:flex; animation:visit .45s cubic-bezier(.2,1.3,.4,1) } @keyframes visit { from { transform:translateX(120%) } } body.react #visit { bottom:140px }
47
47
  #visit .vsay { position:relative; min-width:0; background:#fff; color:#1b1d27; border-radius:11px 11px 2px 11px; padding:7px 10px; font-size:12.5px; line-height:1.35; box-shadow:0 4px 14px rgba(0,0,0,.4); overflow-wrap:anywhere } #visit .vsay small { display:block; color:#5a6072; font-size:11px; margin-bottom:2px } #visit .vgo { display:inline-block; margin-top:5px; padding:1px 10px; border-radius:99px; background:var(--accent); color:#0b1020; font-weight:600; font-size:11.5px }
48
+ #askc { position:absolute; left:12px; bottom:14px; z-index:6; display:none; align-items:flex-end; gap:8px; max-width:min(460px,calc(100% - 24px)) } #askc.on { display:flex; animation:askc .45s cubic-bezier(.2,1.3,.4,1) } @keyframes askc { from { transform:translateX(-120%) } } @media (prefers-reduced-motion:reduce) { #askc.on { animation:none } } body.react #askc { bottom:140px } #center:has(#visit.on) #askc { bottom:118px } #center:has(#askc.on) #pcap { display:none } /* the menu the session waits on, in the lead's words, until it is answered */
49
+ #askc .awho { flex:none; width:72px; height:54px; border-radius:12px; overflow:hidden; border:2px solid #ff5252; box-shadow:0 4px 14px rgba(0,0,0,.45); background:#222 } #askc .awho svg { width:100%; height:100%; display:block }
50
+ #askc .asay { position:relative; min-width:0; max-height:min(52vh,420px); overflow:auto; background:#fff; color:#1b1d27; border-radius:11px 11px 11px 2px; padding:8px 30px 9px 12px; font-size:13px; line-height:1.4; box-shadow:0 4px 14px rgba(0,0,0,.4); overflow-wrap:anywhere } #askc small { display:block; color:#5a6072; font-size:11px; margin-bottom:3px } #askc .ak-t { color:#c62828; font-weight:600 }
51
+ #askc .aq { font-weight:600; margin:3px 0 3px } #askc .ahow { color:#5a6072; font-weight:400; font-size:11.5px } #askc ol { margin:0 0 4px; padding-left:22px } #askc li { margin:1px 0 } #askc li span { color:#5a6072; font-size:11.5px } #askc .aab { margin:2px 0 }
52
+ #askc pre { margin:4px 0; padding:6px 8px; background:#f1f2f6; border-radius:6px; font:12px/1.4 ui-monospace,Menlo,Consolas,monospace; white-space:pre-wrap; max-height:180px; overflow:auto } #askc .afoot { margin-top:6px; padding-top:5px; border-top:1px solid #e6e7ee; color:#5a6072; font-size:11.5px }
53
+ #askc .ax { position:absolute; top:4px; right:4px; width:24px; height:24px; border:0; border-radius:50%; background:transparent; color:#5a6072; cursor:pointer; font-size:13px; line-height:24px } #askc .ax:hover { background:#eceef4 } #askc .ax:focus-visible { outline:2px solid var(--accent); outline-offset:1px }
48
54
  #visit .vwho { flex:none; width:88px; height:66px; border-radius:12px; overflow:hidden; border:2px solid var(--accent); box-shadow:0 4px 14px rgba(0,0,0,.45); background:#222 } #visit.blocked .vwho { border-color:#ff5252 } #visit.speaking .vwho { box-shadow:0 0 0 3px rgba(124,156,255,.4), 0 4px 14px rgba(0,0,0,.45) } #visit .vwho svg { width:100%; height:100%; display:block }
49
55
  #visit .vx { position:absolute; top:-9px; left:-9px; width:20px; height:20px; border-radius:50%; background:var(--panel2); border:1px solid var(--line); color:var(--dim); font-size:11px; line-height:18px } #visit .vx:hover { color:var(--text) }
50
56
  @keyframes pulse { 50% { opacity:.3 } }
@@ -63,6 +69,7 @@
63
69
  body.tree #stage, body.board #stage, body.board #tree { display:none } body.tree #tree { display:block } body.board #boardv { display:block } body.board #present, body.board #gantt { display:none !important }
64
70
  #roster { display:none; width:232px; flex:none; flex-direction:column; gap:5px; padding:10px 8px; overflow:auto; border-right:1px solid var(--line); background:var(--panel) }
65
71
  @media (min-width:900px) { body.rost:not(.tree):not(.board) #roster { display:flex } }
72
+ #roster:focus-visible { outline:2px solid var(--accent); outline-offset:-2px } /* the first stop of the Tab key */
66
73
  #roster h3 { margin:2px 6px 4px; font-size:11px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--dim) }
67
74
  .rr { display:flex; flex-direction:column; gap:2px; padding:6px 9px; border-radius:9px; border-left:3px solid transparent; background:var(--panel2); cursor:pointer; min-width:0 }
68
75
  .rr:hover { background:#2a2f45 } .rr.sel { outline:1px solid var(--accent) }
@@ -98,7 +105,7 @@
98
105
  #fpop { position:absolute; left:10px; z-index:8; width:min(360px,calc(100% - 20px)); max-height:min(46vh,340px); overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; background:var(--panel); border:1px solid var(--line); border-radius:12px; box-shadow:0 14px 40px rgba(0,0,0,.55); padding:6px; animation:fadein .15s }
99
106
  #fpop h4 { margin:6px 10px 4px; font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--dim); font-weight:600 }
100
107
  .sfr { display:grid; grid-template-columns:auto 1fr; gap:0 9px; align-items:center; width:100%; text-align:left; padding:6px 10px; border-radius:8px } .sfr:hover { background:var(--panel2) } .sfr i { font-style:normal; grid-row:span 2 } .sfr b, .sfr em { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap } .sfr b { font-size:12.5px; font-weight:600 } .sfr em { font-style:normal; font-size:11px; color:var(--dim) }
101
- body:not(.replay) #center:has(#files.on) #toasts { bottom:46px } body:not(.replay):not(.react) #center:has(#files.on) #visit { bottom:48px } /* live: the line is the bottom of the call, and what pops up there stays above it */
108
+ body:not(.replay) #center:has(#files.on) #toasts { bottom:46px } body:not(.replay):not(.react) #center:has(#files.on) #visit, body:not(.replay):not(.react) #center:has(#files.on) #askc { bottom:48px } /* live: the line is the bottom of the call, and what pops up there stays above it */
102
109
  .tbadge .l { color:#ff9f1c } .tbadge span { font-size:11px } .tbadge .q { color:#b4bcd4 }
103
110
  .ic:active, .btn:active { transform:scale(.96) } .rr, .ic, .bcard { transition:background .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease) }
104
111
  .meet { font-size:11.5px; color:var(--dim); white-space:nowrap; display:flex; gap:8px; align-items:center } .meet i { width:8px; height:8px; border-radius:50%; background:#ff4d4d; animation:pulse 1.6s infinite }
@@ -389,7 +396,7 @@
389
396
  <div id="files"></div>
390
397
  <div id="hl"></div>
391
398
  <canvas id="gantt" height="90"></canvas>
392
- <div id="toasts" role="status" aria-live="polite"><div class="toast offer" id="vOffer" style="display:none"><span id="vOfferT"></span><button class="btn" id="vOfferB"></button><button class="ic" id="vOfferX" aria-label="Close">✕</button></div><div class="toast offer" id="packNote" style="display:none"><span id="packNoteT"></span><button class="btn" id="packNoteB"></button><button class="ic" id="packNoteX" aria-label="Close">✕</button></div><div class="toast offer" id="trNote" style="display:none"><span id="trNoteT"></span><button class="btn" id="trNoteOk"></button><button class="btn" id="trNoteOff"></button></div></div><div id="visit" role="status" aria-live="polite"></div>
399
+ <div id="toasts" role="status" aria-live="polite"><div class="toast offer" id="vOffer" style="display:none"><span id="vOfferT"></span><button class="btn" id="vOfferB"></button><button class="ic" id="vOfferX" aria-label="Close">✕</button></div><div class="toast offer" id="packNote" style="display:none"><span id="packNoteT"></span><button class="btn" id="packNoteB"></button><button class="ic" id="packNoteX" aria-label="Close">✕</button></div><div class="toast offer" id="trNote" style="display:none"><span id="trNoteT"></span><button class="btn" id="trNoteOk"></button><button class="btn" id="trNoteOff"></button></div></div><div id="visit" role="status" aria-live="polite"></div><div id="askc" role="region" aria-live="polite"></div>
393
400
  <div id="empty"><h2 id="eT"></h2><p id="eP"></p><button class="cta" id="eDemo"></button></div>
394
401
  <div id="gate"><h2 id="gT"></h2><p id="gP"></p><button class="cta" id="gB"></button></div>
395
402
  <div id="detail"><div class="hd"><b id="dname"></b><button class="ic" id="dclose">✕</button></div><div id="dbody"></div></div>
@@ -435,6 +442,7 @@ const PREF_DEFAULTS = { ...prefs }; // for ⚙ → All settings → Reset to d
435
442
  { let loc = {}; try { loc = JSON.parse(localStorage.getItem('cc.prefs') || '{}') || {}; } catch {} // the settings file (shared by every window) and this origin's copy: the more recent one wins
436
443
  const sv = window.SAVED_PREFS && typeof window.SAVED_PREFS === 'object' ? window.SAVED_PREFS : {}; Object.assign(prefs, (sv._t || 0) > (loc._t || 0) ? sv : loc); }
437
444
  const HAD_PREFS = !!prefs._t; // someone who used the app before this page: shown once where the settings went
445
+ if (!HAD_PREFS) prefs.menuTipSeen = true; // a first visit: the menu was never anywhere else for this person, so the tip is not shown on the next visits either
438
446
  if (prefs.vstyle === 'babble') prefs.vstyle = 'animal', prefs.vstyleChosen = true;
439
447
  // Two styles since 1.32.0: the natural voices (the model, the default, which babble until they are installed) and the Animal Crossing babble. The cartoon voices, Simlish and the plain system voices are no longer offered:
440
448
  // whoever had Simlish is on the other babble, everyone else on the natural voices. The cartoon voices read the words with no install, so the call offers the real ones once more to who had closed that line.
@@ -539,7 +547,7 @@ function shopWait(name) { // after the payment page was opened: every few seco
539
547
  shopPoll = setInterval(async () => { if (Date.now() > until) return clearInterval(shopPoll); const r = await shopAsk('claim', { pack: name }); if (r.ok) { clearInterval(shopPoll); shopDone(name); } }, 4000);
540
548
  }
541
549
  function renderShop(el, name, shop) {
542
- el.innerHTML = `<img src="pack-${esc(name)}.jpg" alt="" style="display:block;width:100%;border-radius:8px;margin-bottom:8px">${esc(L('Des personnages d’Halloween dessinés à la main, chacun dans sa pièce.', 'Hand-drawn Halloween characters, each in its own room.'))}<br>${esc(L('Un seul paiement, par carte, sur une page Stripe. Sans compte.', 'One payment, by card, on a Stripe page. No account.'))}<br>${esc(L('2 € minimum : vous pouvez donner plus sur la page de paiement, si vous le souhaitez.', '2 € minimum: you can pay more on the payment page if you like.'))}${shop.artist ? `<br>${esc(L('Dessinés par', 'Drawn by'))} <a href="#" class="artist">${esc(shop.artist)}</a>` : ''}
550
+ el.innerHTML = `<img src="pack-${esc(name)}.jpg" alt="" style="display:block;width:100%;border-radius:8px;margin-bottom:8px">${esc(L('Des personnages d’Halloween dessinés à la main, chacun dans sa pièce.', 'Hand-drawn Halloween characters, each in its own room.'))}<br>${esc(L('Entièrement facultatif : l’app reste gratuite. C’est une façon de soutenir l’artiste et le développeur.', 'Entirely optional: the app stays free. It is a way to support the artist and the developer.'))}<br>${esc(L('Un seul paiement, par carte, sur une page Stripe. Sans compte.', 'One payment, by card, on a Stripe page. No account.'))}<br>${esc(L('2 € minimum : vous pouvez donner plus sur la page de paiement, si vous le souhaitez.', '2 € minimum: you can pay more on the payment page if you like.'))}${shop.artist ? `<br>${esc(L('Dessinés par', 'Drawn by'))} <a href="#" class="artist">${esc(shop.artist)}</a>` : ''}
543
551
  <div style="display:flex;gap:6px;flex-wrap:wrap;margin-top:8px"><button class="btn" id="shopBuy" style="background:var(--accent);border-color:transparent;color:#10131c;font-weight:600">${esc(L('Acheter', 'Buy'))} · ${esc(shop.price)}</button><button class="btn" id="shopHave">${esc(L('Je l’ai déjà acheté', 'I already bought it'))}</button></div>
544
552
  <div id="shopCode" style="display:none;gap:6px;margin-top:8px"><input id="shopKey" aria-label="${esc(L('Code d’achat', 'Purchase code'))}" placeholder="${esc(L('Code d’achat', 'Purchase code'))}" autocomplete="off" spellcheck="false" style="flex:1;min-width:0;font:inherit;color:inherit;background:var(--panel2);border:1px solid var(--line);border-radius:8px;padding:6px 8px"><button class="btn" id="shopGo">${esc(L('Installer', 'Install'))}</button></div>
545
553
  <div id="shopMsg" role="status" style="margin-top:8px"></div>`;
@@ -1355,9 +1363,10 @@ const NEEDS_OK = /^(Edit|Write|MultiEdit|NotebookEdit|AskUserQuestion|ExitPlanMo
1355
1363
  const atTail = () => S.idx >= S.events.length - 3; // only trust wall-clock ages when playback has caught up with the live end
1356
1364
  function agentState(id, now) {
1357
1365
  let s = S.status[id]; const r = S.run[id], w = S.waitOn[id], la = S.lastAct[id];
1366
+ if (id === 'main' && S.live && atTail()) { const row = rowOf(S.cur); if (row && row.state === 'blocked' && row.since && !(la > S.rowsAt)) return { k: 'blocked', txt: '✋ ' + L('attend vous ? ', 'needs you? ') + fmtShort(Math.max(0, now - row.since)), ask: row.ask || '' }; } // what the server knows: a menu open in the session (a Bash approval looks like a running command here), and the question or command it waits on; unless the session moved since that answer. Before "your turn": a menu left open for longer than the lead's quiet time still needs you
1358
1367
  if (id === 'main' && !s) { // the lead is at work until the message that closes its turn, even while it thinks, and from its first turn on (the server says which transcripts carry that mark); one without it falls back on "quiet for 25 s", and a turn cut short on 3 minutes of silence
1359
1368
  const open = S.live && la && (S.sawEnd ? !S.turnOver && now - la < 180000 : now - la < 25000);
1360
- if (r || (w && w.size) || open) s = 'working'; else if (S.live && la) return { k: 'done', txt: '✓ ' + L('à vous', 'your turn') };
1369
+ if (r || (w && w.size) || open) s = 'working'; else if (S.live && la) return { k: 'done', txt: '✓ ' + L('à vous', 'your turn') + ' · ' + fmtShort(Math.max(0, now - la)) };
1361
1370
  }
1362
1371
  if (s === 'done') return { k: 'done', txt: '✓ ' + L('terminé', 'done') };
1363
1372
  if (!s) return { k: 'idle', txt: '' };
@@ -1372,6 +1381,30 @@ function agentState(id, now) {
1372
1381
  return { k: 'working', txt: '⚙ ' + (S.act[id] || L('au travail', 'working')) };
1373
1382
  }
1374
1383
  const STATE_CLASSES = ['working', 'waiting', 'blocked', 'stalled', 'done'];
1384
+ // The menu the followed session waits on, in the lead's words, word for word: the questions and their options numbered as in the menu, the command, the file, the plan.
1385
+ // It stays until the menu is answered (where Claude Code runs: nothing is answered from here); ✕ puts it away until the next one.
1386
+ const ASKC = { off: '' };
1387
+ function askHtml(m, p) {
1388
+ const who = esc(p.name), pre = (x) => (x ? '<pre>' + esc(x) + '</pre>' : ''); let head, body = '';
1389
+ if (m.kind === 'question') { head = '💬 ' + who + ' ' + (m.questions.length > 1 ? L('vous pose plusieurs questions', 'has several questions for you') : L('vous pose une question', 'has a question for you'));
1390
+ body = m.questions.map((q) => '<div class="aq">' + esc(q.q) + ' <span class="ahow">' + (q.multi ? L('(un ou plusieurs choix)', '(one or more)') : L('(un seul choix)', '(pick one)')) + '</span></div>' + (q.options.length ? '<ol>' + q.options.map((o) => '<li>' + esc(o.label) + (o.about ? ' <span>— ' + esc(o.about) + '</span>' : '') + '</li>').join('') + '</ol>' : '')).join(''); }
1391
+ else if (m.kind === 'plan') { head = '📋 ' + who + ' ' + L('vous propose ce plan', 'proposes this plan'); body = pre(m.text); }
1392
+ else if (m.kind === 'command') { head = '🔐 ' + who + ' ' + (m.sure ? L('demande à lancer cette commande', 'asks to run this command') : L('attend peut-être votre feu vert pour cette commande', 'may be waiting for your go-ahead on this command')); body = (m.about ? '<div class="aab">' + esc(m.about) + '</div>' : '') + pre(m.cmd); }
1393
+ else if (m.kind === 'edit') { head = '🔐 ' + who + ' ' + (m.sure ? L('demande à modifier ce fichier', 'asks to edit this file') : L('attend peut-être votre feu vert pour modifier ce fichier', 'may be waiting for your go-ahead to edit this file')); body = pre(m.file); }
1394
+ else if (m.kind === 'menu') { head = '✋ ' + who + ' ' + L('attend votre réponse', 'is waiting for your answer'); body = '<div class="aab">' + L('Un menu est ouvert dans Claude Code.', 'A menu is open in Claude Code.') + '</div>'; }
1395
+ else if (m.kind === 'fetch') { head = '🔐 ' + who + ' ' + L('demande à ouvrir cette page', 'asks to open this page'); body = pre(m.url); }
1396
+ else { head = '🔐 ' + who + ' ' + L('demande la permission d\'utiliser', 'asks permission to use') + ' ' + esc(m.tool || ''); }
1397
+ const foot = L('À répondre dans Claude Code', 'Answer it in Claude Code') + (m.kind === 'question' ? ' · ' + L('les numéros sont ceux du menu', 'the numbers match the menu') : '');
1398
+ return '<div class="awho">' + avatarSVG(p, undefined, 'ak' + p.gid + '_') + '</div><div class="asay"><button class="ax" aria-label="' + esc(L('Masquer jusqu\'à la prochaine question', 'Hide until the next question')) + '">✕</button><small>' + head + ' · <span class="ak-t"></span></small>' + body + '<div class="afoot">' + foot + '</div></div>';
1399
+ }
1400
+ function paintAsk(now) {
1401
+ const el = $('#askc'); if (!el) return; let row = null; try { row = rowOf(S.cur); } catch {}
1402
+ const m = row && row.menu, p = S.agents.main, show = !!(m && p && S.live && !S.demo && ASKC.off !== m.id && agentState('main', now).k === 'blocked');
1403
+ if (!show) { if (el.dataset.k) { el.className = ''; el.innerHTML = ''; el.dataset.k = ''; } return; }
1404
+ if (el.dataset.k !== m.id) { el.dataset.k = m.id; el.className = 'on'; el.setAttribute('aria-label', L('Ce que la session attend de vous', 'What the session is waiting for from you')); el.innerHTML = askHtml(m, p); } // built once per menu, so it is announced once
1405
+ const t = el.querySelector('.ak-t'); if (t) t.textContent = fmtShort(Math.max(0, now - (row.since || now)));
1406
+ }
1407
+ $('#askc').onclick = (e) => { if (e.target.closest('.ax')) { ASKC.off = $('#askc').dataset.k; paintAsk(Date.now()); } };
1375
1408
  function paintStates() {
1376
1409
  const now = Date.now(), n = { working: 0, waiting: 0, blocked: 0, stalled: 0, done: 0 }, ros = [], attn = [];
1377
1410
  for (const p of Object.values(S.agents)) {
@@ -1390,7 +1423,7 @@ function paintStates() {
1390
1423
  paintPill();
1391
1424
  const b = $('#board'), parts = [['working', '⚙', L('au travail', 'working')], ['waiting', '🔗', L('en attente', 'waiting')], ['blocked', '✋', L('vous attendent', 'need you')], ['stalled', '⚠', L('bloqués', 'stalled')], ['done', '✓', L('terminés', 'done')]]
1392
1425
  .filter(([k]) => n[k] && !S.pillSess).map(([k, i, l]) => `<span class="${k}" title="${n[k]} ${l}">${i} ${n[k]}<em> ${l}</em></span>`).join('');
1393
- if (b.innerHTML !== parts) b.innerHTML = parts; fitBoard(); S.nBlocked = n.blocked + n.stalled; S.attn = attn; paintRoster(ros); paintFiles(); return n;
1426
+ if (b.innerHTML !== parts) b.innerHTML = parts; fitBoard(); S.nBlocked = n.blocked + n.stalled; S.attn = attn; paintRoster(ros); paintFiles(); paintAsk(now); return n;
1394
1427
  }
1395
1428
  function fitBoard(force) { // the chips lose their words when they do not all fit (a long language, a narrower window): a chip is never cut mid-word. Tried again with the words only when the window or the texts around have changed
1396
1429
  const b = $('#board'), key = innerWidth + '|' + b.textContent.length + '|' + $('#pill').textContent.length + '|' + $('#subtitle').textContent.length;
@@ -1461,7 +1494,7 @@ function activityLabel(t) { // the short "what is on their screen" tag
1461
1494
  case 'read': return L('Lit ', 'Reading ') + f;
1462
1495
  case 'edit': return L('Modifie ', 'Editing ') + f;
1463
1496
  case 'write': return L('Crée ', 'Writing ') + f;
1464
- case 'cmd': { const n = (d.note || '').trim(); if (n) return n.slice(0, 36); return L('Exécute ', 'Running ') + d.text.trim().split(/\s+/).slice(0, 2).join(' ').slice(0, 26); }
1497
+ case 'cmd': { const n = (d.note || '').trim(), w = d.text.trim().split(/\s+/); if (n) return n.length > 36 ? n.slice(0, 36).replace(/\s+\S*$/, '') + '…' : n; return L('Exécute ', 'Running ') + w.slice(0, 2).join(' ').slice(0, 26) + (w.length > 2 ? '…' : ''); } /* cut at a word, and said to be cut */
1465
1498
  case 'grep': return L('Cherche « ', 'Searching “') + String(d.pattern || '').slice(0, 22) + L(' »', '”');
1466
1499
  case 'glob': return L('Liste ', 'Listing ') + String(d.pattern || '').slice(0, 24);
1467
1500
  case 'todo': return L('Met à jour sa todo', 'Updating todo list');
@@ -1600,7 +1633,7 @@ function artModel(a, id) {
1600
1633
  function artHtml(m) {
1601
1634
  const a = m.a, ok = m.st && m.st.ok, libs = ok && m.st.net && !prefs.artNet, open = esc(L('Ouvrir sur claude.ai', 'Open on claude.ai'));
1602
1635
  const nav = m.pinned && m.n > 1 ? `<button class="pnb" data-go="-1">‹</button><span class="pnn">${m.i + 1}/${m.n}</span><button class="pnb" data-go="1">›</button>` : '';
1603
- const bar = `<div class="pnav">${nav}<span class="purl">🔒 ${esc(a.url.replace(/^https:\/\//, ''))}</span>${ok && m.st.pages > 1 ? `<span class="pnn">${esc(m.whole ? L(`${m.st.pages} pages`, `${m.st.pages} pages`) : m.st.label)}</span>` : ''}${a.v > 1 ? `<span class="pnn">v${a.v}</span>` : ''}${libs ? `<button class="pnb lib" data-lib title="${esc(L('Cette page utilise des bibliothèques hébergées ailleurs : elles ne sont chargées que si vous le demandez', 'This page uses libraries kept on other servers: they are loaded only if you ask'))}">${esc(L('Charger ses bibliothèques', 'Load its libraries'))}</button>` : ''}<button class="pnb" data-open title="${open}" aria-label="${open}">↗</button>${m.pinned ? `<button class="pnb" data-x title="${esc(L('Fermer', 'Close'))}" aria-label="${esc(L('Fermer', 'Close'))}">✕</button>` : ''}</div>`;
1636
+ const bar = `<div class="pnav">${nav}<span class="purl">🔒 ${esc(a.url.replace(/^https:\/\//, ''))}</span>${ok && m.st.pages > 1 ? `<span class="pnn">${esc(m.whole ? m.st.pages + ' ' + L('pages', 'pages') : m.st.label)}</span>` : ''}${a.v > 1 ? `<span class="pnn">v${a.v}</span>` : ''}${libs ? `<button class="pnb lib" data-lib title="${esc(L('Cette page utilise des bibliothèques hébergées ailleurs : elles ne sont chargées que si vous le demandez', 'This page uses libraries kept on other servers: they are loaded only if you ask'))}">${esc(L('Charger ses bibliothèques', 'Load its libraries'))}</button>` : ''}<button class="pnb" data-open title="${open}" aria-label="${open}">↗</button>${m.pinned ? `<button class="pnb" data-x title="${esc(L('Fermer', 'Close'))}" aria-label="${esc(L('Fermer', 'Close'))}">✕</button>` : ''}</div>`;
1604
1637
  const page = ok ? `<iframe sandbox="allow-scripts" referrerpolicy="no-referrer" title="${esc(a.title)}" src="${esc(artSrc(a) + (prefs.artNet ? '&net=1' : '') + (m.whole ? '&whole=1' + (m.pinned ? '&fit=w' : '') : ''))}"></iframe>` + (m.pinned ? '' : `<button class="pzoom" data-pin title="${esc(L('Cliquer pour agrandir', 'Click to enlarge'))}" aria-label="${esc(L('Cliquer pour agrandir', 'Click to enlarge'))}"></button>`)
1605
1638
  : `<div class="pcard"><i>🌐</i><b>${esc(a.title)}</b>${a.note ? `<p>${esc(a.note)}</p>` : ''}${m.st ? `<em>${esc(L('Pas d’aperçu ici : la page est sur claude.ai', 'No preview here: the page is on claude.ai'))}</em><button class="pnb" data-open>${open} ↗</button>` : '<span class="spin"></span>'}</div>`;
1606
1639
  return bar + `<div class="pweb">${page}</div>`;
@@ -1853,7 +1886,7 @@ function renderTree() {
1853
1886
  }
1854
1887
  const node = (id) => {
1855
1888
  const p = S.agents[id], st = S.status[id], k = kids[id] || [], open = !S.collapsed.has(id), lt = last[id]; if (!p) return '';
1856
- return `<li><span class="caret" data-c="${id}">${k.length ? (open ? '▾' : '▸') : ''}</span><span class="node ${st || ''} ${S.speakers.has(id) ? 'speaking' : ''}" data-n="${id}">
1889
+ return `<li><span class="caret" data-c="${esc(id)}">${k.length ? (open ? '▾' : '▸') : ''}</span><span class="node ${st || ''} ${S.speakers.has(id) ? 'speaking' : ''}" data-n="${esc(id)}">
1857
1890
  <span class="dot" style="background:${p.shirt}"></span><b>${esc(p.name)}</b><span class="r">${esc(p.role)}</span>${(() => { const a = agentState(id, Date.now()); return a.k !== 'idle' ? `<span class="stc ${a.k}">${esc(a.txt)}</span>` : ''; })()}
1858
1891
  ${cnt[id] ? `<span class="r">🔧${cnt[id]}</span>` : ''}${k.length ? `<span class="r">👥${k.length}</span>` : ''}${lt && st === 'working' ? `<span class="tl">${esc(lt.name)} ${esc(lt.arg || '')}</span>` : ''}</span>
1859
1892
  ${k.length && open ? `<ul>${k.map(node).join('')}</ul>` : ''}</li>`;
@@ -2413,9 +2446,11 @@ function amend(e, was) { // the server corrected an event the call already has
2413
2446
  }
2414
2447
  if (e.end && !was.end && (e._n != null || e._as || past)) { let k = S.events.length - 1; while (k > i && !(S.events[k].kind === 'user' || (S.events[k].agent === 'main' && /^(say|tools|order)$/.test(S.events[k].kind) && !S.events[k].wf))) k--; if (k === i) S.turnOver = true; } // only if nothing came after it
2415
2448
  }
2416
- let polling = false;
2449
+ let polling = false, polledAt = 0;
2417
2450
  setInterval(async () => {
2418
- if (!S.live || polling) return; polling = true;
2451
+ if (!S.live || polling) return;
2452
+ if (document.hidden && AUD.off() && Date.now() - polledAt < 2500) return; // hidden and not heard (muted, or another window has the sound): every 2.5 s is enough for the alerts; a call you listen to keeps its pace
2453
+ polling = true; polledAt = Date.now();
2419
2454
  try {
2420
2455
  const switched = await followCurrent(); if (S.offline) { S.offline = false; syncUI(); }
2421
2456
  if (switched || !S.cur) return;
@@ -2464,10 +2499,12 @@ const BGROUP = ['blocked', 'turn', 'working', 'waiting', 'idle']; // the board
2464
2499
  let boardBusy = false, boardAll = null, boardDoneOpen = false;
2465
2500
  const isDone = (r) => !!r.done; // put away by you, until the session moves again: the server says so, to every window
2466
2501
  function bcard(r, now, done) {
2467
- const [ic, en, fr] = BSTATE[r.state], extra = r.state === 'blocked' ? ` · ${r.ask ? '' : esc(r.tool) + ' '}${agoStr(r.ageMs)}` : r.state === 'working' && r.tool ? ` · ${esc(r.tool)}` : r.state === 'idle' || r.state === 'turn' ? ` · ${agoStr(now - r.mtime)}` : '';
2502
+ const [ic, en, fr] = BSTATE[r.state], waited = r.since ? now - r.since : r.state === 'blocked' ? r.ageMs : now - r.mtime, mine = r.state === 'blocked' || r.state === 'turn'; // how long it has waited on you
2503
+ const head = r.state === 'blocked' ? [r.ask ? '' : esc(r.tool), r.ran ? '' : agoStr(waited)].filter(Boolean).join(' ') : r.state === 'working' && r.tool ? esc(r.tool) : r.state === 'idle' || (r.state === 'turn' && !r.ran) ? agoStr(waited) : '', extra = head ? ' · ' + head : '';
2504
+ const took = mine && r.ran ? `⏱ ${L('a travaillé', 'worked')} ${agoStr(r.ran)} · ${L('vous attend depuis', 'waiting on you for')} ${agoStr(waited)}` : r.state === 'working' && r.asked ? `⏱ ${L('au travail depuis', 'working for')} ${agoStr(Math.max(0, now - r.asked))}` : ''; // the time it worked, apart from the time it has waited on you
2468
2505
  const pr = r.pr ? `<button class="bpr" data-url="${esc(r.pr.url)}" title="${esc(L('Ouvrir la pull request', 'Open the pull request'))}">PR #${+r.pr.n} ↗</button>` : '';
2469
2506
  const put = done ? `<button class="bdo" data-undo="1" title="${esc(L('Rouvrir', 'Reopen'))}" aria-label="${esc(L('Rouvrir', 'Reopen'))}">↩</button>` : r.state === 'turn' || r.state === 'idle' ? `<button class="bdo" title="${esc(L('Marquer comme traitée', 'Mark as done'))}" aria-label="${esc(L('Marquer comme traitée', 'Mark as done'))}">✓</button>` : '';
2470
- return `<div class="bcard ${r.state}" tabindex="0" role="button" data-p="${esc(r.proj)}" data-i="${esc(r.id)}"><div class="bh"><span class="stc ${r.state}">${ic} ${L(fr, en)}${extra}</span>${pr}${put}</div><div class="bt">${esc(/^[0-9a-f]{8}-[0-9a-f-]{27}$/.test(r.title) ? L('Session sans titre', 'Untitled session') : r.title)}</div>${r.ask ? `<div class="bq">${esc(r.ask)}</div>` : ''}<div class="bp">${esc(niceProj(r.proj))}</div>${r.subTotal ? `<div class="bm">👥 ${r.subActive}/${r.subTotal} ${L('sous-agents actifs', 'sub-agents active')}</div>` : ''}</div>`;
2507
+ return `<div class="bcard ${r.state}" tabindex="0" role="button" data-p="${esc(r.proj)}" data-i="${esc(r.id)}"><div class="bh"><span class="stc ${r.state}">${ic} ${L(fr, en)}${extra}</span>${pr}${put}</div><div class="bt">${esc(/^[0-9a-f]{8}-[0-9a-f-]{27}$/.test(r.title) ? L('Session sans titre', 'Untitled session') : r.title)}</div>${r.ask ? `<div class="bq">${esc(r.ask)}</div>` : ''}<div class="bp">${esc(niceProj(r.proj))}</div>${took ? `<div class="bm">${took}</div>` : ''}${r.subTotal ? `<div class="bm">👥 ${r.subActive}/${r.subTotal} ${L('sous-agents actifs', 'sub-agents active')}</div>` : ''}</div>`;
2471
2508
  }
2472
2509
  function paintBoard() {
2473
2510
  if (!boardAll || !document.body.classList.contains('board')) return; const now = Date.now(), recent = (a, b) => b.mtime - a.mtime;
@@ -2580,7 +2617,7 @@ async function visitSay(v, token) {
2580
2617
  $('#visit').onclick = (e) => { const v = S.visit; if (!v) return; if (e.target.closest('.vx')) hideVisit(); else goSession(v.r.proj, v.r.id); };
2581
2618
  async function sessPoll() {
2582
2619
  if (!S.live || S.demo || document.hidden || sessPoll.busy) return; sessPoll.busy = true;
2583
- try { const rows = await (await fetch('/api/board')).json(); if (Array.isArray(rows) && S.live && !S.demo) { S.rows = rows; knocks(); paintTabs(); } } catch {} finally { sessPoll.busy = false; }
2620
+ try { const t0 = Date.now(), rows = await (await fetch('/api/board')).json(); if (Array.isArray(rows) && S.live && !S.demo) { S.rows = rows; S.rowsAt = t0; knocks(); paintTabs(); } } catch {} finally { sessPoll.busy = false; }
2584
2621
  }
2585
2622
  setInterval(sessPoll, 3000);
2586
2623
  async function setMode(m) {
@@ -2598,7 +2635,7 @@ async function setMode(m) {
2598
2635
  $('#liveProj').style.display = 'none';
2599
2636
  const rows = await (await fetch('/api/sessions')).json();
2600
2637
  $('#sessions').innerHTML = rows.map((r) => { const d = new Date(r.mtime).toLocaleString([], { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' });
2601
- return `<option value="${esc(r.proj)}|${r.id}" data-title="${esc(r.title)}">${r.agents ? '👥' + r.agents + ' · ' : ''}${esc(r.title.slice(0, 40))} (${d})</option>`; }).join('');
2638
+ return `<option value="${esc(r.proj)}|${esc(r.id)}" data-title="${esc(r.title)}">${r.agents ? '👥' + r.agents + ' · ' : ''}${esc(r.title.slice(0, 40))} (${d})</option>`; }).join('');
2602
2639
  $('#empty').classList.remove('on'); const pick = rows.find((r) => r.id === Q.get('pin')) || rows.find((r) => r.agents) || rows[0]; if (!pick) { $('#empty').classList.add('on'); return; }
2603
2640
  $('#sessions').value = `${pick.proj}|${pick.id}`; await openSelected();
2604
2641
  }
@@ -2693,12 +2730,13 @@ async function exportVideo(from = 0, to = 0, clip = 0) { // clip: length in ms
2693
2730
  // =====================================================================
2694
2731
  function applyLang() {
2695
2732
  renderCharInfo(); packNote(); menuTip();
2733
+ 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
2696
2734
  document.documentElement.lang = (LANGS.find((l) => l[0] === prefs.lang) || LANGS[0])[2];
2697
2735
  document.querySelectorAll('[data-fr]').forEach((el) => (el.textContent = FR() ? el.dataset.fr : tr(el.dataset.en)));
2698
2736
  document.querySelectorAll('#viewSeg button').forEach((b) => { b.title = b.textContent; }); // in a narrow window they are icons: the name stays as a tooltip
2699
2737
  $('#callTrMi').style.display = CALL_LANG[prefs.lang] && !FR() ? '' : 'none';
2700
2738
  const sel = $('#langSel'); if (!sel.options.length) sel.innerHTML = LANGS.map(([c, n]) => `<option value="${c}">${n}</option>`).join(''); sel.value = prefs.lang;
2701
- [['#bPlay', L('Pause / Lecture (espace)', 'Pause / Play (space)')], ['#bLog', 'Transcript'], ['#bMute', L('Son (touche M)', 'Sound (M key)')], ['#bMenu', L('Réglages', 'Settings')], ['#dclose', L('Fermer', 'Close')], ['#officeVol', L('Volume de l’ambiance', 'Ambience volume')], ['#musicVol', L('Volume de la musique', 'Music volume')], ['#liveProj', L('Projet à suivre', 'Project to follow')], ['#reactBar', L('Réactions', 'Reactions')], ['#logQ', L('Rechercher dans la transcription', 'Search the transcript')], ['#roster', L('Agents', 'Agents')]].forEach(([q, t]) => { const el = $(q); if (!el) return; el.title = t; el.setAttribute('aria-label', t); }); $('#logQ').placeholder = L('Rechercher…', 'Search…'); $('#menuQ').placeholder = L('Chercher un réglage…', 'Search settings…'); document.querySelectorAll('#reactBar button').forEach((b) => b.setAttribute('aria-label', b.dataset.e));
2739
+ [['#bPlay', L('Pause / Lecture (espace)', 'Pause / Play (space)')], ['#bLog', 'Transcript'], ['#bMute', L('Son (touche M)', 'Sound (M key)')], ['#bMenu', L('Réglages', 'Settings')], ['#dclose', L('Fermer', 'Close')], ['#officeVol', L('Volume de l’ambiance', 'Ambience volume')], ['#musicVol', L('Volume de la musique', 'Music volume')], ['#liveProj', L('Projet à suivre', 'Project to follow')], ['#reactBar', L('Réactions', 'Reactions')], ['#logQ', L('Rechercher dans la transcription', 'Search the transcript')], ['#roster', L('Agents', 'Agents')]].forEach(([q, t]) => { const el = $(q); if (!el) return; el.title = t; el.setAttribute('aria-label', t); }); $('#logQ').placeholder = L('Rechercher…', 'Search…'); $('#menuQ').placeholder = L('Chercher un réglage…', 'Search settings…'); $('#menuQ').setAttribute('aria-label', $('#menuQ').placeholder); $('#sps').setAttribute('aria-label', L('Vitesses prédéfinies', 'Speed presets')); document.querySelectorAll('#reactBar button').forEach((b) => b.setAttribute('aria-label', b.dataset.e));
2702
2740
  $('#gT').textContent = L('Rejoindre l’appel', 'Join the call'); $('#gP').textContent = L('Cliquez pour activer le son et suivre votre session Claude Code en direct.', 'Click to enable sound and follow your Claude Code session live.'); $('#gB').textContent = L('▶ Rejoindre', '▶ Join');
2703
2741
  $('#eDemo').textContent = L('▶ Voir la démo', '▶ Watch the demo'); $('#eT').textContent = L('En attente d’une session', 'Waiting for a session'); $('#eP').innerHTML = watched() ? esc(L('Lancez Claude Code dans {0} : l’appel démarrera tout seul.', 'Start Claude Code in {0} — the call will start by itself.')).replace('{0}', `<b>${esc(watched())}</b>`) : esc(L('Lancez Claude Code dans ce dossier : l’appel démarrera tout seul.', 'Start Claude Code in this folder — the call will start by itself.'));
2704
2742
  for (const id in S.agents) { const p = persona(S.agents[id]); Object.assign(S.agents[id], { name: p.name, role: p.role }); const t = $('#t-' + id); if (t) { t.querySelector('.tag span').textContent = p.role; t.querySelector('.tag b').textContent = p.name; if (id === 'main' || id === 'user') t.querySelector('.tag span').textContent = p.role; } }
@@ -2879,7 +2917,7 @@ function paintPill() {
2879
2917
  sess = true; const st = {}, by = { working: [], waiting: [], blocked: [], stalled: [], done: [], idle: [] };
2880
2918
  for (const id in S.agents) if (id !== 'user' && !S.gone.has(id) && (id === 'main' || S.status[id])) { st[id] = agentState(id, now); by[st[id].k].push(id); }
2881
2919
  const what = (id) => `${nameOf(id)} — ${st[id].txt.replace(/^\S+\s/, '')}`, more = (a) => (a.length > 1 ? ` +${a.length - 1}` : ''), lead = st.main || { k: 'idle' };
2882
- if (by.blocked.length) { cls = 'blocked'; to = by.blocked[0]; txt = '✋ ' + what(to) + more(by.blocked); }
2920
+ if (by.blocked.length) { cls = 'blocked'; to = by.blocked[0]; const q = st[to].ask || ''; txt = '✋ ' + what(to) + more(by.blocked) + (q ? ' · ' + (q.length > 110 ? q.slice(0, 108).replace(/\s+\S*$/, '') + '…' : q) : ''); if (q) tip = q; } // the question or the command it waits on, next to its timer
2883
2921
  else if (by.stalled.length) { cls = 'stalled'; to = by.stalled[0]; txt = '⚠ ' + what(to) + more(by.stalled); }
2884
2922
  else if (by.working.length || by.waiting.length) { // "2 working · Margot — waiting on Ken, Mira", or what the only one at work is doing
2885
2923
  const w = by.working, wt = lead.k === 'waiting' ? 'main' : w.length ? '' : by.waiting[0]; cls = 'working'; to = wt || (w.length === 1 ? w[0] : 'main');
@@ -263,6 +263,7 @@
263
263
  "The shop is not open yet.": "Butikken er ikke åben endnu.",
264
264
  "The shop cannot be reached. Check your connection and try again.": "Butikken kan ikke nås. Tjek din forbindelse, og prøv igen.",
265
265
  "Hand-drawn Halloween characters, each in its own room.": "Håndtegnede Halloween-figurer, hver i sit eget rum.",
266
+ "Entirely optional: the app stays free. It is a way to support the artist and the developer.": "Helt valgfrit: appen forbliver gratis. Det er en måde at støtte kunstneren og udvikleren på.",
266
267
  "One payment, by card, on a Stripe page. No account.": "Én betaling med kort på en Stripe-side. Ingen konto.",
267
268
  "Buy": "Køb",
268
269
  "I already bought it": "Jeg har allerede købt den",
@@ -304,5 +305,27 @@
304
305
  "Got it": "Forstået",
305
306
  "Reset to defaults": "Nulstil til standard",
306
307
  "Your settings moved: the everyday ones are here, the rest in “All settings”.": "Dine indstillinger er flyttet: de daglige er her, resten under “Alle indstillinger”.",
307
- "2 € minimum: you can pay more on the payment page if you like.": "Mindst 2 €: du kan betale mere på betalingssiden, hvis du vil."
308
+ "2 € minimum: you can pay more on the payment page if you like.": "Mindst 2 €: du kan betale mere på betalingssiden, hvis du vil.",
309
+ "worked": "arbejdede",
310
+ "waiting on you for": "venter på dig i",
311
+ "working for": "arbejder i",
312
+ "(one or more)": "(et eller flere)",
313
+ "(pick one)": "(vælg ét)",
314
+ "Answer it in Claude Code": "Svar i Claude Code",
315
+ "asks permission to use": "beder om lov til at bruge",
316
+ "asks to edit this file": "beder om at redigere denne fil",
317
+ "asks to open this page": "beder om at åbne denne side",
318
+ "asks to run this command": "beder om at køre denne kommando",
319
+ "has a question for you": "har et spørgsmål til dig",
320
+ "has several questions for you": "har flere spørgsmål til dig",
321
+ "Hide until the next question": "Skjul indtil næste spørgsmål",
322
+ "may be waiting for your go-ahead on this command": "venter måske på dit OK til denne kommando",
323
+ "may be waiting for your go-ahead to edit this file": "venter måske på dit OK til at redigere denne fil",
324
+ "proposes this plan": "foreslår denne plan",
325
+ "the numbers match the menu": "numrene svarer til menuen",
326
+ "What the session is waiting for from you": "Hvad sessionen venter på fra dig",
327
+ "is waiting for your answer": "venter på dit svar",
328
+ "A menu is open in Claude Code.": "En menu er åben i Claude Code.",
329
+ "Speed presets": "Hastighedsforvalg",
330
+ "pages": "sider"
308
331
  }
@@ -228,7 +228,7 @@
228
228
  "To tweak them, copy them into your folder and pick “My folder”.": "Zum Anpassen in deinen Ordner kopieren und „Mein Ordner“ wählen.",
229
229
  "My folder": "Mein Ordner",
230
230
  "The characters drawn by the app. Pick “My folder” for your own images, or a pack.": "Die von der App gezeichneten Figuren. Wähle „Mein Ordner“ für eigene Bilder oder ein Pack.",
231
- "A visitor when another session needs you": "Ein Besucher, wenn eine andere Sitzung Sie braucht",
231
+ "A visitor when another session needs you": "Ein Besucher, wenn eine andere Sitzung dich braucht",
232
232
  "Follow the Claude Code tab I am on": "Dem Claude Code-Tab folgen, in dem ich bin",
233
233
  "Go there": "Hingehen",
234
234
  "This file is no longer there": "Diese Datei gibt es nicht mehr",
@@ -236,7 +236,7 @@
236
236
  "Files created in this session": "In dieser Sitzung erstellte Dateien",
237
237
  "A file of the demo: nothing to open": "Eine Datei der Demo: nichts zu öffnen",
238
238
  "Could not open the folder": "Der Ordner konnte nicht geöffnet werden",
239
- "Files made for you, when a turn ends": "Für Sie erstellte Dateien, am Ende einer Runde",
239
+ "Files made for you, when a turn ends": "Für dich erstellte Dateien, am Ende einer Runde",
240
240
  "🐞 Report a problem": "🐞 Problem melden",
241
241
  "Report a problem": "Problem melden",
242
242
  "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.": "Von hier aus wird nichts gesendet. Die Schaltfläche öffnet auf GitHub einen Entwurf mit dem Text unten: Lies ihn, beschreibe, was passiert ist, und sende ihn dann selbst ab.",
@@ -252,7 +252,7 @@
252
252
  "Open on claude.ai": "Auf claude.ai öffnen",
253
253
  "Publishing ": "Veröffentliche ",
254
254
  "Showing ": "Zeige ",
255
- "This page uses libraries kept on other servers: they are loaded only if you ask": "Diese Seite nutzt Bibliotheken von anderen Servern: Sie werden nur geladen, wenn Sie es verlangen",
255
+ "This page uses libraries kept on other servers: they are loaded only if you ask": "Diese Seite nutzt Bibliotheken von anderen Servern: Sie werden nur geladen, wenn du es verlangst",
256
256
  "Mark as done": "Als erledigt markieren",
257
257
  "Open the pull request": "Pull Request öffnen",
258
258
  "Reopen": "Wieder öffnen",
@@ -262,8 +262,9 @@
262
262
  "This purchase was refunded.": "Dieser Kauf wurde erstattet.",
263
263
  "This payment is not complete yet.": "Diese Zahlung ist noch nicht abgeschlossen.",
264
264
  "The shop is not open yet.": "Der Shop ist noch nicht geöffnet.",
265
- "The shop cannot be reached. Check your connection and try again.": "Der Shop ist nicht erreichbar. Prüfen Sie Ihre Verbindung und versuchen Sie es erneut.",
265
+ "The shop cannot be reached. Check your connection and try again.": "Der Shop ist nicht erreichbar. Prüfe deine Verbindung und versuche es erneut.",
266
266
  "Hand-drawn Halloween characters, each in its own room.": "Handgezeichnete Halloween-Figuren, jede in ihrem eigenen Raum.",
267
+ "Entirely optional: the app stays free. It is a way to support the artist and the developer.": "Ganz freiwillig: Die App bleibt kostenlos. Es ist eine Möglichkeit, den Künstler und den Entwickler zu unterstützen.",
267
268
  "One payment, by card, on a Stripe page. No account.": "Eine einzige Zahlung per Karte auf einer Stripe-Seite. Kein Konto.",
268
269
  "Buy": "Kaufen",
269
270
  "I already bought it": "Ich habe es schon gekauft",
@@ -305,5 +306,27 @@
305
306
  "Got it": "Verstanden",
306
307
  "Reset to defaults": "Auf Standard zurücksetzen",
307
308
  "Your settings moved: the everyday ones are here, the rest in “All settings”.": "Deine Einstellungen sind umgezogen: die alltäglichen sind hier, der Rest unter „Alle Einstellungen“.",
308
- "2 € minimum: you can pay more on the payment page if you like.": "Mindestens 2 €: Auf der Zahlungsseite kannst du gern mehr zahlen."
309
+ "2 € minimum: you can pay more on the payment page if you like.": "Mindestens 2 €: Auf der Zahlungsseite kannst du gern mehr zahlen.",
310
+ "worked": "hat gearbeitet",
311
+ "waiting on you for": "wartet seit",
312
+ "working for": "arbeitet seit",
313
+ "(one or more)": "(eine oder mehrere)",
314
+ "(pick one)": "(eine Wahl)",
315
+ "Answer it in Claude Code": "In Claude Code beantworten",
316
+ "asks permission to use": "bittet um Erlaubnis für",
317
+ "asks to edit this file": "möchte diese Datei bearbeiten",
318
+ "asks to open this page": "möchte diese Seite öffnen",
319
+ "asks to run this command": "möchte diesen Befehl ausführen",
320
+ "has a question for you": "hat eine Frage an dich",
321
+ "has several questions for you": "hat mehrere Fragen an dich",
322
+ "Hide until the next question": "Bis zur nächsten Frage ausblenden",
323
+ "may be waiting for your go-ahead on this command": "wartet vielleicht auf dein OK für diesen Befehl",
324
+ "may be waiting for your go-ahead to edit this file": "wartet vielleicht auf dein OK, diese Datei zu bearbeiten",
325
+ "proposes this plan": "schlägt diesen Plan vor",
326
+ "the numbers match the menu": "die Nummern sind die des Menüs",
327
+ "What the session is waiting for from you": "Worauf die Sitzung von dir wartet",
328
+ "is waiting for your answer": "wartet auf deine Antwort",
329
+ "A menu is open in Claude Code.": "In Claude Code ist ein Menü offen.",
330
+ "Speed presets": "Geschwindigkeitsvorgaben",
331
+ "pages": "Seiten"
309
332
  }
@@ -2,6 +2,8 @@
2
2
  " full — compaction soon": " full — compaction soon",
3
3
  " on ": " on ",
4
4
  "”": "”",
5
+ "(one or more)": "(one or more)",
6
+ "(pick one)": "(pick one)",
5
7
  "↗ Open in browser": "↗ Open in browser",
6
8
  "⌨ Keyboard shortcuts (?)": "⌨ Keyboard shortcuts (?)",
7
9
  "▶ Join": "▶ Join",
@@ -14,6 +16,7 @@
14
16
  "📋 Recap": "📋 Recap",
15
17
  "2 € minimum: you can pay more on the payment page if you like.": "2 € minimum: you can pay more on the payment page if you like.",
16
18
  "A file of the demo: nothing to open": "A file of the demo: nothing to open",
19
+ "A menu is open in Claude Code.": "A menu is open in Claude Code.",
17
20
  "A visitor when another session needs you": "A visitor when another session needs you",
18
21
  "Add pictures": "Add pictures",
19
22
  "Add the voices of this language": "Add the voices of this language",
@@ -26,8 +29,13 @@
26
29
  "Ambience volume": "Ambience volume",
27
30
  "An agent may be waiting for you ✋": "An agent may be waiting for you ✋",
28
31
  "Animal Crossing (babble)": "Animal Crossing (babble)",
32
+ "Answer it in Claude Code": "Answer it in Claude Code",
29
33
  "Artifacts: load their libraries (from the internet)": "Artifacts: load their libraries (from the internet)",
30
34
  "Asking a question": "Asking a question",
35
+ "asks permission to use": "asks permission to use",
36
+ "asks to edit this file": "asks to edit this file",
37
+ "asks to open this page": "asks to open this page",
38
+ "asks to run this command": "asks to run this command",
31
39
  "brief": "brief",
32
40
  "Busiest agents": "Busiest agents",
33
41
  "Buy": "Buy",
@@ -74,6 +82,7 @@
74
82
  "duration": "duration",
75
83
  "Editing ": "Editing ",
76
84
  "Editor": "Editor",
85
+ "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.",
77
86
  "EPISODE 1": "EPISODE 1",
78
87
  "Episode recap": "Episode recap",
79
88
  "errors": "errors",
@@ -100,7 +109,10 @@
100
109
  "Halloween pack": "Halloween pack",
101
110
  "Hand-drawn Halloween characters, each in its own room.": "Hand-drawn Halloween characters, each in its own room.",
102
111
  "Hand-drawn, each in its own room": "Hand-drawn, each in its own room",
112
+ "has a question for you": "has a question for you",
113
+ "has several questions for you": "has several questions for you",
103
114
  "Hide code & file names in videos": "Hide code & file names in videos",
115
+ "Hide until the next question": "Hide until the next question",
104
116
  "Highlights": "Highlights",
105
117
  "Human": "Human",
106
118
  "I already bought it": "I already bought it",
@@ -109,6 +121,7 @@
109
121
  "Install": "Install",
110
122
  "Installing…": "Installing…",
111
123
  "is sharing their screen": "is sharing their screen",
124
+ "is waiting for your answer": "is waiting for your answer",
112
125
  "Join the call": "Join the call",
113
126
  "Keep": "Keep",
114
127
  "Keep my agents’ own names": "Keep my agents’ own names",
@@ -132,6 +145,8 @@
132
145
  "looping?": "looping?",
133
146
  "Mark as done": "Mark as done",
134
147
  "may be waiting for your approval": "may be waiting for your approval",
148
+ "may be waiting for your go-ahead on this command": "may be waiting for your go-ahead on this command",
149
+ "may be waiting for your go-ahead to edit this file": "may be waiting for your go-ahead to edit this file",
135
150
  "More": "More",
136
151
  "Music volume": "Music volume",
137
152
  "Mute / unmute": "Mute / unmute",
@@ -168,14 +183,15 @@
168
183
  "Opening file…": "Opening file…",
169
184
  "Opening the payment page…": "Opening the payment page…",
170
185
  "output": "output",
186
+ "pages": "pages",
171
187
  "Pause / play": "Pause / play",
172
188
  "Pause / Play (space)": "Pause / Play (space)",
173
189
  "PAUSED": "PAUSED",
174
190
  "Pinned: click to unpin": "Pinned: click to unpin",
175
191
  "Project to follow": "Project to follow",
176
192
  "Prompt from": "Prompt from",
193
+ "proposes this plan": "proposes this plan",
177
194
  "Publishing ": "Publishing ",
178
- "Showing ": "Showing ",
179
195
  "Purchase code": "Purchase code",
180
196
  "Quiet": "Quiet",
181
197
  "Radio unreachable: check your connection or pick another station.": "Radio unreachable: check your connection or pick another station.",
@@ -215,6 +231,7 @@
215
231
  "session": "session",
216
232
  "Sessions": "Sessions",
217
233
  "Settings": "Settings",
234
+ "Showing ": "Showing ",
218
235
  "Sound": "Sound",
219
236
  "Sound (M key)": "Sound (M key)",
220
237
  "Sound and alerts": "Sound and alerts",
@@ -222,6 +239,7 @@
222
239
  "Sound is playing in another window — click to take it over here": "Sound is playing in another window — click to take it over here",
223
240
  "Source": "Source",
224
241
  "Speed": "Speed",
242
+ "Speed presets": "Speed presets",
225
243
  "stalled": "stalled",
226
244
  "stalled · ": "stalled · ",
227
245
  "stalled: a sub-agent has been silent for a long time": "stalled: a sub-agent has been silent for a long time",
@@ -241,6 +259,7 @@
241
259
  "The drawn character": "The drawn character",
242
260
  "THE END": "THE END",
243
261
  "The engine stopped: the agents babble instead.": "The engine stopped: the agents babble instead.",
262
+ "the numbers match the menu": "the numbers match the menu",
244
263
  "The shop cannot be reached. Check your connection and try again.": "The shop cannot be reached. Check your connection and try again.",
245
264
  "The shop is not open yet.": "The shop is not open yet.",
246
265
  "The vampire": "The vampire",
@@ -284,9 +303,13 @@
284
303
  "waiting on ": "waiting on ",
285
304
  "waiting on another agent": "waiting on another agent",
286
305
  "waiting on sub-agents": "waiting on sub-agents",
306
+ "waiting on you for": "waiting on you for",
287
307
  "Web search": "Web search",
308
+ "What the session is waiting for from you": "What the session is waiting for from you",
288
309
  "What the states mean": "What the states mean",
310
+ "worked": "worked",
289
311
  "working": "working",
312
+ "working for": "working for",
290
313
  "Writing ": "Writing ",
291
314
  "You": "You",
292
315
  "You can also switch between Call, Tree and Sessions at the top of the window.": "You can also switch between Call, Tree and Sessions at the top of the window.",
@@ -264,6 +264,7 @@
264
264
  "The shop is not open yet.": "La tienda aún no está abierta.",
265
265
  "The shop cannot be reached. Check your connection and try again.": "No se puede acceder a la tienda. Comprueba tu conexión e inténtalo de nuevo.",
266
266
  "Hand-drawn Halloween characters, each in its own room.": "Personajes de Halloween dibujados a mano, cada uno en su habitación.",
267
+ "Entirely optional: the app stays free. It is a way to support the artist and the developer.": "Totalmente opcional: la app sigue siendo gratis. Es una forma de apoyar al artista y al desarrollador.",
267
268
  "One payment, by card, on a Stripe page. No account.": "Un solo pago, con tarjeta, en una página de Stripe. Sin cuenta.",
268
269
  "Buy": "Comprar",
269
270
  "I already bought it": "Ya lo compré",
@@ -305,5 +306,27 @@
305
306
  "Got it": "Entendido",
306
307
  "Reset to defaults": "Restablecer valores predeterminados",
307
308
  "Your settings moved: the everyday ones are here, the rest in “All settings”.": "Tus ajustes se han movido: los de cada día están aquí, el resto en «Todos los ajustes».",
308
- "2 € minimum: you can pay more on the payment page if you like.": "2 € como mínimo: puedes pagar más en la página de pago si quieres."
309
+ "2 € minimum: you can pay more on the payment page if you like.": "2 € como mínimo: puedes pagar más en la página de pago si quieres.",
310
+ "worked": "trabajó",
311
+ "waiting on you for": "te espera desde hace",
312
+ "working for": "trabajando desde hace",
313
+ "(one or more)": "(una o varias)",
314
+ "(pick one)": "(elige una)",
315
+ "Answer it in Claude Code": "Respóndelo en Claude Code",
316
+ "asks permission to use": "pide permiso para usar",
317
+ "asks to edit this file": "pide editar este archivo",
318
+ "asks to open this page": "pide abrir esta página",
319
+ "asks to run this command": "pide ejecutar este comando",
320
+ "has a question for you": "tiene una pregunta para ti",
321
+ "has several questions for you": "tiene varias preguntas para ti",
322
+ "Hide until the next question": "Ocultar hasta la próxima pregunta",
323
+ "may be waiting for your go-ahead on this command": "quizá espera tu visto bueno para este comando",
324
+ "may be waiting for your go-ahead to edit this file": "quizá espera tu visto bueno para editar este archivo",
325
+ "proposes this plan": "propone este plan",
326
+ "the numbers match the menu": "los números son los del menú",
327
+ "What the session is waiting for from you": "Lo que la sesión espera de ti",
328
+ "is waiting for your answer": "espera tu respuesta",
329
+ "A menu is open in Claude Code.": "Hay un menú abierto en Claude Code.",
330
+ "Speed presets": "Velocidades predefinidas",
331
+ "pages": "páginas"
309
332
  }
@@ -264,6 +264,7 @@
264
264
  "The shop is not open yet.": "ショップはまだオープンしていません。",
265
265
  "The shop cannot be reached. Check your connection and try again.": "ショップに接続できません。接続を確認して、もう一度お試しください。",
266
266
  "Hand-drawn Halloween characters, each in its own room.": "手描きのハロウィンキャラクター。それぞれに専用の部屋があります。",
267
+ "Entirely optional: the app stays free. It is a way to support the artist and the developer.": "購入はまったくの任意です。アプリは無料のままです。アーティストと開発者を応援する方法のひとつです。",
267
268
  "One payment, by card, on a Stripe page. No account.": "Stripe のページでカードによる 1 回払い。アカウント不要。",
268
269
  "Buy": "購入",
269
270
  "I already bought it": "購入済みです",
@@ -305,5 +306,27 @@
305
306
  "Got it": "了解",
306
307
  "Reset to defaults": "初期設定に戻す",
307
308
  "Your settings moved: the everyday ones are here, the rest in “All settings”.": "設定の場所が変わりました。よく使うものはここに、それ以外は「すべての設定」にあります。",
308
- "2 € minimum: you can pay more on the payment page if you like.": "最低2ユーロ。お望みなら支払いページでそれ以上の金額も選べます。"
309
+ "2 € minimum: you can pay more on the payment page if you like.": "最低2ユーロ。お望みなら支払いページでそれ以上の金額も選べます。",
310
+ "worked": "作業時間",
311
+ "waiting on you for": "あなたを待って",
312
+ "working for": "作業中",
313
+ "(one or more)": "(複数選択可)",
314
+ "(pick one)": "(1つ選択)",
315
+ "Answer it in Claude Code": "Claude Code で回答してください",
316
+ "asks permission to use": "が使用の許可を求めています:",
317
+ "asks to edit this file": "がこのファイルの編集を求めています",
318
+ "asks to open this page": "がこのページを開く許可を求めています",
319
+ "asks to run this command": "がこのコマンドの実行を求めています",
320
+ "has a question for you": "から質問があります",
321
+ "has several questions for you": "から複数の質問があります",
322
+ "Hide until the next question": "次の質問まで非表示",
323
+ "may be waiting for your go-ahead on this command": "がこのコマンドの許可を待っているかもしれません",
324
+ "may be waiting for your go-ahead to edit this file": "がこのファイル編集の許可を待っているかもしれません",
325
+ "proposes this plan": "がこのプランを提案しています",
326
+ "the numbers match the menu": "番号はメニューと同じです",
327
+ "What the session is waiting for from you": "セッションがあなたに求めていること",
328
+ "is waiting for your answer": "があなたの回答を待っています",
329
+ "A menu is open in Claude Code.": "Claude Code でメニューが開いています。",
330
+ "Speed presets": "速度プリセット",
331
+ "pages": "ページ"
309
332
  }
@@ -264,6 +264,7 @@
264
264
  "The shop is not open yet.": "상점이 아직 열리지 않았습니다.",
265
265
  "The shop cannot be reached. Check your connection and try again.": "상점에 연결할 수 없습니다. 연결을 확인하고 다시 시도하세요.",
266
266
  "Hand-drawn Halloween characters, each in its own room.": "손으로 그린 핼러윈 캐릭터, 각자 자기 방이 있습니다.",
267
+ "Entirely optional: the app stays free. It is a way to support the artist and the developer.": "구매는 전적으로 선택 사항이며, 앱은 계속 무료입니다. 작가와 개발자를 응원하는 방법입니다.",
267
268
  "One payment, by card, on a Stripe page. No account.": "Stripe 페이지에서 카드로 한 번만 결제합니다. 계정이 필요 없습니다.",
268
269
  "Buy": "구매",
269
270
  "I already bought it": "이미 구매했습니다",
@@ -305,5 +306,27 @@
305
306
  "Got it": "알겠어요",
306
307
  "Reset to defaults": "기본값으로 되돌리기",
307
308
  "Your settings moved: the everyday ones are here, the rest in “All settings”.": "설정 위치가 바뀌었습니다. 자주 쓰는 설정은 여기에, 나머지는 '모든 설정'에 있습니다.",
308
- "2 € minimum: you can pay more on the payment page if you like.": "최소 2유로: 원하시면 결제 페이지에서 더 낼 수 있습니다."
309
+ "2 € minimum: you can pay more on the payment page if you like.": "최소 2유로: 원하시면 결제 페이지에서 더 낼 수 있습니다.",
310
+ "worked": "작업",
311
+ "waiting on you for": "기다리는 중",
312
+ "working for": "작업 중",
313
+ "(one or more)": "(여러 개 선택)",
314
+ "(pick one)": "(하나 선택)",
315
+ "Answer it in Claude Code": "Claude Code에서 답하세요",
316
+ "asks permission to use": "— 사용 권한 요청:",
317
+ "asks to edit this file": "— 이 파일을 수정하려고 합니다",
318
+ "asks to open this page": "— 이 페이지를 열려고 합니다",
319
+ "asks to run this command": "— 이 명령을 실행하려고 합니다",
320
+ "has a question for you": "— 질문이 있습니다",
321
+ "has several questions for you": "— 질문이 여러 개 있습니다",
322
+ "Hide until the next question": "다음 질문까지 숨기기",
323
+ "may be waiting for your go-ahead on this command": "— 이 명령에 대한 승인을 기다리는 것 같습니다",
324
+ "may be waiting for your go-ahead to edit this file": "— 이 파일 수정 승인을 기다리는 것 같습니다",
325
+ "proposes this plan": "— 이 계획을 제안합니다",
326
+ "the numbers match the menu": "번호는 메뉴와 같습니다",
327
+ "What the session is waiting for from you": "세션이 기다리는 것",
328
+ "is waiting for your answer": "— 답을 기다리고 있습니다",
329
+ "A menu is open in Claude Code.": "Claude Code에 메뉴가 열려 있습니다.",
330
+ "Speed presets": "속도 프리셋",
331
+ "pages": "페이지"
309
332
  }
@@ -264,6 +264,7 @@
264
264
  "The shop is not open yet.": "A loja ainda não está aberta.",
265
265
  "The shop cannot be reached. Check your connection and try again.": "Não foi possível acessar a loja. Verifique sua conexão e tente novamente.",
266
266
  "Hand-drawn Halloween characters, each in its own room.": "Personagens de Halloween desenhados à mão, cada um em seu próprio cômodo.",
267
+ "Entirely optional: the app stays free. It is a way to support the artist and the developer.": "Totalmente opcional: o app continua gratuito. É uma forma de apoiar o artista e o desenvolvedor.",
267
268
  "One payment, by card, on a Stripe page. No account.": "Um único pagamento, com cartão, em uma página da Stripe. Sem conta.",
268
269
  "Buy": "Comprar",
269
270
  "I already bought it": "Já comprei",
@@ -305,5 +306,27 @@
305
306
  "Got it": "Entendi",
306
307
  "Reset to defaults": "Restaurar padrões",
307
308
  "Your settings moved: the everyday ones are here, the rest in “All settings”.": "Suas configurações mudaram de lugar: as do dia a dia estão aqui, o resto em “Todas as configurações”.",
308
- "2 € minimum: you can pay more on the payment page if you like.": "Mínimo de 2 €: você pode pagar mais na página de pagamento, se quiser."
309
+ "2 € minimum: you can pay more on the payment page if you like.": "Mínimo de 2 €: você pode pagar mais na página de pagamento, se quiser.",
310
+ "worked": "trabalhou",
311
+ "waiting on you for": "esperando por você há",
312
+ "working for": "trabalhando há",
313
+ "(one or more)": "(uma ou mais)",
314
+ "(pick one)": "(escolha uma)",
315
+ "Answer it in Claude Code": "Responda no Claude Code",
316
+ "asks permission to use": "pede permissão para usar",
317
+ "asks to edit this file": "pede para editar este arquivo",
318
+ "asks to open this page": "pede para abrir esta página",
319
+ "asks to run this command": "pede para executar este comando",
320
+ "has a question for you": "tem uma pergunta para você",
321
+ "has several questions for you": "tem várias perguntas para você",
322
+ "Hide until the next question": "Ocultar até a próxima pergunta",
323
+ "may be waiting for your go-ahead on this command": "talvez espere seu sinal verde para este comando",
324
+ "may be waiting for your go-ahead to edit this file": "talvez espere seu sinal verde para editar este arquivo",
325
+ "proposes this plan": "propõe este plano",
326
+ "the numbers match the menu": "os números são os do menu",
327
+ "What the session is waiting for from you": "O que a sessão espera de você",
328
+ "is waiting for your answer": "espera sua resposta",
329
+ "A menu is open in Claude Code.": "Há um menu aberto no Claude Code.",
330
+ "Speed presets": "Velocidades predefinidas",
331
+ "pages": "páginas"
309
332
  }
@@ -264,6 +264,7 @@
264
264
  "The shop is not open yet.": "商店尚未开放。",
265
265
  "The shop cannot be reached. Check your connection and try again.": "无法连接商店。请检查网络连接后重试。",
266
266
  "Hand-drawn Halloween characters, each in its own room.": "手绘万圣节角色,每个角色都有自己的房间。",
267
+ "Entirely optional: the app stays free. It is a way to support the artist and the developer.": "完全自愿:应用始终免费。这是支持画师和开发者的一种方式。",
267
268
  "One payment, by card, on a Stripe page. No account.": "在 Stripe 页面用银行卡一次性付款。无需账户。",
268
269
  "Buy": "购买",
269
270
  "I already bought it": "我已购买",
@@ -305,5 +306,27 @@
305
306
  "Got it": "知道了",
306
307
  "Reset to defaults": "恢复默认设置",
307
308
  "Your settings moved: the everyday ones are here, the rest in “All settings”.": "设置换了位置:常用的在这里,其余的在“全部设置”里。",
308
- "2 € minimum: you can pay more on the payment page if you like.": "最低 2 欧元:如果愿意,可以在付款页面多付一些。"
309
+ "2 € minimum: you can pay more on the payment page if you like.": "最低 2 欧元:如果愿意,可以在付款页面多付一些。",
310
+ "worked": "工作了",
311
+ "waiting on you for": "已等你",
312
+ "working for": "已工作",
313
+ "(one or more)": "(可多选)",
314
+ "(pick one)": "(单选)",
315
+ "Answer it in Claude Code": "请在 Claude Code 中回答",
316
+ "asks permission to use": "请求使用",
317
+ "asks to edit this file": "请求编辑此文件",
318
+ "asks to open this page": "请求打开此页面",
319
+ "asks to run this command": "请求运行此命令",
320
+ "has a question for you": "有一个问题要问你",
321
+ "has several questions for you": "有几个问题要问你",
322
+ "Hide until the next question": "隐藏到下一个问题",
323
+ "may be waiting for your go-ahead on this command": "可能在等你批准这条命令",
324
+ "may be waiting for your go-ahead to edit this file": "可能在等你批准编辑此文件",
325
+ "proposes this plan": "提出了这个计划",
326
+ "the numbers match the menu": "编号与菜单一致",
327
+ "What the session is waiting for from you": "会话在等你做什么",
328
+ "is waiting for your answer": "在等你的回答",
329
+ "A menu is open in Claude Code.": "Claude Code 中有一个打开的菜单。",
330
+ "Speed presets": "速度预设",
331
+ "pages": "页"
309
332
  }
@@ -264,6 +264,7 @@
264
264
  "The shop is not open yet.": "商店尚未開放。",
265
265
  "The shop cannot be reached. Check your connection and try again.": "無法連線到商店。請檢查網路連線後再試一次。",
266
266
  "Hand-drawn Halloween characters, each in its own room.": "手繪萬聖節角色,每個角色都有自己的房間。",
267
+ "Entirely optional: the app stays free. It is a way to support the artist and the developer.": "完全自願:應用程式始終免費。這是支持畫師和開發者的一種方式。",
267
268
  "One payment, by card, on a Stripe page. No account.": "在 Stripe 頁面以信用卡一次付清。不需要帳戶。",
268
269
  "Buy": "購買",
269
270
  "I already bought it": "我已購買",
@@ -305,5 +306,27 @@
305
306
  "Got it": "知道了",
306
307
  "Reset to defaults": "恢復預設設定",
307
308
  "Your settings moved: the everyday ones are here, the rest in “All settings”.": "設定換了位置:常用的在這裡,其餘的在「全部設定」裡。",
308
- "2 € minimum: you can pay more on the payment page if you like.": "最低 2 歐元:如果願意,可以在付款頁面多付一些。"
309
+ "2 € minimum: you can pay more on the payment page if you like.": "最低 2 歐元:如果願意,可以在付款頁面多付一些。",
310
+ "worked": "工作了",
311
+ "waiting on you for": "已等你",
312
+ "working for": "已工作",
313
+ "(one or more)": "(可複選)",
314
+ "(pick one)": "(單選)",
315
+ "Answer it in Claude Code": "請在 Claude Code 中回答",
316
+ "asks permission to use": "請求使用",
317
+ "asks to edit this file": "請求編輯此檔案",
318
+ "asks to open this page": "請求開啟此頁面",
319
+ "asks to run this command": "請求執行此命令",
320
+ "has a question for you": "有一個問題要問你",
321
+ "has several questions for you": "有幾個問題要問你",
322
+ "Hide until the next question": "隱藏到下一個問題",
323
+ "may be waiting for your go-ahead on this command": "可能在等你核准這條命令",
324
+ "may be waiting for your go-ahead to edit this file": "可能在等你核准編輯此檔案",
325
+ "proposes this plan": "提出了這個計畫",
326
+ "the numbers match the menu": "編號與選單一致",
327
+ "What the session is waiting for from you": "工作階段在等你做什麼",
328
+ "is waiting for your answer": "在等你的回答",
329
+ "A menu is open in Claude Code.": "Claude Code 中有一個開啟的選單。",
330
+ "Speed presets": "速度預設",
331
+ "pages": "頁"
309
332
  }
package/server.js CHANGED
@@ -368,9 +368,31 @@ const readTail = (file, bytes) => { const fd = fs.openSync(file, 'r'); try { con
368
368
  const readHead = (file, bytes) => { const fd = fs.openSync(file, 'r'); try { const n = Math.min(bytes, fs.fstatSync(fd).size), buf = Buffer.alloc(n); fs.readSync(fd, buf, 0, n, 0); return buf.toString('utf8'); } finally { fs.closeSync(fd); } };
369
369
  const APPROVAL = /^(Edit|Write|MultiEdit|NotebookEdit)/, ASKS = /^(AskUserQuestion|ExitPlanMode)/, SUBTOOL = /^(Task|Agent)$/;
370
370
  const boardCache = new Map(); // file → { sig, parsed, title }
371
- let boardMemo = { at: 0, rows: [] };
371
+ let boardMemo = { at: 0, rows: [] }, boardForced = 0;
372
372
  const PR_URL = /^https:\/\/github\.com\/[\w.-]+\/[\w.-]+\/pull\/\d+$/; // nothing else is given to the page as a link to open
373
373
  const askOf = (b) => { const q = b.name === 'AskUserQuestion' && b.input && Array.isArray(b.input.questions) && b.input.questions[0] && b.input.questions[0].question; return typeof q === 'string' ? clip(q.trim(), 200) : ''; }; // the question a session stopped on, for its card
374
+ const callOf = (b) => { const i = b.input || {}, v = b.name === 'Bash' ? i.command : /^(Edit|Write|MultiEdit|NotebookEdit)$/.test(b.name) ? path.basename(String(i.file_path || i.notebook_path || '')) : b.name === 'WebFetch' ? i.url : ''; return typeof v === 'string' && v.trim() ? b.name + '(' + clip(v.replace(/\s+/g, ' ').trim(), 160) + ')' : ''; }; // what a call waiting for your go-ahead would do, written the way Claude Code shows it: Bash(npm test)
375
+ const PLAN_FILE = /[\\/]\.claude[\\/]plans[\\/][^\\/]+\.md$/, PLAN_DIR = process.env.CLAUDE_CONFIG_DIR ? path.join(process.env.CLAUDE_CONFIG_DIR, 'plans') + path.sep : '';
376
+ const planFile = (f) => PLAN_FILE.test(f) || (!!PLAN_DIR && f.startsWith(PLAN_DIR) && f.endsWith('.md')); // also where a CLAUDE_CONFIG_DIR set elsewhere keeps them
377
+ const planText = (f) => { try { const st = fs.statSync(f); if (!st.isFile() || st.size > 262144) return ''; return clip(fs.readFileSync(f, 'utf8').trim(), 1200); } catch { return ''; } };
378
+ const menuOf = (b) => { // what a menu waiting for you shows, from the call it waits on, word for word: the questions and their options in their order (the terminal numbers them the same way), the command, the file, the plan
379
+ const i = b.input || {}, t = (x, n) => (typeof x === 'string' ? clip(x.trim(), n) : '');
380
+ if (b.name === 'AskUserQuestion') return { kind: 'question', questions: (Array.isArray(i.questions) ? i.questions : []).slice(0, 4).map((q) => ({ q: t(q && q.question, 300), multi: !!(q && q.multiSelect), options: (q && Array.isArray(q.options) ? q.options : []).slice(0, 8).map((o) => ({ label: t(o && o.label, 80), about: t(o && o.description, 140) })).filter((o) => o.label) })).filter((q) => q.q) };
381
+ if (b.name === 'ExitPlanMode') return { kind: 'plan', text: t(i.plan, 1200) };
382
+ if (b.name === 'Bash') return { kind: 'command', cmd: t(i.command, 600), about: t(i.description, 160) };
383
+ if (/^(Edit|Write|MultiEdit|NotebookEdit)$/.test(b.name)) return { kind: 'edit', file: t(i.file_path || i.notebook_path, 300) };
384
+ if (b.name === 'WebFetch') return { kind: 'fetch', url: t(i.url, 300) };
385
+ return { kind: 'tool', tool: t(b.name, 80) };
386
+ };
387
+ // Claude Code also keeps <config>/sessions/<pid>.json for each open session: its status (busy, idle, or waiting while a menu waits for your answer: a permission, a question) and since when.
388
+ // It is the only sign of a Bash approval: in the transcript, a command waiting for your go-ahead looks just like one that runs. A file whose process has ended is left out.
389
+ const CC_SESSIONS = process.env.AGENT_STANDUP_CC_SESSIONS || path.join(process.env.CLAUDE_CONFIG_DIR || path.join(os.homedir(), '.claude'), 'sessions');
390
+ const alive = (pid) => { try { process.kill(pid, 0); return true; } catch (e) { return e.code === 'EPERM'; } };
391
+ function liveStatus() { // session id → { status, since }
392
+ const out = new Map(); let names = []; try { names = fs.readdirSync(CC_SESSIONS); } catch { return out; }
393
+ for (const n of names) { if (!/^\d+\.json$/.test(n)) continue; try { const s = JSON.parse(fs.readFileSync(path.join(CC_SESSIONS, n), 'utf8')); if (s && typeof s.sessionId === 'string' && /^(busy|idle|waiting)$/.test(s.status) && Number.isInteger(s.pid) && s.pid > 0 && alive(s.pid)) out.set(s.sessionId, { status: s.status === 'waiting' && s.waitingFor === 'dialog open' ? 'idle' : s.status, since: Number(s.statusUpdatedAt) || 0 }); } catch {} } /* a dialog you opened yourself (/model, /config, /mcp…) also says waiting: it is not a question for you */
394
+ return out;
395
+ }
374
396
  // When the person last did something in a session: an order, a slash command, a "!" command, an order typed while the lead was working. It is what moves the live call (see currentSession).
375
397
  // Not what the harness writes as a user record: the result of a tool, a reminder, the news that a background task ended, the summary of a compaction, an Esc.
376
398
  // Nor the prompt of a task Cowork runs on a schedule (it opens with <scheduled-task …>): nobody typed it, so it does not take the call from the session you are in.
@@ -390,8 +412,8 @@ function typedBefore(file) { // the first look at a session whose last order i
390
412
  function parseTail(file, st) {
391
413
  const sig = st.mtimeMs + ':' + st.size, hit = boardCache.get(file); if (hit && hit.sig === sig) return hit;
392
414
  const { text, cut } = readTail(file, 192 * 1024), lines = text.split('\n'); if (cut) lines.shift();
393
- const pend = new Map(); let lastType = null, lastTool = false, lastStop = null, stops = false, esc = false, lastTs = 0, custom = (hit && hit.custom) || null, ai = (hit && hit.ai) || null, first = hit ? hit.first : undefined, pr = (hit && hit.pr) || null, asked = (hit && hit.asked) || 0;
394
- for (const l of lines) {
415
+ const pend = new Map(); let lastType = null, lastTool = false, lastStop = null, stops = false, esc = false, lastTs = 0, custom = (hit && hit.custom) || null, ai = (hit && hit.ai) || null, first = hit ? hit.first : undefined, pr = (hit && hit.pr) || null, asked = (hit && hit.asked) || 0, plan = (hit && hit.plan) || null;
416
+ for (const l of lines) try { // one odd record costs that record, not the whole card
395
417
  if (!l) continue; let r; try { r = JSON.parse(l); } catch { continue; }
396
418
  const a = typedAt(r); if (a > asked) asked = a;
397
419
  if (r.type === 'custom-title' && typeof r.customTitle === 'string') custom = r.customTitle; else if (r.type === 'ai-title' && typeof r.aiTitle === 'string') ai = r.aiTitle; // a session is renamed, or named, long after its row was first shown: the latest one read wins
@@ -399,8 +421,9 @@ function parseTail(file, st) {
399
421
  const t = Date.parse(r.timestamp) || 0, bl = blocks(r);
400
422
  if (r.type === 'assistant' || r.type === 'user') { lastType = r.type; lastTool = bl.some((b) => b.type === 'tool_use'); lastStop = (r.type === 'assistant' && r.message && r.message.stop_reason) || null; if (lastStop) stops = true; if (t) lastTs = t;
401
423
  esc = r.type === 'user' && bl.some((b) => b.type === 'text' && /^\s*\[Request interrupted/i.test(b.text || '')); if (esc) pend.clear(); } // Esc: the turn stops there, and no call is waited for any more
402
- for (const b of bl) { if (b.type === 'tool_use') pend.set(b.id, { name: b.name, ts: t, q: askOf(b) }); else if (b.type === 'tool_result') pend.delete(b.tool_use_id); }
403
- }
424
+ for (const b of bl) if (b.type === 'tool_use' && /^(Write|Edit|MultiEdit)$/.test(b.name) && b.input && planFile(String(b.input.file_path || ''))) plan = { file: String(b.input.file_path), ts: t }; // the plan, written in its own file before it is shown for approval
425
+ for (const b of bl) { if (b.type === 'tool_use') pend.set(b.id, { id: String(b.id || ''), name: b.name, ts: t, q: askOf(b), c: callOf(b), m: menuOf(b) }); else if (b.type === 'tool_result') pend.delete(b.tool_use_id); }
426
+ } catch {}
404
427
  if (!hit && !custom) { // first look at this file: a little further back than the lines read above, and without needing whole lines
405
428
  const big = readTail(file, 256 * 1024).text, un = (m) => { try { return m ? JSON.parse('"' + m[1] + '"') : null; } catch { return null; } };
406
429
  custom = un([...big.matchAll(/"type":"custom-title","customTitle":"((?:[^"\\]|\\.)*)"/g)].pop()); if (!ai) ai = un([...big.matchAll(/"type":"ai-title","aiTitle":"((?:[^"\\]|\\.)*)"/g)].pop());
@@ -408,7 +431,7 @@ function parseTail(file, st) {
408
431
  if (!custom && !ai && first == null) first = firstPrompt(file) || (st.size > 64 * 1024 ? '' : null); // '' = looked for and not there; a file that has just been created is looked at again
409
432
  if (!hit && !asked && cut) asked = typedBefore(file);
410
433
  const out = { sig, title: custom || ai || first || null, custom, ai, first, pr, lastType, lastTool, lastStop, stops, esc, lastTs, pending: [...pend.values()] }; // a title the person typed wins over the generated one, and both over the first prompt
411
- out.asked = asked; boardCache.set(file, out); if (boardCache.size > 200) boardCache.delete(boardCache.keys().next().value); return out;
434
+ out.asked = asked; out.plan = plan; boardCache.set(file, out); if (boardCache.size > 3 * ROWS_MAX) boardCache.delete(boardCache.keys().next().value); return out; // more than the list can hold: a full list never pushes its own rows out, which read every row again at each scan
412
435
  }
413
436
  function firstPrompt(file) { // the first thing the person typed, read record by record: a pattern over the raw text ran from a user record into the assistant's first answer and took that as the title
414
437
  const ONE = (t) => t.replace(/\s+/g, ' ').trim().slice(0, 90);
@@ -424,28 +447,42 @@ function boardRows() {
424
447
  if (Date.now() - boardMemo.at < 1200) return boardMemo.rows; // several windows polling at once share one scan
425
448
  const out = withDone(boardRows0()); boardMemo = { at: Date.now(), rows: out }; return out;
426
449
  }
450
+ // How many sessions the list keeps, newest first, of each kind (Claude Code, each other tool, Cowork): `most` of them, and whatever the count, the PER_FOLDER newest of each folder, so that
451
+ // sessions written elsewhere never push the ones of a folder out. That is what happened with only a count: the Claude Code session of the folder the call follows left the list, and with it its
452
+ // tab and the call, behind 40 sessions a desktop app had just written in temporary folders (issue #9). Sessions started in a temporary folder (see tmpKey) have places of their own, TMP_ROWS at most.
453
+ const PER_FOLDER = 3, TMP_ROWS = 10, ROWS_MAX = 200; // ROWS_MAX: a ceiling on what the folders add, for someone with hundreds of folders (one worktree per task)
454
+ function capRows(list, most, folderOf) { // list: newest first
455
+ const real = list.filter((r) => !tmpKey(folderOf(r))), keep = new Set(real.slice(0, most)), per = new Map();
456
+ for (const r of real) { if (keep.size >= ROWS_MAX) break; const k = folderOf(r), n = per.get(k) || 0; if (n < PER_FOLDER) { keep.add(r); per.set(k, n + 1); } }
457
+ return real.filter((r) => keep.has(r)).concat(list.filter((r) => tmpKey(folderOf(r))).slice(0, TMP_ROWS));
458
+ }
427
459
  function boardRows0() {
428
- const now = Date.now(), rows = [];
460
+ const now = Date.now(), rows = [], live = liveStatus();
429
461
  for (const m of SOURCES) for (const r of guard(() => m.sessions(), [])) if (now - r.mtime < 12 * 3600e3) rows.push({ proj: m.PROJ, id: r.id, st: { mtimeMs: r.mtime, size: r.size }, cx: r, src: m });
430
462
  for (const proj of projects()) {
431
463
  for (const { id, file } of transcripts(proj)) { try { const st = fs.statSync(file); if (now - st.mtimeMs < 12 * 3600e3) rows.push({ proj, id, st }); } catch {} }
432
464
  }
433
465
  rows.sort((a, b) => b.st.mtimeMs - a.st.mtimeMs);
434
- return rows.filter((r) => !r.cx && r.proj !== COWORK).slice(0, 40).concat(...SOURCES.map((m) => rows.filter((r) => r.src === m).slice(0, 20)), rows.filter((r) => r.proj === COWORK).slice(0, 20)).sort((a, b) => b.st.mtimeMs - a.st.mtimeMs).map(({ proj, id, st, cx, src }) => {
466
+ const own = (r) => r.proj, folder = (r) => String(r.cx.key || r.cx.dir || ''); // a Claude Code session is listed under its folder; a Codex or Vibe one says which folder it was started in
467
+ return capRows(rows.filter((r) => !r.cx && r.proj !== COWORK), 40, own).concat(...SOURCES.map((m) => capRows(rows.filter((r) => r.src === m), 20, folder)), rows.filter((r) => r.proj === COWORK).slice(0, 20)).sort((a, b) => b.st.mtimeMs - a.st.mtimeMs).map(({ proj, id, st, cx, src }) => {
435
468
  if (cx) { const r = guard(() => src.boardRow(cx, now), null); if (r && tmpKey(r.dir)) r.tmp = 1; return r; } // tmp: started in the temporary folder (see tmpKey)
436
469
  const file = path.join(projDir(proj, id), id + '.jsonl'); let p; try { p = parseTail(file, st); } catch { p = { pending: [] }; }
437
- const age = now - st.mtimeMs, lp = (p.pending || [])[(p.pending || []).length - 1]; let state = 'idle', tool = '', ageMs = age;
438
- if (age < 30 * 60e3) {
470
+ const age = now - st.mtimeMs, pend = p.pending || [], w = live.get(id), lp = (w && w.status === 'waiting' && pend.find((c) => !SUBTOOL.test(c.name))) || pend[pend.length - 1]; let state = 'idle', tool = '', ageMs = age, since = 0, open = null; // lp: with a menu open and several calls waiting, Claude Code asks about the first of them
471
+ if (w && w.status === 'waiting' && lp) { state = 'blocked'; tool = lp.name; since = w.since || lp.ts || st.mtimeMs; ageMs = now - since; } // a menu is open in the session and a call waits on it: it needs you now, however long ago it was written
472
+ else if (w && w.status === 'waiting') { state = 'blocked'; since = w.since || st.mtimeMs; ageMs = now - since; const pt = p.plan && p.plan.ts > (p.asked || 0) ? planText(p.plan.file) : ''; open = { id: 'w' + since, tool: pt ? 'ExitPlanMode' : '', ...(pt ? { kind: 'plan', text: pt } : { kind: 'menu' }), sure: 1 }; } // a menu is open and the transcript has no call waiting on it: the plan to approve (Claude Code writes that call only once it is answered, the plan itself is in its file, written this turn), or a menu it does not record
473
+ else if (age < 30 * 60e3) {
439
474
  if (lp) { ageMs = now - (lp.ts || st.mtimeMs); tool = lp.name;
440
- state = SUBTOOL.test(lp.name) ? 'waiting' : (ASKS.test(lp.name) && ageMs > 4000) || (APPROVAL.test(lp.name) && ageMs > 15000) ? 'blocked' : 'working'; }
475
+ state = SUBTOOL.test(lp.name) ? 'waiting' : (ASKS.test(lp.name) && ageMs > 4000) || (APPROVAL.test(lp.name) && ageMs > 15000) ? 'blocked' : 'working'; if (state === 'blocked') since = lp.ts || st.mtimeMs; } // still a guess from how long a call has waited: a session in VS Code asks in its panel, which may not say "waiting"
441
476
  else if (p.esc) state = 'turn'; // you stopped it (Esc): it is your turn there, not "working" for the next ten minutes
442
477
  else if (p.lastType === 'assistant' && !p.lastTool && p.lastStop !== 'tool_use' && !(p.lastStop == null && p.stops && age < 45000)) state = 'turn'; // a line whose message goes on with a tool call is not the end of the turn: the call is written after it, a long one many seconds after.
443
478
  // Claude Code up to 2.1.87 writes that line without saying why it stopped: in a transcript that does say it elsewhere, such a line is given 45 s for its call to come (1 in 100 takes longer than 25 s)
444
479
  else state = age < 10 * 60e3 ? 'working' : 'idle';
480
+ if (state === 'turn') since = p.lastTs || st.mtimeMs;
445
481
  }
446
482
  let subActive = 0, subTotal = 0;
447
483
  for (const x of subFiles(proj, id)) { subTotal++; if (now - mtimeOf(x.file) < 90e3) subActive++; }
448
- return { proj, id, title: coworkTitle(proj, id) || p.title || id, mtime: st.mtimeMs, state, tool, ageMs, subActive, subTotal, asked: p.asked || 0, ...(p.pr ? { pr: p.pr } : {}), ...(state === 'blocked' && lp && lp.q ? { ask: lp.q } : {}), ...(p.esc ? { cut: 1 } : {}), ...(tmpKey(proj) ? { tmp: 1 } : {}) }; // cut: stopped by you, which is no news to tell you
484
+ const ran = since && p.asked && p.asked < since ? since - p.asked : 0, ask = state === 'blocked' && lp ? lp.q || lp.c : ''; // since: when it started to wait on you; ran: how long it worked, from your last order to then
485
+ return { proj, id, title: coworkTitle(proj, id) || p.title || id, mtime: st.mtimeMs, state, tool, ageMs, subActive, subTotal, asked: p.asked || 0, ...(since ? { since } : {}), ...(ran ? { ran } : {}), ...(p.pr ? { pr: p.pr } : {}), ...(ask ? { ask } : {}), ...(open ? { menu: open } : state === 'blocked' && lp && lp.m && !SUBTOOL.test(lp.name) ? { menu: { id: lp.id, tool: lp.name, ...lp.m, ...(w && w.status === 'waiting' ? { sure: 1 } : {}) } } : {}), ...(p.esc ? { cut: 1 } : {}), ...(tmpKey(proj) ? { tmp: 1 } : {}) }; // cut: stopped by you, which is no news to tell you
449
486
  }).filter(Boolean);
450
487
  }
451
488
  // Settings live in a file, not only in the page's localStorage: the port changes between VS Code windows and reloads, and localStorage is per origin (port included).
@@ -515,6 +552,7 @@ process.on('uncaughtExceptionMonitor', (e, origin) => { try { if (OWN || String(
515
552
  // One exception, so that the call is not left on an empty room: when the session you last typed in has finished and been quiet for STICK_MS while another one is at work, the call
516
553
  // goes to that one. A session you went to by hand is not left that way.
517
554
  const STICK_MS = 90000;
555
+ const MENU_LIVE_MS = 30 * 60e3; // a menu left open longer still needs you (board, visitor), but no longer takes the call from where you work
518
556
  // Sessions started in the system's temporary folder: a program running Claude Code there for a moment (a test, a script, a tool that makes a folder per run), not a session someone works in.
519
557
  // When the call looks everywhere it leaves them out, unless there is nothing else; they have no tab then and send no visitor. They stay in the Sessions view, and a window open on such a folder follows it.
520
558
  // macOS: /var/folders/… (/private/… once resolved) and /tmp; Linux: /tmp; Windows: …\AppData\Local\Temp; and wherever TMPDIR points. A key is a folder as Claude Code names it, every other character a "-".
@@ -526,15 +564,26 @@ function sessionMtime(proj, id) {
526
564
  let m = sx ? r.mtime : mtimeOf(path.join(projDir(proj, id), id + '.jsonl')); if (!m) return 0; const subs = subFilesOf(proj, id);
527
565
  for (const x of subs) m = Math.max(m, mtimeOf(x.file)); for (const d of subs.dirs) m = Math.max(m, mtimeOf(d)); return m; // the folders too: a new file in them is activity, as when every file around the transcripts was looked at
528
566
  }
567
+ // A project of Claude Code is named after its folder with every character other than a letter or digit made a dash: -Users-a-app-old may be app/old (inside app) or app-old (beside it).
568
+ // Which one is told by the folder its sessions were started in (the cwd of its first records), read once per project. Not found (an empty project): counted as before, by its name.
569
+ const projCwds = new Map(), dirKey = (d) => String(d || '').replace(/[^a-zA-Z0-9]/g, '-');
570
+ function projCwd(proj) {
571
+ if (projCwds.has(proj)) return projCwds.get(proj);
572
+ let cwd = ''; for (const { id } of transcripts(proj).slice(0, 3)) { try { const m = /"cwd":"((?:[^"\\]|\\.)*)"/.exec(readHead(path.join(projDir(proj, id), id + '.jsonl'), 64 * 1024)); if (m) { cwd = JSON.parse('"' + m[1] + '"'); break; } } catch {} }
573
+ if (cwd && dirKey(cwd) === proj) projCwds.set(proj, cwd); return cwd && dirKey(cwd) === proj ? cwd : ''; // kept once it is sure: the folder whose name is the project's
574
+ }
575
+ const inFolder = (proj, key) => { if (proj === key) return true; if (!proj.startsWith(key + '-')) return false; const cwd = projCwd(proj); if (!cwd) return true; for (let d = cwd; d;) { if (dirKey(d) === key) return true; const up = path.dirname(d); if (up === d) return false; d = up; } return false; };
529
576
  function currentSession(projFilter, pick, stick, anyTmp) { // pick: { proj, id, since } the session you went to by hand, and the latest order there was then · stick: the session the call is in · anyTmp: sessions in the temporary folder count too (see tmpKey)
530
577
  const safe = (x) => typeof x === 'string' && /^[\w.\-]+$/.test(x) && x !== '..', now = Date.now();
531
578
  const there = (c) => !!c && safe(c.id) && safe(c.proj) && (sourceOf(c.proj) ? !!guard(() => sourceOf(c.proj).fileOf(c.id), null) : fs.existsSync(path.join(projDir(c.proj, c.id), c.id + '.jsonl')));
532
- const inScope = (c) => (!projFilter ? anyTmp || !tmpSession(c.proj, c.id) : c.proj === projFilter || c.proj.startsWith(projFilter + '-') || !!(sourceOf(c.proj) && guard(() => sourceOf(c.proj).inProject(c.id, projFilter), false))); // a Codex or Vibe session counts for a project when it was started in that folder
533
- const same = (a, b) => !!a && !!b && a.proj === b.proj && a.id === b.id, all = boardRows(), rows = all.filter(inScope), mine = there(pick) ? all.find((r) => same(r, pick)) : null;
579
+ const inScope = (c) => (!projFilter ? anyTmp || !tmpSession(c.proj, c.id) : inFolder(c.proj, projFilter) || !!(sourceOf(c.proj) && guard(() => sourceOf(c.proj).inProject(c.id, projFilter), false))); // a Codex or Vibe session counts for a project when it was started in that folder
580
+ const same = (a, b) => !!a && !!b && a.proj === b.proj && a.id === b.id; let all = boardRows();
581
+ if (there(pick) && !all.some((r) => same(r, pick)) && now - boardForced > 5000 && sessionMtime(pick.proj, pick.id) > boardMemo.at - 1500) { boardForced = now; boardMemo.at = 0; all = boardRows(); } // boardForced: at most every 5 s, for a session written to that the list never holds (older than 12 h, past the places of its kind) // the session you went to was written after the list shared for 1.2 s was made: without it, its order read as none, and the next answer dropped your pick
582
+ const rows = all.filter(inScope), mine = there(pick) ? all.find((r) => same(r, pick)) : null;
534
583
  const asked = Math.max(0, (mine && mine.asked) || 0, ...rows.map((r) => r.asked || 0)); // the latest order, in the folder the call follows or in the session you went to
535
584
  const moved = pick && pick.pin ? Math.max(0, ...rows.filter((r) => !same(r, pick)).map((r) => r.asked || 0)) : asked; // pick.pin: a call pinned by a click on its tab (📌) is left for an order typed in another session only; what you type in it keeps it there
536
585
  if (there(pick) && !(moved > pick.since)) return { proj: pick.proj, id: pick.id, mtime: now, asked, pick: 1 }; // no "since" on the first question after a pick: the answer gives it (asked), and the page sends it back from then on
537
- const live = rows.filter((r) => /^(working|waiting|blocked)$/.test(r.state) || r.subActive > 0 || now - r.mtime < STICK_MS), last = Math.max(0, ...live.map((r) => r.asked || 0)), top = live.filter((r) => (r.asked || 0) === last);
586
+ const live = rows.filter((r) => /^(working|waiting)$/.test(r.state) || (r.state === 'blocked' && !(now - (r.since || now) > MENU_LIVE_MS)) || r.subActive > 0 || now - r.mtime < STICK_MS), last = Math.max(0, ...live.map((r) => r.asked || 0)), top = live.filter((r) => (r.asked || 0) === last);
538
587
  const to = top.find((r) => same(r, stick)) || top.sort((a, b) => b.mtime - a.mtime)[0]; // two sessions whose last order is not known (or of the same instant): the call stays where it is
539
588
  if (to) return { proj: to.proj, id: to.id, mtime: to.mtime, asked };
540
589
  if (there(stick) && inScope(stick)) return { proj: stick.proj, id: stick.id, mtime: sessionMtime(stick.proj, stick.id), asked }; // nobody is at work: the call stays where it is
@@ -542,7 +591,7 @@ function currentSession(projFilter, pick, stick, anyTmp) { // pick: { proj, id
542
591
  const consider = (proj, id, m) => { if (!best || m > best.mtime) best = { proj, id, mtime: m }; };
543
592
  for (const m of SOURCES) for (const r of guard(() => m.sessions(), [])) if (inScope({ proj: m.PROJ, id: r.id })) consider(m.PROJ, r.id, r.mtime);
544
593
  for (const proj of projects()) {
545
- if (projFilter ? proj !== projFilter && !proj.startsWith(projFilter + '-') : !anyTmp && tmpKey(proj)) continue; // the folder itself, or a folder inside it (a Cowork session is in no folder of yours: it counts when the call looks everywhere, or at Cowork)
594
+ if (projFilter ? !inFolder(proj, projFilter) : !anyTmp && tmpKey(proj)) continue; // the folder itself, or a folder inside it (a Cowork session is in no folder of yours: it counts when the call looks everywhere, or at Cowork)
546
595
  for (const { id } of transcripts(proj)) { const m = sessionMtime(proj, id); if (m) consider(proj, id, m); } // 0: a link to a transcript that is gone
547
596
  }
548
597
  if (!best && projFilter) return { ...currentSession('', null, stick), wide: 1 };
@@ -711,7 +760,8 @@ function buildTimeline(proj, id, files = []) {
711
760
 
712
761
  // Ask the local `claude` CLI (uses the user's existing login) to map a JSON array of strings to another array. Cached.
713
762
  const { spawn } = require('child_process');
714
- const cache = new Map();
763
+ const cache = new Map(), CACHE_MAX = 5000; // translations and little lines, by text: the oldest go first past CACHE_MAX (an editor open for days kept every line of every session)
764
+ const remember = (k, v) => { cache.delete(k); cache.set(k, v); if (cache.size > CACHE_MAX) cache.delete(cache.keys().next().value); };
715
765
  // Find a usable `claude` binary: explicit setting → PATH → usual install spots → the one bundled with the VS Code Claude Code extension.
716
766
  let lastTrError = '', claudeCache = null;
717
767
  const exists = (f) => { try { return fs.statSync(f).isFile(); } catch { return false; } };
@@ -736,10 +786,14 @@ function findClaude() {
736
786
  const found = cands.find(exists) || bundledClaude() || null;
737
787
  return (claudeCache = found);
738
788
  }
789
+ // Through cmd.exe, Node joins the arguments with spaces and quotes none: the empty value of --tools vanished and the system prompt became one argument per word. Quoted, each stays whole
790
+ // (a line break or a double quote inside would end it: there are none in what is sent, and they are made harmless anyway).
791
+ const winArg = (a) => '"' + String(a).replace(/[\r\n]+/g, ' ').replace(/"/g, "'") + '"';
739
792
  function spawnClaude(args, opts) {
740
793
  const bin = findClaude(); if (!bin) { lastTrError = 'not-found'; return null; }
741
- if (process.platform === 'win32' && /\.(cmd|bat)$/i.test(bin)) return spawn('"' + bin + '"', args, { ...opts, shell: true, windowsHide: true }); // npm's Windows shims need a shell
742
- return spawn(bin, args, { ...opts, windowsHide: true });
794
+ const p = process.platform === 'win32' && /\.(cmd|bat)$/i.test(bin) ? spawn('"' + bin + '"', args.map(winArg), { ...opts, shell: true, windowsHide: true }) : spawn(bin, args, { ...opts, windowsHide: true }); // npm's Windows shims need a shell, which takes the arguments as they are: each one is quoted
795
+ if (p.stdin) p.stdin.on('error', () => {}); // a claude that exits before reading its prompt (not signed in, an old version): EPIPE would otherwise end the whole server
796
+ return p;
743
797
  }
744
798
  let running = 0; const queue = [];
745
799
  const pump = () => { while (running < 3 && queue.length) { running++; queue.shift()(); } };
@@ -757,7 +811,7 @@ function claudeMap(kind, instruction, texts) {
757
811
  const done = (ok) => ({ texts: texts.map((t) => cache.get(kind + '|' + t) || t), ok });
758
812
  if (!need.length) return Promise.resolve(done(true));
759
813
  const prompt = instruction + ' Output ONLY a JSON array of strings, same length and order, no markdown.\n' + JSON.stringify(need);
760
- return apiMap(prompt, need).then((arr) => { need.forEach((t, i) => cache.set(kind + '|' + t, String(arr[i]))); return done(true); }).catch(() => schedule(() => new Promise((resolve) => {
814
+ return apiMap(prompt, need).then((arr) => { need.forEach((t, i) => remember(kind + '|' + t, String(arr[i]))); return done(true); }).catch(() => schedule(() => new Promise((resolve) => {
761
815
  const p = spawnClaude(['-p', '--model', 'haiku', '--no-session-persistence', '--tools', ''], { cwd: os.tmpdir() }); if (!p) return resolve(done(false));
762
816
  let out = ''; const timer = setTimeout(() => p.kill(), 60000);
763
817
  p.stdout.on('data', (d) => (out += d));
@@ -767,7 +821,7 @@ function claudeMap(kind, instruction, texts) {
767
821
  let ok = false;
768
822
  try {
769
823
  const arr = JSON.parse(out.slice(out.indexOf('['), out.lastIndexOf(']') + 1));
770
- if (arr.length === need.length) { need.forEach((t, i) => cache.set(kind + '|' + t, String(arr[i]))); ok = true; }
824
+ if (arr.length === need.length) { need.forEach((t, i) => remember(kind + '|' + t, String(arr[i]))); ok = true; }
771
825
  } catch {}
772
826
  resolve(done(ok));
773
827
  });
@@ -817,7 +871,7 @@ const pickWorker = () => trWorkers.reduce((a, b) => (a.q.length + a.busy <= b.q.
817
871
  async function translateFast(texts, lang = 'fr') {
818
872
  const need = [...new Set(texts.filter((t) => !cache.has(lang + '|' + t)))];
819
873
  if (need.length && need.length <= 3 && !process.env.ANTHROPIC_API_KEY) { // a few lines: warm workers in parallel; many lines: one batched call
820
- await Promise.all(need.map(async (t) => { const r = await pickWorker().ask(t, lang); if (r) cache.set(lang + '|' + t, r); }));
874
+ await Promise.all(need.map(async (t) => { const r = await pickWorker().ask(t, lang); if (r) remember(lang + '|' + t, r); }));
821
875
  return { texts: texts.map((t) => cache.get(lang + '|' + t) || t), ok: texts.every((t) => cache.has(lang + '|' + t)) };
822
876
  }
823
877
  return claudeMap(lang, trInstr(lang), texts);
@@ -846,10 +900,11 @@ function loadVoices() { // the same list for the page, asked without waiting:
846
900
  if (sayVoices) return Promise.resolve(sayVoices);
847
901
  return sayVoicesJob || (sayVoicesJob = new Promise((resolve) => { try { execFile(VOICES_CMD[0], VOICES_CMD[1], { encoding: 'utf8', timeout: VOICES_CMD[2], windowsHide: true }, (err, out) => resolve(sayVoices || (sayVoices = parseVoices(err ? '' : String(out))))); } catch { resolve(sayVoices || (sayVoices = parseVoices(''))); } }));
848
902
  }
849
- const ttsDir = path.join(os.tmpdir(), 'agent-standup-tts-' + (process.getuid ? process.getuid() : 'user'));
903
+ const ttsDir = process.platform === 'linux' ? path.join(process.env.XDG_CACHE_HOME || path.join(os.homedir(), '.cache'), 'agent-standup', 'tts') : path.join(os.tmpdir(), 'agent-standup-tts-' + (process.getuid ? process.getuid() : 'user')); // Linux: /tmp is shared by every user, and a folder or file put there first by someone else would have been used (written through, or played); macOS and Windows give each user a temporary folder of their own
850
904
  try { fs.mkdirSync(ttsDir, { recursive: true, mode: 0o700 }); } catch {}
851
905
  const ttsJobs = new Map();
852
- try { for (const f of fs.readdirSync(ttsDir)) { const p = path.join(ttsDir, f); if (Date.now() - fs.statSync(p).mtimeMs > 864e5) fs.unlinkSync(p); } } catch {} // drop cached audio older than a day
906
+ const ttsClean = () => { try { for (const f of fs.readdirSync(ttsDir)) { const p = path.join(ttsDir, f); if (Date.now() - fs.statSync(p).mtimeMs > 864e5) fs.unlinkSync(p); } } catch {} }; // drop cached audio older than a day
907
+ ttsClean(); setInterval(ttsClean, 3600e3).unref(); // also while an editor stays open for days
853
908
  function synthesize(voice, wpm, text, out) {
854
909
  return new Promise((resolve, reject) => {
855
910
  let p; text = text.replace(/\[\[[^\]]*\]\]/g, ' ').replace(/\[(?=\[)/g, '[ ').replace(/\](?=\])/g, '] '); // macOS `say` obeys commands written between [[ and ]] (a 30-second silence, another voice, another speed) and this text comes from a transcript: they are taken out, and no two brackets are left side by side
@@ -1002,14 +1057,18 @@ const reveal = { // run and stat: replaced in the tests, which must not open a
1002
1057
  },
1003
1058
  run(file) { const go = (list) => { const c = list[0]; if (!c) return; try { execFile(c[0], c[1], c[2] || {}, (err) => { if (err) go(list.slice(1)); }); } catch { go(list.slice(1)); } }; go(reveal.cmds(file)); },
1004
1059
  };
1005
- let audioOwner = { id: null, seen: 0 };
1060
+ // Which window plays sound, in a file next to the settings: each VS Code window has its own server, and two windows with the call open both spoke.
1061
+ const AUDIO = path.join(path.dirname(PREFS), 'audio.json');
1062
+ let audioMem = { id: null, seen: 0 }, audioFile = true; // audioFile false: the file cannot be written (a read-only folder), this server keeps the owner itself as it used to
1063
+ const audioOwner = () => { if (!audioFile) return audioMem; try { const a = JSON.parse(fs.readFileSync(AUDIO, 'utf8')); if (a && typeof a.id === 'string') return { id: a.id, seen: Math.min(+a.seen || 0, Date.now()) }; } catch {} return { id: null, seen: 0 }; }; // min: a clock set back left a time to come, and the owner never expired
1064
+ const audioSave = (a) => { audioMem = a; try { fs.mkdirSync(path.dirname(AUDIO), { recursive: true }); const t = AUDIO + '.' + process.pid; fs.writeFileSync(t, JSON.stringify(a)); fs.renameSync(t, AUDIO); } catch { audioFile = false; } }; // whole or not at all: another server may read it at that moment
1006
1065
  function start(port = PORT) {
1007
1066
  return http.createServer((req, res) => {
1008
1067
  let url; try { url = new URL(req.url, 'http://x'); } catch { res.writeHead(400); return res.end('bad request'); } // "GET //" is not an address: answered, where it used to stop the whole server
1009
1068
  req.on('error', () => {}); res.on('error', () => {}); // a browser that goes away mid-request is not our problem
1010
1069
  // Only the local machine may talk to this server: blocks other websites (cross-site requests) and DNS-rebinding attempts.
1011
1070
  const local = (h) => /^(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/.test(h || '');
1012
- let originOk = true; try { originOk = !req.headers.origin || local(new URL(req.headers.origin).host); } catch { originOk = false; }
1071
+ let originOk = true; try { originOk = !req.headers.origin || (local(new URL(req.headers.origin).host) && new URL(req.headers.origin).host === req.headers.host); } catch { originOk = false; } // the page's own address: another local page (a dev server on another port) is another site
1013
1072
  if (!local(req.headers.host) || !originOk) { res.writeHead(403); return res.end('forbidden'); }
1014
1073
  const json = (o, code = 200) => { try { res.writeHead(code, { 'content-type': 'application/json' }); res.end(JSON.stringify(o)); } catch { res.destroy(); } }; // also called from callbacks that run later, where nothing would catch an exception
1015
1074
  const sendFile = (fp) => { const s = fs.createReadStream(fp); s.on('error', () => res.destroy()); s.pipe(res); }; // a file that vanished between the check and the read ends this answer, not the server
@@ -1033,10 +1092,11 @@ function start(port = PORT) {
1033
1092
  }
1034
1093
  if (url.pathname === '/api/audio') { // only one window at a time plays sound: the last one that claimed it (expires if that window stops answering)
1035
1094
  const cid = url.searchParams.get('cid') || '', ok = /^[\w-]{4,40}$/.test(cid);
1036
- if (ok && url.searchParams.get('claim')) audioOwner = { id: cid, seen: Date.now() };
1037
- else if (ok && audioOwner.id === cid) audioOwner.seen = Date.now();
1038
- if (audioOwner.id && Date.now() - audioOwner.seen > 6000) audioOwner = { id: null, seen: 0 };
1039
- return json({ owner: audioOwner.id });
1095
+ const now = Date.now(); let a = audioOwner();
1096
+ if (ok && url.searchParams.get('claim')) audioSave((a = { id: cid, seen: now }));
1097
+ else if (ok && a.id === cid && now - a.seen > 2000) audioSave((a = { id: cid, seen: now })); // the owner says it is still there, written every 2 s at most
1098
+ if (a.id && now - a.seen > 6000) a = { id: null, seen: 0 };
1099
+ return json({ owner: a.id });
1040
1100
  }
1041
1101
  if (url.pathname === '/api/health') return json({ claude: findClaude(), apiKey: !!process.env.ANTHROPIC_API_KEY, trError: lastTrError, platform: process.platform });
1042
1102
  if (url.pathname === '/api/warm') { const lang = trLang(url.searchParams.get('lang')); trWorkers.forEach((w) => { if (!w.p) w.start(lang); }); return json({ ok: true }); }
@@ -1115,19 +1175,25 @@ function start(port = PORT) {
1115
1175
  let f = ''; try { f = decodeURIComponent(pk ? pk[2] : url.pathname.slice('/characters/'.length)); } catch {}
1116
1176
  const dir = pk ? packDir(pk[1]) : charactersDir(), fp = path.join(dir, f);
1117
1177
  try { const ls = fs.lstatSync(fp); if (!CHAR_NAME.test(f) || !fp.startsWith(dir + path.sep) || !ls.isFile() || ls.size > CHAR_MAX) throw 0; } catch { res.writeHead(404); return res.end('not found'); }
1118
- res.writeHead(200, { 'content-type': CHAR_TYPES[f.split('.').pop().toLowerCase()] || 'application/octet-stream', 'cache-control': 'no-cache' }); return sendFile(fp);
1178
+ res.writeHead(200, { 'content-type': CHAR_TYPES[f.split('.').pop().toLowerCase()] || 'application/octet-stream', 'cache-control': 'no-cache', 'x-content-type-options': 'nosniff' }); return sendFile(fp);
1119
1179
  }
1120
1180
  const file = path.join(PUBLIC, url.pathname === '/' ? 'index.html' : url.pathname);
1121
1181
  let fst = null; try { fst = fs.statSync(file); } catch {}
1122
1182
  if (!file.startsWith(PUBLIC + path.sep) || !fst || !fst.isFile()) { res.writeHead(404); return res.end('not found'); }
1123
1183
  // The only frame of the page is the window of an artifact, served from here. Without this line a page shown there could take its own frame to another site, and send out what it holds in the address.
1124
- res.writeHead(200, { 'content-type': MIME[path.extname(file)] || 'application/octet-stream', ...(path.extname(file) === '.html' ? { 'content-security-policy': "frame-src 'self'" } : {}) });
1184
+ res.writeHead(200, { 'content-type': MIME[path.extname(file)] || 'application/octet-stream', ...(path.extname(file) === '.html' ? { 'content-security-policy': "frame-src 'self'; object-src 'none'; base-uri 'none'; form-action 'none'" } : {}) });
1125
1185
  res.end(fs.readFileSync(file));
1126
1186
  } catch (e) { logError(req.method + ' ' + url.pathname, e); if (res.headersSent) return res.destroy(); json({ error: String(e.message || e) }, 500); }
1127
1187
  }).listen(port, '127.0.0.1', function () { console.log(`Agent Standup → http://localhost:${this.address().port}`); });
1128
1188
  }
1129
- module.exports = { start, currentSession, shutdown, findClaude, bundledClaude, boardRows, sessionRows: listSessions, charactersDir, listCharacters, packsDir, installPack, logError, _reveal: reveal, _scrub: { tidy, homeRe }, _artifact: { page: artifactPage, csp: artifactCsp } };
1130
- if (require.main === module) {
1189
+ module.exports = { _winArg: winArg, start, currentSession, shutdown, findClaude, bundledClaude, boardRows, sessionRows: listSessions, charactersDir, listCharacters, packsDir, installPack, logError, _reveal: reveal, _scrub: { tidy, homeRe }, _artifact: { page: artifactPage, csp: artifactCsp } };
1190
+ if (require.main === module && process.env.AGENT_STANDUP_CHILD === '1' && typeof process.send === 'function') { // started by the VS Code extension in a process of its own (see extension.js): reading a large session no longer stops the editor's extensions. Asked for by name: pm2 and others give any app a channel too
1191
+ const srv = start(+process.env.PORT || 0), tell = (m) => { try { process.send(m); } catch {} };
1192
+ srv.on('listening', () => tell({ port: srv.address().port })).on('error', (e) => { tell({ error: e.code || String(e) }); process.exit(1); });
1193
+ process.on('message', (m) => { if (m && m.env && typeof m.env === 'object') for (const [k, v] of Object.entries(m.env)) { if (v == null) delete process.env[k]; else process.env[k] = String(v); } }); // a setting changed in the editor (claudePath, codex, vibe…)
1194
+ process.on('disconnect', () => { try { shutdown(); } catch {} process.exit(0); }); // the editor window closed, or its extension host ended: this server ends with it
1195
+ process.on('uncaughtException', (e) => logError('crash', e)); process.on('unhandledRejection', (e) => logError('promise', e)); // written down and gone on, as in the extension host it ran in before: one odd request does not end the call
1196
+ } else if (require.main === module) {
1131
1197
  start().on('error', (e) => {
1132
1198
  console.error(e.code === 'EADDRINUSE' ? `Port ${PORT} is already in use (maybe Agent Standup is already running, e.g. inside VS Code). Try: PORT=4790 node server.js` : String(e));
1133
1199
  process.exit(1);
package/vibe.js CHANGED
@@ -73,7 +73,8 @@ function meta(dir) {
73
73
  }
74
74
  // The sessions a person started, newest first, each with the folder it was started in.
75
75
  function sessions(limit = 80) { return scan().rows.slice(0, limit).map((r) => { const m = meta(r.dir); return { ...r, cwd: m.cwd, key: dirKey(m.cwd) }; }); } // meta.json is written in both formats
76
- const inProject = (id, key) => { const r = row(id); if (!r || !key) return false; if (key === PROJ) return true; const d = dirKey(meta(r.dir).cwd); return d === key || d.startsWith(key + '-'); };
76
+ const under = (cwd, key) => { for (let d = String(cwd || ''); d;) { if (dirKey(d) === key) return true; const up = path.dirname(d); if (up === d) return false; d = up; } return false; }; // key is the folder itself or one above it: a dashed name alone cannot tell app/old (inside app) from app-old (beside it)
77
+ const inProject = (id, key) => { const r = row(id); if (!r || !key) return false; if (key === PROJ) return true; const c = meta(r.dir).cwd, d = dirKey(c); return d === key || (d.startsWith(key + '-') && under(c, key)); };
77
78
  const cwd = (id) => { const r = row(id); return r ? meta(r.dir).cwd : ''; }; // the folder the session was started in: where a file it names by a relative path is
78
79
  const projectLabel = (cwd) => { const h = os.homedir(), rel = cwd && cwd.startsWith(h + path.sep) ? cwd.slice(h.length + 1) : cwd; return 'Mistral Vibe' + (rel ? ' · ' + rel.split(path.sep).join('/') : ''); };
79
80