ai-agentmanager 1.18.0 → 1.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.18.1 (2026-11-04)
4
+
5
+ - **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.
6
+
3
7
  ## 1.18.0 (2026-11-04)
4
8
 
5
9
  - **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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-agentmanager",
3
- "version": "1.18.0",
3
+ "version": "1.18.1",
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
@@ -1938,7 +1938,7 @@ function renderDetail() {
1938
1938
  : ''}
1939
1939
  ${a.runtime.planning && a.workdir && a.status !== 'preparing'
1940
1940
  ? `<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>
1941
+ <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
1942
  <button class="primary small" data-act="handoff">Continue in repo</button>
1943
1943
  </div>`
1944
1944
  : ''}
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);