@mkhuda/agent-ps 0.2.0 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0
4
+
5
+ The detail panel earns its screen.
6
+
7
+ - It is grouped now, in the order the questions arrive: what the session is,
8
+ what it is doing to the machine, what it has cost, and the command line last.
9
+ The agent name takes its colour from the table, a busy status is green, and an
10
+ inferred pairing reads as a warning rather than another grey line.
11
+ - The disk total is broken down. A hundred megabytes of transcript and a hundred
12
+ of file history call for different answers, and the column alone could not
13
+ tell you which you had. Every backend names its own parts, including the two
14
+ that keep sessions in a database and count rows rather than files.
15
+ - The panel keeps up. It redrew on every pass and so looked live, but it held
16
+ the row it was opened with, which left cpu, memory, uptime and the time since
17
+ the last turn frozen at the moment it appeared.
18
+
3
19
  ## 0.2.0
4
20
 
5
21
  Ways to install it, and a release that publishes itself.
package/README.md CHANGED
@@ -1,16 +1,29 @@
1
+ <div align="center">
2
+
3
+ <img src="https://raw.githubusercontent.com/mkhuda/agent-ps/main/images/agent-ps-screenshot.jpg" width="900"
4
+ alt="agent-ps listing sessions from claude, hermes, codex, opencode, pi, commandcode and copilot side by side, each with its model, uptime, idle time, cpu, memory, disk and working directory, with two hermes background helpers at the bottom">
5
+
1
6
  # agent-ps
2
7
 
3
- A process table for coding agent sessions, the way `ps` would look if it knew
4
- what a session was.
8
+ **A process table for coding agent sessions, the way `ps` would look if it knew
9
+ what a session was.**
5
10
 
