ai-agentmanager 1.70.1 → 1.71.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.71.0 (2026-11-24)
4
+
5
+ - **At a glance.** A new **Glance** button in the top bar, and `agentmgr glance`, show every agent on one line, grouped by what it needs from you: needs you now (a prompt, a question it stopped at, a sign-in, an error, stuck), to fix (failing checks, changes requested, a merge conflict, blocked, the same files as another agent), to review (with its Read first level, or a pull request ready to merge), to answer (questions it asked without stopping), working, follow up, tidy up, and idle. Each line says why, from what the app already knows. The badge counts what needs you now and what is to fix, and a click opens the agent. `--all` lists the idle ones too, `-o` writes Markdown, and the command exits with 1 when something needs you.
6
+
7
+ ## 1.70.2 (2026-11-24)
8
+
9
+ - **Split screen: two views that take the lead at once end up at one size.** 1.70.1 stopped sending a view the size it had just set. When two views took the lead at the same moment, each then followed the other's size, and both stayed shrunk. Every view is sent the size the session took again, so they all end up at the last one. A view still ignores a size it sent itself a moment ago, which was the fix for 1.70.1's problem.
10
+
3
11
  ## 1.70.1 (2026-11-24)
4
12
 
5
13
  - **Split screen: a view no longer starts following itself.** The daemon sent a new terminal size back to every view, including the one that set it. When that view fitted itself twice in a row, the first size came back after the second, was taken for another view's, and the view shrank to follow it. The daemon no longer sends a view its own size, and a view ignores a size it sent a moment ago. Found from the sizes the split screen test now reports when it fails.
package/README.md CHANGED
@@ -1465,6 +1465,18 @@ Agents started this way are marked **⚡ GitHub** or **⚡ webhook**, Slack aler
1465
1465
  }
