snoop-cli 0.2.1 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +41 -13
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -142,14 +142,29 @@ what they add.
142
142
  permission shows as `? asking` on the board, with the request in full under
143
143
  the list: the command, the edit's diff, or the tool's input. Press `A` to
144
144
  allow it once, or `D` to deny it, optionally with a reason that Claude sees.
145
+ Press `Y` to allow it and stop Claude Code asking again, the same as the
146
+ "don't ask again" choice in its own prompt: the board shows what that adds,
147
+ such as the rule `Bash(npm test)` in the project's local settings.
145
148
  The same keys work in the session's own view, where its footer shows the
146
149
  request. Claude Code's own prompt still appears in the session's terminal,
147
150
  and whichever answer comes first wins.
148
151
 
149
152
  The hook waits for an answer only while a live board or session view is
150
153
  open, for at most 5 minutes (set with `snoop hooks install --ask-wait 10m`),
151
- and answering in the terminal ends the wait at once. There is no "always
152
- allow" here, so rules stay in Claude Code's own prompt.
154
+ and answering in the terminal ends the wait at once.
155
+
156
+ **Reply when it's your turn:** When a session's turn ends, its row shows
157
+ `your turn`. Press `R` to type a reply and `enter` to send it, and the agent
158
+ carries on as if you'd typed it in its terminal. The same key works in the
159
+ session's own view, whose footer shows the agent's last message. In the
160
+ Timeline and Tools tabs, the reply is about the selected call or message: it
161
+ quotes it first, with a few lines of the call's result, so you can say "this
162
+ failed, try X" without copying anything. With the
163
+ hooks installed, a finished turn waits for a reply only while a live board or
164
+ session view is open, for as long as a permission request does, and typing in
165
+ the session's terminal ends the wait at once. A reply sent while the agent is
166
+ working reaches it after its current tool call, and one sent with no turn
167
+ waiting reaches it with your next prompt.
153
168
 
154
169
  **Find:** Pressing `f` in the picker finds sessions by a file they read or
155
170
  changed, a command they ran, or a prompt, subagents included. Every word must
@@ -196,19 +211,21 @@ snoop hooks status # or uninstall
196
211
  The hooks run `snoop hook` after each tool call, when the agent tries to
197
212
  finish, and when you submit a prompt. The agent sees your comments at the
198
213
  first of these, so a working agent gets them mid-turn and an agent that has
199
- finished keeps going. The footer shows when they are delivered. Without the
214
+ finished keeps going. Replies sent with `R` travel the same way. The footer
215
+ shows when comments are delivered. Without the
200
216
  hooks, `S` copies the comments to the clipboard instead. A fourth hook runs
201
217
  when a session asks for permission, so the live board can
