@mkhuda/agent-ps 0.2.0 → 0.4.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,42 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0
4
+
5
+ Antigravity, and a legend that was lying about one of the colours.
6
+
7
+ - Google's `agy` is the eighth agent. Each conversation is its own SQLite file,
8
+ but the fields worth showing sit inside protobuf blobs rather than columns, so
9
+ they are read out one at a time: the workspace by its length prefix, the
10
+ opening request from its tags, and the model from the small metadata blob
11
+ rather than the large one, which also holds whatever the session was reading
12
+ and will happily hand back another agent's name.
13
+ - Its steps carry the same status whether a turn is running or finished, so it
14
+ is the one agent whose busy and idle cannot be told apart. That column stays a
15
+ dash rather than guessing at it.
16
+ - The legend coloured the wrong letters. It found each agent by searching the
17
+ line it had just built, and `copilot` contains `pi`, so two letters in the
18
+ middle of one name were painted in another's colour while the real `pi` was
19
+ left with none. Positions are recorded while the line is composed now.
20
+ - An eighth agent had nowhere to go: a basic terminal has seven usable colours
21
+ and the new one would have worn the first one's. Terminals offering 256 now
22
+ draw from a wider palette without disturbing the seven already learned.
23
+
24
+ ## 0.3.0
25
+
26
+ The detail panel earns its screen.
27
+
28
+ - It is grouped now, in the order the questions arrive: what the session is,
29
+ what it is doing to the machine, what it has cost, and the command line last.
30
+ The agent name takes its colour from the table, a busy status is green, and an
31
+ inferred pairing reads as a warning rather than another grey line.
32
+ - The disk total is broken down. A hundred megabytes of transcript and a hundred
33
+ of file history call for different answers, and the column alone could not
34
+ tell you which you had. Every backend names its own parts, including the two
35
+ that keep sessions in a database and count rows rather than files.
36
+ - The panel keeps up. It redrew on every pass and so looked live, but it held
37
+ the row it was opened with, which left cpu, memory, uptime and the time since
38
+ the last turn frozen at the moment it appeared.
39
+
3
40
  ## 0.2.0
4
41
 
