ai-agentmanager 1.44.0 → 1.46.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 +12 -0
- package/README.md +51 -0
- package/package.json +1 -1
- package/public/app.js +18 -1
- package/public/index.html +6 -1
- package/public/keys.js +3 -2
- package/public/news.js +167 -0
- package/public/side.js +122 -2
- package/public/style.css +33 -0
- package/src/brief.js +68 -1
- package/src/cli.js +58 -0
- package/src/config.js +2 -0
- package/src/engines/claude.js +7 -0
- package/src/manager.js +41 -4
- package/src/news.js +454 -0
- package/src/server.js +20 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.46.0 (2026-11-13)
|
|
4
|
+
|
|
5
|
+
- **Debug.** **🐞 Debug** in an agent's detail (or the **Debug** tab of the split) puts the agent's session on the left and a debug pane on the right. Say what goes wrong (a failure, E2E instability at max scale, slowness under load) and the agent investigates in its own session: it reads the code and logs, reproduces and measures where it can, and changes no code yet.
|
|
6
|
+
- **The report.** Drawn beside the session as the agent writes it: animated diagrams of the code path and the data flow, with where it breaks outlined red and what is only suspected dashed amber; the order of events for timing and load problems; findings with evidence, marked confirmed or suspected; the likely causes; and recommended fixes with how to verify each.
|
|
7
|
+
- **Follow-ups and fixes.** **Ask** continues the investigation and brings the report up to date. **Apply fixes** has the agent make the fixes you name (or the ones it recommends), verify each and record the result before and after. From the terminal: `agentmgr debug <agent> "<what goes wrong>"`, and `--fix`.
|
|
8
|
+
|
|
9
|
+
## 1.45.0 (2026-11-13)
|
|
10
|
+
|
|
11
|
+
- **AI News.** **AI News** in the top bar (or `l`, `#news`, `agentmgr news`) lists what the frontier labs released in the last 30 days, newest first and grouped by day. Each entry has its lab, a summary of a sentence or two, a link to the release and the links from the note. Filter by lab or by words; what arrived since you last looked is marked *new* and counted on the button.
|
|
12
|
+
- **Where it comes from.** The release notes of the Claude Platform, Claude Code, the OpenAI API and the Gemini API, read every 6 hours, and a web search once a day for the other top labs (xAI, Meta, Mistral and the rest). **Refresh** and **Search top labs** look now. Add release notes of your own with `"news": { "custom": [...] }` in config.json.
|
|
13
|
+
- **Model calls, on your Claude plan.** One tool-less call per 25 new entries for the summaries (each entry once), and one Claude Code call a day for the web search, allowed only to search and read the web. What the search finds is as reliable as a web search: check the link. Turn either off with `"news": { "summaries": false, "search": false }`.
|
|
14
|
+
|
|
3
15
|
## 1.44.0 (2026-11-12)
|
|
4
16
|
|
|
5
17
|
- **Whose session is this?** Expanded, in full screen and on a phone, the terminal bar shows the agent's name on the left, on every tab (Claude, Code, Shell, Browser). It follows a rename, and its tooltip has the agent's task.
|
package/README.md
CHANGED
|
@@ -27,6 +27,8 @@ Run one background [Claude Code](https://claude.com/claude-code) agent per inten
|
|
|
27
27
|
- **Slack alerts.** A message in your channel when an agent needs input, finishes a backlog item, or fails.
|
|
28
28
|
- **Priority.** Mark agents P0–P3. P0 and P1 are highlighted, and lists sort by priority.
|
|
29
29
|
- **Share for review.** One click writes an **Analysis**, **Design**, **Flow** or **Proposal** document from the agent's work, a human time **Estimate** for planning, or the change's **Documentation** with an OpenAPI spec of any API changes. Copy it as Markdown, download it, or print it to PDF with diagrams.
|
|
30
|
+
- **Debug.** Say what to debug (a failure, E2E instability at max scale, slowness under load) in the **Debug** tab beside an agent's session. The agent investigates there and writes a report next to it: animated diagrams of the code path and the data flow with where it breaks, findings with evidence, likely causes and recommended fixes. It changes no code until you press **Apply fixes**.
|
|
31
|
+
- **AI News.** The frontier labs' latest releases in one list, newest first: Claude Platform, Claude Code, the OpenAI API and the Gemini API from their release notes, and the other top labs from a daily web search. Each is summarized in a sentence or two, with its links.
|
|
30
32
|
- **MCP servers and tools.** See every MCP server Claude Code has in a folder (yours, the project's, claude.ai connectors and plugins) with its tools, sign in to the ones that need it, and run any tool directly, through Claude Code, or in an agent's session.
|
|
31
33
|
- **Human vs AI.** It splits the open questions about the work into the top 5 that need your judgment and the ones a model can answer from the evidence. It answers those, then a second model double-checks every answer.
|
|
32
34
|
- **Review changes.** Each agent's diff file by file, line comments sent back to the agent as one message, then **Commit all** and **Push & open PR**, without leaving the page.
|
|
@@ -181,6 +183,8 @@ agentmgr explain <agent> # full briefing: ask, status, plan
|
|
|
181
183
|
agentmgr remote on | off | status | rotate # phone / remote access (see below)
|
|
182
184
|
agentmgr backlog add "ask" -r <repo> [-p 1] # queue work; also: ls, start, accept, reopen, move, limit, pause
|
|
183
185
|
agentmgr notify slack --webhook <url> # Slack alerts; also: test, status, on, off, event <name> on|off
|
|
186
|
+
agentmgr debug <agent> "what goes wrong" # debug with an agent; no question prints its report; --fix applies the fixes
|
|
187
|
+
agentmgr news # the frontier labs' latest releases, summarized (--refresh, --lab, --days)
|
|
184
188
|
agentmgr inbox # prompts, questions, stuck agents and overlaps waiting on you
|
|
185
189
|
agentmgr answer <agent> <question-id> "…" # answer a question from the inbox
|
|
186
190
|
agentmgr tell <agent> "…" # send a message into the session (when it's idle)
|
|
@@ -1145,6 +1149,53 @@ Usage comes from the session transcripts and is refreshed every few seconds whil
|
|
|
1145
1149
|
|
|
1146
1150
|
`agentmgr mcp run <agent|home> <server> <tool> [arguments or request]` does the first two, and `--session` the third. A destructive tool needs a second click. Plugins can refuse runs outside an agent's session with the `mcp.run` policy.
|
|
1147
1151
|
|
|
1152
|
+
## Debug
|
|
1153
|
+
|
|
1154
|
+
**🐞 Debug** in an agent's detail (or the **Debug** tab of the split, **◫ Split** in the terminal bar) puts the agent's session on the left and the debug pane on the right. Type what is going wrong, for example *E2E tests fail at max scale after about 20 minutes* or *p99 latency triples under load*, and press **Debug** (or Enter).
|
|
1155
|
+
|
|
1156
|
+
The agent investigates in its own session, with everything it already knows about the work: it reads the code on the path, the logs and the tests, reproduces the problem where it can (the failing test, a small load, a script) and measures. It keeps a report, drawn in the pane as it grows:
|
|
1157
|
+
|
|
1158
|
+
| Section | What it has |
|
|
1159
|
+
|---|---|
|
|
1160
|
+
| Summary | What goes wrong, the most likely cause, and how sure it is |
|
|
1161
|
+
| Symptoms | What is seen and when (scale, load, timing), and how to reproduce it |
|
|
1162
|
+
| Code path | An animated flowchart of the path the failing request, job or test takes through the real files and functions; where it breaks is outlined red, what is only suspected dashed amber |
|
|
1163
|
+
| Data flow | An animated flowchart or sequence diagram of the data on that path: where it grows, waits, is dropped or goes wrong |
|
|
1164
|
+
| Interleaving | For timing, concurrency and load problems: the order of events that breaks |
|
|
1165
|
+
| Findings | Each with its evidence (file and line, a log line, a metric, a command and its output), marked confirmed or suspected |
|
|
1166
|
+
| Root cause | The causes, most likely first, with a confidence and what would confirm each |
|
|
1167
|
+
| Recommended fixes | Each with where, the effort, the risk and how to verify it |
|
|
1168
|
+
| Next checks | What to measure next, and what it needs from you |
|
|
1169
|
+
|
|
1170
|
+
- **Follow-ups.** Type what you know or what to look at next and press **Ask**: the investigation continues and the report is brought up to date. If the agent needs something only you have (the scale it fails at, logs), it asks in its session on the left.
|
|
1171
|
+
- **Apply fixes.** The agent changes no repository code while it investigates. **Apply fixes** asks it to make the fixes (name them in the box, like *1 and 3*, or leave it empty for the ones it recommends), verify each the way the report says, and add a **Fixes applied** section with the result before and after.
|
|
1172
|
+
- **How it runs.** Your question is typed into the agent's session like any message: when it is idle, resuming it if it was closed. It uses the agent's own engine, model and permissions; no other model call is made. The report is `DEBUG.md` next to the agent's brief, outside the repository.
|
|
1173
|
+
|
|
1174
|
+
`agentmgr debug <agent> "<what goes wrong>"` asks from the terminal, `agentmgr debug <agent>` prints the report, and `--fix ["1 and 3"]` applies fixes.
|
|
1175
|
+
|
|
1176
|
+
## AI News
|
|
1177
|
+
|
|
1178
|
+
**AI News** in the top bar (or `l`, `#news`, or `agentmgr news`) lists what the frontier labs released in the last 30 days, newest first and grouped by day. Each entry has its lab, a summary of a sentence or two, a link to the release and the links from the note. Filter by lab or by words. What arrived since you last looked is marked *new* and counted on the button.
|
|
1179
|
+
|
|
1180
|
+
Where it comes from:
|
|
1181
|
+
|
|
1182
|
+
| Source | Read from |
|
|
1183
|
+
|---|---|
|
|
1184
|
+
| Claude Platform (Anthropic) | [platform.claude.com release notes](https://platform.claude.com/docs/en/release-notes/overview) |
|
|
1185
|
+
| Claude Code (Anthropic) | its [GitHub releases](https://github.com/anthropics/claude-code/releases), one entry per version |
|
|
1186
|
+
| OpenAI API | [developers.openai.com/changelog](https://developers.openai.com/changelog) |
|
|
1187
|
+
| Gemini API (Google) | [ai.google.dev release notes](https://ai.google.dev/gemini-api/docs/changelog) |
|
|
1188
|
+
| Top 10 labs | a web search once a day, for labs without release notes read here (xAI, Meta, Mistral and the rest) |
|
|
1189
|
+
|
|
1190
|
+
The daemon reads the release notes every 6 hours; **Refresh** reads them now, and **Search top labs** also searches now. Model calls, on your own Claude plan:
|
|
1191
|
+
|
|
1192
|
+
- **Summaries:** one tool-less call per 25 new entries, each entry summarized once. Until then an entry shows the start of its own text.
|
|
1193
|
+
- **Web search:** one Claude Code call a day that may use only web search and web fetch, with no MCP servers and none of its other tools. What it finds is as reliable as a web search: check the link.
|
|
1194
|
+
|
|
1195
|
+
Only public pages are read, and nothing is sent anywhere. A source whose page can't be read is marked ⚠ with the reason, and the others still show.
|
|
1196
|
+
|
|
1197
|
+
In config.json: `"news": { "enabled": true, "sources": ["claude-platform", "claude-code", "openai", "gemini"], "search": true, "summaries": true, "refreshHours": 6, "searchHours": 24, "days": 30 }`. Add release notes of your own, in Markdown with a dated heading per day and a bullet per change, with `"custom": [{ "id": "mistral", "lab": "Mistral AI", "label": "Mistral API", "url": "https://…/changelog.md" }]`.
|
|
1198
|
+
|
|
1148
1199
|
## Configuration
|
|
1149
1200
|
|
|
1150
1201
|
State lives in `~/.agentmanager/` (`state.json`, `daemon.log`, `repos/` for shared clones, `workspaces/` for worktrees). Set `AGENTMGR_HOME` or `AGENTMGR_PORT` to change the location or port. Optional `~/.agentmanager/config.json`:
|
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -38,6 +38,7 @@ import { initReviews } from '/reviews.js';
|
|
|
38
38
|
import { initBugHunt } from '/bughunt.js';
|
|
39
39
|
import { drawDiagram } from '/diagram.js';
|
|
40
40
|
import { initValue } from '/value.js';
|
|
41
|
+
import { initNews } from '/news.js';
|
|
41
42
|
import { initMcp } from '/mcp.js';
|
|
42
43
|
import { initCodeMap } from '/codemap.js';
|
|
43
44
|
import { initKeys } from '/keys.js';
|
|
@@ -66,11 +67,12 @@ const watchOnLoad = hashId === 'watch';
|
|
|
66
67
|
const standupOnLoad = hashId === 'standup';
|
|
67
68
|
const mapOnLoad = hashId === 'map';
|
|
68
69
|
const valueOnLoad = hashId === 'value';
|
|
70
|
+
const newsOnLoad = hashId === 'news';
|
|
69
71
|
const reviewsOnLoad = hashId === 'reviews';
|
|
70
72
|
// "#mcp" or "#mcp/<agent>": the MCP window on its own.
|
|
71
73
|
const mcpOnLoad = hashId === 'mcp';
|
|
72
74
|
let watchShown = false;
|
|
73
|
-
let selectedId = (watchOnLoad || standupOnLoad || mapOnLoad || valueOnLoad || reviewsOnLoad || mcpOnLoad ? null : hashId) || null;
|
|
75
|
+
let selectedId = (watchOnLoad || standupOnLoad || mapOnLoad || valueOnLoad || newsOnLoad || reviewsOnLoad || mcpOnLoad ? null : hashId) || null;
|
|
74
76
|
let openTermOnLoad = hashView === 'term' || hashView === 'code' || isShell(hashView) || isBrowser(hashView);
|
|
75
77
|
let filterText = '';
|
|
76
78
|
// "Only agents created in the last N days": remembered in this browser.
|
|
@@ -299,6 +301,9 @@ $('#bugs-btn').onclick = () => bugsUi.open();
|
|
|
299
301
|
// Value: what the delivered work is worth, for you and for management.
|
|
300
302
|
const valueUi = initValue({ api, $, esc, toast: (m, ms) => toast(m, ms), openAgent: (id) => (showTab('agents'), select(id)) });
|
|
301
303
|
$('#value-btn').onclick = () => valueUi.open();
|
|
304
|
+
// AI News: the frontier labs' latest releases, summarized.
|
|
305
|
+
const newsUi = initNews({ api, $, esc, ago, toast: (m, ms) => toast(m, ms) });
|
|
306
|
+
$('#news-btn').onclick = () => newsUi.open();
|
|
302
307
|
// MCP: the MCP servers and tools Claude Code has in a folder, and running one.
|
|
303
308
|
const mcpUi = initMcp({ api, $, esc, ago, md: (t) => md(t), toast: (m, ms) => toast(m, ms), agents: () => [...agents.values()] });
|
|
304
309
|
$('#mcp-btn').onclick = () => mcpUi.open(selectedId && agents.get(selectedId)?.workdir ? selectedId : null);
|
|
@@ -352,6 +357,7 @@ function shortcut(act) {
|
|
|
352
357
|
if (act === 'reviews') return reviewsUi.open();
|
|
353
358
|
if (act === 'bugs') return bugsUi.open();
|
|
354
359
|
if (act === 'value') return valueUi.open();
|
|
360
|
+
if (act === 'news') return newsUi.open();
|
|
355
361
|
if (act === 'today') return todayUi.open();
|
|
356
362
|
if (act.startsWith('tab:')) return showTab(act.slice(4));
|
|
357
363
|
return false;
|
|
@@ -2300,6 +2306,7 @@ function renderDetail() {
|
|
|
2300
2306
|
${a.aiReview?.verdict ? `<button data-act="overview" title="The AI review: what's done, what's missing, the risks">Overview${a.aiReview.seen ? '' : ' <span class="count">new</span>'}</button>` : ''}
|
|
2301
2307
|
${a.questions?.length ? `<button data-act="questions" title="What the agent asked you, and your answers">Questions${openQuestions(a) ? ` <span class="count">${openQuestions(a)}</span>` : ''}</button>` : ''}
|
|
2302
2308
|
${a.conflicts?.length ? `<button data-act="overlaps" title="Other agents changing the same files: which, who should merge first, and what to do">⚔ Overlaps <span class="count">${a.conflicts.length}</span></button>` : ''}
|
|
2309
|
+
<button data-act="debug" class="desk-only" ${a.workdir && a.status !== 'preparing' ? '' : 'disabled'} title="Debug with this agent: say what to debug (a failure, instability at scale, slowness under load). It investigates in its session and writes a report beside it: animated diagrams of the code path and data flow, findings and recommended fixes">🐞 Debug${a.specDocs?.debug ? ' <span class="count">report</span>' : ''}</button>
|
|
2303
2310
|
<button data-act="mcp" ${a.workdir && a.status !== 'preparing' ? '' : 'disabled'} title="The MCP servers and tools Claude Code has in this agent's folder; run one in its session or once in the workspace">MCP tools</button>
|
|
2304
2311
|
<button data-act="fork" ${a.workdir && a.git?.branch ? '' : 'disabled'} title="A new agent with this one's code and conversation, in its own worktree, to try another approach">Fork</button>
|
|
2305
2312
|
<button data-act="edit" title="Change its name, request, project, priority, permission mode or model">Edit</button>
|
|
@@ -3898,6 +3905,9 @@ $('#detail-body').addEventListener('click', async (e) => {
|
|
|
3898
3905
|
case 'questions':
|
|
3899
3906
|
case 'overlaps':
|
|
3900
3907
|
return openNeeds(a.id, btn.dataset.act);
|
|
3908
|
+
case 'debug':
|
|
3909
|
+
term.open(a.id);
|
|
3910
|
+
return sidePane.open('debug');
|
|
3901
3911
|
case 'mcp':
|
|
3902
3912
|
return mcpUi.open(a.id);
|
|
3903
3913
|
case 'memory':
|
|
@@ -4410,6 +4420,11 @@ function handleEvent(msg) {
|
|
|
4410
4420
|
history.replaceState(null, '', '#');
|
|
4411
4421
|
valueUi.open();
|
|
4412
4422
|
}
|
|
4423
|
+
if (newsOnLoad && !watchShown) {
|
|
4424
|
+
watchShown = true;
|
|
4425
|
+
history.replaceState(null, '', '#');
|
|
4426
|
+
newsUi.open();
|
|
4427
|
+
}
|
|
4413
4428
|
if (standupOnLoad && !watchShown) {
|
|
4414
4429
|
watchShown = true;
|
|
4415
4430
|
history.replaceState(null, '', '#');
|
|
@@ -4459,6 +4474,8 @@ function handleEvent(msg) {
|
|
|
4459
4474
|
teams.delete(msg.id);
|
|
4460
4475
|
} else if (msg.t === 'value') {
|
|
4461
4476
|
valueUi.changed();
|
|
4477
|
+
} else if (msg.t === 'news') {
|
|
4478
|
+
newsUi.changed();
|
|
4462
4479
|
} else if (msg.t === 'standup') {
|
|
4463
4480
|
standupUi.set(msg.latest);
|
|
4464
4481
|
if (msg.latest?.reason === 'scheduled' && msg.latest.items.length) toast('Standup ready: press Standup (or p) to play it', 8000);
|
package/public/index.html
CHANGED
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
<button id="bugs-btn" title="Bugs: background hunts in a project or folder, and what they found, checked and worst first">Bugs <span id="bugs-count" class="badge"></span></button>
|
|
41
41
|
<button id="reviews-btn" title="Reviews: pull requests you review. Reviewer agents ask the critical questions and find what blocks approval; you post what you pick">Reviews <span id="reviews-count" class="badge ready"></span></button>
|
|
42
42
|
<button id="value-btn" title="Value: what the delivered work is worth, by day, week, month and quarter, against the AI cost and your time; reports for management">Value</button>
|
|
43
|
+
<button id="news-btn" title="AI News: the frontier labs' latest releases (Anthropic, OpenAI, Google and the other top labs), each summarized, with links">AI News <span id="news-count" class="badge ready"></span></button>
|
|
43
44
|
<button id="map-btn" title="The codebase map: where each agent is changing and reading code, and who is about to collide">Map</button>
|
|
44
45
|
<button id="watch-btn" title="Running agents' sessions side by side, live: follow them all without clicking from one to the next">Watch</button>
|
|
45
46
|
<button id="mcp-btn" title="MCP: the MCP servers Claude Code has (yours, projects', claude.ai connectors and plugins), their tools, and running one in an agent's session or workspace">MCP</button>
|
|
@@ -146,7 +147,7 @@
|
|
|
146
147
|
<button id="term-attach" class="ghost small" title="Attach files or images (you can also drop or paste them into the terminal)">📎 Attach</button>
|
|
147
148
|
<input type="file" id="term-file" multiple hidden>
|
|
148
149
|
<button id="term-fit" class="ghost small" title="Refit the terminal to the panel">Fit</button>
|
|
149
|
-
<button id="term-split-btn" class="ghost small desk-only" title="Split: the terminal on the left, and Code, Docs (diagrams) or
|
|
150
|
+
<button id="term-split-btn" class="ghost small desk-only" title="Split: the terminal on the left, and Code, Docs (diagrams), Changes or Debug on the right">◫ Split</button>
|
|
150
151
|
<button id="group-split" class="ghost small desk-only" title="Split the screen: a group to the right for another agent's session, as in VS Code (Cmd+\ on a Mac, or Ctrl+Shift+\; add Shift on a Mac, or Alt, to split down). Or drag an agent from the list onto the right or bottom edge">⊞ Split screen</button>
|
|
151
152
|
<button id="term-max" class="ghost small desk-only" title="Expand to fill the window (Ctrl+Shift+E)">⤢ Expand</button>
|
|
152
153
|
<button id="term-full" class="ghost small desk-only" title="Full screen (Esc to leave)">⛶ Full screen</button>
|
|
@@ -194,6 +195,7 @@
|
|
|
194
195
|
<button class="term-tab" data-side="code" role="tab" title="The agent's files">Code</button>
|
|
195
196
|
<button class="term-tab" data-side="docs" role="tab" title="Diagrams and the other documents">Docs</button>
|
|
196
197
|
<button class="term-tab" data-side="changes" role="tab" title="Its changes, explained one by one">Changes</button>
|
|
198
|
+
<button class="term-tab" data-side="debug" role="tab" title="Debug: say what to debug; the agent investigates in its session and its report shows here, with animated diagrams of the code path and data flow, findings and recommended fixes">Debug</button>
|
|
197
199
|
</div>
|
|
198
200
|
<span class="spacer"></span>
|
|
199
201
|
<button type="button" class="ghost small" id="side-close" title="Close the split">✕</button>
|
|
@@ -415,6 +417,9 @@
|
|
|
415
417
|
<dialog id="value-dialog" class="issues-dialog value-dialog" aria-label="Value">
|
|
416
418
|
<div id="value-body"></div>
|
|
417
419
|
</dialog>
|
|
420
|
+
<dialog id="news-dialog" class="issues-dialog news-dialog" aria-label="AI News">
|
|
421
|
+
<div id="news-body"></div>
|
|
422
|
+
</dialog>
|
|
418
423
|
<dialog id="standup-dialog" class="standup-dialog" aria-label="Standup">
|
|
419
424
|
<div id="standup-body"></div>
|
|
420
425
|
</dialog>
|
package/public/keys.js
CHANGED
|
@@ -27,6 +27,7 @@ export const SHORTCUTS = [
|
|
|
27
27
|
[['d'], 'Designs: agents\' design docs', 'designs'],
|
|
28
28
|
[['g'], 'Reviews: pull requests you review', 'reviews'],
|
|
29
29
|
[['v'], 'Value: what the work is worth', 'value'],
|
|
30
|
+
[['l'], 'AI News: the latest frontier releases', 'news'],
|
|
30
31
|
[['1'], 'Agents tab', 'tab:agents'],
|
|
31
32
|
[['2'], 'Inbox: what needs you', 'tab:inbox'],
|
|
32
33
|
[['3'], 'Backlog', 'tab:backlog'],
|
|
@@ -70,11 +71,11 @@ export const SHORTCUTS = [
|
|
|
70
71
|
// A single key, as an event names it, to its action.
|
|
71
72
|
export const SINGLE = {
|
|
72
73
|
j: 'next', k: 'prev', Enter: 'terminal', t: 'terminal',
|
|
73
|
-
r: 'changes', s: 'start', X: 'stop', e: 'edit', n: 'new', a: 'ask', '/': 'filter', w: 'watch', p: 'standup', m: 'map', i: 'issues', o: 'actions', h: 'assistant', ',': 'settings', d: 'designs', g: 'reviews', v: 'value', y: 'today', b: 'bugs', '?': 'help',
|
|
74
|
+
r: 'changes', s: 'start', X: 'stop', e: 'edit', n: 'new', a: 'ask', '/': 'filter', w: 'watch', p: 'standup', m: 'map', i: 'issues', o: 'actions', h: 'assistant', ',': 'settings', d: 'designs', g: 'reviews', v: 'value', l: 'news', y: 'today', b: 'bugs', '?': 'help',
|
|
74
75
|
1: 'tab:agents', 2: 'tab:inbox', 3: 'tab:backlog', 4: 'tab:land', 5: 'tab:built',
|
|
75
76
|
};
|
|
76
77
|
// While Watch is open: only what makes sense there.
|
|
77
|
-
const ON_WATCH = new Set(['today', 'new', 'ask', 'watch', 'standup', 'map', 'issues', 'actions', 'assistant', 'settings', 'designs', 'reviews', 'value', 'bugs', 'help']);
|
|
78
|
+
const ON_WATCH = new Set(['today', 'new', 'ask', 'watch', 'standup', 'map', 'issues', 'actions', 'assistant', 'settings', 'designs', 'reviews', 'value', 'news', 'bugs', 'help']);
|
|
78
79
|
|
|
79
80
|
/** Typing somewhere: a field, an editor or a terminal (xterm types through a textarea). */
|
|
80
81
|
const typing = (el) => Boolean(el?.closest?.('input, textarea, select, [contenteditable=""], [contenteditable="true"], .xterm, .cm-editor'));
|
package/public/news.js
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// AI News: the frontier labs' latest releases in one list, newest first, each with a short summary
|
|
2
|
+
// and its links. The daemon reads the release notes (and searches the web for the top labs once a
|
|
3
|
+
// day) on its own; Refresh looks now. New since you last looked is marked, and counted on the button.
|
|
4
|
+
|
|
5
|
+
import { expandButton, expandable } from './expand.js';
|
|
6
|
+
|
|
7
|
+
const SAVED = 'agentmgr.newsLab';
|
|
8
|
+
|
|
9
|
+
export function initNews({ api, $, esc, ago, toast }) {
|
|
10
|
+
const dialog = $('#news-dialog');
|
|
11
|
+
const body = $('#news-body');
|
|
12
|
+
let data = null;
|
|
13
|
+
let lab = 'all';
|
|
14
|
+
let query = '';
|
|
15
|
+
let again = null;
|
|
16
|
+
try {
|
|
17
|
+
lab = localStorage.getItem(SAVED) || 'all';
|
|
18
|
+
} catch {}
|
|
19
|
+
|
|
20
|
+
async function load({ quiet = false } = {}) {
|
|
21
|
+
try {
|
|
22
|
+
data = await api('GET', '/news');
|
|
23
|
+
} catch (e) {
|
|
24
|
+
if (!quiet) toast?.(e.message, 5000);
|
|
25
|
+
}
|
|
26
|
+
badge();
|
|
27
|
+
render();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function badge() {
|
|
31
|
+
const n = data?.newCount ?? 0;
|
|
32
|
+
const el = $('#news-count');
|
|
33
|
+
if (!el) return;
|
|
34
|
+
el.textContent = n ? String(n) : '';
|
|
35
|
+
el.title = n ? `${n} new since you last looked` : '';
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** "Today", "Yesterday", "Monday, Nov 9" (with the year when it isn't this one). */
|
|
39
|
+
function dayLabel(date) {
|
|
40
|
+
const d = new Date(`${date}T12:00:00`);
|
|
41
|
+
const today = new Date();
|
|
42
|
+
const days = Math.round((new Date(today.toDateString()) - new Date(d.toDateString())) / 86_400_000);
|
|
43
|
+
if (days === 0) return 'Today';
|
|
44
|
+
if (days === 1) return 'Yesterday';
|
|
45
|
+
return d.toLocaleDateString([], { weekday: 'long', month: 'short', day: 'numeric', ...(d.getFullYear() === today.getFullYear() ? {} : { year: 'numeric' }) });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function item(i) {
|
|
49
|
+
const extra = i.links.filter((l) => l.url !== i.url).slice(0, 4);
|
|
50
|
+
return `<li class="news-item${i.isNew ? ' new' : ''}">
|
|
51
|
+
<div class="news-meta"><span class="tag news-lab" data-lab="${esc(i.lab)}">${esc(i.lab)}</span> <span class="hint">${esc(i.label)}</span>${i.isNew ? ' <span class="tag news-new">new</span>' : ''}</div>
|
|
52
|
+
<a class="news-title" href="${esc(i.url)}" target="_blank" rel="noopener">${esc(i.title)}</a>
|
|
53
|
+
${i.summary
|
|
54
|
+
? `<p class="news-summary">${esc(i.summary)}</p>`
|
|
55
|
+
: `<p class="news-summary hint" title="The summary is written on the next refresh">${esc(i.lead ?? '')}</p>`}
|
|
56
|
+
${extra.length ? `<div class="news-links">${extra.map((l) => `<a href="${esc(l.url)}" target="_blank" rel="noopener" title="${esc(l.url)}">${esc(l.text || new URL(l.url).host)} ↗</a>`).join('')}</div>` : ''}
|
|
57
|
+
</li>`;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function source(s) {
|
|
61
|
+
const what = s.error ? `⚠ ${s.error}` : s.at ? `${s.count} entries, read ${ago(s.at)}` : 'not read yet';
|
|
62
|
+
const name = s.page ? `<a href="${esc(s.page)}" target="_blank" rel="noopener">${esc(s.label)}</a>` : esc(s.label);
|
|
63
|
+
return `<span class="news-source${s.error ? ' failed' : ''}" title="${esc(`${s.lab}: ${what}`)}">${name}${s.error ? ' ⚠' : ''}</span>`;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function draw() {
|
|
67
|
+
if (!dialog.open) return;
|
|
68
|
+
if (!data) {
|
|
69
|
+
body.innerHTML = '<p class="hint">Loading…</p>';
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const labs = [...new Set(data.items.map((i) => i.lab))].sort((x, y) => data.items.filter((i) => i.lab === y).length - data.items.filter((i) => i.lab === x).length || x.localeCompare(y));
|
|
73
|
+
if (lab !== 'all' && lab !== 'new' && !labs.includes(lab)) lab = 'all';
|
|
74
|
+
const q = query.trim().toLowerCase();
|
|
75
|
+
const rows = data.items.filter((i) => (lab === 'all' || (lab === 'new' ? i.isNew : i.lab === lab)) && (!q || `${i.title} ${i.summary ?? i.lead ?? ''} ${i.lab} ${i.label} ${(i.tags ?? []).join(' ')}`.toLowerCase().includes(q)));
|
|
76
|
+
const days = [];
|
|
77
|
+
for (const i of rows) {
|
|
78
|
+
if (days.at(-1)?.date !== i.date) days.push({ date: i.date, items: [] });
|
|
79
|
+
days.at(-1).items.push(i);
|
|
80
|
+
}
|
|
81
|
+
const chip = (k, label, n) => `<button class="chip ${k === lab ? 'active' : ''}" role="tab" aria-selected="${k === lab}" data-news-lab="${esc(k)}">${esc(label)} <span class="count">${n}</span></button>`;
|
|
82
|
+
const s = data.settings ?? {};
|
|
83
|
+
body.innerHTML = `
|
|
84
|
+
<div class="issues-head">
|
|
85
|
+
<h2>AI News</h2>
|
|
86
|
+
<div class="chips" role="tablist">${chip('all', 'All', data.items.length)}${data.newCount ? chip('new', 'New', data.newCount) : ''}${labs.map((l) => chip(l, l, data.items.filter((i) => i.lab === l).length)).join('')}</div>
|
|
87
|
+
<span class="spacer"></span>
|
|
88
|
+
<input type="search" class="small news-find" data-news-find placeholder="Find…" value="${esc(query)}" aria-label="Find in the news">
|
|
89
|
+
<button class="small" data-news="refresh" ${data.refreshing || !data.enabled ? 'disabled' : ''} title="Read the release notes again now${s.summaries ? ' and summarize what is new' : ''}">${data.refreshing ? 'Refreshing…' : '↻ Refresh'}</button>
|
|
90
|
+
${s.search ? `<button class="small" data-news="search" ${data.refreshing || !data.enabled ? 'disabled' : ''} title="Also search the web now for the top 10 AI labs' latest releases (otherwise once every ${s.searchHours} hours). One Claude Code call that may only search and read the web">🔎 Search top labs</button>` : ''}
|
|
91
|
+
${expandButton(dialog)}
|
|
92
|
+
<button class="small" data-news="close" title="Close (Esc)">Close</button>
|
|
93
|
+
</div>
|
|
94
|
+
<p class="hint">The frontier labs' latest releases from the last ${esc(String(s.days ?? 30))} days, newest first${s.summaries ? ', each summarized by a model in a sentence or two' : ''}. Read from ${data.sources.map(source).join(', ')}${data.refreshedAt ? `; updated ${esc(ago(data.refreshedAt))}, again every ${esc(String(s.refreshHours))} hours` : ''}. Sources and timing: <code>"news"</code> in config.json.</p>
|
|
95
|
+
${!data.enabled
|
|
96
|
+
? '<p class="hint issues-empty">AI News is off. Turn it on with <code>"news": { "enabled": true }</code> in config.json.</p>'
|
|
97
|
+
: days.length
|
|
98
|
+
? `<div class="issues-scroll news-list">${days.map((d) => `<h3 class="news-day">${esc(dayLabel(d.date))}</h3><ul class="news-items">${d.items.map(item).join('')}</ul>`).join('')}</div>`
|
|
99
|
+
: `<p class="hint issues-empty">${data.refreshing ? 'Reading the release notes…' : data.items.length ? 'Nothing matches.' : 'No news yet. Refresh reads the release notes now.'}</p>`}`;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Typing in Find keeps its focus and caret while the list redraws under it.
|
|
103
|
+
function render() {
|
|
104
|
+
const find = body.querySelector('[data-news-find]');
|
|
105
|
+
const typing = find && document.activeElement === find;
|
|
106
|
+
const at = typing ? find.selectionStart : null;
|
|
107
|
+
draw();
|
|
108
|
+
if (typing) {
|
|
109
|
+
const f = body.querySelector('[data-news-find]');
|
|
110
|
+
f?.focus();
|
|
111
|
+
f?.setSelectionRange(at, at);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
async function refresh(search) {
|
|
116
|
+
try {
|
|
117
|
+
data = await api('POST', '/news/refresh', search ? { search: true } : {});
|
|
118
|
+
toast?.(search ? 'Reading the release notes and searching the web: this can take a few minutes' : 'Reading the release notes', 3000);
|
|
119
|
+
} catch (e) {
|
|
120
|
+
toast?.(e.message, 6000);
|
|
121
|
+
}
|
|
122
|
+
render();
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
body.addEventListener('input', (e) => {
|
|
126
|
+
if (e.target.dataset.newsFind === undefined) return;
|
|
127
|
+
query = e.target.value;
|
|
128
|
+
render();
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
body.addEventListener('click', (e) => {
|
|
132
|
+
const l = e.target.closest('[data-news-lab]');
|
|
133
|
+
if (l) {
|
|
134
|
+
lab = l.dataset.newsLab;
|
|
135
|
+
try {
|
|
136
|
+
localStorage.setItem(SAVED, lab === 'new' ? 'all' : lab);
|
|
137
|
+
} catch {}
|
|
138
|
+
return render();
|
|
139
|
+
}
|
|
140
|
+
const b = e.target.closest('[data-news]')?.dataset.news;
|
|
141
|
+
if (b === 'close') return dialog.close();
|
|
142
|
+
if (b === 'refresh') return refresh(false);
|
|
143
|
+
if (b === 'search') return refresh(true);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
// Closing marks what you saw as seen: the "new" marks and the count clear. The first look starts them.
|
|
147
|
+
dialog.addEventListener('close', () => {
|
|
148
|
+
if (data && (data.newCount || !data.seenAt)) api('POST', '/news/seen', {}).then(() => load({ quiet: true }), () => {});
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
function open() {
|
|
152
|
+
if (dialog.open) return dialog.close();
|
|
153
|
+
dialog.showModal();
|
|
154
|
+
render();
|
|
155
|
+
load();
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** The daemon says the news changed: the count now, and the list while open. */
|
|
159
|
+
function changed() {
|
|
160
|
+
clearTimeout(again);
|
|
161
|
+
again = setTimeout(() => load({ quiet: true }), dialog.open ? 300 : 1500);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
expandable(dialog, render);
|
|
165
|
+
load({ quiet: true });
|
|
166
|
+
return { open, changed, isOpen: () => dialog.open };
|
|
167
|
+
}
|
package/public/side.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// The split view: the terminal (Claude, a shell or a browser tab) stays on the left, and the right
|
|
2
|
-
// pane shows the same agent's Code, its Docs (Diagrams by default)
|
|
3
|
-
// one
|
|
2
|
+
// pane shows the same agent's Code, its Docs (Diagrams by default), its Changes explained one by
|
|
3
|
+
// one, or Debug: you say what to debug, the agent investigates in its session on the left and its
|
|
4
|
+
// report (animated code path and data flow, findings, fixes) grows here. On, the tab and the
|
|
5
|
+
// document are remembered in this browser.
|
|
4
6
|
import { parseDiff } from '/review.js';
|
|
5
7
|
import { cardHtml, explainButton, listenParts as walkParts, walkthroughOf } from '/walkthrough.js';
|
|
6
8
|
|
|
@@ -63,10 +65,100 @@ export function initSide({ api, esc, toast, $, agents, codeUi, docHtml, renderDi
|
|
|
63
65
|
if (!on) return refit();
|
|
64
66
|
if (st.tab === 'code') codeUi.open(st.agentId);
|
|
65
67
|
else if (st.tab === 'docs') renderDocs(true);
|
|
68
|
+
else if (st.tab === 'debug') renderDebug(true);
|
|
66
69
|
else renderChanges(true);
|
|
67
70
|
refit();
|
|
68
71
|
}
|
|
69
72
|
|
|
73
|
+
// ------------------------------------------------------------ Debug
|
|
74
|
+
const DEBUG_IDEAS = ['E2E tests unstable at max scale', 'Slow or failing under load', 'A flaky test', 'A memory or connection leak', 'Wrong data end to end'];
|
|
75
|
+
const drafts = new Map(); // agent id -> what's typed and not sent
|
|
76
|
+
/** Read the report; `want` is the change time the agent's record names, so each version is read once. */
|
|
77
|
+
async function loadDebug(want) {
|
|
78
|
+
const id = st.agentId;
|
|
79
|
+
const key = `${id}:debug`;
|
|
80
|
+
files.set(key, { ...files.get(key), loading: true });
|
|
81
|
+
const r = await api('GET', `/agents/${id}/specs/debug`).catch(() => null);
|
|
82
|
+
files.set(key, { markdown: r?.markdown ?? null, at: r?.updatedAt ?? null, want, loaded: true });
|
|
83
|
+
if (st.agentId === id && st.on && st.tab === 'debug') renderDebug(false);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function renderDebug(force) {
|
|
87
|
+
const a = agents.get(st.agentId);
|
|
88
|
+
const d = files.get(`${st.agentId}:debug`);
|
|
89
|
+
const want = a?.specDocs?.debug ?? null;
|
|
90
|
+
if ((!d || (d.loaded && d.want !== want)) && !d?.loading) loadDebug(want);
|
|
91
|
+
const asks = a?.debug?.asks ?? [];
|
|
92
|
+
const working = Boolean(a?.runtime?.busy || a?.outbox);
|
|
93
|
+
const has = Boolean(d?.markdown);
|
|
94
|
+
const sig = `debug|${st.agentId}|${d?.at}|${Boolean(d?.loaded)}|${asks.length}|${working}|${Boolean(a?.workdir)}`;
|
|
95
|
+
if (!force && sig === st.sig) return;
|
|
96
|
+
st.sig = sig;
|
|
97
|
+
// What's being typed, and where the caret is, survive the redraw.
|
|
98
|
+
const old = body.querySelector('[data-debug-text]');
|
|
99
|
+
if (old) drafts.set(st.agentId, old.value);
|
|
100
|
+
const typing = old && document.activeElement === old ? [old.selectionStart, old.selectionEnd] : null;
|
|
101
|
+
const top = body.querySelector('.side-scroll')?.scrollTop ?? 0;
|
|
102
|
+
const draft = drafts.get(st.agentId) ?? '';
|
|
103
|
+
const ideas = has || asks.length ? '' : `<div class="debug-ideas">${DEBUG_IDEAS.map((t) => `<button type="button" class="chip" data-debug-idea>${esc(t)}</button>`).join('')}</div>`;
|
|
104
|
+
const status = !asks.length
|
|
105
|
+
? ''
|
|
106
|
+
: working
|
|
107
|
+
? `<p class="hint debug-status"><span class="debug-dot"></span> The agent is investigating in its session${has ? '; the report below updates as it writes' : '; the report shows here once it has the code path'}.</p>`
|
|
108
|
+
: has
|
|
109
|
+
? ''
|
|
110
|
+
: '<p class="hint debug-status">Asked. The report shows here when the agent has written it; its session on the left has what it is doing or asking.</p>';
|
|
111
|
+
const asked = asks.length
|
|
112
|
+
? `<details class="debug-asked"><summary>Asked (${asks.length})</summary><ol>${asks.map((x) => `<li>${x.kind === 'fix' ? '<span class="tag">fix</span> ' : ''}${esc(x.text)}</li>`).join('')}</ol></details>`
|
|
113
|
+
: '';
|
|
114
|
+
const report = has
|
|
115
|
+
? `<div class="md debug-report">${docHtml(d.markdown)}</div>`
|
|
116
|
+
: d?.loaded
|
|
117
|
+
? asks.length
|
|
118
|
+
? ''
|
|
119
|
+
: `<p class="hint">Say what is going wrong: a failure, instability at scale, slowness under load. The agent investigates in its session (it reads the code and logs, reproduces and measures where it can) and writes a report here: animated diagrams of the code path and the data flow with where it breaks, what it found with evidence, the likely causes, and the fixes it recommends. It changes no code until you press <b>Apply fixes</b>.</p>`
|
|
120
|
+
: '<p class="hint">Loading…</p>';
|
|
121
|
+
body.innerHTML = `<div class="side-scroll debug-view">
|
|
122
|
+
<form class="debug-ask" data-debug-form>
|
|
123
|
+
<textarea data-debug-text rows="2" ${a?.workdir ? '' : 'disabled'} placeholder="${has ? 'A follow-up: what you know, what to look at next, or which fixes to apply' : 'What should it debug? For example: E2E tests fail at max scale after about 20 minutes'}">${esc(draft)}</textarea>
|
|
124
|
+
${ideas}
|
|
125
|
+
<div class="debug-actions">
|
|
126
|
+
<span class="hint">${has && d.at ? `Report updated ${esc(new Date(d.at).toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' }))}` : ''}</span>
|
|
127
|
+
<span class="spacer"></span>
|
|
128
|
+
${has ? `<button type="button" class="small" data-debug-fix title="Ask the agent to make the report's fixes, verify each and record the result. Name the ones you want in the box (for example: 1 and 3), or leave it empty for the ones it recommends">Apply fixes</button>` : ''}
|
|
129
|
+
<button class="small primary" ${a?.workdir ? '' : 'disabled'}>${has ? 'Ask' : 'Debug'}</button>
|
|
130
|
+
</div>
|
|
131
|
+
</form>
|
|
132
|
+
${status}${asked}${report}
|
|
133
|
+
</div>`;
|
|
134
|
+
const text = body.querySelector('[data-debug-text]');
|
|
135
|
+
if (typing) {
|
|
136
|
+
text.focus();
|
|
137
|
+
text.setSelectionRange(...typing);
|
|
138
|
+
}
|
|
139
|
+
body.querySelector('.side-scroll').scrollTop = top;
|
|
140
|
+
renderDiagrams(body);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
async function sendDebug(payload) {
|
|
144
|
+
const id = st.agentId;
|
|
145
|
+
try {
|
|
146
|
+
agents.set(id, await api('POST', `/agents/${id}/debug`, payload));
|
|
147
|
+
drafts.delete(id);
|
|
148
|
+
const text = body.querySelector('[data-debug-text]');
|
|
149
|
+
if (text) text.value = '';
|
|
150
|
+
toast(payload.fix ? 'Asked the agent to apply the fixes' : 'Sent to the agent: it investigates in its session', 3000);
|
|
151
|
+
} catch (err) {
|
|
152
|
+
toast(`Error: ${err.message}`, 5000);
|
|
153
|
+
}
|
|
154
|
+
if (st.agentId === id && st.tab === 'debug') renderDebug(true);
|
|
155
|
+
}
|
|
156
|
+
// While the agent works, the report is read again now and then: it writes it as it goes.
|
|
157
|
+
setInterval(() => {
|
|
158
|
+
const a = agents.get(st.agentId);
|
|
159
|
+
if (st.on && st.tab === 'debug' && a?.debug && (a.runtime?.busy || a.outbox) && !files.get(`${a.id}:debug`)?.loading) loadDebug(a.specDocs?.debug ?? null);
|
|
160
|
+
}, 5000);
|
|
161
|
+
|
|
70
162
|
// ------------------------------------------------------------ Docs
|
|
71
163
|
function renderDocs(force) {
|
|
72
164
|
const a = agents.get(st.agentId);
|
|
@@ -156,6 +248,13 @@ export function initSide({ api, esc, toast, $, agents, codeUi, docHtml, renderDi
|
|
|
156
248
|
if (tab) return setTab(tab.dataset.side);
|
|
157
249
|
if (e.target.closest('#side-close')) return toggle(false);
|
|
158
250
|
if (e.target.closest('[data-side-reload]')) return loadChanges();
|
|
251
|
+
const idea = e.target.closest('[data-debug-idea]');
|
|
252
|
+
if (idea) {
|
|
253
|
+
const text = body.querySelector('[data-debug-text]');
|
|
254
|
+
text.value = idea.textContent;
|
|
255
|
+
return text.focus();
|
|
256
|
+
}
|
|
257
|
+
if (e.target.closest('[data-debug-fix]')) return sendDebug({ fix: body.querySelector('[data-debug-text]').value.trim() || true });
|
|
159
258
|
try {
|
|
160
259
|
if (e.target.closest('[data-side-explain]')) {
|
|
161
260
|
agents.set(st.agentId, await api('POST', `/agents/${st.agentId}/docs/walkthrough?background=1`));
|
|
@@ -170,6 +269,20 @@ export function initSide({ api, esc, toast, $, agents, codeUi, docHtml, renderDi
|
|
|
170
269
|
toast(`Error: ${err.message}`, 5000);
|
|
171
270
|
}
|
|
172
271
|
});
|
|
272
|
+
pane.addEventListener('submit', (e) => {
|
|
273
|
+
if (!e.target.matches('[data-debug-form]')) return;
|
|
274
|
+
e.preventDefault();
|
|
275
|
+
const question = body.querySelector('[data-debug-text]').value.trim();
|
|
276
|
+
if (question.length < 3) return toast('Say what to debug', 3000);
|
|
277
|
+
sendDebug({ question });
|
|
278
|
+
});
|
|
279
|
+
// Enter sends; Shift+Enter is a new line.
|
|
280
|
+
pane.addEventListener('keydown', (e) => {
|
|
281
|
+
if (e.key === 'Enter' && !e.shiftKey && !e.isComposing && e.target.matches('[data-debug-text]')) {
|
|
282
|
+
e.preventDefault();
|
|
283
|
+
e.target.form.requestSubmit();
|
|
284
|
+
}
|
|
285
|
+
});
|
|
173
286
|
pane.addEventListener('change', (e) => {
|
|
174
287
|
if (!e.target.matches('[data-side-doc]')) return;
|
|
175
288
|
st.doc = e.target.value;
|
|
@@ -211,6 +324,12 @@ export function initSide({ api, esc, toast, $, agents, codeUi, docHtml, renderDi
|
|
|
211
324
|
}
|
|
212
325
|
},
|
|
213
326
|
showing: (tab) => st.on && Boolean(st.agentId) && st.tab === tab,
|
|
327
|
+
/** Open the split on a tab (Debug, from the agent's detail). */
|
|
328
|
+
open(tab) {
|
|
329
|
+
st.on = true;
|
|
330
|
+
pref.set('on', '1');
|
|
331
|
+
setTab(tab);
|
|
332
|
+
},
|
|
214
333
|
/** What Listen reads in Changes: each change, scrolled to and marked as it is read. */
|
|
215
334
|
listenParts() {
|
|
216
335
|
const w = walkthroughOf(agents.get(st.agentId), st.changes?.diffHash);
|
|
@@ -225,6 +344,7 @@ export function initSide({ api, esc, toast, $, agents, codeUi, docHtml, renderDi
|
|
|
225
344
|
agentChanged(a) {
|
|
226
345
|
if (!st.on || a.id !== st.agentId) return;
|
|
227
346
|
if (st.tab === 'docs') renderDocs(false);
|
|
347
|
+
else if (st.tab === 'debug') renderDebug(false);
|
|
228
348
|
else if (st.tab === 'changes') renderChanges(false);
|
|
229
349
|
},
|
|
230
350
|
};
|
package/public/style.css
CHANGED
|
@@ -988,6 +988,19 @@ form.dropping { outline: 2px dashed var(--accent, #6b8cff); outline-offset: 4px;
|
|
|
988
988
|
.split-pane { flex: none; width: 0; }
|
|
989
989
|
.split-pane::after { top: 0; bottom: 0; left: -4px; width: 8px; cursor: col-resize; }
|
|
990
990
|
.split-pane[hidden], .side-pane[hidden] { display: none !important; }
|
|
991
|
+
/* Debug in the split: the question box, what was asked, then the agent's report. */
|
|
992
|
+
.debug-view { display: flex; flex-direction: column; gap: 10px; }
|
|
993
|
+
.debug-ask { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; z-index: 2; background: var(--bg); padding-bottom: 6px; border-bottom: 1px solid var(--border); }
|
|
994
|
+
.debug-ask textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 44px; }
|
|
995
|
+
.debug-ideas { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
996
|
+
.debug-ideas .chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); color: inherit; cursor: pointer; }
|
|
997
|
+
.debug-actions { display: flex; align-items: center; gap: 6px; }
|
|
998
|
+
.debug-status { margin: 0; }
|
|
999
|
+
.debug-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: debug-pulse 1.2s ease-in-out infinite; }
|
|
1000
|
+
@keyframes debug-pulse { 50% { opacity: .25; } }
|
|
1001
|
+
@media (prefers-reduced-motion: reduce) { .debug-dot { animation: none; } }
|
|
1002
|
+
.debug-asked summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
|
|
1003
|
+
.debug-asked ol { margin: 6px 0 0; padding-left: 22px; }
|
|
991
1004
|
.side-pane { flex: none; width: var(--pane-w, 45%); display: flex; flex-direction: column; min-height: 0; border-left: 1px solid #30363d; background: var(--bg); color: var(--text); }
|
|
992
1005
|
.side-bar { display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: #161a22; color: #c9d1d9; font-size: 12.5px; }
|
|
993
1006
|
.side-bar button { color: #c9d1d9; border-color: #30363d; }
|
|
@@ -1375,6 +1388,26 @@ table.issues tr.stage-proposed.ticked { background: color-mix(in srgb, var(--acc
|
|
|
1375
1388
|
table.issues tr.stage-proposed .issue-note { color: var(--accent); }
|
|
1376
1389
|
|
|
1377
1390
|
/* ---------- Value */
|
|
1391
|
+
/* AI News: a day heading, then each release with its lab, summary and links. */
|
|
1392
|
+
.news-dialog { width: min(980px, calc(100% - 32px)); }
|
|
1393
|
+
.news-find { width: 150px; }
|
|
1394
|
+
.news-source.failed, .news-source.failed a { color: var(--red); }
|
|
1395
|
+
.news-day { margin: 14px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
|
|
1396
|
+
.news-list .news-day:first-child { margin-top: 4px; }
|
|
1397
|
+
.news-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
|
|
1398
|
+
.news-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--panel); }
|
|
1399
|
+
.news-item.new { border-left: 3px solid var(--accent); }
|
|
1400
|
+
.news-meta { font-size: 12px; margin-bottom: 4px; }
|
|
1401
|
+
.news-lab { font-weight: 600; }
|
|
1402
|
+
.news-lab[data-lab="Anthropic"] { color: #c15f3c; }
|
|
1403
|
+
.news-lab[data-lab="OpenAI"] { color: var(--green); }
|
|
1404
|
+
.news-lab[data-lab="Google"] { color: var(--accent); }
|
|
1405
|
+
.news-new { color: var(--accent); }
|
|
1406
|
+
.news-title { font-weight: 600; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
|
|
1407
|
+
.news-title:hover { text-decoration: underline; }
|
|
1408
|
+
.news-summary { margin: 4px 0 0; line-height: 1.45; }
|
|
1409
|
+
.news-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12px; }
|
|
1410
|
+
.news-links a { overflow-wrap: anywhere; }
|
|
1378
1411
|
.value-dialog { width: min(1180px, calc(100% - 32px)); }
|
|
1379
1412
|
.value-dialog[open] { overflow: auto; }
|
|
1380
1413
|
.value-period { margin: 0 0 8px; }
|