Expand description
Removes the per-instance shell-integration folders (~/.agentmux/shell/<hash>)
of instances that no longer exist.
integration_base_for keys a folder by a hash of the instance’s data dir, so
every dev build, test home and old version leaves one behind (372 on one
machine after two months). A hash can’t be reversed, so each folder records
the data dir it belongs to in .instance; a folder is stale when that dir is
gone. Age is never the test.
A folder from before the marker existed is matched against the instances still on disk and stamped, so it is cleaned up later once its dir goes away. One that matches nothing is left alone: its dir may live anywhere.
Structs§
Functions§
- live_
instance_ data_ dirs - The data dir of every instance
~/.agentmuxknows of: installed versions and dev builds. - prune_
stale_ integration_ dirs - Sweeps
shell_root, keepingcurrent_baseand every folder whose instance still exists.live_data_dirsare the instance data dirs found on disk. - stamp_
instance - Records which instance
basebelongs to. Called at deploy.