ai-agentmanager 1.18.0 → 1.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.18.2 (2026-11-05)
4
+
5
+ - **Show one project's agents.** A project picker above the agents list shows only that project's agents (**All projects** for everyone). Each browser remembers it.
6
+ - **Newest first** orders the agents list by creation date, the newest on top.
7
+
8
+ ## 1.18.1 (2026-11-04)
9
+
10
+ - **Planning moves into the repo by itself once it's cloned**, even with its terminal open: no more waiting for **Continue in repo**. It still waits until Claude is idle and you haven't typed for 15 seconds, so nothing is cut off. **Continue in repo** still moves it right away.
11
+
3
12
  ## 1.18.0 (2026-11-04)
4
13
 
5
14
  - **Goals.** Give an outcome for today, this week or no deadline, across one or more projects (**+ Goal** in the Backlog tab, or `agentmgr goal add`). It's planned into tasks, one agent each, which go to the backlog and run until done; autopilot ships them where it's on. When all are finished, the outcome is checked against what was delivered and what's missing is queued, for up to 2 more rounds. Each goal keeps **completed**, **pending** and **follow-ups** current, with **Copy summary**, **Carry over** when overdue, and an optional look at the plan before agents start.
package/README.md CHANGED
@@ -286,7 +286,7 @@ Cloning a big repo can take a while. Tick **Plan with Claude while the repo clon
286
286
 
287
287
  1. **Planning.** Claude runs in `~/.agentmanager/planning` with the agent's own session ID. It is told the repo isn't there yet and to clarify the task with you: ask questions, gather requirements, agree on a plan. It doesn't edit files.
288
288
  2. **Handoff.** When the workspace is ready, the session's transcript is copied into the repo folder and the same session resumes there (`claude --resume <id>`). Claude gets the message "The repository is ready … continue with the plan we agreed on" and has the whole planning conversation. The session ID doesn't change.
289
- 3. **Timing.** It moves by itself once Claude has been idle for `handoffIdleSec` and no terminal is attached. If you have the terminal open, it waits for **Continue in repo** (or `agentmgr handoff <agent>`), so it never cuts you off mid-sentence.
289
+ 3. **Timing.** It moves by itself once the workspace is ready and Claude has been idle for `handoffIdleSec`, with no click needed. If you have the terminal open, it also waits until you haven't typed for 15 seconds, so it never cuts you off mid-sentence. **Continue in repo** (or `agentmgr handoff <agent>`) moves it right away.
290
290
 
291
291
  If setup fails while you're planning, the planning session keeps running and **Retry setup** tries again.
292
292
 
@@ -320,7 +320,7 @@ Every agent has a priority, **P0** (urgent) to **P3** (low). **P2** is the defau
320
320
 
321
321
  - **Look.** P0 shows a solid red chip and a red bar on the agent. P1 shows a red outline chip, and P3 a muted chip. P2 shows nothing, to keep the list calm.
322
322
  - **Ordering.** In the **By project** order, agents within a project sort by priority, then needs-input, then running. Projects holding a P0 or P1 agent move to the top and show the chip in their header.
323
- - **Order.** The list starts with the agents created or used most recently on top: one list, each agent with its project. A new agent starts at the top; after that, you or it working in it moves it up (typing, its conversation, its brief); a restart alone doesn't. Above the list, switch to **Running first** (running agents on top, most recently used first, then the rest) or **By project** (the grouping described here). Each browser remembers its choice.
323
+ - **Order.** The list starts with the agents created or used most recently on top: one list, each agent with its project. A new agent starts at the top; after that, you or it working in it moves it up (typing, its conversation, its brief); a restart alone doesn't. Above the list, switch to **Running first** (running agents on top, most recently used first, then the rest), **Newest first** (by creation date, the newest on top) or **By project** (the grouping described here). Next to it, pick a project to see only its agents. Each browser remembers both choices.
324
324
  - **Setting it.** Use the selector next to the agent's name, the New agents dialog, `add --priority P1`, or `agentmgr priority <agent> P0`.
325
325
  - **Backlog.** Items use the same P0–P3 scale and pass it on to their agents.
326
326
  - **Slack.** Alerts are tagged `[P0]` / `[P1]`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-agentmanager",
3
- "version": "1.18.0",
3
+ "version": "1.18.2",
4
4
  "description": "Run background coding agents (Claude Code, Codex) per intent, and keep track of them from a web UI, your phone or the CLI",
5
5
  "keywords": [
6
6
  "claude",
package/public/app.js CHANGED
@@ -60,8 +60,8 @@ const saveRecent = () => {
60
60
  localStorage.setItem('agentmgr.recentDays', String(recent.days));
61
61
  } catch {}
62
62
  };
