agent-session-inspector 0.1.3 → 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.
- 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 +3 -3
- 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 +14 -14
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +13 -13
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- 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 +16 -16
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +15 -15
- package/app/.next/server/app/index.segments/_full.segment.rsc +16 -16
- package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- 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/_0136j91._.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/10x4j1wts3xx2.js +1 -0
- package/app/.next/static/chunks/1dz8a9ds45tdb.js +6 -0
- package/app/.next/static/chunks/1g3ep2o7fhgpe.css +1 -0
- package/app/.next/static/chunks/2iedud09ou282.js +1 -0
- package/app/.next/static/chunks/2k65elb1vo-2z.js +1 -0
- package/app/.next/static/chunks/2t205sbe-_sk4.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 +71 -0
- package/app/Dockerfile +34 -0
- package/app/LICENSE +21 -0
- package/app/README.md +277 -0
- package/app/bin/agent-session-inspector.mjs +159 -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 +19 -0
- package/app/install.sh +85 -0
- package/app/next.config.ts +17 -0
- package/app/package.json +1 -1
- package/app/pnpm-lock.yaml +6760 -0
- package/app/pnpm-workspace.yaml +2 -0
- package/app/postcss.config.mjs +7 -0
- package/app/scripts/demo-data.mjs +288 -0
- package/app/scripts/deploy-docker.sh +67 -0
- package/app/scripts/package-release.sh +84 -0
- package/app/server.js +1 -1
- package/app/tsconfig.json +34 -0
- package/package.json +1 -1
- 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 → KFq9wlUt8U-Sma3McE5Jw}/_buildManifest.js +0 -0
- /package/app/.next/static/{NMXKYaysRrCyMjSEbGwmR → KFq9wlUt8U-Sma3McE5Jw}/_clientMiddlewareManifest.js +0 -0
- /package/app/.next/static/{NMXKYaysRrCyMjSEbGwmR → KFq9wlUt8U-Sma3McE5Jw}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Writes a fake $HOME with synthetic Claude Code, Codex and Copilot transcripts, so the
|
|
3
|
+
// UI can be demoed (and README screenshots retaken) without exposing real
|
|
4
|
+
// sessions. Usage:
|
|
5
|
+
// node scripts/demo-data.mjs /tmp/asi-demo
|
|
6
|
+
// HOME=/tmp/asi-demo pnpm dev
|
|
7
|
+
import fs from "fs";
|
|
8
|
+
import path from "path";
|
|
9
|
+
|
|
10
|
+
const root = path.resolve(process.argv[2] ?? ".demo-home");
|
|
11
|
+
fs.rmSync(root, { recursive: true, force: true });
|
|
12
|
+
|
|
13
|
+
const writeJsonl = (file, rows) => {
|
|
14
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
15
|
+
fs.writeFileSync(file, rows.map((r) => JSON.stringify(r)).join("\n") + "\n");
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const clock = (start) => {
|
|
19
|
+
let t = new Date(start).getTime();
|
|
20
|
+
return (seconds = 3) => new Date((t += seconds * 1000)).toISOString();
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// ---------------------------------------------------------------- Claude Code
|
|
24
|
+
|
|
25
|
+
function claudeSession({ id, cwd, branch, title, start, model, turns }) {
|
|
26
|
+
const at = clock(start);
|
|
27
|
+
const base = { sessionId: id, cwd, gitBranch: branch, version: "2.1.4", entrypoint: "cli" };
|
|
28
|
+
const rows = [{ type: "ai-title", aiTitle: title, sessionId: id }];
|
|
29
|
+
let n = 0;
|
|
30
|
+
let parent = null;
|
|
31
|
+
const uid = () => `${id.slice(0, 8)}-${String(n++).padStart(4, "0")}`;
|
|
32
|
+
const add = (rec) => {
|
|
33
|
+
const uuid = uid();
|
|
34
|
+
rows.push({ ...base, ...rec, uuid, parentUuid: parent });
|
|
35
|
+
parent = uuid;
|
|
36
|
+
};
|
|
37
|
+
let cache = 18_000;
|
|
38
|
+
const usage = (out) => {
|
|
39
|
+
const u = {
|
|
40
|
+
input_tokens: 40 + Math.floor(Math.random() * 400),
|
|
41
|
+
cache_creation_input_tokens: 600 + Math.floor(Math.random() * 2500),
|
|
42
|
+
cache_read_input_tokens: cache,
|
|
43
|
+
output_tokens: out,
|
|
44
|
+
};
|
|
45
|
+
cache += u.cache_creation_input_tokens;
|
|
46
|
+
return u;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
let msg = 0;
|
|
50
|
+
for (const turn of turns) {
|
|
51
|
+
const turnStart = Date.now();
|
|
52
|
+
add({ type: "user", timestamp: at(20), message: { role: "user", content: turn.prompt } });
|
|
53
|
+
for (const step of turn.steps) {
|
|
54
|
+
const mid = `msg_${id.slice(0, 6)}${msg++}`;
|
|
55
|
+
if (step.thinking) {
|
|
56
|
+
add({
|
|
57
|
+
type: "assistant",
|
|
58
|
+
timestamp: at(4),
|
|
59
|
+
message: { id: mid, role: "assistant", model, content: [{ type: "thinking", thinking: step.thinking }], usage: usage(180) },
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
if (step.tool) {
|
|
63
|
+
const toolId = `toolu_${id.slice(0, 6)}${msg}`;
|
|
64
|
+
add({
|
|
65
|
+
type: "assistant",
|
|
66
|
+
timestamp: at(3),
|
|
67
|
+
message: {
|
|
68
|
+
id: mid,
|
|
69
|
+
role: "assistant",
|
|
70
|
+
model,
|
|
71
|
+
content: [{ type: "tool_use", id: toolId, name: step.tool, input: step.input }],
|
|
72
|
+
usage: usage(90 + Math.floor(Math.random() * 400)),
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
add({
|
|
76
|
+
type: "user",
|
|
77
|
+
timestamp: at(step.seconds ?? 2),
|
|
78
|
+
message: {
|
|
79
|
+
role: "user",
|
|
80
|
+
content: [{ type: "tool_result", tool_use_id: toolId, content: step.result, is_error: step.error === true }],
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
if (step.text) {
|
|
85
|
+
add({
|
|
86
|
+
type: "assistant",
|
|
87
|
+
timestamp: at(5),
|
|
88
|
+
message: { id: mid, role: "assistant", model, content: [{ type: "text", text: step.text }], usage: usage(350) },
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
add({ type: "system", subtype: "turn_duration", timestamp: at(1), durationMs: 40_000 + (Date.now() - turnStart) });
|
|
93
|
+
}
|
|
94
|
+
return rows;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const claudeProjects = path.join(root, ".claude", "projects");
|
|
98
|
+
|
|
99
|
+
const checkoutCwd = "/Users/demo/code/acme-shop";
|
|
100
|
+
writeJsonl(
|
|
101
|
+
path.join(claudeProjects, "-Users-demo-code-acme-shop", "7f3c2a10-5b1e-4c8d-9a42-1d6e8b0f3c21.jsonl"),
|
|
102
|
+
claudeSession({
|
|
103
|
+
id: "7f3c2a10-5b1e-4c8d-9a42-1d6e8b0f3c21",
|
|
104
|
+
cwd: checkoutCwd,
|
|
105
|
+
branch: "fix/cart-total-rounding",
|
|
106
|
+
title: "Fix cart total rounding bug",
|
|
107
|
+
start: "2026-09-24T09:12:00Z",
|
|
108
|
+
model: "claude-opus-5-5",
|
|
109
|
+
turns: [
|
|
110
|
+
{
|
|
111
|
+
prompt:
|
|
112
|
+
"Customers are reporting the cart total is sometimes off by a cent. Can you find out why and fix it? Tests are in src/cart/__tests__.",
|
|
113
|
+
steps: [
|
|
114
|
+
{ thinking: "Off-by-a-cent usually means floating point arithmetic on prices. Let me find where the total is computed." },
|
|
115
|
+
{ tool: "Grep", input: { pattern: "total", path: "src/cart" }, result: "src/cart/total.ts:12:export function cartTotal(items: CartItem[]) {\nsrc/cart/total.ts:18: return total;\nsrc/cart/summary.tsx:31: const total = cartTotal(items);" },
|
|
116
|
+
{ tool: "Read", input: { file_path: `${checkoutCwd}/src/cart/total.ts` }, result: "export function cartTotal(items: CartItem[]) {\n let total = 0;\n for (const item of items) {\n total += item.price * item.quantity * (1 - item.discount);\n }\n return Math.round(total * 100) / 100;\n}" },
|
|
117
|
+
{ text: "The total sums floating-point prices and rounds once at the end, so values like `0.1 + 0.2` drift before rounding. I'll switch to integer cents and round per line item." },
|
|
118
|
+
{ tool: "Edit", input: { file_path: `${checkoutCwd}/src/cart/total.ts`, old_string: "total += item.price * item.quantity * (1 - item.discount);", new_string: "total += Math.round(toCents(item.price) * item.quantity * (1 - item.discount));" }, result: "The file src/cart/total.ts has been updated." },
|
|
119
|
+
{ tool: "Edit", input: { file_path: `${checkoutCwd}/src/cart/__tests__/total.test.ts`, old_string: "});", new_string: " it('does not drift on fractional prices', () => {\n expect(cartTotal([{ price: 0.1, quantity: 3, discount: 0 }])).toBe(0.3);\n });\n});" }, result: "The file src/cart/__tests__/total.test.ts has been updated." },
|
|
120
|
+
{ tool: "Bash", input: { command: "pnpm test src/cart", description: "Run cart tests" }, seconds: 14, result: " PASS src/cart/__tests__/total.test.ts\n cartTotal\n ✓ sums line items (3 ms)\n ✓ applies discounts (1 ms)\n ✓ does not drift on fractional prices (1 ms)\n\nTest Suites: 1 passed, 1 total\nTests: 3 passed, 3 total" },
|
|
121
|
+
{ text: "Fixed. `cartTotal` now works in integer cents and rounds each line item, so totals no longer drift by a cent. I added a regression test for fractional prices; all 3 cart tests pass." },
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
prompt: "Nice. Does the same bug exist in the order summary on the checkout page?",
|
|
126
|
+
steps: [
|
|
127
|
+
{ tool: "Read", input: { file_path: `${checkoutCwd}/src/checkout/summary.tsx` }, result: "import { cartTotal } from '../cart/total';\n\nexport function OrderSummary({ items, shipping }) {\n const subtotal = cartTotal(items);\n const total = subtotal + shipping;\n return <Money value={total} />;\n}" },
|
|
128
|
+
{ tool: "Bash", input: { command: "pnpm test src/checkout", description: "Run checkout tests" }, seconds: 9, result: "Tests: 7 passed, 7 total" },
|
|
129
|
+
{ text: "The checkout summary calls `cartTotal`, so it picks up the fix automatically. Shipping is already stored in cents, so there's nothing else to change there." },
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
}),
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
const apiCwd = "/Users/demo/code/weather-api";
|
|
137
|
+
writeJsonl(
|
|
138
|
+
path.join(claudeProjects, "-Users-demo-code-weather-api", "c1d9e4b2-8a7f-4e21-b3c5-6f0a2d9e7b14.jsonl"),
|
|
139
|
+
claudeSession({
|
|
140
|
+
id: "c1d9e4b2-8a7f-4e21-b3c5-6f0a2d9e7b14",
|
|
141
|
+
cwd: apiCwd,
|
|
142
|
+
branch: "main",
|
|
143
|
+
title: "Add rate limiting to forecast endpoint",
|
|
144
|
+
start: "2026-09-23T15:40:00Z",
|
|
145
|
+
model: "claude-sonnet-5",
|
|
146
|
+
turns: [
|
|
147
|
+
{
|
|
148
|
+
prompt: "Add a simple per-IP rate limit (60 requests/minute) to GET /forecast.",
|
|
149
|
+
steps: [
|
|
150
|
+
{ tool: "Glob", input: { pattern: "src/routes/**/*.ts" }, result: "src/routes/forecast.ts\nsrc/routes/health.ts" },
|
|
151
|
+
{ tool: "Read", input: { file_path: `${apiCwd}/src/routes/forecast.ts` }, result: "router.get('/forecast', async (req, res) => {\n const data = await getForecast(req.query.city);\n res.json(data);\n});" },
|
|
152
|
+
{ tool: "Write", input: { file_path: `${apiCwd}/src/middleware/rate-limit.ts`, content: "export function rateLimit(limit: number, windowMs: number) { /* ... */ }" }, result: "File created successfully." },
|
|
153
|
+
{ tool: "Edit", input: { file_path: `${apiCwd}/src/routes/forecast.ts`, old_string: "router.get('/forecast',", new_string: "router.get('/forecast', rateLimit(60, 60_000)," }, result: "The file src/routes/forecast.ts has been updated." },
|
|
154
|
+
{ tool: "Bash", input: { command: "pnpm test", description: "Run test suite" }, seconds: 11, error: true, result: "FAIL src/routes/__tests__/forecast.test.ts\n ✕ returns 429 after limit (12 ms)\n Expected: 429\n Received: 200" },
|
|
155
|
+
{ thinking: "The limiter keys on req.ip, which is undefined behind the test client. Fall back to the socket address." },
|
|
156
|
+
{ tool: "Edit", input: { file_path: `${apiCwd}/src/middleware/rate-limit.ts`, old_string: "const key = req.ip;", new_string: "const key = req.ip ?? req.socket.remoteAddress ?? 'unknown';" }, result: "The file src/middleware/rate-limit.ts has been updated." },
|
|
157
|
+
{ tool: "Bash", input: { command: "pnpm test", description: "Run test suite" }, seconds: 10, result: "Tests: 18 passed, 18 total" },
|
|
158
|
+
{ text: "Added a `rateLimit` middleware (fixed window, keyed by client IP) and applied it to `GET /forecast` at 60 requests/minute. Clients over the limit get a 429 with a `Retry-After` header. All 18 tests pass." },
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
}),
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
writeJsonl(
|
|
166
|
+
path.join(claudeProjects, "-Users-demo-code-acme-shop", "a8e2f7c3-1d4b-4f9e-8c6a-3b5d7e9f1a02.jsonl"),
|
|
167
|
+
claudeSession({
|
|
168
|
+
id: "a8e2f7c3-1d4b-4f9e-8c6a-3b5d7e9f1a02",
|
|
169
|
+
cwd: checkoutCwd,
|
|
170
|
+
branch: "main",
|
|
171
|
+
title: "Explain the checkout flow",
|
|
172
|
+
start: "2026-09-22T11:05:00Z",
|
|
173
|
+
model: "claude-haiku-4-5-20251001",
|
|
174
|
+
turns: [
|
|
175
|
+
{
|
|
176
|
+
prompt: "Give me a quick tour of how checkout works in this repo.",
|
|
177
|
+
steps: [
|
|
178
|
+
{ tool: "Glob", input: { pattern: "src/checkout/**" }, result: "src/checkout/page.tsx\nsrc/checkout/summary.tsx\nsrc/checkout/payment.ts\nsrc/checkout/confirm.ts" },
|
|
179
|
+
{ tool: "Read", input: { file_path: `${checkoutCwd}/src/checkout/page.tsx` }, result: "export default function CheckoutPage() { /* address → payment → confirm */ }" },
|
|
180
|
+
{ text: "Checkout is a three-step flow in `src/checkout/page.tsx`: address, payment, confirm. `payment.ts` creates a payment intent, `confirm.ts` finalizes the order, and `summary.tsx` shows the running total using `cartTotal`." },
|
|
181
|
+
],
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
}),
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
// ---------------------------------------------------------------------- Codex
|
|
188
|
+
|
|
189
|
+
const codexId = "0199a3f2-7c41-7d20-9e8b-5a4c3b2d1e0f";
|
|
190
|
+
{
|
|
191
|
+
const at = clock("2026-09-24T17:30:00Z");
|
|
192
|
+
const cwd = "/Users/demo/code/cli-tools";
|
|
193
|
+
writeJsonl(path.join(root, ".codex", "session_index.jsonl"), [
|
|
194
|
+
{ id: codexId, thread_name: "Add --json flag to status command" },
|
|
195
|
+
]);
|
|
196
|
+
const tokens = (input, cached, output) => ({
|
|
197
|
+
type: "event_msg",
|
|
198
|
+
timestamp: at(1),
|
|
199
|
+
payload: {
|
|
200
|
+
type: "token_count",
|
|
201
|
+
info: {
|
|
202
|
+
total_token_usage: { input_tokens: input, cached_input_tokens: cached, output_tokens: output, total_tokens: input + output },
|
|
203
|
+
last_token_usage: { total_tokens: 9_000 },
|
|
204
|
+
model_context_window: 272_000,
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
});
|
|
208
|
+
writeJsonl(path.join(root, ".codex", "sessions", "2026", "09", "24", `rollout-2026-09-24T17-30-00-${codexId}.jsonl`), [
|
|
209
|
+
{
|
|
210
|
+
type: "session_meta",
|
|
211
|
+
timestamp: at(0),
|
|
212
|
+
payload: { id: codexId, cwd, originator: "codex_cli_rs", cli_version: "0.61.0", git: { branch: "feat/status-json", repository_url: "git@github.com:demo/cli-tools.git" } },
|
|
213
|
+
},
|
|
214
|
+
{ type: "turn_context", timestamp: at(1), payload: { model: "gpt-5-codex", effort: "medium", cwd } },
|
|
215
|
+
{ type: "event_msg", timestamp: at(1), payload: { type: "task_started", turn_id: "t1", model_context_window: 272_000 } },
|
|
216
|
+
{ type: "event_msg", timestamp: at(2), payload: { type: "user_message", message: "Add a --json flag to `status` that prints machine-readable output." } },
|
|
217
|
+
{ type: "event_msg", timestamp: at(4), payload: { type: "agent_reasoning", text: "Find the status command definition and its output formatter." } },
|
|
218
|
+
{ type: "response_item", timestamp: at(1), payload: { type: "function_call", name: "shell", call_id: "c1", arguments: JSON.stringify({ command: ["rg", "-n", "fn status", "src"] }) } },
|
|
219
|
+
{ type: "response_item", timestamp: at(2), payload: { type: "function_call_output", call_id: "c1", output: "src/commands/status.rs:14:pub fn status(args: StatusArgs) -> Result<()> {" } },
|
|
220
|
+
tokens(21_400, 12_800, 1_150),
|
|
221
|
+
{ type: "event_msg", timestamp: at(8), payload: { type: "patch_apply_end", call_id: "p1", success: true, stdout: "Success. Updated the following files:\nM src/commands/status.rs\nM src/cli.rs", stderr: "", changes: { [`${cwd}/src/commands/status.rs`]: { type: "update" }, [`${cwd}/src/cli.rs`]: { type: "update" } } } },
|
|
222
|
+
{ type: "response_item", timestamp: at(1), payload: { type: "function_call", name: "shell", call_id: "c2", arguments: JSON.stringify({ command: ["cargo", "test", "status"] }) } },
|
|
223
|
+
{ type: "response_item", timestamp: at(18), payload: { type: "function_call_output", call_id: "c2", output: "running 4 tests\ntest status::plain_output ... ok\ntest status::json_output ... ok\n\ntest result: ok. 4 passed; 0 failed" } },
|
|
224
|
+
tokens(48_900, 36_100, 2_870),
|
|
225
|
+
{ type: "event_msg", timestamp: at(4), payload: { type: "agent_message", message: "`status --json` now serializes the status struct with serde and prints it to stdout. Plain output is unchanged. Added a test for the JSON shape; all 4 status tests pass." } },
|
|
226
|
+
{ type: "event_msg", timestamp: at(1), payload: { type: "task_complete", turn_id: "t1", duration_ms: 44_000 } },
|
|
227
|
+
]);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// -------------------------------------------------------------------- Copilot
|
|
231
|
+
|
|
232
|
+
{
|
|
233
|
+
const id = "5e2b9c14-3f8a-4d61-a7e0-9c3d2b1f6a85";
|
|
234
|
+
const dir = path.join(root, ".copilot", "session-state", id);
|
|
235
|
+
const cwd = "/Users/demo/code/docs-site";
|
|
236
|
+
const start = "2026-09-24T12:05:00Z";
|
|
237
|
+
const at = clock(start);
|
|
238
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
239
|
+
fs.writeFileSync(
|
|
240
|
+
path.join(dir, "workspace.yaml"),
|
|
241
|
+
[
|
|
242
|
+
`id: ${id}`,
|
|
243
|
+
`name: Fix broken links in docs sidebar`,
|
|
244
|
+
`cwd: ${cwd}`,
|
|
245
|
+
`repository: demo/docs-site`,
|
|
246
|
+
`branch: fix/sidebar-links`,
|
|
247
|
+
`created_at: ${start}`,
|
|
248
|
+
`updated_at: 2026-09-24T12:07:10Z`,
|
|
249
|
+
`host_type: cli`,
|
|
250
|
+
`client_name: copilot-cli`,
|
|
251
|
+
`user_named: true`,
|
|
252
|
+
].join("\n") + "\n",
|
|
253
|
+
);
|
|
254
|
+
|
|
255
|
+
let n = 0;
|
|
256
|
+
const ev = (type, data, seconds) => ({ type, data, id: `cp-${n++}`, timestamp: at(seconds), parentId: null });
|
|
257
|
+
const tool = (name, args, result, seconds = 2) => {
|
|
258
|
+
const toolCallId = `call_${n}`;
|
|
259
|
+
return [
|
|
260
|
+
ev("tool.execution_start", { toolName: name, toolCallId, arguments: args }, 3),
|
|
261
|
+
ev("tool.execution_complete", { toolName: name, toolCallId, success: true, result: { content: result } }, seconds),
|
|
262
|
+
];
|
|
263
|
+
};
|
|
264
|
+
writeJsonl(path.join(dir, "events.jsonl"), [
|
|
265
|
+
ev("session.start", { sessionId: id, selectedModel: "gpt-5.1", copilotVersion: "0.0.412", context: { cwd, branch: "fix/sidebar-links", repository: "demo/docs-site" } }, 0),
|
|
266
|
+
ev("user.message", { content: "Some links in the docs sidebar 404 after the folder rename. Find and fix them." }, 5),
|
|
267
|
+
ev("assistant.message", { content: "I'll check the sidebar config against the files that actually exist.", outputTokens: 120, inputTokens: 9_800 }, 4),
|
|
268
|
+
...tool("bash", { command: "node scripts/check-links.js sidebar.json" }, "3 broken links:\n /guides/setup -> guides/setup.md (missing)\n /guides/deploy -> guides/deploy.md (missing)\n /api/auth -> api/auth.md (missing)", 6),
|
|
269
|
+
...tool("glob", { pattern: "docs/**/*.md" }, "docs/getting-started/setup.md\ndocs/getting-started/deploy.md\ndocs/reference/auth.md\ndocs/index.md"),
|
|
270
|
+
...tool("edit", { path: `${cwd}/sidebar.json`, old_str: '"guides/setup"', new_str: '"getting-started/setup"' }, "File updated."),
|
|
271
|
+
...tool("bash", { command: "node scripts/check-links.js sidebar.json" }, "All links OK (24 checked).", 5),
|
|
272
|
+
ev("assistant.message", { content: "Updated three sidebar entries to the new `getting-started/` and `reference/` paths. The link checker now reports all 24 links OK.", outputTokens: 210, inputTokens: 14_600 }, 4),
|
|
273
|
+
ev("session.shutdown", {
|
|
274
|
+
totalApiDurationMs: 21_400,
|
|
275
|
+
totalPremiumRequests: 2,
|
|
276
|
+
modelMetrics: { "gpt-5.1": { usage: { inputTokens: 38_900, outputTokens: 1_640, cacheReadTokens: 27_300 } } },
|
|
277
|
+
}, 2),
|
|
278
|
+
]);
|
|
279
|
+
|
|
280
|
+
fs.mkdirSync(path.join(root, ".copilot", "logs"), { recursive: true });
|
|
281
|
+
fs.writeFileSync(
|
|
282
|
+
path.join(root, ".copilot", "logs", "process-1758715500000-4821.log"),
|
|
283
|
+
`${start} [INFO] Starting Copilot CLI 0.0.412\n${start} [INFO] Session ${id} created in ${cwd}\n2026-09-24T12:07:10Z [INFO] Session ${id} shut down\n`,
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
console.log(`Demo home written to ${root}`);
|
|
288
|
+
console.log(`Run: HOME=${root} pnpm dev`);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
NAME=agent-session-inspector
|
|
5
|
+
|
|
6
|
+
docker build -t "$NAME" .
|
|
7
|
+
|
|
8
|
+
if docker container inspect "$NAME" >/dev/null 2>&1; then
|
|
9
|
+
docker rm -f "$NAME"
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
# Mount only the transcript paths the app reads, read-only. Deliberately narrow:
|
|
13
|
+
# ~/.codex/auth.json, ~/.copilot/config.json and ~/.hermes/auth.json hold
|
|
14
|
+
# credentials and stay out.
|
|
15
|
+
PATHS=(
|
|
16
|
+
".copilot/session-state"
|
|
17
|
+
".copilot/logs"
|
|
18
|
+
".copilot/session-store.db"
|
|
19
|
+
".copilot/session-store.db-shm"
|
|
20
|
+
".copilot/session-store.db-wal"
|
|
21
|
+
".claude/projects"
|
|
22
|
+
".codex/sessions"
|
|
23
|
+
".codex/session_index.jsonl"
|
|
24
|
+
".local/share/opencode/opencode.db"
|
|
25
|
+
".local/share/opencode/opencode.db-shm"
|
|
26
|
+
".local/share/opencode/opencode.db-wal"
|
|
27
|
+
".hermes/state.db"
|
|
28
|
+
".hermes/state.db-shm"
|
|
29
|
+
".hermes/state.db-wal"
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
# Desktop apps keep their data somewhere else on each OS; inside the Linux
|
|
33
|
+
# container the app looks under ~/.config.
|
|
34
|
+
case "$(uname -s)" in
|
|
35
|
+
Darwin) APP_DATA="Library/Application Support" ;;
|
|
36
|
+
*) APP_DATA=".config" ;;
|
|
37
|
+
esac
|
|
38
|
+
APP_PATHS=(
|
|
39
|
+
"Code/User/workspaceStorage"
|
|
40
|
+
"Code/User/globalStorage/emptyWindowChatSessions"
|
|
41
|
+
"Code - Insiders/User/workspaceStorage"
|
|
42
|
+
"Code - Insiders/User/globalStorage/emptyWindowChatSessions"
|
|
43
|
+
"Claude/local-agent-mode-sessions"
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
mounts=()
|
|
47
|
+
for rel in "${PATHS[@]}"; do
|
|
48
|
+
if [ -e "$HOME/$rel" ]; then
|
|
49
|
+
mounts+=(-v "$HOME/$rel:/root/$rel:ro")
|
|
50
|
+
fi
|
|
51
|
+
done
|
|
52
|
+
for rel in "${APP_PATHS[@]}"; do
|
|
53
|
+
if [ -e "$HOME/$APP_DATA/$rel" ]; then
|
|
54
|
+
mounts+=(-v "$HOME/$APP_DATA/$rel:/root/.config/$rel:ro")
|
|
55
|
+
fi
|
|
56
|
+
done
|
|
57
|
+
|
|
58
|
+
if [ ${#mounts[@]} -eq 0 ]; then
|
|
59
|
+
echo "No agent session directories found under $HOME." >&2
|
|
60
|
+
exit 1
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
# The app shows where each session is stored; tell it what the mounts are
|
|
64
|
+
# called out here, so the paths it shows are ones that exist on this machine.
|
|
65
|
+
docker run -d --name "$NAME" --restart unless-stopped --user root -e HOME=/root \
|
|
66
|
+
-e ASI_HOST_HOME="$HOME" -e ASI_HOST_APP_DATA="$HOME/$APP_DATA" \
|
|
67
|
+
"${mounts[@]}" "$NAME"
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Build the standalone server and stage it in dist/agent-session-inspector, the
|
|
3
|
+
# folder `npm publish` uploads, then pack that into
|
|
4
|
+
# dist/agent-session-inspector.tar.gz, the archive install.sh downloads. The
|
|
5
|
+
# build has no native modules, so one package runs on any OS with Node.
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
NAME=agent-session-inspector
|
|
9
|
+
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
10
|
+
VERSION="${1:-$(node -p "require('$ROOT/package.json').version")}"
|
|
11
|
+
VERSION="${VERSION#v}"
|
|
12
|
+
OUT="$ROOT/dist"
|
|
13
|
+
STAGE="$OUT/$NAME"
|
|
14
|
+
# The server sits a level down: npm leaves a package's top-level node_modules
|
|
15
|
+
# out of the upload.
|
|
16
|
+
APP="$STAGE/app"
|
|
17
|
+
MODULES="$APP/node_modules"
|
|
18
|
+
|
|
19
|
+
cd "$ROOT"
|
|
20
|
+
# Clear the old output first, or the build traces it into the new one.
|
|
21
|
+
rm -rf "$OUT"
|
|
22
|
+
pnpm run build
|
|
23
|
+
|
|
24
|
+
mkdir -p "$APP"
|
|
25
|
+
|
|
26
|
+
# next build leaves .next/static out of the standalone folder.
|
|
27
|
+
cp -R .next/standalone/. "$APP/"
|
|
28
|
+
mkdir -p "$APP/.next"
|
|
29
|
+
cp -R .next/static "$APP/.next/static"
|
|
30
|
+
|
|
31
|
+
mkdir -p "$STAGE/bin"
|
|
32
|
+
cp "bin/$NAME.mjs" "$STAGE/bin/$NAME.mjs"
|
|
33
|
+
chmod +x "$STAGE/bin/$NAME.mjs"
|
|
34
|
+
echo "$VERSION" > "$STAGE/VERSION"
|
|
35
|
+
cp README.md LICENSE "$STAGE/"
|
|
36
|
+
|
|
37
|
+
# The tracer drags in sharp (unused: images are unoptimized) with its
|
|
38
|
+
# per-platform binaries and dependencies.
|
|
39
|
+
for dep in "$MODULES"/.pnpm/sharp@*/node_modules/*; do
|
|
40
|
+
if [ -L "$dep" ]; then
|
|
41
|
+
target="$(cd "$dep" 2>/dev/null && pwd -P)" || continue
|
|
42
|
+
rm -rf "${target%/node_modules/*}"
|
|
43
|
+
fi
|
|
44
|
+
done
|
|
45
|
+
rm -rf "$MODULES"/.pnpm/@img+* "$MODULES"/.pnpm/sharp@*
|
|
46
|
+
|
|
47
|
+
# npm never uploads symlinks, and pnpm's node_modules is built from them, so
|
|
48
|
+
# hoist every traced package into one flat node_modules.
|
|
49
|
+
find "$APP" -type l -delete
|
|
50
|
+
for dir in "$MODULES"/.pnpm/*/node_modules/* "$MODULES"/.pnpm/*/node_modules/@*/*; do
|
|
51
|
+
[ -d "$dir" ] || continue
|
|
52
|
+
name="${dir##*/node_modules/}"
|
|
53
|
+
case "$name" in @*/*) ;; @*) continue ;; esac
|
|
54
|
+
if [ -e "$MODULES/$name" ]; then
|
|
55
|
+
echo "error: two versions of $name in the build; a flat node_modules can hold one" >&2
|
|
56
|
+
exit 1
|
|
57
|
+
fi
|
|
58
|
+
mkdir -p "$(dirname "$MODULES/$name")"
|
|
59
|
+
mv "$dir" "$MODULES/$name"
|
|
60
|
+
done
|
|
61
|
+
rm -rf "$MODULES/.pnpm"
|
|
62
|
+
|
|
63
|
+
if find "$STAGE" -name '*.node' | grep -q .; then
|
|
64
|
+
echo "error: native module in build; the package would not be portable:" >&2
|
|
65
|
+
find "$STAGE" -name '*.node' >&2
|
|
66
|
+
exit 1
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
# The manifest npm publishes: the built app has no dependencies left to install.
|
|
70
|
+
node -e '
|
|
71
|
+
const pkg = require(process.argv[1]);
|
|
72
|
+
const [name, version] = process.argv.slice(2);
|
|
73
|
+
const { description, keywords, author, license, homepage, bugs, repository, engines } = pkg;
|
|
74
|
+
console.log(JSON.stringify({
|
|
75
|
+
name, version, description, keywords, author, license, homepage, bugs, repository, engines,
|
|
76
|
+
bin: { [name]: `bin/${name}.mjs` },
|
|
77
|
+
files: ["app", "bin", "VERSION"],
|
|
78
|
+
}, null, 2));
|
|
79
|
+
' "$ROOT/package.json" "$NAME" "$VERSION" > "$STAGE/package.json"
|
|
80
|
+
|
|
81
|
+
tar -czf "$OUT/$NAME.tar.gz" -C "$OUT" "$NAME"
|
|
82
|
+
cp install.sh "$OUT/install.sh"
|
|
83
|
+
|
|
84
|
+
echo "Packed $NAME $VERSION -> dist/$NAME.tar.gz ($(du -h "$OUT/$NAME.tar.gz" | cut -f1))"
|
package/app/server.js
CHANGED
|
@@ -9,7 +9,7 @@ const currentPort = parseInt(process.env.PORT, 10) || 3000
|
|
|
9
9
|
const hostname = process.env.HOSTNAME || '0.0.0.0'
|
|
10
10
|
|
|
11
11
|
let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
|
|
12
|
-
const nextConfig = {"env":{"APP_VERSION":"0.1.
|
|
12
|
+
const nextConfig = {"env":{"APP_VERSION":"0.1.4"},"webpack":null,"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"instrumentationClientInject":[],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":true,"customCacheHandler":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{"serverFunctions":true,"browserToTerminal":"warn"},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/home/runner/work/agent-session-inspector/agent-session-inspector","enablePrerenderSourceMaps":true,"cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"experimental":{"appNewScrollHandler":true,"coldCacheBadge":false,"devValidationWorker":true,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"dynamicOnHover":false,"useOffline":false,"varyParams":true,"optimisticRouting":true,"instrumentationClientRouterTransitionEvents":false,"prefetchInlining":{"maxSize":2048,"maxBundleSize":10240},"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":3,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptOperationCache":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"devMemoryThresholdRestart":true,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"requestInsights":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"useTypeScriptCli":true,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":true,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"serverComponentsHmrCancellation":false,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"globalNotFound":false,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":true,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","turbopackMemoryEvictionMode":"auto","optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"useCacheTimeout":54,"instantInsights":{"validationLevel":"warning"},"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.ts","outputFileTracingExcludes":{"/**":["./.git/**","./.claude/**","./src/**"]},"repoRoot":"/home/runner/work/agent-session-inspector/agent-session-inspector","turbopack":{"root":"/home/runner/work/agent-session-inspector/agent-session-inspector"},"distDirRoot":".next"}
|
|
13
13
|
|
|
14
14
|
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
|
|
15
15
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2017",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "react-jsx",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [
|
|
17
|
+
{
|
|
18
|
+
"name": "next"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"paths": {
|
|
22
|
+
"@/*": ["./src/*"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"include": [
|
|
26
|
+
"next-env.d.ts",
|
|
27
|
+
"**/*.ts",
|
|
28
|
+
"**/*.tsx",
|
|
29
|
+
".next/types/**/*.ts",
|
|
30
|
+
".next/dev/types/**/*.ts",
|
|
31
|
+
"**/*.mts"
|
|
32
|
+
],
|
|
33
|
+
"exclude": ["node_modules"]
|
|
34
|
+
}
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[70406,(e,r,t)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},20635,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},24725,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,r,t)=>{r.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,r,t)=>{r.exports=e.x("node:stream",()=>require("node:stream"))},14747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Bexternals%5D__0xll52b._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},20635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},72626,e=>{"use strict";var t=e.i(90453),r=e.i(16011);async function a(e){let a=e.nextUrl.searchParams.get("provider")??void 0;return t.NextResponse.json((0,r.listSessions)(a))}e.s(["GET",0,a])},60471,e=>{"use strict";var t=e.i(66096),r=e.i(67637),a=e.i(47656),n=e.i(58227),s=e.i(98630),i=e.i(94609),o=e.i(98774),l=e.i(77679),d=e.i(99020),u=e.i(15304),p=e.i(97666),c=e.i(91817),x=e.i(81575),h=e.i(93310),v=e.i(66395),R=e.i(93695);e.i(17232);var m=e.i(86935);let g=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/sessions/route",pathname:"/api/sessions",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/sessions/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(72626),...{}}),{workAsyncStorage:f,workUnitAsyncStorage:w,serverHooks:E}=g;async function C(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),g.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/sessions/route";f=f.replace(/\/index$/,"")||"/";let w=await g.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:E,deploymentId:C,params:y,nextConfig:A,parsedUrl:T,isDraftMode:b,prerenderManifest:q,routerServerContext:P,isOnDemandRevalidate:S,revalidateOnlyGenerated:N,resolvedPathname:j,clientReferenceManifest:_,serverActionsManifest:k}=w,O=(0,o.normalizeAppPath)(f),H=!!(q.dynamicRoutes[O]||q.routes[j]),I=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,T,!1):t.end("This page could not be found"),null);if(H&&!b){let e=!!q.routes[j],t=q.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(A.adapterPath)return await I();throw new R.NoFallbackError}}let M=null;!H||g.isDev||b||(M="/index"===(M=j)?"/":M);let U=!0===g.isDev||!H,D=H&&!U;k&&_&&(0,i.setManifestsSingleton)({page:f,clientReferenceManifest:_,serverActionsManifest:k});let F=e.method||"GET",K=(0,s.getTracer)(),L=K.getActiveScopeSpan(),$=!!(null==P?void 0:P.isWrappedByNextServer),B=!!(0,n.getRequestMeta)(e,"minimalMode"),G=(0,n.getRequestMeta)(e,"incrementalCache")||await g.getIncrementalCache(e,A,q,B);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let V={params:y,previewProps:q.preview,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts,useCacheTimeout:A.experimental.useCacheTimeout},cacheComponents:!!A.cacheComponents,validationLevel:A.experimental.instantInsights.validationLevel,supportsDynamicResponse:U,incrementalCache:G,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:A.cacheLife,staticPageGenerationTimeout:A.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>g.onRequestError(e,t,a,n,P)},sharedContext:{buildId:E,deploymentId:C}},X=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),z=d.NextRequestAdapter.fromNodeNextRequest(X,(0,d.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:r})=>{try{if(!B&&S&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await g.handle(z,V);e.fetchMetrics=V.renderOpts.fetchMetrics;let s=V.renderOpts.pendingWaitUntil;s&&a.waitUntil&&(a.waitUntil(s),s=void 0);let i=V.renderOpts.collectedTags;if(!H)return await (0,c.sendResponse)(X,W,n,s),null;{let e=await n.blob(),t=(0,x.toNodeOutgoingHttpHeaders)(n.headers);i&&(t[v.NEXT_CACHE_TAGS_HEADER]=i),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,a=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=v.INFINITE_CACHE?!1!==r&&r>0?A.expireTime:void 0:V.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await g.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:S})},!1,P),t}},J=async(n,i)=>{try{var o,l;let n=await g.handleResponse({req:e,nextConfig:A,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:q,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:N,responseGenerator:Z,waitUntil:a.waitUntil,isMinimalMode:B});if(!H)return;if((null==n||null==(o=n.value)?void 0:o.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",S?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,x.fromNodeOutgoingHttpHeaders)(n.value.headers);B&&H||s.delete(v.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,h.getCacheControlHeader)(n.cacheControl)),await (0,c.sendResponse)(X,W,new Response(n.value.body,{headers:s,status:n.value.status||200}));return}catch(t){if(t instanceof R.NoFallbackError||await g.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:S})},!1,P),H)throw t;await (0,c.sendResponse)(X,W,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:s.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let r=K.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||O,o=`${F} ${a}`;n.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),n.updateName(o),i&&i!==n&&(i.setAttribute("http.route",a),i.updateName(o))})()}};if($&&L)await J(L,void 0);else{let t=K.getActiveScopeSpan();await K.withPropagatedContext(e.headers,()=>K.trace(u.BaseServerSpan.handleRequest,{spanName:`${F} ${f}`,kind:s.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>J(e,t)),void 0,!$)}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:w})},"routeModule",0,g,"serverHooks",0,E,"workAsyncStorage",0,f,"workUnitAsyncStorage",0,w])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__093lyxv._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},20635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},34202,e=>{"use strict";var t=e.i(90453),r=e.i(16011);async function a(){return t.NextResponse.json((0,r.listProviders)())}e.s(["GET",0,a])},71853,e=>{"use strict";var t=e.i(66096),r=e.i(67637),a=e.i(47656),n=e.i(58227),s=e.i(98630),i=e.i(94609),o=e.i(98774),l=e.i(77679),d=e.i(99020),u=e.i(15304),p=e.i(97666),c=e.i(91817),x=e.i(81575),h=e.i(93310),v=e.i(66395),R=e.i(93695);e.i(17232);var m=e.i(86935);let g=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/providers/route",pathname:"/api/providers",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/providers/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(34202),...{}}),{workAsyncStorage:f,workUnitAsyncStorage:w,serverHooks:E}=g;async function C(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),g.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/providers/route";f=f.replace(/\/index$/,"")||"/";let w=await g.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:E,deploymentId:C,params:y,nextConfig:A,parsedUrl:T,isDraftMode:b,prerenderManifest:q,routerServerContext:P,isOnDemandRevalidate:S,revalidateOnlyGenerated:N,resolvedPathname:j,clientReferenceManifest:_,serverActionsManifest:k}=w,O=(0,o.normalizeAppPath)(f),H=!!(q.dynamicRoutes[O]||q.routes[j]),I=async()=>((null==P?void 0:P.render404)?await P.render404(e,t,T,!1):t.end("This page could not be found"),null);if(H&&!b){let e=!!q.routes[j],t=q.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(A.adapterPath)return await I();throw new R.NoFallbackError}}let M=null;!H||g.isDev||b||(M="/index"===(M=j)?"/":M);let U=!0===g.isDev||!H,D=H&&!U;k&&_&&(0,i.setManifestsSingleton)({page:f,clientReferenceManifest:_,serverActionsManifest:k});let F=e.method||"GET",K=(0,s.getTracer)(),L=K.getActiveScopeSpan(),$=!!(null==P?void 0:P.isWrappedByNextServer),B=!!(0,n.getRequestMeta)(e,"minimalMode"),G=(0,n.getRequestMeta)(e,"incrementalCache")||await g.getIncrementalCache(e,A,q,B);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let V={params:y,previewProps:q.preview,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts,useCacheTimeout:A.experimental.useCacheTimeout},cacheComponents:!!A.cacheComponents,validationLevel:A.experimental.instantInsights.validationLevel,supportsDynamicResponse:U,incrementalCache:G,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:A.cacheLife,staticPageGenerationTimeout:A.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>g.onRequestError(e,t,a,n,P)},sharedContext:{buildId:E,deploymentId:C}},X=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),z=d.NextRequestAdapter.fromNodeNextRequest(X,(0,d.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:r})=>{try{if(!B&&S&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await g.handle(z,V);e.fetchMetrics=V.renderOpts.fetchMetrics;let s=V.renderOpts.pendingWaitUntil;s&&a.waitUntil&&(a.waitUntil(s),s=void 0);let i=V.renderOpts.collectedTags;if(!H)return await (0,c.sendResponse)(X,W,n,s),null;{let e=await n.blob(),t=(0,x.toNodeOutgoingHttpHeaders)(n.headers);i&&(t[v.NEXT_CACHE_TAGS_HEADER]=i),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,a=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=v.INFINITE_CACHE?!1!==r&&r>0?A.expireTime:void 0:V.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await g.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:S})},!1,P),t}},J=async(n,i)=>{try{var o,l;let n=await g.handleResponse({req:e,nextConfig:A,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:q,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:N,responseGenerator:Z,waitUntil:a.waitUntil,isMinimalMode:B});if(!H)return;if((null==n||null==(o=n.value)?void 0:o.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",S?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,x.fromNodeOutgoingHttpHeaders)(n.value.headers);B&&H||s.delete(v.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,h.getCacheControlHeader)(n.cacheControl)),await (0,c.sendResponse)(X,W,new Response(n.value.body,{headers:s,status:n.value.status||200}));return}catch(t){if(t instanceof R.NoFallbackError||await g.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:S})},!1,P),H)throw t;await (0,c.sendResponse)(X,W,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:s.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let r=K.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||O,o=`${F} ${a}`;n.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),n.updateName(o),i&&i!==n&&(i.setAttribute("http.route",a),i.updateName(o))})()}};if($&&L)await J(L,void 0);else{let t=K.getActiveScopeSpan();await K.withPropagatedContext(e.headers,()=>K.trace(u.BaseServerSpan.handleRequest,{spanName:`${F} ${f}`,kind:s.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>J(e,t)),void 0,!$)}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:w})},"routeModule",0,g,"serverHooks",0,E,"workAsyncStorage",0,f,"workUnitAsyncStorage",0,w])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0ne74op._.js.map
|