ai-agentmanager 1.49.0 → 1.51.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 +15 -0
- package/README.md +28 -0
- package/package.json +1 -1
- package/public/app.js +11 -0
- package/public/index.html +7 -0
- package/public/keys.js +3 -2
- package/public/side.js +113 -52
- package/public/style.css +25 -1
- package/public/usage.js +118 -0
- package/src/brief.js +76 -1
- package/src/cli.js +49 -0
- package/src/config.js +2 -0
- package/src/engines/claude.js +5 -0
- package/src/engines/codex.js +3 -1
- package/src/manager.js +45 -3
- package/src/notify.js +1 -0
- package/src/rea.js +47 -0
- package/src/server.js +40 -0
- package/src/statusline.js +40 -0
- package/src/trust.js +10 -0
- package/src/usage.js +225 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.51.0 (2026-11-14)
|
|
4
|
+
|
|
5
|
+
- **Usage: what is left of each engine's plan.** A chip by the connection light shows the engine new agents start on with what is used of its limits (`Claude Code 5h 23% · wk 41%`), amber then red as a limit nears. Click it (or **Usage…** in the menu, `z`, `agentmgr usage`) for every engine: each limit's percent used, percent left, and when it resets.
|
|
6
|
+
- **Where the numbers come from.** Claude Code's 5-hour session and 7-day limits, which it hands a session's status line (Pro, Max and Ultra plans, once a session has had a reply): sessions started here get a status line that records them, and your own status line still shows. Codex's limits from its session logs, when it reports them. For any engine, a limit an agent actually hit, until it resets. No service is asked and no model is called.
|
|
7
|
+
- **Alert, hold, switch.** An alert once per limit at 80% used (adjustable; the new *usage* alert). **Hold new work at** a percent (off by default): no new agent starts on an engine at or past it, and agents already running carry on. **Start new agents here** makes another installed engine the default for new agents.
|
|
8
|
+
- Turn it off with `"usage": { "enabled": false }` in config.json.
|
|
9
|
+
|
|
10
|
+
## 1.50.0 (2026-11-14)
|
|
11
|
+
|
|
12
|
+
- **Reverse engineer.** **🔍 Reverse engineer** in an agent's detail (or the **Reverse** tab of the split, or `agentmgr reverse`) puts the agent's session on the left and a pane on the right. Name a target (an app's folder, a binary's path, a website's address) and what you want to understand; the agent investigates in its own session with the tools of [REA](https://github.com/morluto/rea), the "Reverse Engineer Anything" MCP server, and changes nothing.
|
|
13
|
+
- **The report.** Drawn beside the session as the agent writes it: what the target is, how the feature works as an animated diagram, the data and interfaces, findings with their evidence marked confirmed or inferred, what could not be determined, and a plan for building your own version.
|
|
14
|
+
- **Build it in my project.** The agent writes your own version from the behaviour the report describes, with tests: its own code, nothing copied from the target.
|
|
15
|
+
- **REA is set up by you.** The pane says whether REA is registered with Claude Code for the agent's folder; if it isn't, run `npx rea-agents setup` in a terminal and restart the agent's session. The app installs nothing. Native binaries also need Hopper, Ghidra, IDA or Kuna.
|
|
16
|
+
- **What it is for.** Software you own or are allowed to analyse. The agent is told to analyse only, not to work on getting around licence checks, copy protection or sign-in, and not to collect credentials or personal data.
|
|
17
|
+
|
|
3
18
|
## 1.49.0 (2026-11-14)
|
|
4
19
|
|
|
5
20
|
- **Decide.** **Decide** in the top bar (or `q`, `#decide`, `agentmgr decide`) helps with the decisions, not only the tasks. A plan waiting for review or an agent's question comes with its options, the one recommended, why, the evidence, the risk, how sure it is, and whether it is hard to undo; one click carries out any option, and the same recommendation is on the item's Inbox card. The reasoning is the AI judge's, on your own plan, within its daily budget; with the judge off nothing is recommended or decided.
|
package/README.md
CHANGED
|
@@ -30,6 +30,8 @@ Run one background [Claude Code](https://claude.com/claude-code) agent per inten
|
|
|
30
30
|
- **Plan.** A project's commitment dates (code complete, release candidate, GA) with a checklist of what is still open for each, reminders as they come near, and an at-risk or late flag. A **decision log** gathered from plan reviews, your answers and design docs. A **tech debt radar** from git history and the code. What is open can be handed to an agent.
|
|
31
31
|
- **Your day.** Connect your calendar and Today lays the day out around your meetings: the free time between them with what needs you placed in it, and what each meeting is about.
|
|
32
32
|
- **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**.
|
|
33
|
+
- **Usage.** How much of each engine's plan limits is used and left (Claude Code's 5-hour session and week, Codex's), and when they reset: a chip by the connection light, an alert near a limit, an option to hold new work at a percent, and one click to start new agents on another engine.
|
|
34
|
+
- **Reverse engineer.** Name a target (an app's folder, a binary, a website) and what you want to understand, in the **Reverse** tab beside an agent's session: the agent investigates with [REA](https://github.com/morluto/rea)'s tools and keeps a report with animated diagrams of how it works, the evidence, what could not be determined, and a plan to build your own version.
|
|
33
35
|
- **Runbooks for support.** A runbook for the support team written from a release ticket, every ticket of an epic, or a project's code changes in a time frame: what changed, what customers may see, how to check it, troubleshooting, rollback, when to escalate, and what to confirm with engineering.
|
|
34
36
|
- **Decide.** Help with the decisions, not only the tasks: a plan to review or an agent's question arrives with its options, the one recommended, why, and the risk; calls you keep making become standing decisions that are handled for you and reported; the backlog is ranked by impact; a date at risk is laid out as choices; and past decisions are looked back on.
|
|
35
37
|
- **OS.** The computer the agents run on and how loaded it is right now: processor, load average, memory, swap and disks with the last ten minutes, what each open agent session takes, and the busiest processes.
|
|
@@ -189,9 +191,11 @@ agentmgr remote on | off | status | rotate # phone / remote access (see below
|
|
|
189
191
|
agentmgr backlog add "ask" -r <repo> [-p 1] # queue work; also: ls, start, accept, reopen, move, limit, pause
|
|
190
192
|
agentmgr notify slack --webhook <url> # Slack alerts; also: test, status, on, off, event <name> on|off
|
|
191
193
|
agentmgr debug <agent> "what goes wrong" # debug with an agent; no question prints its report; --fix applies the fixes
|
|
194
|
+
agentmgr reverse <agent> -t /path/to/app "how does search work" # reverse engineer with an agent and REA; no question prints the report; --build builds your own
|
|
192
195
|
agentmgr dates <project> --cc 2026-12-01 --rc 2026-12-10 --ga 2026-12-20 # commitment dates; no dates: where each stands
|
|
193
196
|
agentmgr decisions [project] [--md] # the decision log; --add "<question>" --decision "<what>" adds one
|
|
194
197
|
agentmgr debt <project> --scan # the tech debt radar: files that change often and are hard to read
|
|
198
|
+
agentmgr usage # each engine's plan limits: used, left, resets (--warn 80, --hold 95, --default codex)
|
|
195
199
|
agentmgr runbook --ticket REL-42 # a support runbook from a release ticket (or --epic KEY, or --since 2026-10-01 -p <project>; -o file.md)
|
|
196
200
|
agentmgr decide # what waits for your decision, with its recommendation (--do <n>, --handled, --standing, --autonomy p=level, --priority, --risk)
|
|
197
201
|
agentmgr os # this computer and its load: processor, memory, disks, what each open session takes (--json)
|
|
@@ -1219,6 +1223,30 @@ With it, Today opens with **Your day**:
|
|
|
1219
1223
|
|
|
1220
1224
|
Repeating meetings, time zones, moved or cancelled occurrences and events marked *free* are understood. Several calendars can be added; **Disconnect** forgets them. In config.json: `"calendar": { "ics": ["https://…"], "workStart": "09:00", "workEnd": "18:00" }`.
|
|
1221
1225
|
|
|
1226
|
+
## Usage: what is left of each engine's plan
|
|
1227
|
+
|
|
1228
|
+
A chip by the connection light shows the engine new agents start on with what is used of its limits (`Claude Code 5h 23% · wk 41%`), turning amber and red as a limit nears. Click it (or **Usage…** in the menu, `z`, or `agentmgr usage`) for every engine: each limit with the percent used, the percent left, and when it resets.
|
|
1229
|
+
|
|
1230
|
+
- **Claude Code**: its 5-hour session and 7-day limits. Claude Code hands these to a session's status line command (for Pro, Max and Ultra plans, once the session has had a reply), so the sessions started here get a status line that records them. Your own status line, if you have one, still shows: it is run with the same input. Without one you get a short line with the model and the two percentages. Not for agents in a container.
|
|
1231
|
+
- **Codex**: the limits Codex writes in its session logs, when it reports them.
|
|
1232
|
+
- **Any engine**: a limit an agent actually hits is shown until it resets (and the agent carries on by itself when it does, as before).
|
|
1233
|
+
- **Alert me at** a percent used (80% by default): one alert per limit and reset, in Slack if alerts are on (the *usage* alert).
|
|
1234
|
+
- **Hold new work at** a percent (off by default): no new agent starts on an engine at or past it; the backlog waits and New agents says why. Agents already running carry on.
|
|
1235
|
+
- **Start new agents here** makes another installed engine the default for new agents; agents already running stay where they are (**Continue on** moves one).
|
|
1236
|
+
|
|
1237
|
+
These are numbers the engines hand out on this computer: no service is asked and no model is called. Turn it off with `"usage": { "enabled": false }` in config.json.
|
|
1238
|
+
|
|
1239
|
+
## Reverse engineer
|
|
1240
|
+
|
|
1241
|
+
**🔍 Reverse engineer** in an agent's detail (or the **Reverse** tab of the split) puts the agent's session on the left and a pane on the right. Name a **target** (an app's folder or `.asar`, a binary's path, a website's address) and what you want to understand ("how does search work in this app"). The agent investigates in its own session with the tools of [REA](https://github.com/morluto/rea), the "Reverse Engineer Anything" MCP server, and changes nothing.
|
|
1242
|
+
|
|
1243
|
+
- **The report**, drawn beside the session as the agent writes it: what the target is, how the feature works as an animated diagram, the data and interfaces (storage, formats, calls between processes, network requests), findings with their evidence marked confirmed or inferred, what could not be determined, and a plan for building your own version in this project.
|
|
1244
|
+
- **Follow-ups and building.** **Ask** continues the investigation. **Build it in my project** has the agent write your own version from the behaviour the report describes, with tests: its own code, nothing copied from the target.
|
|
1245
|
+
- **REA is set up by you.** The pane says whether REA is registered with Claude Code for the agent's folder (read from Claude Code's settings and the project's `.mcp.json`; a plugin that brings REA is not seen there). If it isn't, run `npx rea-agents setup` in a terminal and restart the agent's session: the app installs nothing. Native binaries also need Hopper, Ghidra, IDA or Kuna; JavaScript, Electron and websites need nothing more.
|
|
1246
|
+
- **What it is for.** Software you own or are allowed to analyse: a licence or the law may restrict reverse engineering someone else's product. The agent is told to analyse only, not to work on getting around licence checks, copy protection or sign-in, not to collect credentials or personal data, and to build from behaviour without copying code or assets.
|
|
1247
|
+
|
|
1248
|
+
`agentmgr reverse <agent> -t <target> "<what to understand>"` asks from the terminal, `agentmgr reverse <agent>` prints the report, and `--build` builds your own.
|
|
1249
|
+
|
|
1222
1250
|
## Debug
|
|
1223
1251
|
|
|
1224
1252
|
**🐞 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).
|
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -42,6 +42,7 @@ import { initNews } from '/news.js';
|
|
|
42
42
|
import { initPlan } from '/plan.js';
|
|
43
43
|
import { initSystem } from '/system.js';
|
|
44
44
|
import { adviceHtml, initDecide } from '/decide.js';
|
|
45
|
+
import { initUsage } from '/usage.js';
|
|
45
46
|
import { initMcp } from '/mcp.js';
|
|
46
47
|
import { initCodeMap } from '/codemap.js';
|
|
47
48
|
import { initKeys } from '/keys.js';
|
|
@@ -350,6 +351,9 @@ decideUi = initDecide({
|
|
|
350
351
|
onData: () => (renderInbox(), selectedId && renderDetail()),
|
|
351
352
|
});
|
|
352
353
|
$('#decide-btn').onclick = () => decideUi.open();
|
|
354
|
+
// Usage: each engine's plan limits, used and left (the chip by the connection light opens it).
|
|
355
|
+
const usageUi = initUsage({ api, $, esc, ago, toast: (m, ms) => toast(m, ms) });
|
|
356
|
+
$('#usage-btn').onclick = () => usageUi.open();
|
|
353
357
|
// MCP: the MCP servers and tools Claude Code has in a folder, and running one.
|
|
354
358
|
const mcpUi = initMcp({ api, $, esc, ago, md: (t) => md(t), toast: (m, ms) => toast(m, ms), agents: () => [...agents.values()] });
|
|
355
359
|
$('#mcp-btn').onclick = () => mcpUi.open(selectedId && agents.get(selectedId)?.workdir ? selectedId : null);
|
|
@@ -407,6 +411,7 @@ function shortcut(act) {
|
|
|
407
411
|
if (act === 'plan') return planUi.open();
|
|
408
412
|
if (act === 'os') return osUi.open();
|
|
409
413
|
if (act === 'decide') return decideUi.open();
|
|
414
|
+
if (act === 'usage') return usageUi.open();
|
|
410
415
|
if (act === 'today') return todayUi.open();
|
|
411
416
|
if (act.startsWith('tab:')) return showTab(act.slice(4));
|
|
412
417
|
return false;
|
|
@@ -2362,6 +2367,7 @@ function renderDetail() {
|
|
|
2362
2367
|
${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>` : ''}
|
|
2363
2368
|
${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>` : ''}
|
|
2364
2369
|
<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>
|
|
2370
|
+
<button data-act="reverse" class="desk-only" ${a.workdir && a.status !== 'preparing' ? '' : 'disabled'} title="Reverse engineer with this agent and REA's tools: name a target (an app's folder, a binary, a website) and what you want to understand. It investigates in its session and writes a report beside it: how it works with animated diagrams, the evidence, what could not be determined, and a plan to build your own version">🔍 Reverse engineer${a.specDocs?.reverse ? ' <span class="count">report</span>' : ''}</button>
|
|
2365
2371
|
<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>
|
|
2366
2372
|
<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>
|
|
2367
2373
|
<button data-act="edit" title="Change its name, request, project, priority, permission mode or model">Edit</button>
|
|
@@ -3967,6 +3973,9 @@ $('#detail-body').addEventListener('click', async (e) => {
|
|
|
3967
3973
|
case 'debug':
|
|
3968
3974
|
term.open(a.id);
|
|
3969
3975
|
return sidePane.open('debug');
|
|
3976
|
+
case 'reverse':
|
|
3977
|
+
term.open(a.id);
|
|
3978
|
+
return sidePane.open('reverse');
|
|
3970
3979
|
case 'mcp':
|
|
3971
3980
|
return mcpUi.open(a.id);
|
|
3972
3981
|
case 'memory':
|
|
@@ -4550,6 +4559,8 @@ function handleEvent(msg) {
|
|
|
4550
4559
|
valueUi.changed();
|
|
4551
4560
|
} else if (msg.t === 'news') {
|
|
4552
4561
|
newsUi.changed();
|
|
4562
|
+
} else if (msg.t === 'usage') {
|
|
4563
|
+
usageUi.changed();
|
|
4553
4564
|
} else if (msg.t === 'advisor') {
|
|
4554
4565
|
decideUi.changed();
|
|
4555
4566
|
} else if (msg.t === 'plan') {
|
package/public/index.html
CHANGED
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
<button id="about-btn" class="about-btn" type="button" title="About AI Agent Manager: version, release, links">About</button>
|
|
27
27
|
<button id="update-btn" class="update-btn" type="button" hidden></button>
|
|
28
28
|
<span id="conn" class="conn" title="Daemon connection">connecting…</span>
|
|
29
|
+
<button id="usage-chip" class="usage-chip" type="button" hidden></button>
|
|
29
30
|
</div>
|
|
30
31
|
<div class="top-actions">
|
|
31
32
|
<input id="filter" type="search" placeholder="Filter agents" aria-label="Filter agents" />
|
|
@@ -65,6 +66,7 @@
|
|
|
65
66
|
<span id="me-email" class="hint"></span>
|
|
66
67
|
<span id="me-where" class="hint"></span>
|
|
67
68
|
</div>
|
|
69
|
+
<button role="menuitem" id="usage-btn" title="What is used and left of each engine's plan limits (Claude Code's 5-hour session and week, Codex's), and when they reset">Usage…</button>
|
|
68
70
|
<button role="menuitem" id="settings-btn">Settings…</button>
|
|
69
71
|
<button role="menuitem" id="worklog-btn" title="What your agents got done: pull requests, bugs fixed, issues filed; kept in a spreadsheet for reviews">Work record…</button>
|
|
70
72
|
<button role="menuitem" id="cleanup-btn" title="Close agents idle for a while, and delete old closed ones">Clean up…</button>
|
|
@@ -199,6 +201,7 @@
|
|
|
199
201
|
<button class="term-tab" data-side="docs" role="tab" title="Diagrams and the other documents">Docs</button>
|
|
200
202
|
<button class="term-tab" data-side="changes" role="tab" title="Its changes, explained one by one">Changes</button>
|
|
201
203
|
<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>
|
|
204
|
+
<button class="term-tab" data-side="reverse" role="tab" title="Reverse engineer: name a target (an app, a binary, a website) and what to understand; the agent investigates with REA's tools and its report shows here, with diagrams, evidence, what could not be determined, and a plan to build your own">Reverse</button>
|
|
202
205
|
</div>
|
|
203
206
|
<span class="spacer"></span>
|
|
204
207
|
<button type="button" class="ghost small" id="side-close" title="Close the split">✕</button>
|
|
@@ -423,6 +426,9 @@
|
|
|
423
426
|
<dialog id="plan-dialog" class="issues-dialog plan-dialog" aria-label="Plan">
|
|
424
427
|
<div id="plan-body"></div>
|
|
425
428
|
</dialog>
|
|
429
|
+
<dialog id="usage-dialog" class="issues-dialog usage-dialog" aria-label="Usage">
|
|
430
|
+
<div id="usage-body"></div>
|
|
431
|
+
</dialog>
|
|
426
432
|
<dialog id="decide-dialog" class="issues-dialog decide-dialog" aria-label="Decide">
|
|
427
433
|
<div id="decide-body"></div>
|
|
428
434
|
</dialog>
|
|
@@ -607,6 +613,7 @@
|
|
|
607
613
|
<label class="check"><input type="checkbox" name="ev_budget" /> nears or reaches its budget, or today's spend reaches the daily limit</label>
|
|
608
614
|
<label class="check"><input type="checkbox" name="ev_standup" /> the daily standup is ready (with a link to play it)</label>
|
|
609
615
|
<label class="check"><input type="checkbox" name="ev_value" /> value reports (weekly, monthly, quarterly, as set in Value)</label>
|
|
616
|
+
<label class="check"><input type="checkbox" name="ev_usage" /> an engine's plan limit (Claude Code's 5-hour session or week, Codex's) is nearly used up (Usage)</label>
|
|
610
617
|
<label class="check"><input type="checkbox" name="ev_decided" /> something was decided for you: a standing decision of yours applied, or it was within the autonomy you set (Decide)</label>
|
|
611
618
|
<label class="check"><input type="checkbox" name="ev_milestone" /> a project's date (code complete, RC, GA) is 14, 7, 3 or 1 days away, today, or late (Plan → Dates)</label>
|
|
612
619
|
<label class="check"><input type="checkbox" name="ev_waiting" /> finished its turn and is idle after <input name="waitingDelaySec" type="number" min="0" class="num" />s</label>
|
package/public/keys.js
CHANGED
|
@@ -31,6 +31,7 @@ export const SHORTCUTS = [
|
|
|
31
31
|
[['c'], 'Plan: project dates, decisions and tech debt', 'plan'],
|
|
32
32
|
[['u'], 'OS: this computer and its load', 'os'],
|
|
33
33
|
[['q'], 'Decide: recommendations, standing decisions, impact, dates at risk', 'decide'],
|
|
34
|
+
[['z'], "Usage: each engine's plan limits, used and left", 'usage'],
|
|
34
35
|
[['1'], 'Agents tab', 'tab:agents'],
|
|
35
36
|
[['2'], 'Inbox: what needs you', 'tab:inbox'],
|
|
36
37
|
[['3'], 'Backlog', 'tab:backlog'],
|
|
@@ -74,11 +75,11 @@ export const SHORTCUTS = [
|
|
|
74
75
|
// A single key, as an event names it, to its action.
|
|
75
76
|
export const SINGLE = {
|
|
76
77
|
j: 'next', k: 'prev', Enter: 'terminal', t: 'terminal',
|
|
77
|
-
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', c: 'plan', u: 'os', q: 'decide', y: 'today', b: 'bugs', '?': 'help',
|
|
78
|
+
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', c: 'plan', u: 'os', q: 'decide', z: 'usage', y: 'today', b: 'bugs', '?': 'help',
|
|
78
79
|
1: 'tab:agents', 2: 'tab:inbox', 3: 'tab:backlog', 4: 'tab:land', 5: 'tab:built',
|
|
79
80
|
};
|
|
80
81
|
// While Watch is open: only what makes sense there.
|
|
81
|
-
const ON_WATCH = new Set(['today', 'new', 'ask', 'watch', 'standup', 'map', 'issues', 'actions', 'assistant', 'settings', 'designs', 'reviews', 'value', 'news', 'plan', 'os', 'decide', 'bugs', 'help']);
|
|
82
|
+
const ON_WATCH = new Set(['today', 'new', 'ask', 'watch', 'standup', 'map', 'issues', 'actions', 'assistant', 'settings', 'designs', 'reviews', 'value', 'news', 'plan', 'os', 'decide', 'usage', 'bugs', 'help']);
|
|
82
83
|
|
|
83
84
|
/** Typing somewhere: a field, an editor or a terminal (xterm types through a textarea). */
|
|
84
85
|
const typing = (el) => Boolean(el?.closest?.('input, textarea, select, [contenteditable=""], [contenteditable="true"], .xterm, .cm-editor'));
|
package/public/side.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// The split view: the terminal (Claude, a shell or a browser tab) stays on the left, and the right
|
|
2
2
|
// pane shows the same agent's Code, its Docs (Diagrams by default), its Changes explained one by
|
|
3
|
-
// one,
|
|
4
|
-
// report (animated code path and data flow, findings, fixes) grows here
|
|
3
|
+
// one, 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; or Reverse engineer: the
|
|
5
|
+
// same for how something in an app, a binary or a website works, with REA's tools. On, the tab and the
|
|
5
6
|
// document are remembered in this browser.
|
|
6
7
|
import { parseDiff } from '/review.js';
|
|
7
8
|
import { cardHtml, explainButton, listenParts as walkParts, walkthroughOf } from '/walkthrough.js';
|
|
@@ -66,97 +67,150 @@ export function initSide({ api, esc, toast, $, agents, codeUi, docHtml, renderDi
|
|
|
66
67
|
if (st.tab === 'code') codeUi.open(st.agentId);
|
|
67
68
|
else if (st.tab === 'docs') renderDocs(true);
|
|
68
69
|
else if (st.tab === 'debug') renderDebug(true);
|
|
70
|
+
else if (st.tab === 'reverse') renderReverse(true);
|
|
69
71
|
else renderChanges(true);
|
|
70
72
|
refit();
|
|
71
73
|
}
|
|
72
74
|
|
|
73
|
-
// ------------------------------------------------------------ Debug
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
// ------------------------------------------------------------ Debug and Reverse engineer
|
|
76
|
+
// Two investigations of the same shape: you ask, the agent investigates in its session, and its
|
|
77
|
+
// report grows here. They differ in their words, in what follows the report (fixes, or building
|
|
78
|
+
// your own), and Reverse engineer also names a target and needs REA's tools.
|
|
79
|
+
const ASK = {
|
|
80
|
+
debug: {
|
|
81
|
+
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'],
|
|
82
|
+
first: 'What should it debug? For example: E2E tests fail at max scale after about 20 minutes',
|
|
83
|
+
more: 'A follow-up: what you know, what to look at next, or which fixes to apply',
|
|
84
|
+
go: 'Debug',
|
|
85
|
+
short: 'Say what to debug',
|
|
86
|
+
sent: 'Sent to the agent: it investigates in its session',
|
|
87
|
+
then: { key: 'fix', label: 'Apply fixes', sent: 'Asked the agent to apply the fixes', 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" },
|
|
88
|
+
waiting: 'the report shows here once it has the code path',
|
|
89
|
+
empty: '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 ask for a fix.',
|
|
90
|
+
},
|
|
91
|
+
reverse: {
|
|
92
|
+
ideas: ['How does search work?', 'How is data stored and synced?', 'What does it send over the network?', 'How does the plugin system load code?', 'What file format does it save?'],
|
|
93
|
+
first: 'What do you want to understand? For example: how does search work in this app',
|
|
94
|
+
more: 'A follow-up: where to look next, or which part to build',
|
|
95
|
+
go: 'Investigate',
|
|
96
|
+
short: 'Say what you want to understand',
|
|
97
|
+
sent: 'Sent to the agent: it investigates in its session',
|
|
98
|
+
then: { key: 'build', label: 'Build it in my project', sent: 'Asked the agent to build it from the report', title: 'Ask the agent to build your own version in this project from what the report describes: its own code, nothing copied from the target, with tests. Name the part you want in the box, or leave it empty for the plan under "Build it"' },
|
|
99
|
+
waiting: 'the report shows here once it knows the shape of the target',
|
|
100
|
+
empty: "Name a target (an app's folder, a binary, a website) and what you want to understand about it. The agent investigates in its session with REA's tools and writes a report here: how it works with animated diagrams, the evidence behind each claim, what is confirmed and what is inferred, what could not be determined, and a plan for building your own version. It changes nothing until you ask it to build.",
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
const drafts = new Map(); // "<agent>:<kind>" -> what's typed and not sent
|
|
104
|
+
const rea = new Map(); // agent id -> whether REA is registered for its folder
|
|
76
105
|
/** Read the report; `want` is the change time the agent's record names, so each version is read once. */
|
|
77
|
-
async function
|
|
106
|
+
async function loadAsk(kind, want) {
|
|
78
107
|
const id = st.agentId;
|
|
79
|
-
const key = `${id}
|
|
108
|
+
const key = `${id}:${kind}`;
|
|
80
109
|
files.set(key, { ...files.get(key), loading: true });
|
|
81
|
-
const r = await api('GET', `/agents/${id}/specs
|
|
110
|
+
const r = await api('GET', `/agents/${id}/specs/${kind}`).catch(() => null);
|
|
82
111
|
files.set(key, { markdown: r?.markdown ?? null, at: r?.updatedAt ?? null, want, loaded: true });
|
|
83
|
-
if (st.agentId === id && st.on && st.tab ===
|
|
112
|
+
if (st.agentId === id && st.on && st.tab === kind) renderAsk(kind, false);
|
|
113
|
+
}
|
|
114
|
+
async function loadRea() {
|
|
115
|
+
const id = st.agentId;
|
|
116
|
+
rea.set(id, { loading: true });
|
|
117
|
+
rea.set(id, (await api('GET', `/agents/${id}/reverse/rea`).catch(() => null)) ?? { unknown: true });
|
|
118
|
+
if (st.agentId === id && st.on && st.tab === 'reverse') renderAsk('reverse', true);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** What Reverse engineer needs said above its box: whether REA is there, and what it is for. */
|
|
122
|
+
function reverseNotes(a) {
|
|
123
|
+
const r = rea.get(a?.id);
|
|
124
|
+
if (!r && a?.workdir) loadRea();
|
|
125
|
+
const setup = r?.registered
|
|
126
|
+
? `<p class="hint reverse-rea ok">REA is registered in ${esc(r.where)}. Native binaries also need Hopper, Ghidra, IDA or Kuna; JavaScript, Electron and websites need nothing more.</p>`
|
|
127
|
+
: r && !r.loading && !r.unknown
|
|
128
|
+
? `<p class="hint reverse-rea missing"><b>REA was not found</b> in Claude Code's settings for this agent. Set it up in a terminal with <code>${esc(r.setup)}</code>, then restart this agent's session. (If REA came with a plugin, it is not seen here and will still work.) <button type="button" class="link" data-reverse-recheck>Check again</button></p>`
|
|
129
|
+
: '';
|
|
130
|
+
return `${setup}<p class="hint reverse-note">For software you own or are allowed to analyse: a licence or the law may restrict reverse engineering someone else's product. The agent is told to analyse only, not to get around licence checks or sign-in, and to build from behaviour without copying code or assets.</p>`;
|
|
84
131
|
}
|
|
85
132
|
|
|
86
|
-
function
|
|
133
|
+
function renderAsk(kind, force) {
|
|
134
|
+
const w = ASK[kind];
|
|
87
135
|
const a = agents.get(st.agentId);
|
|
88
|
-
const d = files.get(`${st.agentId}
|
|
89
|
-
const want = a?.specDocs?.
|
|
90
|
-
if ((!d || (d.loaded && d.want !== want)) && !d?.loading)
|
|
91
|
-
const asks = a?.
|
|
136
|
+
const d = files.get(`${st.agentId}:${kind}`);
|
|
137
|
+
const want = a?.specDocs?.[kind] ?? null;
|
|
138
|
+
if ((!d || (d.loaded && d.want !== want)) && !d?.loading) loadAsk(kind, want);
|
|
139
|
+
const asks = a?.[kind]?.asks ?? [];
|
|
92
140
|
const working = Boolean(a?.runtime?.busy || a?.outbox);
|
|
93
141
|
const has = Boolean(d?.markdown);
|
|
94
|
-
const
|
|
142
|
+
const r = rea.get(st.agentId);
|
|
143
|
+
const sig = `${kind}|${st.agentId}|${d?.at}|${Boolean(d?.loaded)}|${asks.length}|${working}|${Boolean(a?.workdir)}|${kind === 'reverse' ? `${r?.registered}|${Boolean(r?.loading)}|${a?.reverse?.target ?? ''}` : ''}`;
|
|
95
144
|
if (!force && sig === st.sig) return;
|
|
96
145
|
st.sig = sig;
|
|
97
146
|
// What's being typed, and where the caret is, survive the redraw.
|
|
98
|
-
const old = body.querySelector(
|
|
99
|
-
|
|
100
|
-
|
|
147
|
+
const old = body.querySelector(`[data-${kind}-text]`);
|
|
148
|
+
const key = `${st.agentId}:${kind}`;
|
|
149
|
+
if (old) drafts.set(key, old.value);
|
|
150
|
+
const oldTarget = body.querySelector('[data-reverse-target]');
|
|
151
|
+
if (kind === 'reverse' && oldTarget) drafts.set(`${key}:target`, oldTarget.value);
|
|
152
|
+
const focused = [old, oldTarget].find((el) => el && document.activeElement === el);
|
|
153
|
+
const typing = focused ? [focused === old ? `[data-${kind}-text]` : '[data-reverse-target]', focused.selectionStart, focused.selectionEnd] : null;
|
|
101
154
|
const top = body.querySelector('.side-scroll')?.scrollTop ?? 0;
|
|
102
|
-
const draft = drafts.get(
|
|
103
|
-
const ideas = has || asks.length ? '' : `<div class="debug-ideas">${
|
|
155
|
+
const draft = drafts.get(key) ?? '';
|
|
156
|
+
const ideas = has || asks.length ? '' : `<div class="debug-ideas">${w.ideas.map((t) => `<button type="button" class="chip" data-ask-idea data-${kind}-idea>${esc(t)}</button>`).join('')}</div>`;
|
|
104
157
|
const status = !asks.length
|
|
105
158
|
? ''
|
|
106
159
|
: 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' :
|
|
160
|
+
? `<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' : `; ${w.waiting}`}.</p>`
|
|
108
161
|
: has
|
|
109
162
|
? ''
|
|
110
163
|
: '<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
164
|
const asked = asks.length
|
|
112
|
-
? `<details class="debug-asked"><summary>Asked (${asks.length})</summary><ol>${asks.map((x) => `<li>${x.kind ===
|
|
165
|
+
? `<details class="debug-asked"><summary>Asked (${asks.length})</summary><ol>${asks.map((x) => `<li>${x.kind === w.then.key ? `<span class="tag">${w.then.key}</span> ` : ''}${esc(x.text)}</li>`).join('')}</ol></details>`
|
|
113
166
|
: '';
|
|
114
|
-
const report = has
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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>
|
|
167
|
+
const report = has ? `<div class="md debug-report">${docHtml(d.markdown)}</div>` : d?.loaded ? (asks.length ? '' : `<p class="hint">${esc(w.empty)}</p>`) : '<p class="hint">Loading…</p>';
|
|
168
|
+
const target = kind === 'reverse' ? `<input data-reverse-target ${a?.workdir ? '' : 'disabled'} value="${esc(drafts.get(`${key}:target`) ?? a?.reverse?.target ?? '')}" placeholder="The target: /Applications/Notes.app, ~/Downloads/app.asar, a binary's path, or https://example.com" aria-label="The target" />` : '';
|
|
169
|
+
body.innerHTML = `<div class="side-scroll debug-view ${kind}-view">
|
|
170
|
+
<form class="debug-ask" data-ask-form="${kind}" data-${kind}-form>
|
|
171
|
+
${target}
|
|
172
|
+
<textarea data-${kind}-text rows="2" ${a?.workdir ? '' : 'disabled'} placeholder="${esc(has ? w.more : w.first)}">${esc(draft)}</textarea>
|
|
124
173
|
${ideas}
|
|
125
174
|
<div class="debug-actions">
|
|
126
175
|
<span class="hint">${has && d.at ? `Report updated ${esc(new Date(d.at).toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' }))}` : ''}</span>
|
|
127
176
|
<span class="spacer"></span>
|
|
128
|
-
${has ? `<button type="button" class="small" data
|
|
129
|
-
<button class="small primary" ${a?.workdir ? '' : 'disabled'}>${has ? 'Ask' :
|
|
177
|
+
${has ? `<button type="button" class="small" data-${kind}-${w.then.key} title="${esc(w.then.title)}">${esc(w.then.label)}</button>` : ''}
|
|
178
|
+
<button class="small primary" ${a?.workdir ? '' : 'disabled'}>${has ? 'Ask' : w.go}</button>
|
|
130
179
|
</div>
|
|
131
180
|
</form>
|
|
181
|
+
${kind === 'reverse' ? reverseNotes(a) : ''}
|
|
132
182
|
${status}${asked}${report}
|
|
133
183
|
</div>`;
|
|
134
|
-
const text = body.querySelector('[data-debug-text]');
|
|
135
184
|
if (typing) {
|
|
136
|
-
|
|
137
|
-
|
|
185
|
+
const el = body.querySelector(typing[0]);
|
|
186
|
+
el.focus();
|
|
187
|
+
el.setSelectionRange(typing[1], typing[2]);
|
|
138
188
|
}
|
|
139
189
|
body.querySelector('.side-scroll').scrollTop = top;
|
|
140
190
|
renderDiagrams(body);
|
|
141
191
|
}
|
|
192
|
+
const renderDebug = (force) => renderAsk('debug', force);
|
|
193
|
+
const renderReverse = (force) => renderAsk('reverse', force);
|
|
142
194
|
|
|
143
|
-
async function
|
|
195
|
+
async function sendAsk(kind, payload) {
|
|
144
196
|
const id = st.agentId;
|
|
197
|
+
const w = ASK[kind];
|
|
145
198
|
try {
|
|
146
|
-
agents.set(id, await api('POST', `/agents/${id}
|
|
147
|
-
drafts.delete(id);
|
|
148
|
-
const text = body.querySelector(
|
|
199
|
+
agents.set(id, await api('POST', `/agents/${id}/${kind}`, payload));
|
|
200
|
+
drafts.delete(`${id}:${kind}`);
|
|
201
|
+
const text = body.querySelector(`[data-${kind}-text]`);
|
|
149
202
|
if (text) text.value = '';
|
|
150
|
-
toast(payload.
|
|
203
|
+
toast(payload[w.then.key] ? w.then.sent : w.sent, 3000);
|
|
151
204
|
} catch (err) {
|
|
152
205
|
toast(`Error: ${err.message}`, 5000);
|
|
153
206
|
}
|
|
154
|
-
if (st.agentId === id && st.tab ===
|
|
207
|
+
if (st.agentId === id && st.tab === kind) renderAsk(kind, true);
|
|
155
208
|
}
|
|
156
209
|
// While the agent works, the report is read again now and then: it writes it as it goes.
|
|
157
210
|
setInterval(() => {
|
|
158
211
|
const a = agents.get(st.agentId);
|
|
159
|
-
|
|
212
|
+
const kind = st.tab;
|
|
213
|
+
if (st.on && ASK[kind] && a?.[kind] && (a.runtime?.busy || a.outbox) && !files.get(`${a.id}:${kind}`)?.loading) loadAsk(kind, a.specDocs?.[kind] ?? null);
|
|
160
214
|
}, 5000);
|
|
161
215
|
|
|
162
216
|
// ------------------------------------------------------------ Docs
|
|
@@ -248,13 +302,15 @@ export function initSide({ api, esc, toast, $, agents, codeUi, docHtml, renderDi
|
|
|
248
302
|
if (tab) return setTab(tab.dataset.side);
|
|
249
303
|
if (e.target.closest('#side-close')) return toggle(false);
|
|
250
304
|
if (e.target.closest('[data-side-reload]')) return loadChanges();
|
|
251
|
-
const idea = e.target.closest('[data-
|
|
305
|
+
const idea = e.target.closest('[data-ask-idea]');
|
|
252
306
|
if (idea) {
|
|
253
|
-
const text = body.querySelector(
|
|
307
|
+
const text = body.querySelector(`[data-${st.tab}-text]`);
|
|
254
308
|
text.value = idea.textContent;
|
|
255
309
|
return text.focus();
|
|
256
310
|
}
|
|
257
|
-
if (e.target.closest('[data-debug-fix]')) return
|
|
311
|
+
if (e.target.closest('[data-debug-fix]')) return sendAsk('debug', { fix: body.querySelector('[data-debug-text]').value.trim() || true });
|
|
312
|
+
if (e.target.closest('[data-reverse-build]')) return sendAsk('reverse', { build: body.querySelector('[data-reverse-text]').value.trim() || true });
|
|
313
|
+
if (e.target.closest('[data-reverse-recheck]')) return loadRea();
|
|
258
314
|
try {
|
|
259
315
|
if (e.target.closest('[data-side-explain]')) {
|
|
260
316
|
agents.set(st.agentId, await api('POST', `/agents/${st.agentId}/docs/walkthrough?background=1`));
|
|
@@ -270,15 +326,19 @@ export function initSide({ api, esc, toast, $, agents, codeUi, docHtml, renderDi
|
|
|
270
326
|
}
|
|
271
327
|
});
|
|
272
328
|
pane.addEventListener('submit', (e) => {
|
|
273
|
-
|
|
329
|
+
const kind = e.target.dataset.askForm;
|
|
330
|
+
if (!ASK[kind]) return;
|
|
274
331
|
e.preventDefault();
|
|
275
|
-
const question = body.querySelector(
|
|
276
|
-
if (question.length < 3) return toast(
|
|
277
|
-
|
|
332
|
+
const question = body.querySelector(`[data-${kind}-text]`).value.trim();
|
|
333
|
+
if (question.length < 3) return toast(ASK[kind].short, 3000);
|
|
334
|
+
if (kind === 'debug') return sendAsk('debug', { question });
|
|
335
|
+
const target = body.querySelector('[data-reverse-target]').value.trim();
|
|
336
|
+
if (!target) return toast("Name the target: an app's folder, a binary's path, or a website's address", 4000);
|
|
337
|
+
sendAsk('reverse', { question, target });
|
|
278
338
|
});
|
|
279
339
|
// Enter sends; Shift+Enter is a new line.
|
|
280
340
|
pane.addEventListener('keydown', (e) => {
|
|
281
|
-
if (e.key === 'Enter' && !e.shiftKey && !e.isComposing && e.target.matches('[data-debug-text]')) {
|
|
341
|
+
if (e.key === 'Enter' && !e.shiftKey && !e.isComposing && e.target.matches('[data-debug-text], [data-reverse-text]')) {
|
|
282
342
|
e.preventDefault();
|
|
283
343
|
e.target.form.requestSubmit();
|
|
284
344
|
}
|
|
@@ -345,6 +405,7 @@ export function initSide({ api, esc, toast, $, agents, codeUi, docHtml, renderDi
|
|
|
345
405
|
if (!st.on || a.id !== st.agentId) return;
|
|
346
406
|
if (st.tab === 'docs') renderDocs(false);
|
|
347
407
|
else if (st.tab === 'debug') renderDebug(false);
|
|
408
|
+
else if (st.tab === 'reverse') renderReverse(false);
|
|
348
409
|
else if (st.tab === 'changes') renderChanges(false);
|
|
349
410
|
},
|
|
350
411
|
};
|
package/public/style.css
CHANGED
|
@@ -999,6 +999,10 @@ form.dropping { outline: 2px dashed var(--accent, #6b8cff); outline-offset: 4px;
|
|
|
999
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
1000
|
@keyframes debug-pulse { 50% { opacity: .25; } }
|
|
1001
1001
|
@media (prefers-reduced-motion: reduce) { .debug-dot { animation: none; } }
|
|
1002
|
+
.reverse-view input[data-reverse-target] { width: 100%; box-sizing: border-box; }
|
|
1003
|
+
.reverse-rea, .reverse-note { margin: 0; }
|
|
1004
|
+
.reverse-rea.missing { padding: 6px 10px; border-left: 3px solid var(--yellow); }
|
|
1005
|
+
.reverse-rea.ok { color: var(--green); }
|
|
1002
1006
|
.debug-asked summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
|
|
1003
1007
|
.debug-asked ol { margin: 6px 0 0; padding-left: 22px; }
|
|
1004
1008
|
.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); }
|
|
@@ -1291,7 +1295,7 @@ table.bench-cases tr.faster td:nth-child(5) { color: var(--green); font-weight:
|
|
|
1291
1295
|
.issues-dialog { width: min(1100px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 16px; }
|
|
1292
1296
|
/* Only while open: a display on the dialog itself would keep a closed one on screen. */
|
|
1293
1297
|
.issues-dialog[open] { display: flex; flex-direction: column; }
|
|
1294
|
-
#issues-body, #actions-body, #designs-body, #reviews-body, #bugs-body, #plan-body, #news-body, #os-body, #decide-body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
|
|
1298
|
+
#issues-body, #actions-body, #designs-body, #reviews-body, #bugs-body, #plan-body, #news-body, #os-body, #decide-body, #usage-body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
|
|
1295
1299
|
/* The lists: drag the corner to any size, or fill the window (⤢ or f). */
|
|
1296
1300
|
.issues-dialog { resize: both; overflow: hidden; min-width: min(520px, calc(100% - 32px)); min-height: 240px; max-width: calc(100% - 16px); max-height: calc(100% - 16px); }
|
|
1297
1301
|
.issues-dialog.expanded { width: calc(100% - 16px); height: calc(100% - 16px); }
|
|
@@ -1448,6 +1452,26 @@ table.plan-debt .plan-score b { position: relative; padding-left: 6px; }
|
|
|
1448
1452
|
.plan-bar-fill { position: absolute; left: 0; top: 6px; bottom: 6px; background: color-mix(in srgb, var(--red) 22%, transparent); border-radius: 3px; }
|
|
1449
1453
|
table.plan-debt code { overflow-wrap: anywhere; }
|
|
1450
1454
|
/* AI News: a day heading, then each release with its lab, summary and links. */
|
|
1455
|
+
/* ---------- Usage: each engine's plan limits, used and left */
|
|
1456
|
+
.usage-chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); white-space: nowrap; cursor: pointer; font-variant-numeric: tabular-nums; }
|
|
1457
|
+
.usage-chip.warn { color: var(--yellow); border-color: var(--yellow); }
|
|
1458
|
+
.usage-chip.high, .usage-chip.held, .usage-chip.limited { color: var(--red); border-color: var(--red); }
|
|
1459
|
+
.usage-dialog { width: min(760px, calc(100% - 32px)); }
|
|
1460
|
+
.usage-scroll { border: 0; }
|
|
1461
|
+
.usage-window { margin: 8px 0 2px; }
|
|
1462
|
+
.usage-window-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
|
|
1463
|
+
.usage-num { font-variant-numeric: tabular-nums; }
|
|
1464
|
+
.usage-left { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--green); }
|
|
1465
|
+
.usage-left.busy { color: var(--yellow); }
|
|
1466
|
+
.usage-left.heavy { color: var(--red); }
|
|
1467
|
+
.usage-level.ok { color: var(--green); }
|
|
1468
|
+
.usage-level.warn { color: var(--yellow); border-color: var(--yellow); }
|
|
1469
|
+
.usage-level.high, .usage-level.held, .usage-level.limited { color: var(--red); border-color: var(--red); }
|
|
1470
|
+
.usage-settings { display: flex; gap: 18px; flex-wrap: wrap; margin: 6px 0 8px; font-size: 13px; }
|
|
1471
|
+
.usage-settings label { display: flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; }
|
|
1472
|
+
.usage-settings select { width: auto; }
|
|
1473
|
+
@media (max-width: 760px) { .usage-chip { display: none; } }
|
|
1474
|
+
|
|
1451
1475
|
/* ---------- Runbooks for the support team (a tab of Plan) */
|
|
1452
1476
|
.rb-form input[name="key"] { flex: 1 1 240px; min-width: 0; }
|
|
1453
1477
|
.rb-form input[name="note"] { flex: 2 1 260px; min-width: 0; }
|