202
218
  [answer it](#many-sessions-at-once). If you installed the hooks before that
203
- hook existed, `snoop hooks status` says so, and running `snoop hooks install`
204
- again adds it.
219
+ hook existed, or before replies, `snoop hooks status` says so, and running
220
+ `snoop hooks install` again updates them.
205
221
 
206
222
  The hooks are the only change snoop makes to Claude Code's settings, and
207
223
  `snoop hooks uninstall` removes exactly those entries. Sent comments wait in a
208
224
  `snoop/inbox` folder in your state directory (`~/.local/state` on Linux) until
209
- a hook delivers them. Permission requests wait in `snoop/asks` beside it, and
210
- open snoops refresh a small `snoop/listening` file every 2 seconds, which is
211
- how the hook knows to wait. A session that was already running may need a restart
225
+ a hook delivers them. Permission requests wait in `snoop/asks` beside it,
226
+ finished turns waiting for a reply are marked in `snoop/turns`, and open
227
+ snoops refresh a small `snoop/listening` file every 2 seconds, which is how
228
+ the hooks know to wait. A session that was already running may need a restart
212
229
  before it uses the hooks.
213
230
 
214
231
  ## Summary across sessions
@@ -254,6 +271,8 @@ attention:
254
271
  | `⟳ compacted` | the context is compacted |
255
272
  | `ctx 90%` | the context window passes 90% |
256
273
  | `? Bash: npm test` | the session asks for permission (needs the hooks) |
274
+ | `$ cost passed $5.00` | with `--cost-alert 5`, the session's cost passes another $5 |
275
+ | `◌ turn running 15m00s` | with `--long-turn 15m`, a turn has run that long |
257
276
 
258
277
  Any key hides the alert, and pressing `!` jumps to it. Lines already in the
259
278
  transcript when it opens never raise alerts.
@@ -263,8 +282,13 @@ snoop --follow --bell # ring the bell on errors, turn ends an
263
282
  snoop --live --notify # a desktop notification when any session needs you
264
283
  snoop --follow --bell --alerts error,stall,turn,compact,ctx,ask
265
284
  snoop --stall 2m # 0 disables the waiting alert
285
+ snoop --live --notify --cost-alert 5 --long-turn 15m # catch a runaway session
266
286
  ```
267
287
 
288
+ The cost and long-turn alerts are off until you set their limit. The cost
289
+ alert counts from what the session had spent when snoop opened it, and while
290
+ a session runs, its cost is an estimate from its tokens.
291
+
268
292
  The live board raises the same alerts for every session on it, prefixed with
269
293
  the project (`api: ✓ your turn`).
270
294
 
@@ -309,7 +333,8 @@ Press `?` anywhere for the keys of the current screen. The full list follows.
309
333
  | `1 2 3 4 5`, `[ ]` | switch tabs |
310
334
  | `esc` | clear the search or filter, then go back |
311
335
  | `!` | jump to the latest alert |
312
- | `A` / `D` | allow once / deny the session's permission request |
336
+ | `A` / `Y` / `D` | allow once / always allow / deny the session's permission request |
337
+ | `R` | reply to the session's agent, about the selected call or message in the Timeline and Tools |
313
338
  | `y` / `e` | copy the selection / export the view to Markdown |
314
339
  | `?` | every key for the current screen |
315
340
  | `q` | quit |
@@ -319,10 +344,13 @@ shows it in the timeline, and `←` and `→` collapse and expand (`←` on a ca
319
344
  moves to its group). Pressing `E` expands everything (press it again to
320
345
  reset), and a `/` search keeps only matching calls with their groups opened.
321
346
 
322
- In the Files tab, `T` switches between the list and a tree of folders. In
323
- the tree, `space` and `enter` open or close a folder, `←` and `→` close and
324
- open (`←` on a file moves to its folder), and `E` opens every folder (press
325
- it again to reset).
347
+ In the Files and Diff tabs, `T` switches between the list and a tree of
348
+ folders. In the tree, `space` and `enter` open or close a folder, `←` and `→`
349
+ close and open (`←` on a file moves to its folder), and `E` on a folder opens
350
+ it and every folder in it (press it again to close them). On a file, `E` does
351
+ the same for the whole tree. In the Files tab, `c` comments on the change at
352
+ the top of the detail pane, quoting it, `C` comments on the whole file, and
353
+ `S` sends them with the Diff tab's comments.
326
354
 
327
355
  In the Diff tab, `b` switches between the uncommitted changes and the whole
328
356
  branch, and `B` picks the branch's base. Press `tab` to move between the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snoop-cli",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "description": "A terminal viewer for Claude Code sessions: follow one live, or see what any past one cost, changed and spent its time on.",
5
5
  "license": "MIT",
6
6
  "repository": {"type": "git", "url": "git+https://github.com/jzills/snoop.git"},
@@ -10,11 +10,11 @@
10
10
  "files": ["bin"],
11
11
  "engines": {"node": ">=18"},
12
12
  "optionalDependencies": {
13
- "@jzills/snoop-cli-linux-x64": "0.2.1",
14
- "@jzills/snoop-cli-linux-arm64": "0.2.1",
15
- "@jzills/snoop-cli-darwin-x64": "0.2.1",
16
- "@jzills/snoop-cli-darwin-arm64": "0.2.1",
17
- "@jzills/snoop-cli-win32-x64": "0.2.1",
18
- "@jzills/snoop-cli-win32-arm64": "0.2.1"
13
+ "@jzills/snoop-cli-linux-x64": "0.3.1",
14
+ "@jzills/snoop-cli-linux-arm64": "0.3.1",
15
+ "@jzills/snoop-cli-darwin-x64": "0.3.1",
16
+ "@jzills/snoop-cli-darwin-arm64": "0.3.1",
17
+ "@jzills/snoop-cli-win32-x64": "0.3.1",
18
+ "@jzills/snoop-cli-win32-arm64": "0.3.1"
19
19
  }
20
20
  }