/** * `/tmux-pilot:collect-subagent-garbage` — manually reap finished (or * dead-but-"running") subagents. * * Tears down each reapable subagent's tmux window/session, TUI process, config * dir, temp files, and ephemeral worktree via `teardownSubagent`. Tracker * records (`.pif/tasks`) are kept as history. Useful when * `subagent-execution.cleanup-enabled: false` and processes have piled up, or as a safety * net for strays that escaped the normal cleanup. * * Also sweeps ORPHANED per-parent tmux servers (ADR 0003 / design D8): every * sidecar manifest in the socket base dir is checked; a server hosting no * live `running` record's window and not belonging to the current parent is * killed and its socket + manifest files removed. Stale files whose server * already exited (`exit-empty`) are cleaned the same way. */ import type { HarnessRegistry } from "#src/harness/registry"; import { type TmuxManager } from "#src/tmux-manager"; import type { SubagentTracker } from "#src/tracker"; export type CollectGarbageNotify = (message: string, level?: "info" | "warn" | "error") => void; export declare function createCollectGarbageCommandHandler(tracker: SubagentTracker, tmux: TmuxManager, harnessRegistry?: HarnessRegistry): (notify: CollectGarbageNotify) => Promise; //# sourceMappingURL=collect-garbage-command.d.ts.map