@double_geste/agent-standup 1.41.0 → 1.41.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/package.json +1 -1
- package/public/index.html +5 -4
- package/server.js +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@double_geste/agent-standup",
|
|
3
|
-
"version": "1.41.
|
|
3
|
+
"version": "1.41.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
|
@@ -504,10 +504,10 @@ const Q = new URLSearchParams(location.search);
|
|
|
504
504
|
const EMBED = Q.get('embed') === '1' || window.parent !== window;
|
|
505
505
|
const APP = window.AS_APP && typeof window.AS_APP === 'object' && typeof window.AS_APP.rate === 'string' ? window.AS_APP : { kind: '', rate: 'https://github.com/Atoll92/agent-standup' }; // where this page runs (appKind in server.js)
|
|
506
506
|
|
|
507
|
-
let prefs = { lang: 'en', voice: true, roster:
|
|
507
|
+
let prefs = { lang: 'en', voice: true, roster: false, banter: true, reactions: false, office: false, officeVol: 0.8, vstyle: 'kokoro', notify: false, epi: false, vanish: true, music: false, station: 'fip', musicVol: 0.35, view: 'call', hideCode: false, ownNames: true, visits: true, askCard: false, followTab: true, files: true, callTr: true, voiceVol: 1 };
|
|
508
508
|
const PREF_DEFAULTS = { ...prefs }; // for ⚙ → All settings → Reset to defaults
|
|
509
509
|
{ 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
|
|
510
|
-
const sv = window.SAVED_PREFS && typeof window.SAVED_PREFS === 'object' ? window.SAVED_PREFS : {};
|
|
510
|
+
const sv = window.SAVED_PREFS && typeof window.SAVED_PREFS === 'object' ? window.SAVED_PREFS : {}; const won = (sv._t || 0) > (loc._t || 0) ? sv : loc; Object.assign(prefs, won); if (Object.keys(won).length && !('roster' in won)) prefs.roster = true; /* settings saved before the list could be turned off: it stays as they had it, on */
|
|
511
511
|
if ((+sv.shareUsageT || 0) > (+prefs.shareUsageT || 0)) { prefs.shareUsage = sv.shareUsage; prefs.shareUsageT = sv.shareUsageT; prefs.usageAsked = sv.usageAsked; } } // the usage answer: the newest one, as the server keeps it (this origin's copy may hold an older one)
|
|
512
512
|
const HAD_PREFS = !!prefs._t; // someone who used the app before this page: shown once where the settings went
|
|
513
513
|
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
|
|
@@ -2928,7 +2928,8 @@ setInterval(async () => {
|
|
|
2928
2928
|
S.seq = d.seq; if (d.marks) S.sawEnd = true; if (d.cost && (!S.cost || d.cost.usd !== S.cost.usd || d.cost.final !== S.cost.final)) { S.cost = d.cost; later('tok', renderTokens, 300); } if (!d.events || !d.events.length) return;
|
|
2929
2929
|
for (const a of d.agents) if (!S.agents[a.id]) { S.agents[a.id] = persona(twinOf(a)); addTile(S.agents[a.id]); }
|
|
2930
2930
|
const from = S.events.length, fresh = [], changed = []; // the session is not written in order: what is new goes at the end (the order the call got it in), what the server corrected is corrected in place
|
|
2931
|
-
for (const e of d.events) { const old = S.byK.get(e.k); if (old
|
|
2931
|
+
for (const e of d.events) { const old = S.byK.get(e.k); if (old && old.tools && e.tools) e.tools = e.tools.map((t, j) => (old.tools[j] && old.tools[j].id === t.id ? Object.assign(old.tools[j], t) : t)); /* a call sent again (its plan named by the answer): the same object, which the shared screen holds */
|
|
2932
|
+
if (old) { changed.push([old, { kind: old.kind, n: old.tools ? old.tools.length : 0, end: old.end }]); Object.assign(old, e); } else { S.byK.set(e.k, e); fresh.push(e); } }
|
|
2932
2933
|
if (fresh.some((e) => e.end)) S.sawEnd = true;
|
|
2933
2934
|
if (fresh.length) { S.events = S.events.concat(fresh); stampT(from); $('#seek').max = S.events.length - 1; trNew(from); warmTTS(from); renderLog(false); }
|
|
2934
2935
|
if (S.playing && !S.recomputing) for (const e of fresh) if (e.kind === 'order' && !S.status[e.to]) { S.status[e.to] = 'working'; S.orderTs[e.to] = e.ts || 0; S.gone.delete(e.to); } // a new sub-agent shows up now, while the previous line is still being read
|
|
@@ -3564,7 +3565,7 @@ if (EMBED) $('#mBrowser').style.display = $('#mFollowTab').style.display = '';
|
|
|
3564
3565
|
(async function init() {
|
|
3565
3566
|
if (!prefs.firstDay) { prefs.firstDay = HAD_PREFS ? '2000-01-01' : new Date().toISOString().slice(0, 10); savePrefs(); } // the first day the call is in view asks nothing (see firstDay); someone who used the app before has had theirs
|
|
3566
3567
|
if (!LANGS.some((l) => l[0] === prefs.lang)) prefs.lang = 'en'; await loadLocale(prefs.lang); voiceOffer(); kokoroUI(); await loadChars();
|
|
3567
|
-
document.body.classList.toggle('rost', prefs.roster
|
|
3568
|
+
document.body.classList.toggle('rost', !!prefs.roster); document.body.classList.toggle('react', !!prefs.reactions); document.body.classList.toggle('focusl', !!prefs.focusLayout); setView(prefs.view); menuInit(); addEventListener('click', () => { try { if (prefs.notify && !EMBED && 'Notification' in window && Notification.permission === 'default') Notification.requestPermission(); } catch {} }, { once: true }); applyLang(); applyMute(); TTS.init().then(updateHint);
|
|
3568
3569
|
loadHealth().then(() => { // French by default only if translation can actually work; otherwise stay in English without a warning
|
|
3569
3570
|
const h = S.health || {};
|
|
3570
3571
|
if (!prefs.langChosen && FR() && h.claude === null && !h.apiKey) { prefs.lang = 'en'; applyLang(); }
|
package/server.js
CHANGED
|
@@ -478,7 +478,7 @@ function timelineEntry(proj, id) {
|
|
|
478
478
|
// ---- Live feed. The timeline is sorted again at each build and events already sent can change (an order typed mid-turn is stamped at typing time and lands before what the page has; a sub-agent's last line becomes its report; a tool call joins an earlier beat),
|
|
479
479
|
// so a page cannot ask for "what comes after index n". Every event has a key `k` that never changes, each build that changes something gets the next sequence number, and a page asks for the events that are new or different since the number it holds.
|
|
480
480
|
// `ep` names this memory: it is a new one after a restart, after the session left the cache, or when a transcript was rewritten, and the page then loads the whole session again.
|
|
481
|
-
const sigOf = (e) => e.kind + '|' + e.agent + '|' + (e.to || '') + '|' + (e.end || '') + '|' + (e.kind === 'tools' ? e.tools.length + ':' + e.tools[e.tools.length - 1].id : e.kind === 'usage' ? e.u.i + ',' + e.u.o + ',' + e.u.r + ',' + e.u.w + ',' + e.model : e.kind === 'order' ? e.toolId + ',' + e.bg + ',' + e.title : e.kind === 'finish' ? e.ts : ''); // everything about an event that can differ from one build to the next. Its text, its tool calls, its results and its time never do: they come from one transcript record (same key = same record); and `t` moves only when time zero does, which feedStep looks at once for all
|
|
481
|
+
const sigOf = (e) => e.kind + '|' + e.agent + '|' + (e.to || '') + '|' + (e.end || '') + '|' + (e.kind === 'tools' ? e.tools.length + ':' + e.tools[e.tools.length - 1].id + ':' + e.tools.map((t) => (t.d && t.d.kind === 'plan' ? (t.d.text || '').length + (t.d.text || '').slice(-24) : '')).join(',') : e.kind === 'usage' ? e.u.i + ',' + e.u.o + ',' + e.u.r + ',' + e.u.w + ',' + e.model : e.kind === 'order' ? e.toolId + ',' + e.bg + ',' + e.title : e.kind === 'finish' ? e.ts : ''); // everything about an event that can differ from one build to the next (a plan's text too: its answer names the plan approved). Its text, its tool calls, its results and its time never do: they come from one transcript record (same key = same record); and `t` moves only when time zero does, which feedStep looks at once for all
|
|
482
482
|
function feedStep(prev, tl, files) {
|
|
483
483
|
let f = prev && files.every((x) => { const was = prev.gens.get(x); return was === undefined || was === (fileStates.get(x) || {}).gen; }) ? prev : null; // a transcript read again from its start numbers its events again: the keys no longer mean the same thing
|
|
484
484
|
for (let pass = 0; ; pass++) {
|
|
@@ -532,6 +532,7 @@ const askOf = (b) => { const q = b.name === 'AskUserQuestion' && b.input && Arra
|
|
|
532
532
|
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)
|
|
533
533
|
const PLAN_FILE = /[\\/]\.claude[\\/]plans[\\/][^\\/]+\.md$/, PLAN_DIR = process.env.CLAUDE_CONFIG_DIR ? path.join(process.env.CLAUDE_CONFIG_DIR, 'plans') + path.sep : '';
|
|
534
534
|
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
|
|
535
|
+
const planDoc = (f) => { try { const st = fs.statSync(f); if (!st.isFile() || st.size > 262144) return ''; return clip(fs.readFileSync(f, 'utf8').trim(), 4000); } catch { return ''; } }; // the whole plan, for the shared screen
|
|
535
536
|
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 ''; } };
|
|
536
537
|
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
|
|
537
538
|
const i = b.input || {}, t = (x, n) => (typeof x === 'string' ? clip(x.trim(), n) : '');
|
|
@@ -993,6 +994,7 @@ function parseRecord(st, r) {
|
|
|
993
994
|
for (const b of blocks(r)) if (b.type === 'tool_result' && wf) push({ ts, agent, kind: 'wfrun', toolId: b.tool_use_id, run: wf }); // the answer to a Workflow call names the run it started: its agents are in subagents/workflows/<run>/
|
|
994
995
|
for (const b of blocks(r)) if (b.type === 'tool_result' && (st.toolName[b.tool_use_id] === 'Agent' || st.toolName[b.tool_use_id] === 'Task') && !(st.bg && st.bg[b.tool_use_id]) && !/^\s*Async agent launched/i.test(resultText(b.content))) push({ ts, agent, kind: 'agentdone', toolId: b.tool_use_id }); // a synchronous call: the lead got the sub-agent's answer back, so it has finished (async launches answer immediately and are not a completion)
|
|
995
996
|
const one = blocks(r).filter((b) => b.type === 'tool_result').length === 1; // what Claude Code noted about the call (toolUseResult) is that call's when the record answers one call
|
|
997
|
+
if (one && st.plans && r.toolUseResult && typeof r.toolUseResult.plan === 'string' && r.toolUseResult.plan.trim()) for (const b of blocks(r)) if (b.type === 'tool_result' && st.plans.has(b.tool_use_id)) st.plans.get(b.tool_use_id).d.text = clip(r.toolUseResult.plan.trim(), 4000); // the answer names the plan exactly: the plan file holds only the latest one
|
|
996
998
|
for (const b of blocks(r)) if (b.type === 'tool_result' && st.toolName[b.tool_use_id] && !NO_RESULT.has(st.toolName[b.tool_use_id])) {
|
|
997
999
|
const n = st.toolName[b.tool_use_id], text = resultText(b.content), img = resultImages(b.content).length, files = n === 'Bash' && !b.is_error ? docPaths(text, false).map((f) => absPath(f, r.cwd)) : [], art = !b.is_error && st.pubs && st.pubs.has(b.tool_use_id) ? artOf(st, st.pubs.get(b.tool_use_id), r.toolUseResult, text) : null;
|
|
998
1000
|
items.push({ id: b.tool_use_id, err: !!b.is_error, out: clipOut(text.replace(/<system-reminder>[\s\S]*?<\/system-reminder>/g, '').trimEnd(), RESULT_MAX[n] || (/^mcp__/.test(n) ? 900 : 600)), ...(img ? { img } : {}), ...(files.length ? { files } : {}), ...(art ? { art } : {}), ...(BROWSER_MCP.test(n) && !b.is_error ? browserSeen(text, n) : {}), ...resultMore(n, text, one ? r.toolUseResult : null) }); // img: how many pictures came back; the page fetches them from /api/media · files: the documents a command says it made
|
|
@@ -1019,7 +1021,7 @@ function parseRecord(st, r) {
|
|
|
1019
1021
|
else if (b.type === 'tool_use') {
|
|
1020
1022
|
st.toolName[b.id] = b.name; if (b.name === 'TaskCreate') st.tasks = 1; (st.out = st.out || new Set()).add(b.id); if (b.input && b.input.run_in_background) (st.bg = st.bg || {})[b.id] = true; // out: the calls that have no answer yet
|
|
1021
1023
|
if (b.name === 'Agent' || b.name === 'Task') push({ ts, agent, kind: 'agentcall', toolId: b.id, bg: !!(b.input && b.input.run_in_background), text: (b.input && b.input.prompt) || '', title: (b.input && b.input.description) || '', ...(b.input && typeof b.input.name === 'string' && b.input.name.trim() ? { nm: b.input.name.trim() } : {}) });
|
|
1022
|
-
else { const tool = toolLabel(b, ts); if (tool.d && tool.d.outs) tool.d.outs = tool.d.outs.map((f) => absPath(f, r.cwd)); if (tool.d && tool.d.kind === 'artifact') (st.pubs = st.pubs || new Map()).set(b.id, tool.d.open ? 'open' : tool.d.doc ? 'doc' : 'pub'); push({ ts, agent, kind: 'tool', tool, ...th() }); st.act = st.raw.length - 1; }
|
|
1024
|
+
else { const tool = toolLabel(b, ts); if (tool.d && tool.d.outs) tool.d.outs = tool.d.outs.map((f) => absPath(f, r.cwd)); if (/^(Write|Edit|MultiEdit)$/.test(b.name) && b.input && planFile(String(b.input.file_path || ''))) { st.planF = String(b.input.file_path); st.planW = b.name === 'Write' && typeof b.input.content === 'string' ? { mid: m.id, text: clip(b.input.content.trim(), 4000) } : null; } if (tool.d && tool.d.kind === 'plan') { (st.plans = st.plans || new Map()).set(b.id, tool); if (st.planW && st.planW.mid && st.planW.mid === m.id) tool.d.text = st.planW.text; else if (!tool.d.text && st.planF) tool.d.text = (st.planW && st.planW.text) || planDoc(st.planF); } /* a plan written in the same message as its call: the call carries the one before, or none */ /* Claude Code 2.1.30x sends ExitPlanMode with no plan: the plan is the file the session just wrote in ~/.claude/plans */ if (tool.d && tool.d.kind === 'artifact') (st.pubs = st.pubs || new Map()).set(b.id, tool.d.open ? 'open' : tool.d.doc ? 'doc' : 'pub'); push({ ts, agent, kind: 'tool', tool, ...th() }); st.act = st.raw.length - 1; }
|
|
1023
1025
|
}
|
|
1024
1026
|
}
|
|
1025
1027
|
if (agent === 'main' && (m.stop_reason === 'end_turn' || ((r.isApiErrorMessage || (m.model === '<synthetic>' && m.stop_reason === 'stop_sequence')) && !(st.out && st.out.size)))) { // also a turn that ends on a message Claude Code writes itself, in the place of the model's: the API is down, the limit is reached, the request was refused, or there was nothing to answer. Nothing follows it, unless a call of the lead is still out: the connection dropped while its agents worked, and it goes on when they answer. (A message of the model that a safety check cuts is not the end either: Claude Code tells the model, which goes on.) The lead's turn is over: Claude Code writes one record per content block, each with the message's stop reason, so the mark goes on the line this record carries (a thinking block carries none)
|