63
- // How the agents list is ordered: recently used (the default) or running first, one list each; or grouped by project.
64
- const ORDERS = ['recent', 'running', 'project'];
63
+ // How the agents list is ordered: recently used (the default), running first or newest first, one list each; or grouped by project.
64
+ const ORDERS = ['recent', 'running', 'created', 'project'];
65
65
  let listOrder = (() => {
66
66
  try {
67
67
  const v = localStorage.getItem('agentmgr.listOrder');
@@ -70,6 +70,14 @@ let listOrder = (() => {
70
70
  return 'recent';
71
71
  }
72
72
  })();
73
+ // Show only one project's agents ('' = every project).
74
+ let listProject = (() => {
75
+ try {
76
+ return localStorage.getItem('agentmgr.listProject') ?? '';
77
+ } catch {
78
+ return '';
79
+ }
80
+ })();
73
81
 
74
82
  // ------------------------------------------------------------------ helpers
75
83
 
@@ -821,11 +829,26 @@ function projectGroups(list) {
821
829
  );
822
830
  }
823
831
 
824
- /** One list, most recently used first (Running first: the running agents, then the rest). */
832
+ /** One list, most recently used first (Running first: the running agents, then the rest; Newest first: by creation). */
825
833
  const usedAt = (a) => a.activeAt ?? a.createdAt ?? '';
826
834
  function orderedAgents(list) {
827
835
  const top = (a) => (listOrder === 'running' && !a.runtime.running ? 1 : 0);
828
- return [...list].sort((a, b) => top(a) - top(b) || usedAt(b).localeCompare(usedAt(a)));
836
+ const at = listOrder === 'created' ? (a) => a.createdAt ?? '' : usedAt;
837
+ return [...list].sort((a, b) => top(a) - top(b) || at(b).localeCompare(at(a)));
838
+ }
839
+
840
+ /** The project picker: every project with agents, by name; a project that's gone falls back to all. */
841
+ function renderProjectPicker(all) {
842
+ const groups = projectGroups(all).sort((a, b) => a.label.localeCompare(b.label));
843
+ if (listProject && !groups.some((g) => g.key === listProject)) listProject = '';
844
+ const sel = $('#list-project');
845
+ sel.hidden = groups.length < 2 && !listProject;
846
+ const html = `<option value="">All projects</option>${groups.map((g) => `<option value="${esc(g.key)}">${esc(g.label)} (${g.agents.length})</option>`).join('')}`;
847
+ if (sel.dataset.html !== html) {
848
+ sel.innerHTML = html;
849
+ sel.dataset.html = html;
850
+ }
851
+ sel.value = listProject;
829
852
  }
830
853
 
831
854
  function renderList() {
@@ -834,8 +857,11 @@ function renderList() {
834
857
  document.title = waiting ? `(${waiting}) AI Agent Manager` : 'AI Agent Manager';
835
858
  // "@cc" shows one project; any other text also matches shortcuts.
836
859
  const at = filterText.startsWith('@') ? filterText.slice(1) : null;
860
+ renderProjectPicker([...agents.values()]);
837
861
  const list = [...agents.values()].filter((a) =>
838
- !filterText
862
+ listProject && (a.projectInfo?.key ?? 'other') !== listProject
863
+ ? false
864
+ : !filterText
839
865
  ? true
840
866
  : at !== null
841
867
  ? (a.projectInfo?.shortcut ?? '') === at || (at && (a.projectInfo?.shortcut ?? '').startsWith(at))
@@ -1938,7 +1964,7 @@ function renderDetail() {
1938
1964
  : ''}
1939
1965
  ${a.runtime.planning && a.workdir && a.status !== 'preparing'
1940
1966
  ? `<div class="ready-box">
1941
- <span>The workspace is ready. The planning session moves into the repo when you leave the terminal, or now:</span>
1967
+ <span>The workspace is ready. The planning session moves into the repo as soon as Claude is idle and you pause typing, or now:</span>
1942
1968
  <button class="primary small" data-act="handoff">Continue in repo</button>
1943
1969
  </div>`
1944
1970
  : ''}
@@ -3560,6 +3586,13 @@ $('#list-order').addEventListener('change', (e) => {
3560
3586
  } catch {}
3561
3587
  renderList();
3562
3588
  });
3589
+ $('#list-project').addEventListener('change', (e) => {
3590
+ listProject = e.target.value;
3591
+ try {
3592
+ localStorage.setItem('agentmgr.listProject', listProject);
3593
+ } catch {}
3594
+ renderList();
3595
+ });
3563
3596
  $('#recent-days').value = recent.days;
3564
3597
  $('#recent-on').addEventListener('change', (e) => {
3565
3598
  recent.on = e.target.checked;
package/public/index.html CHANGED
@@ -75,9 +75,11 @@
75
75
  </label>
76
76
  <input type="number" id="recent-days" min="1" max="3650" value="7" aria-label="Days"> days
77
77
  <span class="spacer"></span><span id="recent-hidden"></span>
78
- <select id="list-order" aria-label="Order" title="Recently used: one list, the agents created or worked in most recently on top. Running first: running agents on top, most recently used first, then the rest. By project: grouped, busiest and most urgent first.">
78
+ <select id="list-project" aria-label="Project" title="Show only one project's agents" hidden></select>
79
+ <select id="list-order" aria-label="Order" title="Recently used: one list, the agents created or worked in most recently on top. Running first: running agents on top, most recently used first, then the rest. Newest first: by creation date, the newest on top. By project: grouped, busiest and most urgent first.">
79
80
  <option value="recent">Recently used</option>
80
81
  <option value="running">Running first</option>
82
+ <option value="created">Newest first</option>
81
83
  <option value="project">By project</option>
82
84
  </select>
83
85
  </div>
package/public/style.css CHANGED
@@ -168,7 +168,9 @@ body.term-max .layout { grid-template-columns: 1fr; }
168
168
  .recent-switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; margin: 0; font-weight: normal; }
169
169
  .recent-switch input { width: auto; margin: 0; }
170
170
  .recent-bar input[type="number"] { width: 56px; flex: none; padding: 2px 6px; font-size: 12px; }
171
- #list-order { width: auto; flex: none; padding: 1px 4px; font-size: 12px; }
171
+ #list-order, #list-project { width: auto; flex: none; padding: 1px 4px; font-size: 12px; }
172
+ #list-project { max-width: 160px; }
173
+ #list-project[hidden] { display: none; }
172
174
  .agent-list li.agent .tag.proj { cursor: default; }
173
175
  .agent-list { list-style: none; margin: 0; padding: 0; }
174
176
  .agent-list li.project { border-bottom: 1px solid var(--border); }
package/src/config.js CHANGED
@@ -63,7 +63,7 @@ const DEFAULTS = {
63
63
  // Pre-accept Claude's "trust this folder" prompt for the folders agents run in.
64
64
  trustAgentFolders: true,
65
65
  // A planning session moves into the repo by itself once Claude has been idle this
66
- // long and no terminal is attached; otherwise it waits for "Continue in repo".
66
+ // long (and, with its terminal open, you haven't typed for 15 seconds).
67
67
  handoffIdleSec: 5,
68
68
  // The AI judge (stuck, idle screens, reviews); see JUDGE_DEFAULTS in judge.js for every field.
69
69
  judge: { enabled: true },
package/src/manager.js CHANGED
@@ -151,6 +151,8 @@ const ANSI = /\x1b(\[[0-9;?<>=]*[ -\/]*[@-~]|\][^\x07\x1b]*(\x07|\x1b\\)|[()][0-
151
151
  // When a link is found from several sources, the higher-ranked source is kept.
152
152
  const SOURCE_RANK = { manual: 5, intent: 4, session: 3, branch: 2, mentioned: 1 };
153
153
  const BUSY_IDLE_MS = 3000;
154
+ // A planning session moves into its ready repo only after this long without you typing in it.
155
+ const HANDOFF_TYPING_MS = 15000;
154
156
  // The attention label engines give a tool permission menu (what rules can answer).
155
157
  const PERMISSION = 'Permission prompt';
156
158
  /** Looser stuck thresholds: candidates the judge looks at before anyone is bothered. */
@@ -1256,16 +1258,19 @@ export class AgentManager extends EventEmitter {
1256
1258
 
1257
1259
  /**
1258
1260
  * Move a planning session into its now-ready workspace. Without `force` it
1259
- * only does so when nobody is looking at the terminal and Claude is idle, so
1260
- * it never yanks the session away mid-conversation; otherwise it flags the
1261
- * agent "ready" and waits for Continue in repo.
1261
+ * waits until Claude is idle and, with a terminal open, you have stopped
1262
+ * typing too, so it never yanks the session away mid-turn or mid-sentence;
1263
+ * until then it flags the agent "ready" (Continue in repo moves it now).
1262
1264
  */
1263
1265
  async maybeHandoff(id, { force = false } = {}) {
1264
1266
  const agent = this.store.get(id);
1265
1267
  const rt = this.runtimes.get(id);
1266
1268
  if (!agent?.workdir || agent.status === 'preparing' || !(rt?.pty && rt.planning)) return agent && this.view(agent);
1267
1269
  const idleMs = (this.config.handoffIdleSec ?? 5) * 1000;
1268
- const quiet = !rt.clients.size && !rt.busy && Date.now() - (rt.lastOutputAt ?? 0) >= idleMs;
1270
+ const t = Date.now();
1271
+ // Watching the terminal: also wait for a pause in your typing (a half-typed message is lost in the move).
1272
+ const typing = rt.clients.size > 0 && t - (this.inputAt.get(id) ?? 0) < Math.max(idleMs, HANDOFF_TYPING_MS);
1273
+ const quiet = !rt.busy && !typing && t - (rt.lastOutputAt ?? 0) >= idleMs;
1269
1274
  if (!force && !quiet) {
1270
1275
  if (!agent.planning?.ready) this.patch(id, { planning: { ...agent.planning, ready: true } });
1271
1276
  return this.view(agent);