agent-session-inspector 0.1.2 → 0.1.4

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 (182) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +144 -138
  3. package/VERSION +1 -1
  4. package/app/.next/BUILD_ID +1 -1
  5. package/app/.next/app-path-routes-manifest.json +3 -0
  6. package/app/.next/build-manifest.json +5 -5
  7. package/app/.next/prerender-manifest.json +38 -6
  8. package/app/.next/required-server-files.json +1 -1
  9. package/app/.next/routes-manifest.json +21 -0
  10. package/app/.next/server/app/_global-error/page/build-manifest.json +2 -2
  11. package/app/.next/server/app/_global-error/page.js.nft.json +1 -1
  12. package/app/.next/server/app/_global-error.html +1 -1
  13. package/app/.next/server/app/_global-error.rsc +2 -2
  14. package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  15. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
  16. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/app/.next/server/app/_not-found/page/build-manifest.json +2 -2
  18. package/app/.next/server/app/_not-found/page.js +4 -4
  19. package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
  20. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/app/.next/server/app/_not-found.html +1 -1
  22. package/app/.next/server/app/_not-found.rsc +20 -19
  23. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +20 -19
  24. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +17 -15
  25. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  26. package/app/.next/server/app/api/analytics/route.js +2 -2
  27. package/app/.next/server/app/api/analytics/route.js.nft.json +1 -1
  28. package/app/.next/server/app/api/logs/route.js +2 -2
  29. package/app/.next/server/app/api/logs/route.js.nft.json +1 -1
  30. package/app/.next/server/app/api/pricing/route/app-paths-manifest.json +3 -0
  31. package/app/.next/server/app/api/pricing/route/build-manifest.json +12 -0
  32. package/app/.next/server/app/api/pricing/route/server-reference-manifest.json +4 -0
  33. package/app/.next/server/app/api/pricing/route.js +6 -0
  34. package/app/.next/server/app/api/pricing/route.js.map +5 -0
  35. package/app/.next/server/app/api/pricing/route.js.nft.json +1 -0
  36. package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +3 -0
  37. package/app/.next/server/app/api/providers/route.js +2 -2
  38. package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
  39. package/app/.next/server/app/api/search/route.js +2 -2
  40. package/app/.next/server/app/api/search/route.js.nft.json +1 -1
  41. package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route/app-paths-manifest.json +3 -0
  42. package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route/build-manifest.json +12 -0
  43. package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route/server-reference-manifest.json +4 -0
  44. package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route.js +7 -0
  45. package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route.js.map +5 -0
  46. package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route.js.nft.json +1 -0
  47. package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route_client-reference-manifest.js +3 -0
  48. package/app/.next/server/app/api/sessions/[provider]/[id]/route.js +2 -2
  49. package/app/.next/server/app/api/sessions/[provider]/[id]/route.js.nft.json +1 -1
  50. package/app/.next/server/app/api/sessions/route.js +2 -2
  51. package/app/.next/server/app/api/sessions/route.js.nft.json +1 -1
  52. package/app/.next/server/app/favicon.ico/route.js +1 -2
  53. package/app/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  54. package/app/.next/server/app/favicon.ico.body +0 -0
  55. package/app/.next/server/app/icon.svg/route/app-paths-manifest.json +3 -0
  56. package/app/.next/server/app/icon.svg/route/build-manifest.json +12 -0
  57. package/app/.next/server/app/icon.svg/route.js +6 -0
  58. package/app/.next/server/app/icon.svg/route.js.map +5 -0
  59. package/app/.next/server/app/icon.svg/route.js.nft.json +1 -0
  60. package/app/.next/server/app/icon.svg.body +21 -0
  61. package/app/.next/server/app/icon.svg.meta +1 -0
  62. package/app/.next/server/app/index.html +1 -1
  63. package/app/.next/server/app/index.rsc +22 -21
  64. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +18 -17
  65. package/app/.next/server/app/index.segments/_full.segment.rsc +22 -21
  66. package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  67. package/app/.next/server/app/page/build-manifest.json +2 -2
  68. package/app/.next/server/app/page.js +4 -4
  69. package/app/.next/server/app/page.js.nft.json +1 -1
  70. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  71. package/app/.next/server/app/sessions/[provider]/[id]/page/build-manifest.json +2 -2
  72. package/app/.next/server/app/sessions/[provider]/[id]/page.js +4 -4
  73. package/app/.next/server/app/sessions/[provider]/[id]/page.js.nft.json +1 -1
  74. package/app/.next/server/app/sessions/[provider]/[id]/page_client-reference-manifest.js +1 -1
  75. package/app/.next/server/app-paths-manifest.json +3 -0
  76. package/app/.next/server/chunks/1oeh_server_app_api_sessions_[provider]_[id]_reveal_route_actions_1mqlatn.js +3 -0
  77. package/app/.next/server/chunks/[root-of-the-server]__0dyq0rc._.js +3 -0
  78. package/app/.next/server/chunks/[root-of-the-server]__0kgkqhn._.js +3 -0
  79. package/app/.next/server/chunks/[root-of-the-server]__0yxic1z._.js +6 -0
  80. package/app/.next/server/chunks/[root-of-the-server]__10p8y9z._.js +3 -0
  81. package/app/.next/server/chunks/[root-of-the-server]__11n7k65._.js +3 -0
  82. package/app/.next/server/chunks/[root-of-the-server]__1cceere._.js +3 -0
  83. package/app/.next/server/chunks/[root-of-the-server]__1eclfq8._.js +3 -0
  84. package/app/.next/server/chunks/[root-of-the-server]__1lz20wm._.js +3 -0
  85. package/app/.next/server/chunks/[root-of-the-server]__1w48qe_._.js +3 -0
  86. package/app/.next/server/chunks/[root-of-the-server]__1zdh1mi._.js +3 -0
  87. package/app/.next/server/chunks/[root-of-the-server]__20epvou._.js +3 -0
  88. package/app/.next/server/chunks/_next-internal_server_app_api_pricing_route_actions_06i5bdm.js +3 -0
  89. package/app/.next/server/chunks/_next-internal_server_app_icon_svg_route_actions_1r2h_ub.js +3 -0
  90. package/app/.next/server/chunks/ssr/{[root-of-the-server]__136432r._.js → [root-of-the-server]__09wcsz4._.js} +2 -2
  91. package/app/.next/server/chunks/ssr/[root-of-the-server]__0rwa1xd._.js +3 -0
  92. package/app/.next/server/chunks/ssr/[root-of-the-server]__0vog67g._.js +3 -0
  93. package/app/.next/server/chunks/ssr/[root-of-the-server]__0zh4z_k._.js +3 -0
  94. package/app/.next/server/chunks/ssr/[root-of-the-server]__14zv8r1._.js +1 -1
  95. package/app/.next/server/chunks/ssr/[root-of-the-server]__1ei65vj._.js +3 -0
  96. package/app/.next/server/chunks/ssr/_0136j91._.js +1 -1
  97. package/app/.next/server/chunks/ssr/_0o294sf._.js +3 -0
  98. package/app/.next/server/chunks/ssr/_1-5v1mi._.js +3 -0
  99. package/app/.next/server/chunks/ssr/_12__495._.js +1 -1
  100. package/app/.next/server/chunks/ssr/_1ck8cbf._.js +1 -1
  101. package/app/.next/server/chunks/ssr/src_app_page_tsx_1chiuah._.js +1 -1
  102. package/app/.next/server/chunks/ssr/src_app_sessions_[provider]_[id]_page_tsx_0uf635h._.js +3 -3
  103. package/app/.next/server/middleware-build-manifest.js +5 -5
  104. package/app/.next/server/pages/404.html +1 -1
  105. package/app/.next/server/pages/500.html +1 -1
  106. package/app/.next/server/server-reference-manifest.js +1 -1
  107. package/app/.next/server/server-reference-manifest.json +1 -1
  108. package/app/.next/static/chunks/{1golqn9hvdi85.js → 0pkcgt8dr0jkl.js} +1 -1
  109. package/app/.next/static/chunks/10x4j1wts3xx2.js +1 -0
  110. package/app/.next/static/chunks/1dz8a9ds45tdb.js +6 -0
  111. package/app/.next/static/chunks/1g3ep2o7fhgpe.css +1 -0
  112. package/app/.next/static/chunks/{1bvlgvy9l9_54.js → 244zytz360e56.js} +1 -1
  113. package/app/.next/static/chunks/2iedud09ou282.js +1 -0
  114. package/app/.next/static/chunks/2k65elb1vo-2z.js +1 -0
  115. package/app/.next/static/chunks/2t205sbe-_sk4.js +1 -0
  116. package/app/.next/static/chunks/{0u22wlboqnsjn.js → 3_e2d472hbms0.js} +1 -1
  117. package/app/.next/static/chunks/{turbopack-1whpqxvx8f759.js → turbopack-2r-q4_3piunr7.js} +1 -1
  118. package/app/.next/static/media/favicon.1xg7fnblxruif.ico +0 -0
  119. package/app/.next/static/media/icon.3q7e6rp5-d1lv.svg +21 -0
  120. package/app/AGENTS.md +9 -0
  121. package/app/CLAUDE.md +1 -0
  122. package/app/CONTRIBUTING.md +71 -0
  123. package/app/Dockerfile +34 -0
  124. package/app/LICENSE +21 -0
  125. package/app/README.md +277 -0
  126. package/app/bin/agent-session-inspector.mjs +159 -0
  127. package/app/components.json +25 -0
  128. package/app/docs/screenshots/analytics-dark.png +0 -0
  129. package/app/docs/screenshots/analytics.png +0 -0
  130. package/app/docs/screenshots/session-overview-dark.png +0 -0
  131. package/app/docs/screenshots/session-overview.png +0 -0
  132. package/app/docs/screenshots/sessions-dark.png +0 -0
  133. package/app/docs/screenshots/sessions.png +0 -0
  134. package/app/docs/screenshots/timeline-dark.png +0 -0
  135. package/app/docs/screenshots/timeline.png +0 -0
  136. package/app/docs/screenshots/token-optimizer-dark.png +0 -0
  137. package/app/docs/screenshots/token-optimizer.png +0 -0
  138. package/app/docs/social-preview.png +0 -0
  139. package/app/eslint.config.mjs +19 -0
  140. package/app/install.sh +85 -0
  141. package/app/next.config.ts +17 -0
  142. package/app/package.json +17 -3
  143. package/app/pnpm-lock.yaml +6760 -0
  144. package/app/pnpm-workspace.yaml +2 -0
  145. package/app/postcss.config.mjs +7 -0
  146. package/app/scripts/demo-data.mjs +288 -0
  147. package/app/scripts/deploy-docker.sh +67 -0
  148. package/app/scripts/package-release.sh +84 -0
  149. package/app/server.js +1 -1
  150. package/app/tsconfig.json +34 -0
  151. package/bin/agent-session-inspector.mjs +2 -1
  152. package/package.json +17 -3
  153. package/app/.next/server/chunks/[externals]__0l8ei7u._.js +0 -3
  154. package/app/.next/server/chunks/[externals]__0xll52b._.js +0 -3
  155. package/app/.next/server/chunks/[root-of-the-server]__093lyxv._.js +0 -3
  156. package/app/.next/server/chunks/[root-of-the-server]__0ne74op._.js +0 -3
  157. package/app/.next/server/chunks/[root-of-the-server]__0uqb915._.js +0 -6
  158. package/app/.next/server/chunks/[root-of-the-server]__0uv5tnc._.js +0 -3
  159. package/app/.next/server/chunks/[root-of-the-server]__1lfc-ga._.js +0 -3
  160. package/app/.next/server/chunks/[root-of-the-server]__1n_sepq._.js +0 -3
  161. package/app/.next/server/chunks/_1i74yrf._.js +0 -3
  162. package/app/.next/server/chunks/ssr/[root-of-the-server]__0o9lim0._.js +0 -3
  163. package/app/.next/server/chunks/ssr/[root-of-the-server]__0ovxc0l._.js +0 -3
  164. package/app/.next/server/chunks/ssr/[root-of-the-server]__0u75sqx._.js +0 -3
  165. package/app/.next/server/chunks/ssr/[root-of-the-server]__10av_pp._.js +0 -3
  166. package/app/.next/server/chunks/ssr/_02qe55s._.js +0 -3
  167. package/app/.next/server/chunks/ssr/_1f2ffz2._.js +0 -3
  168. package/app/.next/static/chunks/1a6ohz9e-zu6v.js +0 -6
  169. package/app/.next/static/chunks/1gjrekoh3wbwd.js +0 -1
  170. package/app/.next/static/chunks/2bron83qy3bb-.js +0 -1
  171. package/app/.next/static/chunks/2rm87uoxc3wi6.js +0 -1
  172. package/app/.next/static/chunks/2wkix9od_vgcp.css +0 -1
  173. package/app/.next/static/chunks/3fjiamhx4adq8.js +0 -1
  174. package/app/.next/static/media/favicon.2vob68tjqpejf.ico +0 -0
  175. package/app/public/file.svg +0 -1
  176. package/app/public/globe.svg +0 -1
  177. package/app/public/next.svg +0 -1
  178. package/app/public/vercel.svg +0 -1
  179. package/app/public/window.svg +0 -1
  180. /package/app/.next/static/{66JBn2mmg7nPYv4u88Jb6 → KFq9wlUt8U-Sma3McE5Jw}/_buildManifest.js +0 -0
  181. /package/app/.next/static/{66JBn2mmg7nPYv4u88Jb6 → KFq9wlUt8U-Sma3McE5Jw}/_clientMiddlewareManifest.js +0 -0
  182. /package/app/.next/static/{66JBn2mmg7nPYv4u88Jb6 → KFq9wlUt8U-Sma3McE5Jw}/_ssgManifest.js +0 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kishan Mundha
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,89 +1,25 @@
1
1
  # Agent Session Inspector