5
42
  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 eleven sessions across all eight agents at once, each agent named in its own colour, with columns for model, uptime, time since the last turn, cpu, memory and disk. Three antigravity sessions, two hermes background helpers, a copilot chat with no process of its own, and a busy claude session highlighted at the top.">
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
- ![agents](https://img.shields.io/badge/agents-7-orange?style=flat-square)
16
+ ![agents](https://img.shields.io/badge/agents-8-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
@@ -111,12 +124,18 @@ legend above the keys.
111
124
  | [OpenCode](https://github.com/sst/opencode) | ![blue](https://img.shields.io/badge/-3b6fd4?style=flat-square) | SQLite | directory | yes | `opencode --session` |
112
125
  | Hermes | ![red](https://img.shields.io/badge/-c0392b?style=flat-square) | SQLite | directory | yes | `hermes --resume` |
113
126
  | GitHub Copilot | ![white](https://img.shields.io/badge/-cfd3d8?style=flat-square) | VS Code storage | no process | yes | in the editor |
127
+ | Antigravity | ![blue](https://img.shields.io/badge/-5f87ff?style=flat-square) | SQLite per conversation | directory | no | `agy --conversation` |
114
128
 
115
129
  Only Claude Code records which process is running which session, so every other
116
130
  pairing is matched on working directory and shown as a guess. OpenCode, Hermes
117
131
  and Copilot count tokens and cost, which the detail panel shows. Agents you have
118
132
  not installed are skipped, not reported as missing.
119
133
 
134
+ Antigravity keeps each conversation in its own database, but the fields worth
135
+ showing are inside protobuf blobs rather than columns, so they are read out one
136
+ at a time. Its steps carry the same status whether a turn is running or has
137
+ finished, so it is the one agent whose busy and idle cannot be told apart.
138
+
120
139
  Copilot is the exception to everything. It runs inside the VS Code extension
121
140
  host, so it has no process of its own: no PID, no uptime, no CPU or memory, and
122
141
  nothing to stop. What it does have is the credits each turn spent, which the free
@@ -155,7 +174,7 @@ something.
155
174
  Those keys live at the bottom of the screen, under a line naming every agent on
156
175
  screen in its own colour and, on the right, what the table is sorted by:
157
176
 
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)
177
+ ![The bottom of the screen: a legend naming all eight agents, each in its own colour, the sort order spelled out on the right, and the key bar beneath it](https://raw.githubusercontent.com/mkhuda/agent-ps/main/images/agent-ps-footer-screenshot.jpg)
159
178
 
160
179
  That middle line does three jobs. It is the key to the colours in the AGENT
161
180
  column, it says the sort order in words so the marked heading is never a guess,
@@ -190,32 +209,31 @@ ended sessions, then `s` until DISK is marked.
190
209
 
191
210
  ### The detail panel
192
211
 
193
- Enter on a live session opens everything known about it, including tokens and
194
- cost where the agent counts them:
212
+ Enter on a live session opens everything known about it, grouped in the order
213
+ the questions arrive: what the session is, what it is doing to the machine, what
214
+ it has cost, and the command line last, since it is long and rarely the
215
+ question.
216
+
217
+ <img src="https://raw.githubusercontent.com/mkhuda/agent-ps/main/images/agent-ps-detail.jpg" width="620"
218
+ 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.">
219
+
220
+ The disk total is broken down, because the number on its own is not something
221
+ you can act on. Forty megabytes of transcript and forty of file history call for
222
+ different answers, and until you can see which it is there is nothing to decide.
223
+
224
+ Where the agent counts tokens, they are here too. Hermes and OpenCode report
225
+ cost, Copilot reports the credits a turn spent:
195
226
 
196
227
  ```
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
228
  provider opencode-free
210
229
  tokens in 24,608 out 242 reasoning 190
211
230
  calls 2 api, 6 messages, 0 tool calls
212
231
  cost $0.0000 estimated
213
- command /usr/bin/python3 /Users/rg/.hermes/hermes-agent/hermes
214
232
  ```
215
233
 
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.
234
+ A `paired` line appears when the session was matched to the process by working
235
+ directory rather than reported, so you know before pressing `k` that the pairing
236
+ is a guess.
219
237
 
220
238
  Enter on an ended session reopens it in a new terminal tab instead. Copilot
221
239
  chats live in the editor, so they have no reopen command and say so.
@@ -309,7 +327,7 @@ itself can answer. Nothing is invented to fill the gap.
309
327
  ## How it works
310
328
 
311
329
  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
330
+ [where each agent keeps its sessions](https://github.com/mkhuda/agent-ps/blob/main/docs/internals.md), how busy and idle are
313
331
  decided per agent, which processes count as background helpers, how a shim is
314
332
  told apart from a real session, and what the DISK column is adding up.
315
333
 
@@ -348,12 +366,12 @@ install fetches. The build is reproducible: the same source always produces the
348
366
  same bytes, so the committed executable can be checked against the tree.
349
367
 
350
368
  ```
351
- 5045dee9f7c0a85a193886e0b5fcf37020a4c36f10537f36fa453d1020aff365 agent-ps
369
+ 1a44868de812f5d0d2ac012ec97d610a34bca21884f718c7a8dffae80fb05ee6 agent-ps
352
370
  ```
353
371
 
354
372
  Adding an agent takes one class and one line in the registry. See
355
- [CONTRIBUTING.md](CONTRIBUTING.md).
373
+ [CONTRIBUTING.md](https://github.com/mkhuda/agent-ps/blob/main/CONTRIBUTING.md).
356
374
 
357
375
  ## License
358
376
 
359
- MIT. See [LICENSE](LICENSE).
377
+ 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.4.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",