agent-session-inspector 0.1.3 → 0.1.5
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/README.md +154 -64
- package/VERSION +1 -1
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +2 -0
- package/app/.next/build-manifest.json +3 -3
- package/app/.next/prerender-manifest.json +5 -5
- package/app/.next/required-server-files.json +1 -1
- package/app/.next/routes-manifest.json +15 -0
- package/app/.next/server/app/_global-error.html +1 -1
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +16 -16
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +16 -16
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +19 -18
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -3
- package/app/.next/server/app/api/analytics/route.js +2 -2
- package/app/.next/server/app/api/analytics/route.js.nft.json +1 -1
- package/app/.next/server/app/api/logs/route.js +2 -2
- package/app/.next/server/app/api/logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/pricing/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/pricing/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/pricing/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/pricing/route.js +6 -0
- package/app/.next/server/app/api/pricing/route.js.map +5 -0
- package/app/.next/server/app/api/pricing/route.js.nft.json +1 -0
- package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/providers/route.js +2 -2
- package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next/server/app/api/search/route.js +2 -2
- package/app/.next/server/app/api/search/route.js.nft.json +1 -1
- package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route.js +7 -0
- package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route.js.map +5 -0
- package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route.js.nft.json +1 -0
- package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/sessions/[provider]/[id]/route.js +2 -2
- package/app/.next/server/app/api/sessions/[provider]/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/sessions/route.js +2 -2
- package/app/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +18 -18
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +16 -16
- package/app/.next/server/app/index.segments/_full.segment.rsc +18 -18
- package/app/.next/server/app/index.segments/_tree.segment.rsc +3 -3
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/sessions/[provider]/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/sessions/[provider]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +2 -0
- package/app/.next/server/chunks/1oeh_server_app_api_sessions_[provider]_[id]_reveal_route_actions_1mqlatn.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0dyq0rc._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0kgkqhn._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0yxic1z._.js +6 -0
- package/app/.next/server/chunks/[root-of-the-server]__10p8y9z._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1cceere._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1eclfq8._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1lz20wm._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1zdh1mi._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__20epvou._.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_pricing_route_actions_06i5bdm.js +3 -0
- package/app/.next/server/chunks/ssr/[root-of-the-server]__1ei65vj._.js +1 -1
- package/app/.next/server/chunks/ssr/_0136j91._.js +1 -1
- package/app/.next/server/chunks/ssr/_0f8nmc3._.js +1 -1
- package/app/.next/server/chunks/ssr/_0o294sf._.js +3 -0
- package/app/.next/server/chunks/ssr/_1-5v1mi._.js +3 -0
- package/app/.next/server/chunks/ssr/_12__495._.js +1 -1
- package/app/.next/server/chunks/ssr/_1ck8cbf._.js +1 -1
- package/app/.next/server/chunks/ssr/src_app_page_tsx_1chiuah._.js +1 -1
- package/app/.next/server/chunks/ssr/src_app_sessions_[provider]_[id]_page_tsx_0uf635h._.js +3 -3
- package/app/.next/server/middleware-build-manifest.js +3 -3
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +1 -1
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/043k5ranw7p1-.js +1 -0
- package/app/.next/static/chunks/0mihgzifdany7.js +1 -0
- package/app/.next/static/chunks/{367imffzz5g8x.css → 0ua57-s0meis5.css} +2 -2
- package/app/.next/static/chunks/{31hdfb4m8lwzz.js → 1fe2mxakoweia.js} +1 -1
- package/app/.next/static/chunks/1syzk-359a-tl.js +6 -0
- package/app/.next/static/chunks/23pvfhng1yidh.css +1 -0
- package/app/.next/static/chunks/2t205sbe-_sk4.js +1 -0
- package/app/.next/static/chunks/3-g9jvt_m-6_4.js +1 -0
- package/app/.next/static/chunks/{0u22wlboqnsjn.js → 3_e2d472hbms0.js} +1 -1
- package/app/AGENTS.md +9 -0
- package/app/CLAUDE.md +1 -0
- package/app/CONTRIBUTING.md +90 -0
- package/app/Dockerfile +34 -0
- package/app/LICENSE +21 -0
- package/app/README.md +367 -0
- package/app/bin/agent-session-inspector.mjs +185 -0
- package/app/components.json +25 -0
- package/app/docs/screenshots/analytics-dark.png +0 -0
- package/app/docs/screenshots/analytics.png +0 -0
- package/app/docs/screenshots/session-overview-dark.png +0 -0
- package/app/docs/screenshots/session-overview.png +0 -0
- package/app/docs/screenshots/sessions-dark.png +0 -0
- package/app/docs/screenshots/sessions.png +0 -0
- package/app/docs/screenshots/timeline-dark.png +0 -0
- package/app/docs/screenshots/timeline.png +0 -0
- package/app/docs/screenshots/token-optimizer-dark.png +0 -0
- package/app/docs/screenshots/token-optimizer.png +0 -0
- package/app/docs/social-preview.png +0 -0
- package/app/eslint.config.mjs +20 -0
- package/app/install.sh +85 -0
- package/app/next.config.ts +17 -0
- package/app/package.json +6 -2
- package/app/pnpm-lock.yaml +7031 -0
- package/app/pnpm-workspace.yaml +3 -0
- package/app/postcss.config.mjs +7 -0
- package/app/scripts/build-cli.mjs +26 -0
- package/app/scripts/demo-data.mjs +335 -0
- package/app/scripts/deploy-docker.sh +71 -0
- package/app/scripts/package-release.sh +86 -0
- package/app/server.js +1 -1
- package/app/tsconfig.json +34 -0
- package/bin/agent-session-inspector.mjs +37 -11
- package/cli/cli.mjs +7610 -0
- package/package.json +5 -2
- package/app/.next/server/chunks/[externals]__0xll52b._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__093lyxv._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0ne74op._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0uqb915._.js +0 -6
- package/app/.next/server/chunks/[root-of-the-server]__0uv5tnc._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1lfc-ga._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1n_sepq._.js +0 -3
- package/app/.next/server/chunks/ssr/_0w9kj20._.js +0 -3
- package/app/.next/server/chunks/ssr/_1te8t5n._.js +0 -3
- package/app/.next/static/chunks/105fms2oszpby.js +0 -1
- package/app/.next/static/chunks/13ads2-fzhdry.css +0 -1
- package/app/.next/static/chunks/1n1htnt-u9ghv.js +0 -6
- package/app/.next/static/chunks/2bron83qy3bb-.js +0 -1
- package/app/.next/static/chunks/2q8c3-tw6cvrv.js +0 -1
- package/app/.next/static/chunks/3rd1dhhkaulu1.js +0 -1
- /package/app/.next/static/{NMXKYaysRrCyMjSEbGwmR → -wq1RTFV0ts5s-g4PiOpq}/_buildManifest.js +0 -0
- /package/app/.next/static/{NMXKYaysRrCyMjSEbGwmR → -wq1RTFV0ts5s-g4PiOpq}/_clientMiddlewareManifest.js +0 -0
- /package/app/.next/static/{NMXKYaysRrCyMjSEbGwmR → -wq1RTFV0ts5s-g4PiOpq}/_ssgManifest.js +0 -0
|
@@ -7,17 +7,30 @@ import { existsSync, readFileSync } from "node:fs";
|
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
import net from "node:net";
|
|
9
9
|
import path from "node:path";
|
|
10
|
-
import { fileURLToPath } from "node:url";
|
|
10
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
11
11
|
|
|
12
12
|
const NAME = "agent-session-inspector";
|
|
13
13
|
const MIN_NODE = [22, 13];
|
|
14
14
|
const PKG_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
15
15
|
const SERVER = path.join(PKG_DIR, "app", "server.js");
|
|
16
16
|
|
|
17
|
+
// Report commands print to the terminal instead of starting the server; they
|
|
18
|
+
// live in the bundle scripts/build-cli.mjs writes to <package>/cli/.
|
|
19
|
+
const CLI = path.join(PKG_DIR, "cli", "cli.mjs");
|
|
20
|
+
const COMMANDS = ["usage", "stats", "sessions"];
|
|
21
|
+
|
|
17
22
|
const HELP = `Usage: ${NAME} [options]
|
|
23
|
+
${NAME} <command> [options]
|
|
24
|
+
|
|
25
|
+
Browse Claude Code, Codex, Copilot, Cursor, Gemini CLI, OpenCode and Hermes
|
|
26
|
+
session transcripts in a local web UI, or print a report in the terminal.
|
|
27
|
+
|
|
28
|
+
Commands:
|
|
29
|
+
usage Tokens and estimated cost by day, model, project or agent
|
|
30
|
+
stats Sessions, messages, tool calls and time, by agent
|
|
31
|
+
sessions Recent sessions with their cost and health
|
|
18
32
|
|
|
19
|
-
|
|
20
|
-
local web UI.
|
|
33
|
+
Run a command with --help for its options.
|
|
21
34
|
|
|
22
35
|
Options:
|
|
23
36
|
-p, --port <port> Port to listen on (default: 3000, or the next free one)
|
|
@@ -118,7 +131,12 @@ function openBrowser(url) {
|
|
|
118
131
|
.unref();
|
|
119
132
|
}
|
|
120
133
|
|
|
121
|
-
const
|
|
134
|
+
const argv = process.argv.slice(2);
|
|
135
|
+
const command = COMMANDS.includes(argv[0]) ? argv[0] : null;
|
|
136
|
+
if (!command && argv[0] && !argv[0].startsWith("-")) {
|
|
137
|
+
fail(`unknown command ${argv[0]}\n\n${HELP}`);
|
|
138
|
+
}
|
|
139
|
+
const opts = command ? null : parseArgs(argv);
|
|
122
140
|
|
|
123
141
|
// npx only warns about package.json "engines", and the app needs node:sqlite.
|
|
124
142
|
const [major, minor] = process.versions.node.split(".").map(Number);
|
|
@@ -126,6 +144,21 @@ if (major < MIN_NODE[0] || (major === MIN_NODE[0] && minor < MIN_NODE[1])) {
|
|
|
126
144
|
fail(`Node.js ${MIN_NODE.join(".")} or newer is required (found ${process.version}).`);
|
|
127
145
|
}
|
|
128
146
|
|
|
147
|
+
// node:sqlite still announces itself as experimental on Node 22; not useful here.
|
|
148
|
+
const emitWarning = process.emitWarning;
|
|
149
|
+
process.emitWarning = (warning, ...rest) => {
|
|
150
|
+
if (String(warning).includes("SQLite is an experimental feature")) return;
|
|
151
|
+
emitWarning.call(process, warning, ...rest);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
if (command) {
|
|
155
|
+
if (!existsSync(CLI)) {
|
|
156
|
+
fail(`no command bundle found at ${CLI}\nRun \`pnpm cli ${command}\` from a checkout.`);
|
|
157
|
+
}
|
|
158
|
+
const { run } = await import(pathToFileURL(CLI).href);
|
|
159
|
+
process.exit(run(command, argv.slice(1)));
|
|
160
|
+
}
|
|
161
|
+
|
|
129
162
|
if (!existsSync(SERVER)) {
|
|
130
163
|
fail(`no build found at ${SERVER}\nRun scripts/package-release.sh and use dist/${NAME}/bin/${NAME}.mjs.`);
|
|
131
164
|
}
|
|
@@ -142,13 +175,6 @@ process.env.NEXT_TELEMETRY_DISABLED = "1";
|
|
|
142
175
|
process.env.PORT = String(port);
|
|
143
176
|
process.env.HOSTNAME = opts.host;
|
|
144
177
|
|
|
145
|
-
// node:sqlite still announces itself as experimental on Node 22; not useful here.
|
|
146
|
-
const emitWarning = process.emitWarning;
|
|
147
|
-
process.emitWarning = (warning, ...rest) => {
|
|
148
|
-
if (String(warning).includes("SQLite is an experimental feature")) return;
|
|
149
|
-
emitWarning.call(process, warning, ...rest);
|
|
150
|
-
};
|
|
151
|
-
|
|
152
178
|
// server.js is CommonJS and starts listening on load.
|
|
153
179
|
createRequire(import.meta.url)(SERVER);
|
|
154
180
|
|