@double_geste/agent-standup 1.47.0 → 1.47.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/kokoro.js CHANGED
@@ -92,24 +92,29 @@ function install(o = {}) {
92
92
  let dl = null, dlError = '';
93
93
  function get(url, file, [, size, sha], hops = 0) {
94
94
  return new Promise((resolve, reject) => {
95
+ let abort = null; // set once the answer is coming in: from then on every failure goes through fail(), so the half file is gone before the answer
95
96
  const req = (url.startsWith('http:') ? http : https).get(url, { headers: /* http: only the tests' local server */ { 'user-agent': 'agent-standup' } }, (res) => {
96
97
  if ([301, 302, 303, 307, 308].includes(res.statusCode) && res.headers.location && hops < 6) { res.resume(); return get(new URL(res.headers.location, url).href, file, [, size, sha], hops + 1).then(resolve, reject); } // Hugging Face hands the large files to its CDN
97
98
  if (res.statusCode !== 200) { res.resume(); return reject(new Error('HTTP ' + res.statusCode)); }
98
99
  const h = crypto.createHash('sha256'), part = file + '.part', out = fs.createWriteStream(part); let n = 0;
99
- const fail = (e) => { res.destroy(); out.destroy(); fs.rm(part, { force: true }, () => {}); reject(e); };
100
- res.on('data', (d) => { h.update(d); n += d.length; if (dl) dl.done += d.length; }); res.on('error', fail); out.on('error', fail);
100
+ let failed = false; const fail = abort = (e) => { if (failed) return; failed = true; /* the first cause is the one told: a cut connection also makes the half file say "write after destroyed" */ res.destroy(); const gone = () => fs.rm(part, { force: true }, () => reject(e)); if (out.closed) gone(); else { out.once('close', gone); out.destroy(); } }; // the half file is gone before the answer: a second try starts a new one of the same name
101
+ res.on('data', (d) => { h.update(d); n += d.length; if (dl) dl.done += d.length; }); res.on('error', (e) => fail(e && e.message === 'aborted' ? new Error('connection cut') : e)); out.on('error', fail); // 'aborted' is what node says of a connection reset mid-body
101
102
  res.on('close', () => { if (!res.complete) fail(new Error('connection cut')); });
102
103
  out.on('finish', () => { if (n !== size || h.digest('hex') !== sha) return fail(new Error('a file arrived damaged')); try { fs.renameSync(part, file); resolve(); } catch (e) { fail(e); } });
103
104
  res.pipe(out);
104
105
  });
105
- req.on('error', reject); req.setTimeout(60e3, () => req.destroy(new Error('no answer from Hugging Face')));
106
+ req.on('error', (e) => (abort ? abort(e) : reject(e))); req.setTimeout(60e3, () => req.destroy(new Error('no answer from Hugging Face')));
106
107
  });
107
108
  }
109
+ const CUT = /connection cut|no answer|ECONNRESET|ECONNABORTED|EPIPE|ETIMEDOUT|EAI_AGAIN|socket hang up|HTTP 5\d\d/; // a cut connection, a stalled one or a server error: worth another try; a missing file (HTTP 404, and other 4xx), an address that does not resolve or a refused connection (ENOTFOUND, ECONNREFUSED) or a damaged file is not
110
+ async function getRetrying(url, to, f) { // up to three tries a file, a short pause between them, the progress taken back to where the file began
111
+ for (let at = 1, from = dl ? dl.done : 0; ; at++) { try { return await get(url, to, f); } catch (e) { if (at >= 3 || !CUT.test(String((e && (e.code || e.message)) || e))) throw e; if (dl) dl.done = from; await new Promise((r) => setTimeout(r, 1000 * at)); } }
112
+ }
108
113
  const SETS = { st: { files: ST_FILES, url: () => ST_URL, at: (f) => path.join(ST_DIR, f) }, zh: { files: ZH_FILES, url: () => ZH_URL, at: zhPath } };
109
114
  function fetchSets(names) {
110
115
  dlError = ''; const todo = []; for (const n of names) { const S = SETS[n]; for (const f of S.files) if (size(S.at(f[0])) !== f[1]) todo.push([S.url() + f[0], S.at(f[0]), f]); }
111
116
  dl = { done: 0, total: todo.reduce((n, t) => n + t[2][1], 0) };
112
- (async () => { for (const [url, to, f] of todo) { fs.mkdirSync(path.dirname(to), { recursive: true }); await get(url, to, f); } })()
117
+ (async () => { for (const [url, to, f] of todo) { fs.mkdirSync(path.dirname(to), { recursive: true }); await getRetrying(url, to, f); } })()
113
118
  .then(() => { dl = null; }, (e) => { dl = null; dlError = 'download: ' + String((e && e.message) || e).slice(0, 120); });
114
119
  }
115
120
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@double_geste/agent-standup",
3
- "version": "1.47.0",
3
+ "version": "1.47.1",
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
@@ -1640,7 +1640,7 @@ function paintStates() {
1640
1640
  if (st.k === 'done' && was && was !== 'done' && was !== 'idle') { pr.textContent = '🎉'; pr.className = 'prop cheer'; if (shown) oneShot(t, 'yay', 950); setTimeout(() => { if (pr.classList.contains('cheer')) { pr.textContent = ''; pr.className = 'prop'; } }, 1200); }
1641
1641
  else if (!pr.classList.contains('cheer')) { if (pr.textContent !== want) pr.textContent = want; const pc = 'prop ' + (want ? st.k : ''); if (pr.className !== pc) pr.className = pc; }
1642
1642
  if (shown && !S.gone.has(p.id)) ros.push({ p, st });
1643
- if (p.id === 'main' && st.k === 'done' && was && was !== 'done' && was !== 'idle' && S.live && S.playing) { S.wrap = was; if (Date.now() - (S.mainBusyAt || 0) > 45000) confetti(); if (S.mainBusyAt) coffeeAsk(S.mainBusyAt); } // the lead is done, its face says so: it always has a word for it (see wrapUp, which needs to know what it was doing just before), and confetti after a long turn
1643
+ if (p.id === 'main' && st.k === 'done' && was && was !== 'done' && was !== 'idle' && S.live && S.playing) { S.wrap = was; if (Date.now() - (S.mainBusyAt || 0) > 45000) confetti(); if (S.mainBusyAt && !rateAsk(S.mainBusyAt)) coffeeAsk(S.mainBusyAt); } // the lead is done, its face says so: it always has a word for it (see wrapUp, which needs to know what it was doing just before), and confetti after a long turn
1644
1644
  if (p.id === 'main') { if (st.k === 'working' || st.k === 'waiting') S.mainBusyAt = S.mainBusyAt || Date.now(); else if (st.k === 'done') S.mainBusyAt = 0; }
1645
1645
  S.prevState[p.id] = st.k; const tip = `${p.name} — ${p.role}${st.txt ? '\n' + st.txt : ''}${S.lastTool[p.id] ? '\n' + S.lastTool[p.id] : ''}`; if (t.title !== tip) t.title = tip;
1646
1646
  }
@@ -2492,7 +2492,7 @@ $('#mCoffee').onclick = () => { $('#menu').classList.remove('on'); openExternal(
2492
2492
  // is in view, a tip by the menu; "Later" asks again a week later, one time; the star and "No thanks" end it. The days are kept in the settings file; nothing is sent.
2493
2493
  $('#mRate').onclick = () => { $('#menu').classList.remove('on'); rateGo(); };
2494
2494
  function rateGo() { rateEnd(); if (EMBED && APP.kind === 'editor') window.parent.postMessage({ agentStandup: 'rate' }, '*'); else openExternal(APP.rate); }
2495
- const rateEnd = () => { prefs.rateDone = utcDay(); savePrefs(); $('#rateTip').style.display = 'none'; };
2495
+ const rateEnd = () => { prefs.rateDone = utcDay(); savePrefs(); $('#rateTip').style.display = 'none'; rateAsk.done = true; clearTimeout(rateAsk.t); }; /* rateAsk.done: rated or declined in this page, its line never shows; not prefs.rateDone, which a star given in the desktop app also sets */
2496
2496
  const RATE_ASKS = (APP.kind === 'desktop' || APP.kind === 'cli' || APP.kind === 'plugin') && !EMBED && !Q.get('demo'), utcDay = () => new Date().toISOString().slice(0, 10);
2497
2497
  // One ask a day at most, and none the first day the call is in view (prefs.firstDay): the star, the coffee and the pack each wait for a day nothing else was asked (prefs.askDay, and which one in askWhat, so the same ask can show again that day).
2498
2498
  // The real voices are not an ask but an offer of the app itself: they keep their line until answered, and step aside on the few days the Halloween pack's line shows (not while they download).
@@ -2505,13 +2505,26 @@ function rateDay() { // a day of use: the page in view that day
2505
2505
  }
2506
2506
  function rateTip() {
2507
2507
  const t = $('#rateTip'); if (!RATE_ASKS || prefs.rateDone || firstDay() || askedToday('rate') || (+prefs.rateDays || 0) < 3 || (prefs.rateLater && utcDay() < prefs.rateLater) || $('#menuTip').style.display !== 'none' || $('#usageTip').style.display !== 'none' || $('#updTip').style.display !== 'none' || $('#menu').classList.contains('on')) { t.style.display = 'none'; return; }
2508
- const r = $('#bMenu').getBoundingClientRect(); if (!r.width) return;
2509
- $('#rateTipT').textContent = L('Agent Standup vous plaît ? Une étoile sur GitHub aide d’autres personnes à le trouver.', 'Enjoying Agent Standup? A star on GitHub helps other people find it.');
2510
- $('#rateYes').textContent = L('⭐ Mettre une étoile', '⭐ Star it'); $('#rateLater').textContent = L('Plus tard', 'Later'); $('#rateNo').textContent = L('Non merci', 'No thanks');
2511
- rateTip.seen = utcDay(); noteAsk('rate'); t.style.display = ''; t.style.top = Math.round(r.bottom + 10) + 'px'; t.style.right = Math.max(8, Math.round(innerWidth - r.right - 6)) + 'px'; t.style.setProperty('--ax', Math.max(8, Math.round(r.width / 2 - 2)) + 'px');
2508
+ rateShow();
2509
+ }
2510
+ function rateShow() { // the tip by the menu: a star on GitHub, or in the editor a rating on the store it installs from
2511
+ const t = $('#rateTip'), r = $('#bMenu').getBoundingClientRect(); if (!r.width) return false;
2512
+ $('#rateTipT').textContent = RATE_ED ? L('Agent Standup vous plaît ? Une note aide d’autres personnes à le trouver.', 'Enjoying Agent Standup? A rating helps other people find it.') : L('Agent Standup vous plaît ? Une étoile sur GitHub aide d’autres personnes à le trouver.', 'Enjoying Agent Standup? A star on GitHub helps other people find it.');
2513
+ $('#rateYes').textContent = RATE_ED ? L('⭐ Noter', '⭐ Rate it') : L('⭐ Mettre une étoile', '⭐ Star it'); $('#rateLater').textContent = L('Plus tard', 'Later'); $('#rateNo').textContent = L('Non merci', 'No thanks');
2514
+ rateTip.seen = utcDay(); noteAsk('rate'); t.style.display = ''; t.style.top = Math.round(r.bottom + 10) + 'px'; t.style.right = Math.max(8, Math.round(innerWidth - r.right - 6)) + 'px'; t.style.setProperty('--ax', Math.max(8, Math.round(r.width / 2 - 2)) + 'px'); return true;
2515
+ }
2516
+ // In the editor the extension keeps the days and the answers (noteUse in extension.js); when a rating is due it opens the call with &rate=1, and the call asks once, in this line,
2517
+ // at the end of a run followed live (the lead at work for 2 minutes, its turn closed, 8 s for the confetti and its last word): a moment the call has just been worth watching.
2518
+ // Never the first day, never the day the coffee or the notification asked; shown, it counts as asked (rateShown); the star opens the store, "No thanks" ends it. Nothing is sent.
2519
+ const RATE_ED = APP.kind === 'editor' && EMBED && !Q.get('demo');
2520
+ function rateAsk(busyAt) {
2521
+ if (!RATE_ED || !(rateAsk.on || Q.get('rate') === '1') || rateAsk.done || firstDay() || askedToday('rate') || document.hidden || !S.turnOver || Date.now() - busyAt < 2 * 60e3) return false;
2522
+ rateAsk.done = true; clearTimeout(rateAsk.t);
2523
+ rateAsk.t = setTimeout(() => { if (document.hidden || !S.turnOver || $('#menu').classList.contains('on') || [$('#menuTip'), $('#usageTip'), $('#updTip'), $('#coffeeTip')].some((x) => x.style.display !== 'none') || agentState('main', Date.now()).k !== 'done' || !rateShow()) { rateAsk.done = false; return; } window.parent.postMessage({ agentStandup: 'rateShown' }, '*'); }, 8000);
2524
+ return true;
2512
2525
  }
2513
- $('#rateYes').onclick = rateGo; $('#rateNo').onclick = rateEnd;
2514
- $('#rateLater').onclick = () => { if (prefs.rateLater) return rateEnd(); prefs.rateLater = new Date(Date.parse(utcDay()) + 7 * 864e5).toISOString().slice(0, 10); savePrefs(); $('#rateTip').style.display = 'none'; };
2526
+ $('#rateYes').onclick = rateGo; $('#rateNo').onclick = () => { rateEnd(); if (RATE_ED) window.parent.postMessage({ agentStandup: 'rateNo' }, '*'); };
2527
+ $('#rateLater').onclick = () => { if (RATE_ED) { $('#rateTip').style.display = 'none'; return; } /* the editor keeps the days: it asks again a week later (rateShown in extension.js) */ if (prefs.rateLater) return rateEnd(); prefs.rateLater = new Date(Date.parse(utcDay()) + 7 * 864e5).toISOString().slice(0, 10); savePrefs(); $('#rateTip').style.display = 'none'; };
2515
2528
  document.addEventListener('visibilitychange', rateDay); setInterval(rateDay, 3600e3); // the desktop window can stay open for days
2516
2529
  // ☕ Once, at the end of a run the call followed live (the lead at work for 3 minutes, or 3 agents at work in that turn, and the turn closed by its end mark), from the second day the call has been in view.
2517
2530
  // Never twice ("No thanks", the coffee or nothing at all end it), never the day the star is asked, never in a demo. The days are kept in the settings file; nothing is sent.
@@ -3238,6 +3251,8 @@ setInterval(async () => {
3238
3251
 
3239
3252
  window.addEventListener('message', (e) => { // VS Code asks for a given session: the one the status bar was clicked for, or the one of the Claude Code tab you went to (the message is named 'pin' on both sides, from when the call was pinned there)
3240
3253
  const d = e.data; if (EMBED && e.source === window.parent && d && d.agentStandup === 'lead' && typeof d.name === 'string') { APP.lead = d.name.slice(0, 100); leadField(); renameLead(); return; } // agentStandup.leadName changed in the editor
3254
+ if (EMBED && e.source === window.parent && d && d.agentStandup === 'rateOff') { rateAsk.done = true; clearTimeout(rateAsk.t); return; } // the editor's notification asked today: never the line too
3255
+ if (EMBED && e.source === window.parent && d && d.agentStandup === 'rateOn') { rateAsk.on = true; return; } // a rating became due while this call was open
3241
3256
  if (EMBED && e.source === window.parent && d && d.agentStandup === 'answered' && d.how === 'app' && typeof d.app === 'string') { toast('✋ ' + L('Elle vous attend dans ', 'Waiting for you in ') + d.app.slice(0, 40)); return; } // the extension opened the terminal or app the session runs in (answerAt)
3242
3257
  if (!EMBED || e.source !== window.parent || !d || d.agentStandup !== 'pin' || typeof d.id !== 'string') return;
3243
3258
  if (d.tab) { if (prefs.followTab !== false && S.live && !S.demo && typeof d.proj === 'string' && !(S.pick && S.pick.pin)) goSession(d.proj, d.id); return; } // the Claude Code tab you went to: the call goes with you (followTab in extension.js; off in ⚙), unless you pinned a call (📌): that one stays while you go through your tabs
@@ -333,7 +333,9 @@
333
333
  "⭐ Rate Agent Standup": "⭐ Bedøm Agent Standup",
334
334
  "⭐ Star Agent Standup on GitHub": "⭐ Giv Agent Standup en stjerne på GitHub",
335
335
  "⭐ Star it": "⭐ Giv en stjerne",
336
+ "⭐ Rate it": "⭐ Bedøm",
336
337
  "Enjoying Agent Standup? A star on GitHub helps other people find it.": "Kan du lide Agent Standup? En stjerne på GitHub hjælper andre med at finde det.",
338
+ "Enjoying Agent Standup? A rating helps other people find it.": "Kan du lide Agent Standup? En bedømmelse hjælper andre med at finde det.",
337
339
  "Later": "Senere",
338
340
  "No thanks": "Nej tak",
339
341
  "Model": "Model",
@@ -334,7 +334,9 @@
334
334
  "⭐ Rate Agent Standup": "⭐ Agent Standup bewerten",
335
335
  "⭐ Star Agent Standup on GitHub": "⭐ Agent Standup auf GitHub einen Stern geben",
336
336
  "⭐ Star it": "⭐ Stern geben",
337
+ "⭐ Rate it": "⭐ Bewerten",
337
338
  "Enjoying Agent Standup? A star on GitHub helps other people find it.": "Gefällt dir Agent Standup? Ein Stern auf GitHub hilft anderen, es zu finden.",
339
+ "Enjoying Agent Standup? A rating helps other people find it.": "Gefällt dir Agent Standup? Eine Bewertung hilft anderen, es zu finden.",
338
340
  "Later": "Später",
339
341
  "No thanks": "Nein danke",
340
342
  "Model": "Modell",
@@ -15,6 +15,7 @@
15
15
  "☕ Buy the dev a coffee": "☕ Buy the dev a coffee",
16
16
  "⚙ All settings (display, alerts…)": "⚙ All settings (display, alerts…)",
17
17
  "⭐ Rate Agent Standup": "⭐ Rate Agent Standup",
18
+ "⭐ Rate it": "⭐ Rate it",
18
19
  "⭐ Star Agent Standup on GitHub": "⭐ Star Agent Standup on GitHub",
19
20
  "⭐ Star it": "⭐ Star it",
20
21
  "🎞 Export video": "🎞 Export video",
@@ -118,6 +119,7 @@
118
119
  "effort": "effort",
119
120
  "Empty or too long message (4000 characters at most)": "Empty or too long message (4000 characters at most)",
120
121
  "Empty: use the default name.": "Empty: use the default name.",
122
+ "Enjoying Agent Standup? A rating helps other people find it.": "Enjoying Agent Standup? A rating helps other people find it.",
121
123
  "Enjoying Agent Standup? A star on GitHub helps other people find it.": "Enjoying Agent Standup? A star on GitHub helps other people find it.",
122
124
  "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.",
123
125
  "EPISODE 1": "EPISODE 1",
@@ -334,7 +334,9 @@
334
334
  "⭐ Rate Agent Standup": "⭐ Valorar Agent Standup",
335
335
  "⭐ Star Agent Standup on GitHub": "⭐ Dar una estrella a Agent Standup en GitHub",
336
336
  "⭐ Star it": "⭐ Dar una estrella",
337
+ "⭐ Rate it": "⭐ Valorar",
337
338
  "Enjoying Agent Standup? A star on GitHub helps other people find it.": "¿Te gusta Agent Standup? Una estrella en GitHub ayuda a que otros lo encuentren.",
339
+ "Enjoying Agent Standup? A rating helps other people find it.": "¿Te gusta Agent Standup? Una valoración ayuda a que otros lo encuentren.",
338
340
  "Later": "Más tarde",
339
341
  "No thanks": "No, gracias",
340
342
  "Model": "Modelo",
@@ -334,7 +334,9 @@
334
334
  "⭐ Rate Agent Standup": "⭐ Agent Standup を評価する",
335
335
  "⭐ Star Agent Standup on GitHub": "⭐ GitHub で Agent Standup にスターを付ける",
336
336
  "⭐ Star it": "⭐ スターを付ける",
337
+ "⭐ Rate it": "⭐ 評価する",
337
338
  "Enjoying Agent Standup? A star on GitHub helps other people find it.": "Agent Standup を気に入っていただけましたか?GitHub でスターを付けていただけると、ほかの人が見つけやすくなります。",
339
+ "Enjoying Agent Standup? A rating helps other people find it.": "Agent Standup を気に入っていただけましたか?評価をいただけると、ほかの人が見つけやすくなります。",
338
340
  "Later": "後で",
339
341
  "No thanks": "結構です",
340
342
  "Model": "モデル",
@@ -334,7 +334,9 @@
334
334
  "⭐ Rate Agent Standup": "⭐ Agent Standup 평가하기",
335
335
  "⭐ Star Agent Standup on GitHub": "⭐ GitHub에서 Agent Standup에 별 주기",
336
336
  "⭐ Star it": "⭐ 별 주기",
337
+ "⭐ Rate it": "⭐ 평가하기",
337
338
  "Enjoying Agent Standup? A star on GitHub helps other people find it.": "Agent Standup이 마음에 드시나요? GitHub에 별을 남겨 주시면 다른 분들이 찾는 데 도움이 됩니다.",
339
+ "Enjoying Agent Standup? A rating helps other people find it.": "Agent Standup이 마음에 드시나요? 평가를 남겨 주시면 다른 분들이 찾는 데 도움이 됩니다.",
338
340
  "Later": "나중에",
339
341
  "No thanks": "괜찮습니다",
340
342
  "Model": "모델",
@@ -334,7 +334,9 @@
334
334
  "⭐ Rate Agent Standup": "⭐ Avaliar o Agent Standup",
335
335
  "⭐ Star Agent Standup on GitHub": "⭐ Dar uma estrela ao Agent Standup no GitHub",
336
336
  "⭐ Star it": "⭐ Dar uma estrela",
337
+ "⭐ Rate it": "⭐ Avaliar",
337
338
  "Enjoying Agent Standup? A star on GitHub helps other people find it.": "Está gostando do Agent Standup? Uma estrela no GitHub ajuda outras pessoas a encontrá-lo.",
339
+ "Enjoying Agent Standup? A rating helps other people find it.": "Está gostando do Agent Standup? Uma avaliação ajuda outras pessoas a encontrá-lo.",
338
340
  "Later": "Mais tarde",
339
341
  "No thanks": "Não, obrigado",
340
342
  "Model": "Modelo",
@@ -334,7 +334,9 @@
334
334
  "⭐ Rate Agent Standup": "⭐ 为 Agent Standup 评分",
335
335
  "⭐ Star Agent Standup on GitHub": "⭐ 在 GitHub 上为 Agent Standup 加星",
336
336
  "⭐ Star it": "⭐ 加星",
337
+ "⭐ Rate it": "⭐ 去评分",
337
338
  "Enjoying Agent Standup? A star on GitHub helps other people find it.": "喜欢 Agent Standup 吗?在 GitHub 上加颗星能帮助更多人发现它。",
339
+ "Enjoying Agent Standup? A rating helps other people find it.": "喜欢 Agent Standup 吗?留下评分能帮助更多人发现它。",
338
340
  "Later": "以后再说",
339
341
  "No thanks": "不用了",
340
342
  "Model": "模型",
@@ -334,7 +334,9 @@
334
334
  "⭐ Rate Agent Standup": "⭐ 為 Agent Standup 評分",
335
335
  "⭐ Star Agent Standup on GitHub": "⭐ 在 GitHub 上為 Agent Standup 加星",
336
336
  "⭐ Star it": "⭐ 加星",
337
+ "⭐ Rate it": "⭐ 去評分",
337
338
  "Enjoying Agent Standup? A star on GitHub helps other people find it.": "喜歡 Agent Standup 嗎?在 GitHub 上加顆星能幫助更多人發現它。",
339
+ "Enjoying Agent Standup? A rating helps other people find it.": "喜歡 Agent Standup 嗎?留下評分能幫助更多人發現它。",
338
340
  "Later": "以後再說",
339
341
  "No thanks": "不用了",
340
342
  "Model": "模型",