pi-cowboy 0.15.1 → 0.15.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.
@@ -19,7 +19,7 @@ const NUDGE_DELAY_MS = 200;
19
19
  // --- SpawnCoordinator ---
20
20
  export class SpawnCoordinator {
21
21
  manager;
22
- /** Background agent ids; every settlement of one nudges. */
22
+ /** Background agent ids; every settlement of one nudges, except a stop the user ordered. */
23
23
  backgroundAgentIds = new Set();
24
24
  /** Pending nudge agent ids. */
25
25
  pendingNudges = new Set();
@@ -138,15 +138,17 @@ export class SpawnCoordinator {
138
138
  }, NUDGE_DELAY_MS);
139
139
  }
140
140
  /**
141
- * Nudge on every settlement of a background agent — a revived run notifies on each
142
- * settlement, not just the first. Only dispose clears the set.
141
+ * Nudge on every settlement of a background agent — a revived run notifies on
142
+ * each settlement, not just the first. A stop the user ordered from the status
143
+ * menu is the one exception: they did it on purpose, so the orchestrator is not
144
+ * woken to react. Only dispose clears the set.
143
145
  */
144
146
  onAgentComplete(spawn) {
145
147
  if (!this.backgroundAgentIds.has(spawn.id))
146
148
  return;
147
- // A stop the parent ordered itself is not news: stop_cowboy_agent returned that
148
- // same settlement to the caller that made the call.
149
- if (stoppedByParent(spawn))
149
+ // A stop the user ordered from the menu is not news — they were right there.
150
+ // A stop the orchestrator ordered through stop_cowboy_agent still reports.
151
+ if (stoppedByUser(spawn))
150
152
  return;
151
153
  this.scheduleNudge(spawn.id);
152
154
  }
@@ -246,10 +248,10 @@ export class SpawnCoordinator {
246
248
  }
247
249
  }
248
250
  }
249
- /** Whether a settlement is a stop the parent agent requested through its own tool. */
250
- function stoppedByParent(spawn) {
251
+ /** Whether a settlement is a stop the user ordered from the status menu. */
252
+ function stoppedByUser(spawn) {
251
253
  const lifecycle = spawn.lifecycle;
252
254
  return (hasOutcome(lifecycle) &&
253
255
  lifecycle.status === "stopped" &&
254
- lifecycle.stop.initiator === "agent");
256
+ lifecycle.stop.initiator === "user");
255
257
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-cowboy",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "type": "module",
5
5
  "packageManager": "pnpm@12.9.1",
6
6
  "description": "Agent orchestrator for pi: can manage Codex, Claude Code, OpenCode, pi, pig and pi-bolt as subagents. Runs subagents in background Herdr panes, isolated in copy-on-write Git worktrees.",