1466
1466
  ```
1467
1467
 
1468
+ ## At a glance: every agent, and what to act on
1469
+
1470
+ **Glance** in the top bar, or `agentmgr glance`, puts every agent on one line, grouped by what it needs from you:
1471
+
1472
+ - **Needs you now**: stopped at a prompt, stopped at a question, waiting for you to sign in, stopped with an error, or stuck.
1473
+ - **To fix**: its pull request has failing checks, requested changes or a merge conflict; it says it is blocked; or it changes the same files as another agent.
1474
+ - **To review**: finished work waiting for review, with its [Read first](#read-first-where-your-attention-goes) level, and pull requests ready to merge.
1475
+ - **To answer**: questions it asked without stopping, still unanswered (the Inbox).
1476
+ - **Working**, **Follow up** (quiet and not finished), **Tidy up** (done, but its session is still open) and **Idle**.
1477
+
1478
+ Each line says why, from what the app already knows; no model is asked. The badge on the button counts what needs you now and what is to fix. Click a line to open the agent. `agentmgr glance --all` lists the idle agents too, `-o glance.md` writes it as Markdown, and the command exits with 1 when something needs you now or is to fix.
1479
+
1468
1480
  ## Read first: where your attention goes
1469
1481
 
1470
1482
  You cannot read everything agents produce with the same care. **Read first** in the top bar, or `agentmgr read-first`, ranks finished work waiting for your review by how much it needs reading.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-agentmanager",
3
- "version": "1.70.1",
3
+ "version": "1.71.0",
4
4
  "description": "Run background coding agents (Claude Code, Codex) per intent, and keep track of them from a web UI, your phone or the CLI",
5
5
  "keywords": [
6
6
  "claude",
package/public/app.js CHANGED
@@ -62,6 +62,7 @@ import { autoNeedHtml, autonomyNeeds, autonomyRow, initAutonomy, needsPermission
62
62
  import { initProof, proofRows } from '/proof.js';
63
63
  import { initWeekly } from '/weekly.js';
64
64
  import { initReadFirst, readFirstRow } from '/readfirst.js';
65
+ import { initGlance } from '/glance.js';
65
66
  import { initUnderstand } from '/understand.js';
66
67
  import { kindHtml, optionsRows, parseKind, parsePaths, parseValue, pathsHtml, privateRow, valueHtml } from '/valuelens.js';
67
68
 
@@ -227,6 +228,7 @@ initWorklog({ api, esc, toast, $ });
227
228
  initWeekly({ api, esc, toast, $, md: (t) => md(t) });
228
229
  const understandUi = initUnderstand({ $, esc, api, toast: (m, ms) => toast(m, ms), openChanges: (id) => (showTab('agents'), select(id), reviewUi.open(id)), agentOf: (id) => agents.get(id) });
229
230
  const readFirstUi = initReadFirst({ $, esc, ago: (t) => ago(t), agents, openAgent: (id) => (showTab('agents'), select(id)), openChanges: (id) => (showTab('agents'), select(id), reviewUi.open(id)), projectOf: (a) => a.projectInfo?.name ?? null, api, toast: (m, ms) => toast(m, ms), understand: (id) => understandUi.open(id) });
231
+ const glanceUi = initGlance({ $, esc, ago: (t) => ago(t), agents, openAgent: (id) => (showTab('agents'), select(id)), readFirst: () => readFirstUi.open() });
230
232
  initSetup({ api, esc, $ });
231
233
  const updateUi = initUpdate({ api, esc, toast, $ });
232
234
  initMenu({ api, esc, toast, $ });
@@ -2808,6 +2810,7 @@ const VIEWS = {
2808
2810
  watch: () => watchUi?.render(),
2809
2811
  groups: () => groupsUi?.render(),
2810
2812
  standup: () => standupUi?.render(),
2813
+ glance: () => glanceUi?.render(),
2811
2814
  };
2812
2815
  const ALL_VIEWS = Object.keys(VIEWS);
2813
2816
 
@@ -4895,7 +4898,7 @@ function handleEvent(msg) {
4895
4898
  if (msg.agent.hunting) bugsUi.changed();
4896
4899
  // The detail, terminal and document views show one agent; another agent's update leaves them be.
4897
4900
  return invalidate([
4898
- 'list', 'backlog', 'land', 'inbox', 'race', 'team',
4901
+ 'list', 'backlog', 'land', 'inbox', 'race', 'team', 'glance',
4899
4902
  ...(watchUi.isOpen() ? ['watch'] : []),
4900
4903
  ...(groupsUi?.count() ? ['groups'] : []),
4901
4904
  ...(standupUi.isOpen() ? ['standup'] : []),
@@ -0,0 +1,175 @@
1
+ // At a glance (top bar): every agent on one line, in groups by what it needs from you: act now,
2
+ // fix, review, answer, working, follow up, tidy up, and idle. Each line says why, from what the app
3
+ // already knows (prompts, questions, stuck findings, pull requests, the Read first ranking,
4
+ // follow-up reminders), so nothing here is a model's guess. The daemon uses the same functions
5
+ // for `agentmgr glance` and /glance.
6
+
7
+ export const GROUPS = {
8
+ act: { label: 'Needs you now', act: 'Answer it' },
9
+ fix: { label: 'To fix', act: 'Look at it' },
10
+ review: { label: 'To review', act: 'Review it' },
11
+ answer: { label: 'To answer', act: 'Answer' },
12
+ working: { label: 'Working', act: null },
13
+ follow: { label: 'Follow up', act: 'Follow up' },
14
+ tidy: { label: 'Tidy up', act: 'Close its session' },
15
+ quiet: { label: 'Idle', act: null },
16
+ };
17
+ const ORDER = Object.keys(GROUPS);
18
+ const LEVEL = { close: 'Read closely', look: 'Look', skim: 'Skim' };
19
+ const plural = (n, one, many = `${one}s`) => `${n} ${n === 1 ? one : many}`;
20
+ const clip = (s, n = 140) => {
21
+ const t = String(s ?? '').replace(/\s+/g, ' ').trim();
22
+ return t.length > n ? `${t.slice(0, n - 1)}…` : t;
23
+ };
24
+ const prNo = (p) => (p.number ? `#${p.number}` : `#${String(p.url ?? '').split('/').pop()}`);
25
+
26
+ /** Why an open pull request needs fixing, in words. */
27
+ function fixWhy(p) {
28
+ const why = [];
29
+ if (p.checks?.state === 'failed') why.push('checks failing');
30
+ if (p.review === 'CHANGES_REQUESTED') why.push('changes requested');
31
+ if (p.mergeable === 'CONFLICTING' || p.mergeState === 'DIRTY') why.push('merge conflict');
32
+ return why.join(', ') || 'needs fixes';
33
+ }
34
+
35
+ /**
36
+ * One agent's line: { group, why: [reasons, the first is the headline], since }. `a` is the
37
+ * agent's view (manager.view): runtime, prs, readFirst, followUp, stuck, questions and so on.
38
+ */
39
+ export function glanceOf(a) {
40
+ const rt = a.runtime ?? {};
41
+ const prs = (Array.isArray(a.prs) ? a.prs : Object.values(a.prs ?? {})).filter((p) => p.source !== 'mentioned');
42
+ const open = prs.filter((p) => p.state === 'OPEN');
43
+ const outcome = a.results?.outcome ?? a.brief?.results?.outcome ?? null;
44
+ const out = { act: [], fix: [], review: [], answer: [], working: [], follow: [], tidy: [] };
45
+
46
+ // Needs you now: it is waiting on you.
47
+ if (rt.attention) out.act.push(`Stopped at a ${String(rt.attention).toLowerCase()}`);
48
+ if (rt.waiting) out.act.push(rt.waiting.state === 'error' ? `Shows an error: ${clip(rt.waiting.summary)}` : `Asks: ${clip(rt.waiting.question || rt.waiting.summary)}`);
49
+ if (a.signIn) out.act.push('Waiting for you to sign in');
50
+ if (a.status === 'error') out.act.push(`Stopped with an error${a.error ? `: ${clip(a.error)}` : ''}`);
51
+ for (const s of a.stuck ?? []) out.act.push(`Looks stuck: ${clip(s.title, 100)}`);
52
+
53
+ // To fix: its work is held up.
54
+ for (const p of open.filter((p) => p.land === 'fix' || fixWhy(p) !== 'needs fixes')) out.fix.push(`Pull request ${prNo(p)}: ${fixWhy(p)}`);
55
+ if (outcome === 'blocked') out.fix.push(`Blocked${a.results?.blockers?.[0]?.text ? `: ${clip(a.results.blockers[0].text)}` : ''}`);
56
+ for (const c of a.conflicts ?? []) out.fix.push(`Changes the same files as ${c.agent?.name ?? 'another agent'}`);
57
+
58
+ // To review: finished, or a pull request ready to merge.
59
+ if (a.readFirst) out.review.push(`${LEVEL[a.readFirst.level]}${a.readFirst.reasons?.[0] ? `: ${clip(a.readFirst.reasons[0].text, 120)}` : ''}`);
60
+ for (const p of open.filter((p) => p.land === 'ready')) out.review.push(`Pull request ${prNo(p)} is ready to merge`);
61
+
62
+ // To answer: questions it asked without stopping (the Inbox), still unanswered.
63
+ const asked = (a.questions ?? []).filter((q) => !q.answer);
64
+ if (asked.length) out.answer.push(`${plural(asked.length, 'question')} it asked without stopping: ${clip(asked[0].question, 100)}`);
65
+
66
+ // Working.
67
+ if (rt.planning) out.working.push('Planning');
68
+ else if (rt.busy) out.working.push('Working');
69
+ if (rt.limited) out.working.push(`Paused at a usage limit${rt.limited.resetAt ? ' until it resets' : ''}`);
70
+ if (a.status === 'preparing') out.working.push('Getting ready');
71
+
72
+ // Follow up, or tidy up (reminders.js).
73
+ if (a.followUp?.kind === 'followup') out.follow.push(a.followUp.title + (a.followUp.detail ? ` (${clip(a.followUp.detail, 100)})` : ''));
74
+ if (a.followUp?.kind === 'close') out.tidy.push(a.followUp.title);
75
+
76
+ const group = ORDER.find((g) => out[g]?.length) ?? 'quiet';
77
+ const why = group === 'quiet' ? [quietWhy(a, prs, outcome)] : [...out[group], ...ORDER.filter((g) => g !== group && g !== 'working').flatMap((g) => out[g] ?? [])];
78
+ return { group, why: [...new Set(why)], since: a.activeAt ?? a.createdAt ?? null };
79
+ }
80
+
81
+ function quietWhy(a, prs, outcome) {
82
+ const merged = prs.filter((p) => p.state === 'MERGED');
83
+ if (merged.length) return `Pull request ${prNo(merged[0])} merged`;
84
+ if (outcome === 'done') return 'Done';
85
+ if (outcome === 'partial') return 'Partly done';
86
+ if (a.runtime?.running) return 'Open, nothing happening';
87
+ return a.status === 'exited' ? 'Its session ended' : 'Stopped';
88
+ }
89
+
90
+ /**
91
+ * Every agent's line, grouped and in order: what needs you first, then by priority and the most
92
+ * recently active. Returns { items, counts, total }.
93
+ */
94
+ export function glance(agents) {
95
+ const items = [...agents]
96
+ .filter((a) => a && a.kind !== 'general')
97
+ .map((a) => ({ id: a.id, name: a.name, kind: a.kind, project: a.projectInfo?.name ?? null, title: clip(String(a.intent ?? '').split('\n')[0], 120), priority: a.priority ?? 2, running: Boolean(a.runtime?.running), ...glanceOf(a) }))
98
+ .sort((x, y) => ORDER.indexOf(x.group) - ORDER.indexOf(y.group) || x.priority - y.priority || String(y.since).localeCompare(String(x.since)));
99
+ const counts = Object.fromEntries(ORDER.map((g) => [g, items.filter((i) => i.group === g).length]));
100
+ return { items, counts, total: items.length };
101
+ }
102
+
103
+ /** One sentence for the whole fleet: "14 agents: 2 need you now, 1 to fix, …". */
104
+ export function glanceLine({ counts, total }) {
105
+ if (!total) return 'No agents yet.';
106
+ const parts = [
107
+ counts.act && `${counts.act} ${counts.act === 1 ? 'needs' : 'need'} you now`,
108
+ counts.fix && `${counts.fix} to fix`,
109
+ counts.review && `${counts.review} to review`,
110
+ counts.answer && `${counts.answer} with questions to answer`,
111
+ counts.working && `${counts.working} working`,
112
+ counts.follow && `${counts.follow} to follow up`,
113
+ counts.tidy && `${counts.tidy} to tidy up`,
114
+ counts.quiet && `${counts.quiet} idle`,
115
+ ].filter(Boolean);
116
+ return `${plural(total, 'agent')}: ${parts.join(', ')}.`;
117
+ }
118
+
119
+ export function glanceMarkdown(g, { all = false } = {}) {
120
+ const out = ['# At a glance', '', glanceLine(g), ''];
121
+ for (const key of ORDER) {
122
+ const list = g.items.filter((i) => i.group === key);
123
+ if (!list.length || (key === 'quiet' && !all)) continue;
124
+ out.push(`## ${GROUPS[key].label} (${list.length})`, '');
125
+ for (const i of list) out.push(`- **${i.name}**${i.project ? ` · ${i.project}` : ''}: ${i.why.join('; ')}`);
126
+ out.push('');
127
+ }
128
+ if (!all && g.counts.quiet) out.push(`${plural(g.counts.quiet, 'idle agent')} not listed.`);
129
+ return out.join('\n').trimEnd();
130
+ }
131
+
132
+ export function initGlance({ $, esc, ago, agents, openAgent, readFirst }) {
133
+ const dlg = $('#glance-dialog');
134
+ let showIdle = false;
135
+
136
+ function render() {
137
+ const g = glance(agents.values());
138
+ const n = g.counts.act + g.counts.fix;
139
+ const badge = $('#glance-count');
140
+ badge.textContent = n || '';
141
+ badge.title = n ? `${g.counts.act} need you now, ${g.counts.fix} to fix` : '';
142
+ if (!dlg.open) return;
143
+ const row = (i) => `<li class="gl-item gl-${i.group}" data-gl-agent="${esc(i.id)}" tabindex="0">
144
+ <div class="gl-head"><b>${esc(i.name)}</b> <span class="hint">${esc(i.project ?? '')}${i.since ? ` · ${ago(i.since)}` : ''}${i.running ? ' · open' : ''}</span></div>
145
+ <div class="gl-why">${esc(i.why[0])}</div>
146
+ ${i.why.length > 1 ? `<div class="gl-more hint">${esc(i.why.slice(1, 3).join(' · '))}${i.why.length > 3 ? ` · and ${i.why.length - 3} more` : ''}</div>` : ''}
147
+ ${i.title && i.title !== i.name ? `<div class="gl-title hint">${esc(i.title)}</div>` : ''}
148
+ </li>`;
149
+ const section = (key) => {
150
+ const list = g.items.filter((i) => i.group === key);
151
+ if (!list.length) return '';
152
+ if (key === 'quiet' && !showIdle) return `<p class="hint">${plural(list.length, 'idle agent')}. <button class="link" data-gl-idle>Show them</button></p>`;
153
+ return `<section class="gl-group"><h3>${GROUPS[key].label} <span class="badge">${list.length}</span>${key === 'review' ? ' <button class="link" data-gl-readfirst>Read first</button>' : ''}</h3><ul class="gl-list">${list.map(row).join('')}</ul></section>`;
154
+ };
155
+ $('#glance-body').innerHTML = `<p class="gl-line">${esc(glanceLine(g))}</p>${g.total ? ORDER.map(section).join('') : ''}${g.counts.act + g.counts.fix + g.counts.review + g.counts.answer + g.counts.follow + g.counts.tidy === 0 && g.total ? '<p class="hint">Nothing to act on.</p>' : ''}`;
156
+ }
157
+
158
+ function open() {
159
+ if (!dlg.open) dlg.showModal();
160
+ render();
161
+ }
162
+ $('#glance-btn').onclick = () => open();
163
+ dlg.addEventListener('click', (e) => {
164
+ if (e.target.closest('[data-gl="close"]')) return dlg.close();
165
+ if (e.target.closest('[data-gl-idle]')) return ((showIdle = true), render());
166
+ if (e.target.closest('[data-gl-readfirst]')) return (dlg.close(), readFirst());
167
+ const it = e.target.closest('[data-gl-agent]');
168
+ if (it) return (dlg.close(), openAgent(it.dataset.glAgent));
169
+ });
170
+ dlg.addEventListener('keydown', (e) => {
171
+ const it = e.target.closest?.('[data-gl-agent]');
172
+ if (it && e.key === 'Enter') (dlg.close(), openAgent(it.dataset.glAgent));
173
+ });
174
+ return { open, render, isOpen: () => dlg.open };
175
+ }
package/public/index.html CHANGED
@@ -33,6 +33,7 @@
33
33
  <button id="go-btn" class="go-btn" title="Go to: find a view, an agent or a setting by name (Ctrl+K or ⌘K)" aria-label="Go to a view, an agent or a setting">⌕ Go to</button>