2
2
 
3
- A local web UI for reading agent CLI transcripts: what the agent did, how long it
4
- took, and where the tokens went. It reads the on-disk session files directly and
5
- never sends them anywhere.
3
+ [![npm version](https://img.shields.io/npm/v/agent-session-inspector)](https://www.npmjs.com/package/agent-session-inspector)
4
+ [![CI](https://github.com/kishanmundha/agent-session-inspector/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/kishanmundha/agent-session-inspector/actions/workflows/ci.yml)
5
+ [![node](https://img.shields.io/node/v/agent-session-inspector)](https://nodejs.org)
6
+ [![license](https://img.shields.io/npm/l/agent-session-inspector)](LICENSE)
6
7
 
7
- <picture>
8
- <source media="(prefers-color-scheme: dark)" srcset="docs/screenshots/session-overview-dark.png">
9
- <img alt="Session overview: token, tool-call and timing stats above the event timeline" src="docs/screenshots/session-overview.png">
10
- </picture>
11
-
12
- ## Screenshots
13
-
14
- **All sessions in one place.** Every session of every supported agent on the
15
- machine, filterable by agent and searchable by title, repo, branch or id.
16
- Each card shows turns, tool calls and tokens in/out at a glance.
17
-
18
- <picture>
19
- <source media="(prefers-color-scheme: dark)" srcset="docs/screenshots/sessions-dark.png">
20
- <img alt="Session list with agent filters, search and per-session token counts" src="docs/screenshots/sessions.png">
21
- </picture>
22
-
23
- **Step-by-step timeline.** Prompts, reasoning, tool calls and their results in
24
- order, with per-step token counts. Expand any event to see its content, or open
25
- the raw record.
26
-
27
- <picture>
28
- <source media="(prefers-color-scheme: dark)" srcset="docs/screenshots/timeline-dark.png">
29
- <img alt="Event timeline showing user prompt, thinking, and Grep/Read tool calls" src="docs/screenshots/timeline.png">
30
- </picture>
8
+ A local web UI for reading coding-agent transcripts (Claude Code, Codex, GitHub
9
+ Copilot, OpenCode, Hermes): what the agent did, how long it took, and where the
10
+ tokens went.
31
11
 
32
- **Token Optimizer.** Where the context went (system prompt vs. tool results vs.
33
- replies), which tools ran most, and hints for trimming expensive sessions.
12
+ > **Your sessions never leave your machine.** The app collects nothing: no
13
+ > telemetry, no analytics, no account, no cloud. It reads the transcript files
14
+ > already on your disk, read-only, and serves them to your own browser on
15
+ > `127.0.0.1`. See [Privacy](#privacy) for the details and how to check.
34
16
 
35
17
  <picture>
36
- <source media="(prefers-color-scheme: dark)" srcset="docs/screenshots/token-optimizer-dark.png">
37
- <img alt="Token Optimizer: context usage breakdown, tool usage and event type charts" src="docs/screenshots/token-optimizer.png">
18
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/kishanmundha/agent-session-inspector/main/docs/screenshots/session-overview-dark.png">
19
+ <img alt="Session overview: token, cost, health and timing stats above the event timeline" src="https://raw.githubusercontent.com/kishanmundha/agent-session-inspector/main/docs/screenshots/session-overview.png">
38
20
  </picture>
39
21
 
40
- **Projects.** Sessions are grouped by the repository they ran in, so work
41
- started from a subfolder or a git worktree lands in the same project. The
42
- Projects tab lists each one with its sessions, cost and tokens, and picking a
43
- project filters Analytics, Usage and Sessions together. Outside a repository,
44
- the working directory is the project; the dated scratch folders the Codex app
45
- creates for project-less chats count as one project.
46
-
47
- **Activity.** One day at a time: how many sessions were working at once in each
48
- 15-minute slot, the agent time and cost of each session, and the day's split by
49
- project, model and agent.
50
-
51
- **Edits per turn.** A session's Edits tab lists each prompt with the files the
52
- agent wrote, edited or patched in response, linked to the event in the timeline.
53
-
54
- **Skills and MCP tools.** The Analytics tab counts which skills were loaded and
55
- which MCP servers and tools were called, for the selected range.
56
-
57
- > Screenshots use synthetic demo data. To reproduce them locally, see
58
- > [Demo data](#demo-data).
59
-
60
- Supported agents:
61
-
62
- | Agent | Reads from | Session titles | Logs |
63
- | ----------------------------- | ------------------------------------------------------------- | --------------------- | ---- |
64
- | GitHub Copilot CLI | `~/.copilot/session-state`, `~/.copilot/logs` | checkpoint DB | yes |
65
- | GitHub Copilot Chat (VS Code) | `<Code>/User/workspaceStorage/*/chatSessions` | chat title | no |
66
- | Claude Code | `~/.claude/projects/<project>/<session>.jsonl` | `custom`/`ai` titles | no |
67
- | Claude Cowork | `<Claude>/local-agent-mode-sessions` | session descriptor | no |
68
- | OpenAI Codex CLI | `~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl` | `session_index.jsonl` | no |
69
- | OpenCode | `~/.local/share/opencode/opencode.db` | `session` table | no |
70
- | Hermes Agent | `~/.hermes/state.db` | `sessions` table | no |
71
-
72
- `<Code>` and `<Claude>` are the desktop apps' data folders: `~/Library/Application
73
- Support/…` on macOS, `%APPDATA%\…` on Windows, `~/.config/…` on Linux. VS Code
74
- Insiders is read too. The two SQLite stores are opened read-only.
75
-
76
- Two things differ from the CLIs that log every request:
77
-
78
- - **Copilot Chat** meters a whole request, and its prompt count is that of the
79
- last model round. For a request that called tools, input tokens and cost are a
80
- floor.
81
- - **Hermes** counts tokens per session, so its usage appears as one checkpoint at
82
- the end of the timeline rather than per message.
83
-
84
- Whichever directories exist on the machine show up; the rest are hidden.
85
-
86
- ## Getting started
22
+ ## Quick start
87
23
 
88
24
  Run it with [Node.js](https://nodejs.org) 22.13 or newer, nothing to install:
89
25
 
@@ -102,7 +38,7 @@ around instead, install it globally:
102
38
  npm install -g agent-session-inspector
103
39
  ```
104
40
 
105
- ### Without npm
41
+ ### Install script
106
42
 
107
43
  The same build is on GitHub Releases, with an installer that needs only Node,
108
44
  `curl` and `tar`:
@@ -119,52 +55,114 @@ command to update. To uninstall:
119
55
  rm -rf ~/.agent-session-inspector ~/.local/bin/agent-session-inspector
120
56
  ```
121
57
 
122
- ### From source
58
+ The install script needs bash, so it covers macOS, Linux and WSL. On Windows
59
+ use `npx`.
123
60
 
124
- ```bash
125
- pnpm install
126
- pnpm dev
127
- ```
61
+ ## Supported agents
128
62
 
129
- Open [http://localhost:3000](http://localhost:3000).
63
+ | Agent | Reads from | Session titles | Logs |
64
+ | ----------------------------- | ---------------------------------------------- | --------------------- | ---- |
65
+ | GitHub Copilot CLI | `~/.copilot/session-state`, `~/.copilot/logs` | checkpoint DB | yes |
66
+ | GitHub Copilot Chat (VS Code) | `<Code>/User/workspaceStorage/*/chatSessions` | chat title | no |
67
+ | Claude Code | `~/.claude/projects/<project>/<session>.jsonl` | `custom`/`ai` titles | no |
68
+ | Claude Cowork | `<Claude>/local-agent-mode-sessions` | session descriptor | no |
69
+ | OpenAI Codex CLI | `~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl` | `session_index.jsonl` | no |
70
+ | OpenCode | `~/.local/share/opencode/opencode.db` | `session` table | no |
71
+ | Hermes Agent | `~/.hermes/state.db` | `sessions` table | no |
130
72
 
131
- To run it in Docker with the transcript directories mounted read-only:
73
+ `<Code>` and `<Claude>` are the desktop apps' data folders: `~/Library/Application
74
+ Support/…` on macOS, `%APPDATA%\…` on Windows, `~/.config/…` on Linux. VS Code
75
+ Insiders is read too. The two SQLite stores are opened read-only.
132
76
 
133
- ```bash
134
- pnpm deploy:docker
135
- ```
77
+ Two things differ from the CLIs that log every request:
78
+
79
+ - **Copilot Chat** meters a whole request, and its prompt count is that of the
80
+ last model round. For a request that called tools, input tokens and cost are a
81
+ floor.
82
+ - **Hermes** counts tokens per session, so its usage appears as one checkpoint at
83
+ the end of the timeline rather than per message.
136
84
 
137
- ### Demo data
85
+ Whichever directories exist on the machine show up; the rest are hidden.
138
86
 
139
- To try the UI without your own transcripts (or to retake the screenshots),
140
- generate a fake home directory with a few synthetic sessions and point the app
141
- at it:
87
+ ## Privacy
142
88
 
143
- ```bash
144
- node scripts/demo-data.mjs /tmp/asi-demo
145
- HOME=/tmp/asi-demo pnpm dev
146
- ```
89
+ Transcripts hold your prompts, code and file contents, so the app is built to
90
+ keep them on the machine. Nothing about you or your sessions is collected, by
91
+ this project or anyone else:
147
92
 
148
- ### Releasing
93
+ - **No data collection.** There is no telemetry, analytics, crash reporting,
94
+ account or sync, and Next.js's own telemetry is switched off.
95
+ - **No outbound requests.** The app reads the session files in place and talks
96
+ only to your browser. Fonts and the price table used for cost estimates are
97
+ bundled, not fetched. The one download is the app itself, when `npx` or the
98
+ install script fetches it.
99
+ - **Local only.** The server binds to `127.0.0.1`, so other machines on your
100
+ network cannot reach it unless you pass `--host`.
101
+ - **Read-only.** Session files are only read, and the SQLite stores are opened
102
+ read-only. The app never edits or deletes a transcript.
149
103
 
150
- Change `version` in `package.json` and push to `main`. The
151
- [release workflow](.github/workflows/release.yml) builds the app, publishes it
152
- to npm, and creates the `vX.Y.Z` tag and GitHub release with
153
- `agent-session-inspector.tar.gz` and `install.sh`, which is what the install
154
- command downloads. A push that leaves the version alone releases nothing.
104
+ You don't have to take this on trust. The code is open, and the browser's
105
+ Network tab shows every request going to `localhost` and nowhere else; the app
106
+ works the same with the network disconnected.
155
107
 
156
- The workflow signs in to npm by
157
- [trusted publishing](https://docs.npmjs.com/trusted-publishers), so the
158
- repository holds no npm token. The package's settings on npmjs.com must list
159
- this repository and `release.yml` as its trusted publisher.
108
+ ## Features
160
109
 
161
- `pnpm package` runs the same build locally into `dist/`. To try the result
162
- without publishing:
110
+ **Analytics across sessions.** Cost, messages, tool calls and active time for
111
+ the selected range, with an activity calendar and filters for project, agent
112
+ and model.
163
113
 
164
- ```bash
165
- npx ./dist/agent-session-inspector
166
- ASI_TARBALL_URL="file://$PWD/dist/agent-session-inspector.tar.gz" bash install.sh
167
- ```
114
+ <picture>
115
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/kishanmundha/agent-session-inspector/main/docs/screenshots/analytics-dark.png">
116
+ <img alt="Analytics tab: cost, session and token totals above an activity calendar" src="https://raw.githubusercontent.com/kishanmundha/agent-session-inspector/main/docs/screenshots/analytics.png">
117
+ </picture>
118
+
119
+ **All sessions in one place.** Every session of every supported agent on the
120
+ machine, filterable by agent and searchable by title, repo, branch or id.
121
+ Each card shows turns, tool calls, health grade, cost and tokens in/out at a
122
+ glance.
123
+
124
+ <picture>
125
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/kishanmundha/agent-session-inspector/main/docs/screenshots/sessions-dark.png">
126
+ <img alt="Session list with agent filters, search and per-session health, cost and token counts" src="https://raw.githubusercontent.com/kishanmundha/agent-session-inspector/main/docs/screenshots/sessions.png">
127
+ </picture>
128
+
129
+ **Step-by-step timeline.** Prompts, reasoning, tool calls and their results in
130
+ order, with per-step token counts and cost. Expand any event to see its content, or open
131
+ the raw record.
132
+
133
+ <picture>
134
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/kishanmundha/agent-session-inspector/main/docs/screenshots/timeline-dark.png">
135
+ <img alt="Event timeline showing user prompt, thinking, and Grep/Read tool calls" src="https://raw.githubusercontent.com/kishanmundha/agent-session-inspector/main/docs/screenshots/timeline.png">
136
+ </picture>
137
+
138
+ **Token Optimizer.** What the session cost by token class, model and turn, where
139
+ the context went (system prompt vs. tool results vs. replies), which tools ran
140
+ most, and hints for trimming expensive sessions.
141
+
142
+ <picture>
143
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/kishanmundha/agent-session-inspector/main/docs/screenshots/token-optimizer-dark.png">
144
+ <img alt="Token Optimizer: estimated cost by token class and model, and a cost-by-turn chart" src="https://raw.githubusercontent.com/kishanmundha/agent-session-inspector/main/docs/screenshots/token-optimizer.png">
145
+ </picture>
146
+
147
+ **Projects.** Sessions are grouped by the repository they ran in, so work
148
+ started from a subfolder or a git worktree lands in the same project. The
149
+ Projects tab lists each one with its sessions, cost and tokens, and picking a
150
+ project filters Analytics, Usage and Sessions together. Outside a repository,
151
+ the working directory is the project; the dated scratch folders the Codex app
152
+ creates for project-less chats count as one project.
153
+
154
+ **Activity.** One day at a time: how many sessions were working at once in each
155
+ 15-minute slot, the agent time and cost of each session, and the day's split by
156
+ project, model and agent.
157
+
158
+ **Edits per turn.** A session's Edits tab lists each prompt with the files the
159
+ agent wrote, edited or patched in response, linked to the event in the timeline.
160
+
161
+ **Skills and MCP tools.** The Analytics tab counts which skills were loaded and
162
+ which MCP servers and tools were called, for the selected range.
163
+
164
+ > Screenshots use synthetic demo data. To reproduce them locally, see
165
+ > [CONTRIBUTING.md](CONTRIBUTING.md#demo-data).
168
166
 
169
167
  ## How it works
170
168
 
@@ -222,8 +220,21 @@ restart:
222
220
  {
223
221
  "my-local-model": { "input": 0, "output": 0 },
224
222
  "claude-opus-5-5": [
225
- { "input": 4, "output": 20, "cacheRead": 0.2, "cacheWrite": 5, "cacheWrite1h": 8 },
226
- { "from": "2027-01-01", "input": 3, "output": 15, "cacheRead": 0.15, "cacheWrite": 3.75, "cacheWrite1h": 6 }
223
+ {
224
+ "input": 4,
225
+ "output": 20,
226
+ "cacheRead": 0.2,
227
+ "cacheWrite": 5,
228
+ "cacheWrite1h": 8
229
+ },
230
+ {
231
+ "from": "2027-01-01",
232
+ "input": 3,
233
+ "output": 15,
234
+ "cacheRead": 0.15,
235
+ "cacheWrite": 3.75,
236
+ "cacheWrite1h": 6
237
+ }
227
238
  ]
228
239
  }
229
240
  ```
@@ -240,32 +251,27 @@ and in its header. The score is rule-based and read straight off the transcript
240
251
  by `health.ts`: it measures how smoothly the session ran, not whether the result
241
252
  was any good. A session starts at 100 and loses points for:
242
253
 
243
- | Signal | What it means | Points |
244
- | ----------------- | ------------------------------------------------------- | --------------- |
245
- | Unfinished | Ends on an API error, or stops without a final reply | 25 / 15 |
246
- | Tool failures | Share of tool results that failed | up to 25 |
247
- | Retry loops | The same tool failing three times in a row | 6 each, max 18 |
248
- | API errors | Errors and retried requests | 2 each, max 10 |
249
- | Interrupted turns | Turns stopped before the agent finished | 4 each, max 12 |
250
- | Compactions | Context summarized mid-session | 3 each, max 9 |
254
+ | Signal | What it means | Points |
255
+ | ----------------- | ---------------------------------------------------- | -------------- |
256
+ | Unfinished | Ends on an API error, or stops without a final reply | 25 / 15 |
257
+ | Tool failures | Share of tool results that failed | up to 25 |
258
+ | Retry loops | The same tool failing three times in a row | 6 each, max 18 |
259
+ | API errors | Errors and retried requests | 2 each, max 10 |
260
+ | Interrupted turns | Turns stopped before the agent finished | 4 each, max 12 |
261
+ | Compactions | Context summarized mid-session | 3 each, max 9 |
251
262
 
252
263
  90 and up is an A, 80 a B, 70 a C, 60 a D. A session that is still running is not
253
264
  marked down for being unfinished. Click the Health card on a session to see what
254
265
  it lost points for and jump to those events; the Quality tab on the home page
255
266
  shows grades, outcomes and the most common problems across sessions.
256
267
 
257
- ### Adding a provider
258
-
259
- 1. Write `src/lib/providers/<name>.ts` exporting a `SessionProvider`: `info`,
260
- `isAvailable`, `listSessions`, `getSession`, plus `listLogs`/`getLogContent`
261
- (return empty when the agent has no log directory).
262
- 2. Map its records onto the canonical event types; cap huge payloads before they
263
- reach the client, and set `resultChars` on tool results so the token review
264
- can size them. Attach `billedUsage` wherever the transcript reports usage so
265
- the session can be priced.
266
- 3. Register it in `src/lib/providers/index.ts` and add its id to
267
- `ProviderId` in `types.ts`.
268
- 4. Add its badge colours to `src/lib/provider-meta.ts`.
269
-
270
- Routes are provider-scoped: `/sessions/<provider>/<id>` and
271
- `/api/sessions/<provider>/<id>`.
268
+ ## Contributing
269
+
270
+ Bug reports and pull requests are welcome; open an
271
+ [issue](https://github.com/kishanmundha/agent-session-inspector/issues) for anything that looks wrong, ideally with the
272
+ agent, OS and Node version. [CONTRIBUTING.md](CONTRIBUTING.md) covers running
273
+ from source, demo data, adding a provider and releasing.
274
+
275
+ ## License
276
+
277
+ [MIT](LICENSE) © Kishan Mundha
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.4
@@ -1 +1 @@
1
- 66JBn2mmg7nPYv4u88Jb6
1
+ KFq9wlUt8U-Sma3McE5Jw
@@ -3,11 +3,14 @@
3
3
  "/_not-found/page": "/_not-found",
4
4
  "/api/analytics/route": "/api/analytics",
5
5
  "/api/logs/route": "/api/logs",
6
+ "/api/pricing/route": "/api/pricing",
6
7
  "/api/providers/route": "/api/providers",
7
8
  "/api/search/route": "/api/search",
9
+ "/api/sessions/[provider]/[id]/reveal/route": "/api/sessions/[provider]/[id]/reveal",
8
10
  "/api/sessions/[provider]/[id]/route": "/api/sessions/[provider]/[id]",
9
11
  "/api/sessions/route": "/api/sessions",
10
12
  "/favicon.ico/route": "/favicon.ico",
13
+ "/icon.svg/route": "/icon.svg",
11
14
  "/page": "/",
12
15
  "/sessions/[provider]/[id]/page": "/sessions/[provider]/[id]"
13
16
  }
@@ -7,16 +7,16 @@
7
7
  "static/chunks/0cz1d0mv5g_q7.js"
8
8
  ],
9
9
  "lowPriorityFiles": [
10
- "static/66JBn2mmg7nPYv4u88Jb6/_buildManifest.js",
11
- "static/66JBn2mmg7nPYv4u88Jb6/_ssgManifest.js",
12
- "static/66JBn2mmg7nPYv4u88Jb6/_clientMiddlewareManifest.js"
10
+ "static/KFq9wlUt8U-Sma3McE5Jw/_buildManifest.js",
11
+ "static/KFq9wlUt8U-Sma3McE5Jw/_ssgManifest.js",
12
+ "static/KFq9wlUt8U-Sma3McE5Jw/_clientMiddlewareManifest.js"
13
13
  ],
14
14
  "rootMainFiles": [
15
15
  "static/chunks/37by6nx5006ki.js",
16
16
  "static/chunks/25hzl7qw_661s.js",
17
17
  "static/chunks/00nb3qfg98pl1.js",
18
- "static/chunks/1golqn9hvdi85.js",
19
- "static/chunks/turbopack-1whpqxvx8f759.js"
18
+ "static/chunks/0pkcgt8dr0jkl.js",
19
+ "static/chunks/turbopack-2r-q4_3piunr7.js"
20
20
  ],
21
21
  "rootMainFilesTree": {},
22
22
  "pagesChunkGroupBootstrapParams": {},
@@ -5,7 +5,7 @@
5
5
  "routeType": "page",
6
6
  "response": "complete",
7
7
  "compute": "static",
8
- "htmlSize": 11843,
8
+ "htmlSize": 12245,
9
9
  "experimentalBypassFor": [
10
10
  {
11
11
  "type": "header",
@@ -33,7 +33,7 @@
33
33
  "routeType": "page",
34
34
  "response": "complete",
35
35
  "compute": "static",
36
- "htmlSize": 9203,
36
+ "htmlSize": 9199,
37
37
  "experimentalBypassFor": [
38
38
  {
39
39
  "type": "header",
@@ -62,7 +62,7 @@
62
62
  "routeType": "page",
63
63
  "response": "complete",
64
64
  "compute": "static",
65
- "htmlSize": 12656,
65
+ "htmlSize": 13058,
66
66
  "experimentalBypassFor": [
67
67
  {
68
68
  "type": "header",
@@ -117,13 +117,45 @@
117
117
  "x-next-revalidated-tags",
118
118
  "x-next-revalidate-tag-token"
119
119
  ]
120
+ },
121
+ "/icon.svg": {
122
+ "initialHeaders": {
123
+ "cache-control": "public, max-age=0, must-revalidate",
124
+ "content-type": "image/svg+xml",
125
+ "x-next-cache-tags": "_N_T_/layout,_N_T_/icon.svg/layout,_N_T_/icon.svg/route,_N_T_/icon.svg"
126
+ },
127
+ "routeType": "route",
128
+ "response": "complete",
129
+ "compute": "static",
130
+ "experimentalBypassFor": [
131
+ {
132
+ "type": "header",
133
+ "key": "next-action"
134
+ },
135
+ {
136
+ "type": "header",
137
+ "key": "content-type",
138
+ "value": "multipart/form-data;.*"
139
+ }
140
+ ],
141
+ "initialRevalidateSeconds": false,
142
+ "srcRoute": "/icon.svg",
143
+ "dataRoute": null,
144
+ "allowHeader": [
145
+ "host",
146
+ "x-matched-path",
147
+ "x-prerender-revalidate",
148
+ "x-prerender-revalidate-if-generated",
149
+ "x-next-revalidated-tags",
150
+ "x-next-revalidate-tag-token"
151
+ ]
120
152
  }
121
153
  },
122
154
  "dynamicRoutes": {},
123
155
  "notFoundRoutes": [],
124
156
  "preview": {
125
- "previewModeId": "d3f8963f285abc4a86d12a0e46c97ff9",
126
- "previewModeSigningKey": "70a15865da0a381174161598cdfd96bdfe86940d0fedbff68c9ae50d8e485c51",
127
- "previewModeEncryptionKey": "2456185fb0a8f320e93e256df288905f4b3c133ff842fd048e205467b2514d1e"
157
+ "previewModeId": "2d398a993885ff688f6f46e9f0f5916e",
158
+ "previewModeSigningKey": "2a55dc7a4b98549d232d5db1af75efd5755b48b3e52c254b7f18476985496dca",
159
+ "previewModeEncryptionKey": "7c127f6890a6eda31d1903ea8057002b5f17b6eb4a22be7c1fc8440224117923"
128
160
  }
129
161
  }
@@ -2,7 +2,7 @@
2
2
  "version": 1,
3
3
  "config": {
4
4
  "env": {
5
- "APP_VERSION": "0.1.2"
5
+ "APP_VERSION": "0.1.4"
6
6
  },
7
7
  "webpack": null,
8
8
  "typescript": {
@@ -31,6 +31,15 @@
31
31
  },
32
32
  "namedRegex": "^/api/sessions/(?<nxtPprovider>[^/]+?)/(?<nxtPid>[^/]+?)(?:/)?$"
33
33
  },
34
+ {
35
+ "page": "/api/sessions/[provider]/[id]/reveal",
36
+ "regex": "^/api/sessions/([^/]+?)/([^/]+?)/reveal(?:/)?$",
37
+ "routeKeys": {
38
+ "nxtPprovider": "nxtPprovider",
39
+ "nxtPid": "nxtPid"
40
+ },
41
+ "namedRegex": "^/api/sessions/(?<nxtPprovider>[^/]+?)/(?<nxtPid>[^/]+?)/reveal(?:/)?$"
42
+ },
34
43
  {
35
44
  "page": "/sessions/[provider]/[id]",
36
45
  "regex": "^/sessions/([^/]+?)/([^/]+?)(?:/)?$",
@@ -72,6 +81,12 @@
72
81
  "routeKeys": {},
73
82
  "namedRegex": "^/api/logs(?:/)?$"
74
83
  },
84
+ {
85
+ "page": "/api/pricing",
86
+ "regex": "^/api/pricing(?:/)?$",
87
+ "routeKeys": {},
88
+ "namedRegex": "^/api/pricing(?:/)?$"
89
+ },
75
90
  {
76
91
  "page": "/api/providers",
77
92
  "regex": "^/api/providers(?:/)?$",
@@ -95,6 +110,12 @@
95
110
  "regex": "^/favicon\\.ico(?:/)?$",
96
111
  "routeKeys": {},
97
112
  "namedRegex": "^/favicon\\.ico(?:/)?$"
113
+ },
114
+ {
115
+ "page": "/icon.svg",
116
+ "regex": "^/icon\\.svg(?:/)?$",
117
+ "routeKeys": {},
118
+ "namedRegex": "^/icon\\.svg(?:/)?$"
98
119
  }
99
120
  ],
100
121
  "dataRoutes": [],
@@ -9,8 +9,8 @@
9
9
  "static/chunks/37by6nx5006ki.js",
10
10
  "static/chunks/25hzl7qw_661s.js",
11
11
  "static/chunks/00nb3qfg98pl1.js",
12
- "static/chunks/1golqn9hvdi85.js",
13
- "static/chunks/turbopack-1whpqxvx8f759.js"
12
+ "static/chunks/0pkcgt8dr0jkl.js",
13
+ "static/chunks/turbopack-2r-q4_3piunr7.js"
14
14
  ],
15
15
  "pages": {},
16
16
  "ampFirstPages": [],