@mkhuda/agent-ps 0.5.0 → 0.6.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,38 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.1
4
+
5
+ Stopping a session now stops what it started.
6
+
7
+ - `k` in the table stops the whole process tree, as `agent-ps stop` already
8
+ did. It was reading the agent rows rather than the process table, so a
9
+ session's MCP servers and helpers were left orphaned.
10
+ - A stop is no longer reported as failed when it worked. SIGKILL is delivered
11
+ after `os.kill` returns, and the check ran before the kernel had finished.
12
+ - When something does survive, the message names the PIDs instead of only
13
+ counting them.
14
+
15
+ ## 0.6.0
16
+
17
+ Reclaiming what ended sessions leave behind.
18
+
19
+ - `agent-ps prune` removes the parts of an ended session that are not the
20
+ conversation: subagent transcripts, file history, task records, shell
21
+ snapshots, request dumps. On the machine it was written on that is 96M across
22
+ 43 sessions, against 33M for deleting every session older than a month,
23
+ because the sessions holding the space are recent rather than old.
24
+ - It reports by default and removes only with `--apply`. Transcripts are never
25
+ removed, a session with a running process is never touched whatever its age,
26
+ and agents that keep sessions in a database are left alone entirely.
27
+ - `p` in the table does the same for the selected row, after a confirmation
28
+ naming what goes. On a running session it refuses and says why.
29
+ - The detail panel marks which parts of a session can be pruned, and the line
30
+ above the keys reports the total when there is one.
31
+ - One confirmation path now serves every destructive key, rather than each
32
+ growing its own.
33
+ - Release pages take their title and notes from the changelog instead of the
34
+ commit list.
35
+
3
36
  ## 0.5.0
4
37
 
5
38
  The token counts four agents were already writing.
package/README.md CHANGED
@@ -154,6 +154,7 @@ something.
154
154
  | `S` | reverse the direction |
155
155
  | `k` | stop the selected process and its children, after confirming |
156
156
  | `b` | stop every background helper, after confirming |
157
+ | `p` | remove what the selected ended session left behind, after confirming |
157
158
  | `y`, `n` | answer a confirmation |
158
159
  | `e` | show or hide ended sessions |
159
160
  | `/` | filter by session, title, agent, model, directory, or PID |
@@ -239,6 +240,9 @@ agent-ps list --all # include ended sessions
239
240
  agent-ps list --json # machine readable, with idle seconds
240
241
  agent-ps list --limit 100 # how many ended sessions (default 40)
241
242
  agent-ps list --filter benchmark # same match as the / key
243
+ agent-ps prune # what ended sessions left, minus the conversation
244
+ agent-ps prune --older-than 30d # only sessions idle that long (default 7d)
245
+ agent-ps prune --apply # actually remove it
242
246
  agent-ps agents # which agents were found, and where
243
247
  agent-ps --agent codex list # one agent, or a comma separated list
244
248
  agent-ps stop 32244 # stop one process tree
@@ -253,6 +257,30 @@ agent-ps --version
253
257
  Piping works without a subcommand: with stdout not a terminal, agent-ps prints
254
258
  the table and exits.
255
259
 
260
+ ## Reclaiming space
261
+
262
+ A session writes more than its conversation. Claude Code alone keeps subagent
263
+ transcripts, file history for `/rewind`, task records and a session
264
+ environment, and on this machine those came to a fifth of everything on disk.
265
+
266
+ ```bash
267
+ agent-ps prune
268
+ ```
269
+
270
+ Reports and removes nothing. It lists what ended sessions left behind, grouped
271
+ by what it is and which sessions hold the most, and `--apply` removes it.
272
+
273
+ In the table, `p` does the same for the row you are on, and the detail panel
274
+ marks which parts of a session those are. On a session that is still running it
275
+ refuses and says why rather than going quiet.
276
+
277
+ Three things it will not do. It never touches a transcript, so every session
278
+ stays resumable. It never touches a session with a running process, whatever
279
+ its age, because file history is what `/rewind` reaches for. And it never
280
+ touches OpenCode, Copilot or Antigravity, whose sessions are rows in a database
281
+ the agent may have open: agent-ps reads, and does not write, the stores it
282
+ did not create.
283
+
256
284
  ## What each column means
257
285
 
258
286
  | Column | Meaning |
@@ -348,7 +376,7 @@ install fetches. The build is reproducible: the same source always produces the
348
376
  same bytes, so the committed executable can be checked against the tree.
349
377
 
350
378
  ```
351
- d46f6f55086b25c4efab962d2945e70c2c486aa62931cf6e532cec2c16174496 agent-ps
379
+ 37b410980a4968757cd30092644c8483503499eebfee76b49b3721a1107493f4 agent-ps
352
380
  ```
353
381
 
354
382
  Adding an agent takes one class and one line in the registry. See
package/agent-ps CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mkhuda/agent-ps",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "description": "A process table for coding agent sessions. Claude Code, Codex, OpenCode, Hermes, Pi, CommandCode and Copilot in one view, with models, idle time, disk use and one key to stop them.",
5
5
  "keywords": [
6
6
  "cli",