34
34
  <nav class="top-nav" id="top-nav" aria-label="Views">
35
35
  <button id="today-btn" title="Today: what needs you, from every list, most pressing first, and why (y)">Today <span id="today-count" class="badge ready"></span></button>
36
+ <button id="glance-btn" title="At a glance: every agent on one line, grouped by what it needs from you (act now, fix, review, working, follow up, tidy up, idle), and why">Glance <span id="glance-count" class="badge"></span></button>
36
37
  <button id="readfirst-btn" title="Read first: finished work waiting for your review, the pieces that need reading most first, and why">Read first <span id="readfirst-count" class="badge"></span></button>
37
38
  <button id="assistant-btn" title="An always-on session that finds new work and starts agents for it">Assistant <span id="assistant-dot" class="assistant-dot" hidden></span></button>
38
39
  <button id="spend-btn" title="Results across agents (merge rate, time to PR, cost per merged PR), what they cost, and spending limits">Results <span id="spend-today" class="spend-today"></span></button>
@@ -460,6 +461,11 @@
460
461
  <div class="dialog-actions"><button type="button" class="small" data-us="make" title="Write new questions from its changes as they are now">New questions</button><button type="button" class="small" data-us="changes">Review changes</button><span class="spacer"></span><button type="button" class="small primary" data-us="close">Close</button></div>