6
11
  [![ci](https://img.shields.io/github/actions/workflow/status/mkhuda/agent-ps/ci.yml?branch=main&style=flat-square&label=ci)](https://github.com/mkhuda/agent-ps/actions/workflows/ci.yml)
7
12
  [![pypi](https://img.shields.io/pypi/v/agent-ps?style=flat-square&color=blue)](https://pypi.org/project/agent-ps/)
8
- [![license](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](LICENSE)
13
+ [![npm](https://img.shields.io/npm/v/%40mkhuda%2Fagent-ps?style=flat-square&color=blue&label=npm)](https://www.npmjs.com/package/@mkhuda/agent-ps)
14
+ [![license](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](https://github.com/mkhuda/agent-ps/blob/main/LICENSE)
9
15
  ![python](https://img.shields.io/badge/python-3.8%2B-blue?style=flat-square)
10
16
  ![agents](https://img.shields.io/badge/agents-7-orange?style=flat-square)
11
17
  ![dependencies](https://img.shields.io/badge/dependencies-none-brightgreen?style=flat-square)
12
18
 
13
- ![agent-ps listing sessions from claude, hermes, codex, opencode, pi, commandcode and copilot side by side, each with its model, uptime, idle time, cpu, memory, disk and working directory, with two hermes background helpers at the bottom](images/agent-ps-screenshot.jpg)
19
+ [Install](#install) | [Usage](#usage) | [Agents](#agents) |
20
+ [Scripting](#scripting) | [How it works](https://github.com/mkhuda/agent-ps/blob/main/docs/internals.md)
21
+
22
+ ```
23
+ curl -fsSL https://raw.githubusercontent.com/mkhuda/agent-ps/main/install.sh | sh
24
+ ```
25
+
26
+ </div>
14
27
 
15
28
  `ps aux | grep claude` gives you PIDs. It will not tell you which one is the
16
29
  session you are talking to, what model it is spending on, whether it has been
@@ -155,7 +168,7 @@ something.
155
168
  Those keys live at the bottom of the screen, under a line naming every agent on
156
169
  screen in its own colour and, on the right, what the table is sorted by:
157
170
 
158
- ![The bottom of the screen: a legend naming each agent in its own colour, the sort shown in words on the right, and the key bar beneath it](images/agent-ps-footer-screenshot.jpg)
171
+ ![The bottom of the screen: a legend naming each agent in its own colour, the sort shown in words on the right, and the key bar beneath it](https://raw.githubusercontent.com/mkhuda/agent-ps/main/images/agent-ps-footer-screenshot.jpg)
159
172
 
160
173
  That middle line does three jobs. It is the key to the colours in the AGENT
161
174
  column, it says the sort order in words so the marked heading is never a guess,
@@ -190,32 +203,31 @@ ended sessions, then `s` until DISK is marked.
190
203
 
191
204
  ### The detail panel
192
205
 
193
- Enter on a live session opens everything known about it, including tokens and
194
- cost where the agent counts them:
206
+ Enter on a live session opens everything known about it, grouped in the order
207
+ the questions arrive: what the session is, what it is doing to the machine, what
208
+ it has cost, and the command line last, since it is long and rarely the
209
+ question.
210
+
211
+ <img src="https://raw.githubusercontent.com/mkhuda/agent-ps/main/images/agent-ps-detail.jpg" width="620"
212
+ alt="The detail panel for a Claude Code session, in four groups. Session: agent, id, status, model, title and directory. Process: pid with its parent, uptime, and time since the last turn. Usage: cpu, memory, and a 41M disk total broken into 28M of transcript, 11M of subagent logs and 2M of file history. Command: the command line that started it.">
213
+
214
+ The disk total is broken down, because the number on its own is not something
215
+ you can act on. Forty megabytes of transcript and forty of file history call for
216
+ different answers, and until you can see which it is there is nothing to decide.
217
+
218
+ Where the agent counts tokens, they are here too. Hermes and OpenCode report
219
+ cost, Copilot reports the credits a turn spent:
195
220
 
196
221
  ```
197
- session details
198
-
199
- agent hermes
200
- session 20260905_005254_2c9f4d
201
- status idle
202
- model nemotron-3.5-lightning-free
203
- directory /Users/rg/projects/agent-ps
204
- title halo are you hermes?
205
- pid 21098 (parent 17518)
206
- uptime 1h17m last turn 1h15m ago
207
- usage cpu 0.0% memory 11M disk 121K
208
- paired matched by working directory, not reported
209
222
  provider opencode-free
210
223
  tokens in 24,608 out 242 reasoning 190
211
224
  calls 2 api, 6 messages, 0 tool calls
212
225
  cost $0.0000 estimated
213
- command /usr/bin/python3 /Users/rg/.hermes/hermes-agent/hermes
214
226
  ```
215
227
 
216
- The `paired` line appears only when the pairing was inferred. The provider,
217
- tokens, calls and cost lines appear only for agents that record them, and are
218
- simply absent for the rest.
228
+ A `paired` line appears when the session was matched to the process by working
229
+ directory rather than reported, so you know before pressing `k` that the pairing
230
+ is a guess.
219
231
 
220
232
  Enter on an ended session reopens it in a new terminal tab instead. Copilot
221
233
  chats live in the editor, so they have no reopen command and say so.
@@ -309,7 +321,7 @@ itself can answer. Nothing is invented to fill the gap.
309
321
  ## How it works
310
322
 
311
323
  The parts that are not obvious have their own page:
312
- [where each agent keeps its sessions](docs/internals.md), how busy and idle are
324
+ [where each agent keeps its sessions](https://github.com/mkhuda/agent-ps/blob/main/docs/internals.md), how busy and idle are
313
325
  decided per agent, which processes count as background helpers, how a shim is
314
326
  told apart from a real session, and what the DISK column is adding up.
315
327
 
@@ -348,12 +360,12 @@ install fetches. The build is reproducible: the same source always produces the
348
360
  same bytes, so the committed executable can be checked against the tree.
349
361
 
350
362
  ```
351
- 5045dee9f7c0a85a193886e0b5fcf37020a4c36f10537f36fa453d1020aff365 agent-ps
363
+ d5f2e2bd6d35e148e461c60c7cb7bd80fce272a15efb462a7dd513955ef5a2b6 agent-ps
352
364
  ```
353
365
 
354
366
  Adding an agent takes one class and one line in the registry. See
355
- [CONTRIBUTING.md](CONTRIBUTING.md).
367
+ [CONTRIBUTING.md](https://github.com/mkhuda/agent-ps/blob/main/CONTRIBUTING.md).
356
368
 
357
369
  ## License
358
370
 
359
- MIT. See [LICENSE](LICENSE).
371
+ MIT. See [LICENSE](https://github.com/mkhuda/agent-ps/blob/main/LICENSE).
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.2.0",
3
+ "version": "0.3.0",
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",