@os-eco/overstory-cli 0.10.3 → 0.11.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/README.md +4 -2
- package/agents/builder.md +10 -1
- package/agents/lead.md +106 -5
- package/package.json +1 -1
- package/src/agents/headless-mail-injector.ts +8 -0
- package/src/agents/mail-poll-detect.test.ts +153 -0
- package/src/agents/mail-poll-detect.ts +73 -0
- package/src/agents/overlay.test.ts +56 -0
- package/src/agents/overlay.ts +33 -0
- package/src/agents/scope-detect.test.ts +190 -0
- package/src/agents/scope-detect.ts +146 -0
- package/src/agents/turn-runner.test.ts +862 -0
- package/src/agents/turn-runner.ts +225 -8
- package/src/commands/agents.ts +9 -0
- package/src/commands/coordinator.test.ts +127 -0
- package/src/commands/coordinator.ts +71 -4
- package/src/commands/dashboard.ts +1 -1
- package/src/commands/log.test.ts +131 -0
- package/src/commands/log.ts +37 -2
- package/src/commands/merge.test.ts +118 -0
- package/src/commands/merge.ts +51 -8
- package/src/commands/sling.test.ts +104 -0
- package/src/commands/sling.ts +95 -8
- package/src/commands/stop.test.ts +81 -0
- package/src/index.ts +5 -1
- package/src/insights/quality-gates.test.ts +141 -0
- package/src/insights/quality-gates.ts +156 -0
- package/src/logging/theme.ts +4 -0
- package/src/merge/predict.test.ts +387 -0
- package/src/merge/predict.ts +249 -0
- package/src/merge/resolver.ts +1 -1
- package/src/mulch/client.ts +3 -3
- package/src/sessions/store.test.ts +267 -5
- package/src/sessions/store.ts +105 -7
- package/src/types.ts +51 -1
- package/src/watchdog/daemon.test.ts +124 -2
- package/src/watchdog/daemon.ts +27 -12
- package/src/watchdog/health.test.ts +133 -8
- package/src/watchdog/health.ts +37 -5
- package/src/worktree/manager.test.ts +218 -1
- package/src/worktree/manager.ts +55 -0
- package/src/worktree/tmux.test.ts +25 -0
- package/src/worktree/tmux.ts +17 -0
- package/templates/overlay.md.tmpl +2 -0
package/src/worktree/tmux.ts
CHANGED
|
@@ -404,6 +404,17 @@ function sendSignal(pid: number, signal: "SIGTERM" | "SIGKILL"): void {
|
|
|
404
404
|
* failures are silently handled since the goal is best-effort cleanup)
|
|
405
405
|
*/
|
|
406
406
|
export async function killSession(name: string): Promise<void> {
|
|
407
|
+
// Defense in depth: an empty session name passed to `tmux -t` is prefix-matched
|
|
408
|
+
// against every session in the server, wildcard-killing the entire overstory
|
|
409
|
+
// swarm (overstory-74ce). Reject empty names at the boundary so a regression in
|
|
410
|
+
// any caller surfaces loudly instead of silently nuking the tmux server.
|
|
411
|
+
if (name === "") {
|
|
412
|
+
throw new AgentError(
|
|
413
|
+
"killSession called with empty session name (would wildcard-kill all tmux sessions due to prefix matching)",
|
|
414
|
+
{ agentName: name },
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
|
|
407
418
|
// Step 1: Get the pane PID before killing the tmux session
|
|
408
419
|
const panePid = await getPanePid(name);
|
|
409
420
|
|
|
@@ -457,6 +468,12 @@ export async function getCurrentSessionName(): Promise<string | null> {
|
|
|
457
468
|
* @returns true if the session exists, false otherwise
|
|
458
469
|
*/
|
|
459
470
|
export async function isSessionAlive(name: string): Promise<boolean> {
|
|
471
|
+
// Defense in depth: an empty `-t` argument is prefix-matched against every
|
|
472
|
+
// session, so `has-session` would return true whenever any overstory session
|
|
473
|
+
// exists. Treat empty as "not alive" without contacting tmux (overstory-74ce).
|
|
474
|
+
if (name === "") {
|
|
475
|
+
return false;
|
|
476
|
+
}
|
|
460
477
|
const { exitCode } = await runCommand(tmuxCmd("has-session", "-t", name));
|
|
461
478
|
return exitCode === 0;
|
|
462
479
|
}
|