461
462
  </dialog>
462
463
 
464
+ <dialog id="glance-dialog" class="update-dialog readfirst-dialog" aria-label="At a glance">
465
+ <h2>At a glance</h2>
466
+ <div id="glance-body"></div>
467
+ <div class="dialog-actions"><span class="spacer"></span><button type="button" class="small primary" data-gl="close">Close</button></div>
468
+ </dialog>
463
469
  <dialog id="readfirst-dialog" class="update-dialog readfirst-dialog" aria-label="Read first">
464
470
  <h2>Read first</h2>
465
471
  <div id="readfirst-body"></div>
package/public/style.css CHANGED
@@ -390,6 +390,20 @@ body.term-max .term-agent, .term-wrap:fullscreen .term-agent { display: inline-b
390
390
  .kept-private-off { margin: 4px 0; }
391
391
  .readfirst-dialog { width: min(760px, calc(100vw - 24px)); }
392
392
  #readfirst-body { max-height: min(66vh, 680px); overflow: auto; }
393
+ #glance-body { max-height: min(70vh, 720px); overflow: auto; overflow-wrap: anywhere; }
394
+ .gl-line { font-weight: 600; margin: 0 0 8px; }
395
+ .gl-group h3 { font-size: 14px; margin: 12px 0 4px; }
396
+ .gl-list { list-style: none; margin: 0; padding: 0; }
397
+ .gl-item { padding: 6px 8px; border-left: 3px solid var(--border); border-radius: 4px; cursor: pointer; }
398
+ .gl-item:hover, .gl-item:focus { background: var(--panel-2); outline: none; }
399
+ .gl-item + .gl-item { margin-top: 4px; }
400
+ .gl-act { border-left-color: var(--red); }
401
+ .gl-fix { border-left-color: var(--yellow); }
402
+ .gl-review { border-left-color: var(--accent); }
403
+ .gl-answer { border-left-color: var(--muted); }
404
+ .gl-working { border-left-color: var(--green); }
405
+ .gl-why { margin-top: 2px; }
406
+ .gl-more, .gl-title { font-size: 12px; }
393
407
  .rf-list { list-style: none; margin: 8px 0; padding: 0; }
394
408
  .rf-item { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 8px; font-size: 13px; overflow-wrap: anywhere; }
395
409
  .rf-item.rf-close { border-left-color: var(--red); }
package/src/cli.js CHANGED
@@ -865,6 +865,37 @@ export async function main(argv) {
865
865
  u.data.questions.forEach((x, i) => console.log(`${bold(`${i + 1}.`)} ${x.answer}${x.why ? dim(` ${x.why}`) : ''}${x.file ? dim(`\n read: ${x.file}${x.head ? ` ${x.head}` : ''}`) : ''}`));
866
866
  });
867
867
 
868
+ program
869
+ .command('glance')
870
+ .description('Every agent on one line, grouped by what it needs from you: needs you now (a prompt, a question it stopped at, a sign-in, an error, stuck), to fix (failing checks, changes requested, a conflict, blocked), to review, to answer (questions asked without stopping), working, to follow up, to tidy up, and idle; each with why. Exit 1 when something needs you now or is to fix.')
871
+ .option('-a, --all', 'list the idle agents too')
872
+ .option('-o, --out <file>', 'write it as Markdown to a file')
873
+ .option('--json', 'print JSON')
874
+ .action(async (o) => {
875
+ await daemon();
876
+ const g = await api('GET', `/glance${o.all ? '?all=1' : ''}`);
877
+ if (o.json) return console.log(JSON.stringify(g, null, 2));
878
+ if (o.out) {
879
+ fs.writeFileSync(o.out, `${g.markdown}\n`);
880
+ console.log(`${green('✓')} written to ${o.out}`);
881
+ } else {
882
+ console.log(bold(g.line));
883
+ const tone = { act: red, fix: yellow, review: cyan, answer: cyan, working: green, follow: yellow, tidy: dim, quiet: dim };
884
+ const label = { act: 'Needs you now', fix: 'To fix', review: 'To review', answer: 'To answer', working: 'Working', follow: 'Follow up', tidy: 'Tidy up', quiet: 'Idle' };
885
+ for (const key of Object.keys(label)) {
886
+ const list = g.items.filter((i) => i.group === key);
887
+ if (!list.length) continue;
888
+ if (key === 'quiet' && !o.all) {
889
+ console.log(dim(`\n${list.length} idle (agentmgr glance --all to list them)`));
890
+ continue;
891
+ }
892
+ console.log(`\n${tone[key](label[key])} ${dim(`(${list.length})`)}`);
893
+ for (const i of list) console.log(` ${bold(i.name)} ${dim(i.id)}${i.project ? dim(` ${i.project}`) : ''}\n ${i.why.slice(0, 3).join(dim(' · '))}`);
894
+ }
895
+ }
896
+ if (g.counts.act || g.counts.fix) process.exitCode = 1;
897
+ });
898
+
868
899
  program
869
900
  .command('read-first')
870
901
  .description('Finished work waiting for your review, the pieces that need reading most first: each with a level (read closely, look, skim), the reasons from what the app measured (high-risk files, the scorecard, checks, whether the tests notice a mistake, what was left out, risks not checked, its own confidence, size), and where to start. Exit 1 when something is to be read closely.')
package/src/manager.js CHANGED
@@ -2088,7 +2088,7 @@ export class AgentManager extends EventEmitter {
2088
2088
  }
2089
2089
 
2090
2090
  /** Resize a session. `from`: the viewer that asked, which is not sent its own size back. */
2091
- resize(id, cols, rows, kind = 'claude', from = null) {
2091
+ resize(id, cols, rows, kind = 'claude') {
2092
2092
  const rt = this.termRuntime(id, kind);
2093
2093
  if (!rt || !(cols > 0 && rows > 0)) return;
2094
2094
  const changed = rt.cols !== cols || rt.rows !== rows;
@@ -2097,10 +2097,10 @@ export class AgentManager extends EventEmitter {
2097
2097
  try {
2098
2098
  rt.pty?.resize(cols, rows);
2099
2099
  } catch {}
2100
- // Viewers that don't size the session follow it.
2101
- // (Sent back to the one that asked, a size it has since replaced with a newer one would make it
2102
- // follow itself.)
2103
- if (changed) for (const c of rt.clients ?? []) if (c !== from) c.send({ t: 'size', cols, rows });
2100
+ // Viewers that don't size the session follow it. The one that asked is told too: when two views
2101
+ // take the lead at once, the last size the session took is what they all end up showing. (A
2102
+ // view ignores a size it sent itself a moment ago: groups.js, followSize.)
2103
+ if (changed) for (const c of rt.clients ?? []) c.send({ t: 'size', cols, rows });
2104
2104
  }
2105
2105
 
2106
2106
  // ------------------------------------------------------- ancillary shells
package/src/server.js CHANGED
@@ -60,6 +60,7 @@ import { Quality } from './quality.js';
60
60
  import { recordMarkdown } from './record.js';
61
61
  import { Weekly } from './weekly.js';
62
62
  import { queueMarkdown, readQueue } from './readfirst.js';
63
+ import { glance, glanceLine, glanceMarkdown } from '../public/glance.js';
63
64
  import { traceMarkdown, traceOf } from './trace.js';
64
65
  import { PRIVATE_MESSAGE, keptPrivate, mustBeShareable } from './private.js';
65
66
  import { Standards, runCheck } from './standards.js';
@@ -1275,6 +1276,11 @@ export async function startServer({ port = PORT, host = HOST, evalTimer = true }
1275
1276
  api.post('/repeats/dismiss', wrap((req) => repeats.dismiss(String(req.body?.key ?? ''))));
1276
1277
  api.post('/playbooks/:id/run', wrap((req) => playbooks.run(req.params.id, { vars: req.body?.vars ?? {} })));
1277
1278
  // Read first (readfirst.js): finished work waiting for review, the pieces that need reading most first.
1279
+ // At a glance: every agent on one line, grouped by what it needs from you (public/glance.js).
1280
+ api.get('/glance', wrap((req) => {
1281
+ const g = glance(store.list().map((a) => manager.view(a)));
1282
+ return { ...g, line: glanceLine(g), markdown: glanceMarkdown(g, { all: req.query.all === '1' }) };
1283
+ }));
1278
1284
  api.get('/read-first', wrap((req) => {
1279
1285
  const items = readQueue(store.list(), (a) => manager.view(a));
1280
1286
  return req.query.format === 'md' ? { markdown: queueMarkdown(items) } : { items };
@@ -2089,7 +2095,7 @@ export async function startServer({ port = PORT, host = HOST, evalTimer = true }
2089
2095
  return;
2090
2096
  }
2091
2097
  if (msg.t === 'i' && typeof msg.d === 'string') manager.write(agent.id, msg.d, kind);
2092
- else if (msg.t === 'r') manager.resize(agent.id, msg.cols | 0, msg.rows | 0, kind, client);
2098
+ else if (msg.t === 'r') manager.resize(agent.id, msg.cols | 0, msg.rows | 0, kind);
2093
2099
  });
2094
2100
  ws.on('close', () => session.detach());
2095
2101
  } catch (err) {