@tonyclaw/agent-inspector 2.0.12 → 2.0.13

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 (28) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{CompareDrawer-ClM_uVRy.js → CompareDrawer-CrMyE23D.js} +1 -1
  3. package/.output/public/assets/{ProxyViewerContainer-CTNNzXSa.js → ProxyViewerContainer-BZuo0px3.js} +17 -17
  4. package/.output/public/assets/{ReplayDialog-7rp7N_KJ.js → ReplayDialog-TQGhDdTa.js} +1 -1
  5. package/.output/public/assets/RequestAnatomy-D6kQYtfa.js +1 -0
  6. package/.output/public/assets/{ResponseView-Cjlf3b6-.js → ResponseView-C6ybWuB8.js} +1 -1
  7. package/.output/public/assets/{StreamingChunkSequence-Ctx3sT3r.js → StreamingChunkSequence-Bvs59_-I.js} +1 -1
  8. package/.output/public/assets/_sessionId-BNG_mnaH.js +1 -0
  9. package/.output/public/assets/index-BUxIwHhC.js +1 -0
  10. package/.output/public/assets/{main-FvIQopAy.js → main-DvFSJlOd.js} +2 -2
  11. package/.output/server/{_sessionId-BDSgtrsI.mjs → _sessionId-DHYJxPb7.mjs} +2 -2
  12. package/.output/server/_ssr/{CompareDrawer-Cqvv0I3x.mjs → CompareDrawer-meimDBeA.mjs} +2 -2
  13. package/.output/server/_ssr/{ProxyViewerContainer-C0YEoG8N.mjs → ProxyViewerContainer-Co-WKq6u.mjs} +14 -15
  14. package/.output/server/_ssr/{ReplayDialog-CrsynUKI.mjs → ReplayDialog-cclcGyR9.mjs} +3 -3
  15. package/.output/server/_ssr/{RequestAnatomy-CR_JUkcL.mjs → RequestAnatomy-to_rezzu.mjs} +212 -18
  16. package/.output/server/_ssr/{ResponseView-Dba2Et69.mjs → ResponseView-CZZI4IZd.mjs} +2 -2
  17. package/.output/server/_ssr/{StreamingChunkSequence-BIMHLstI.mjs → StreamingChunkSequence-BTF4xSYX.mjs} +2 -2
  18. package/.output/server/_ssr/{index-DveIUTm5.mjs → index-D2fpJFP5.mjs} +2 -2
  19. package/.output/server/_ssr/index.mjs +2 -2
  20. package/.output/server/_ssr/{router-D0yXVG0Q.mjs → router-RDBAF-Iu.mjs} +2 -2
  21. package/.output/server/{_tanstack-start-manifest_v-pe0xJFuQ.mjs → _tanstack-start-manifest_v-DB9sseoH.mjs} +1 -1
  22. package/.output/server/index.mjs +60 -60
  23. package/package.json +1 -1
  24. package/src/components/ProxyViewer.tsx +7 -6
  25. package/src/components/proxy-viewer/anatomy/RequestAnatomy.tsx +267 -20
  26. package/.output/public/assets/RequestAnatomy-sL2FFo_N.js +0 -1
  27. package/.output/public/assets/_sessionId-DEWzDQ8-.js +0 -1
  28. package/.output/public/assets/index-DGIIhZTn.js +0 -1
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { u as useProviders, p as analyzeContextIntelligence, f as formatTokens, k as TooltipProvider, c as cn, l as Tooltip, m as TooltipTrigger, n as TooltipContent, S as SegmentBar, R as ROLE_COLOR_CLASSES, A as ANATOMY_ROLE_LABELS, q as formatContextWindowTokens, C as CONTEXT_USAGE_THRESHOLDS } from "./ProxyViewerContainer-C0YEoG8N.mjs";
3
- import "./router-D0yXVG0Q.mjs";
2
+ import { u as useProviders, p as analyzeContextIntelligence, f as formatTokens, k as TooltipProvider, c as cn, l as Tooltip, m as TooltipTrigger, n as TooltipContent, S as SegmentBar, R as ROLE_COLOR_CLASSES, A as ANATOMY_ROLE_LABELS, q as formatContextWindowTokens, C as CONTEXT_USAGE_THRESHOLDS } from "./ProxyViewerContainer-Co-WKq6u.mjs";
3
+ import "./router-RDBAF-Iu.mjs";
4
4
  import "../_libs/modelcontextprotocol__server.mjs";
5
5
  import "../_libs/jszip.mjs";
6
6
  import { ac as Info, b as ChevronDown, f as ChevronRight } from "../_libs/lucide-react.mjs";
@@ -169,6 +169,9 @@ const DIVERGENCE_AMBER_THRESHOLD = 0.25;
169
169
  const TOP_CONTRIBUTOR_COUNT = 5;
170
170
  const DUPLICATE_GROUP_DISPLAY_COUNT = 4;
171
171
  const DUPLICATE_SEGMENT_DISPLAY_COUNT = 6;
172
+ const TOOL_SCHEMA_SAVINGS_RATIO = 0.25;
173
+ const SYSTEM_PROMPT_SAVINGS_RATIO = 0.2;
174
+ const HISTORY_SAVINGS_RATIO = 0.2;
172
175
  const ROLE_ORDER = ["system", "user", "assistant", "tool", "tools"];
173
176
  const ROLE_DESCRIPTIONS = {
174
177
  system: "instructions",
@@ -234,8 +237,8 @@ function formatContextSource(intelligence) {
234
237
  return intelligence.model === null ? intelligence.contextWindow.label : `${intelligence.contextWindow.label}: ${intelligence.model}`;
235
238
  }
236
239
  }
237
- function diagnosticTone(diagnostic) {
238
- switch (diagnostic.severity) {
240
+ function advisorTone(severity) {
241
+ switch (severity) {
239
242
  case "watch":
240
243
  return "border-amber-400/30 bg-amber-400/8 text-amber-100";
241
244
  case "danger":
@@ -262,13 +265,207 @@ function ContextHealthBadge({ health }) {
262
265
  }
263
266
  );
264
267
  }
268
+ function roleUsageTokens(intelligence, role) {
269
+ return intelligence.roleUsages.find((usage) => usage.role === role)?.tokens ?? 0;
270
+ }
271
+ function roleUsagePercent(intelligence, role) {
272
+ return intelligence.roleUsages.find((usage) => usage.role === role)?.percent ?? 0;
273
+ }
274
+ function estimatedSaving(tokens, ratio) {
275
+ if (tokens <= 0) return null;
276
+ const saving = Math.round(tokens * ratio);
277
+ return saving > 0 ? saving : null;
278
+ }
279
+ function largestSegmentForRole(segments, role) {
280
+ return [...segments].filter((segment) => segment.role === role).sort((left, right) => right.size - left.size)[0] ?? null;
281
+ }
282
+ function largestSegmentForHistory(segments) {
283
+ return [...segments].filter(
284
+ (segment) => segment.role === "user" || segment.role === "assistant" || segment.role === "tool"
285
+ ).sort((left, right) => right.size - left.size)[0] ?? null;
286
+ }
287
+ function firstDuplicateTarget(groups, segments) {
288
+ const firstGroup = groups[0] ?? null;
289
+ if (firstGroup === null) return null;
290
+ const firstSegment = firstGroup.segments[0] ?? null;
291
+ if (firstSegment === null) return null;
292
+ return resolveDuplicateSegment(firstSegment, segments);
293
+ }
294
+ function duplicateSaving(groups) {
295
+ const saving = groups.reduce((sum, group) => sum + group.repeatedTokens, 0);
296
+ return saving > 0 ? saving : null;
297
+ }
298
+ function historyTokens(intelligence) {
299
+ return roleUsageTokens(intelligence, "user") + roleUsageTokens(intelligence, "assistant") + roleUsageTokens(intelligence, "tool");
300
+ }
301
+ function advisorItemFromDiagnostic({
302
+ diagnostic,
303
+ intelligence,
304
+ segments
305
+ }) {
306
+ switch (diagnostic.kind) {
307
+ case "duplicate":
308
+ return {
309
+ key: "duplicate",
310
+ kind: "duplicate",
311
+ severity: diagnostic.severity,
312
+ title: "Duplicate content",
313
+ impact: diagnostic.detail,
314
+ action: "Remove repeated blocks or keep one canonical copy in the next request.",
315
+ savingTokens: duplicateSaving(intelligence.duplicateGroups),
316
+ target: firstDuplicateTarget(intelligence.duplicateGroups, segments)
317
+ };
318
+ case "tool-schema": {
319
+ const tokens = roleUsageTokens(intelligence, "tools");
320
+ const percent = roleUsagePercent(intelligence, "tools");
321
+ return {
322
+ key: "tool-schema",
323
+ kind: "tool-schema",
324
+ severity: diagnostic.severity,
325
+ title: "Tool schema pressure",
326
+ impact: `Tool definitions use ~${formatTokens(tokens)} tokens (${formatPercent(
327
+ percent * 100
328
+ )}).`,
329
+ action: "Disable unused tools or shorten verbose schema descriptions.",
330
+ savingTokens: estimatedSaving(tokens, TOOL_SCHEMA_SAVINGS_RATIO),
331
+ target: largestSegmentForRole(segments, "tools")
332
+ };
333
+ }
334
+ case "system-heavy": {
335
+ const tokens = roleUsageTokens(intelligence, "system");
336
+ const percent = roleUsagePercent(intelligence, "system");
337
+ return {
338
+ key: "system-heavy",
339
+ kind: "system-heavy",
340
+ severity: diagnostic.severity,
341
+ title: "Large system prompt",
342
+ impact: `System instructions use ~${formatTokens(tokens)} tokens (${formatPercent(
343
+ percent * 100
344
+ )}).`,
345
+ action: "Compress repeated policy text and move stable guidance into reusable memory.",
346
+ savingTokens: estimatedSaving(tokens, SYSTEM_PROMPT_SAVINGS_RATIO),
347
+ target: largestSegmentForRole(segments, "system")
348
+ };
349
+ }
350
+ case "history-bloat": {
351
+ const tokens = historyTokens(intelligence);
352
+ return {
353
+ key: "history-bloat",
354
+ kind: "history-bloat",
355
+ severity: diagnostic.severity,
356
+ title: "Conversation history growth",
357
+ impact: diagnostic.detail,
358
+ action: "Summarize older turns and trim resolved tool outputs before continuing.",
359
+ savingTokens: estimatedSaving(tokens, HISTORY_SAVINGS_RATIO),
360
+ target: largestSegmentForHistory(segments)
361
+ };
362
+ }
363
+ }
364
+ }
365
+ function buildContextAdvisorItems({
366
+ intelligence,
367
+ segments
368
+ }) {
369
+ const items = [];
370
+ if (intelligence.riskLevel === "watch" || intelligence.riskLevel === "danger") {
371
+ items.push({
372
+ key: "context-pressure",
373
+ kind: "context-pressure",
374
+ severity: intelligence.riskLevel === "danger" ? "danger" : "watch",
375
+ title: "Context window pressure",
376
+ impact: `${formatUsagePercent(intelligence.usagePercent)} used, ${formatRemainingTokens(
377
+ intelligence.remainingAfterReserveTokens
378
+ )} remaining after output reserve.`,
379
+ action: "Start with the largest context block, then remove duplicates or summarize history.",
380
+ savingTokens: null,
381
+ target: [...segments].sort((left, right) => right.size - left.size)[0] ?? null
382
+ });
383
+ }
384
+ if (intelligence.contextWindow.source === "unknown") {
385
+ items.push({
386
+ key: "context-window",
387
+ kind: "context-window",
388
+ severity: "watch",
389
+ title: "Context window unknown",
390
+ impact: "Agent Inspector cannot calculate remaining space for this model.",
391
+ action: "Add model metadata in Provider settings so risk and remaining space are accurate.",
392
+ savingTokens: null,
393
+ target: null
394
+ });
395
+ }
396
+ intelligence.diagnostics.forEach((diagnostic) => {
397
+ items.push(advisorItemFromDiagnostic({ diagnostic, intelligence, segments }));
398
+ });
399
+ return items;
400
+ }
401
+ function ContextAdvisorPanel({
402
+ items,
403
+ onSegmentActivate
404
+ }) {
405
+ if (items.length === 0) return null;
406
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "space-y-2 rounded border border-border/70 bg-muted/15 p-2", children: [
407
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
408
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-foreground", children: "Context Advisor" }),
409
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "font-mono text-[11px] text-muted-foreground", children: [
410
+ String(items.length),
411
+ " issue",
412
+ items.length === 1 ? "" : "s"
413
+ ] })
414
+ ] }),
415
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid gap-2", children: items.map((item) => {
416
+ const target = item.target;
417
+ const canJump = target !== null && onSegmentActivate !== void 0;
418
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
419
+ "div",
420
+ {
421
+ className: cn("rounded border px-2 py-1.5 text-xs", advisorTone(item.severity)),
422
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-wrap items-start justify-between gap-2", children: [
423
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0", children: [
424
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium", children: item.title }),
425
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-0.5 text-[11px] text-muted-foreground", children: [
426
+ "Impact: ",
427
+ item.impact
428
+ ] }),
429
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-0.5 text-[11px] text-muted-foreground", children: [
430
+ "Action: ",
431
+ item.action
432
+ ] })
433
+ ] }),
434
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex shrink-0 items-center gap-1.5", children: [
435
+ item.savingTokens !== null && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-mono text-[11px] text-muted-foreground", children: [
436
+ "Save ~",
437
+ formatTokens(item.savingTokens)
438
+ ] }),
439
+ canJump && target !== null && onSegmentActivate !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(
440
+ "button",
441
+ {
442
+ type: "button",
443
+ onClick: () => onSegmentActivate(target),
444
+ className: "inline-flex h-6 items-center gap-1 rounded border border-border/60 px-1.5 text-[11px] text-muted-foreground hover:border-border hover:bg-muted/40 hover:text-foreground",
445
+ title: "Jump to the most relevant context block",
446
+ children: [
447
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "size-3" }),
448
+ "Jump"
449
+ ]
450
+ }
451
+ )
452
+ ] })
453
+ ] })
454
+ },
455
+ item.key
456
+ );
457
+ }) })
458
+ ] });
459
+ }
265
460
  function ContextIntelligenceStrip({
266
- intelligence
461
+ intelligence,
462
+ segments,
463
+ onSegmentActivate
267
464
  }) {
268
465
  const usageWidth = intelligence.usagePercent === null ? 0 : Math.max(1, intelligence.usagePercent * 100);
269
466
  const outputReserveLabel = intelligence.outputReserveTokens === null ? "No output reserve" : `Output reserve ${formatTokens(intelligence.outputReserveTokens)}`;
270
467
  const largestRole = intelligence.largestRole;
271
- const visibleDiagnostics = intelligence.duplicateGroups.length === 0 ? intelligence.diagnostics : intelligence.diagnostics.filter((diagnostic) => diagnostic.kind !== "duplicate");
468
+ const advisorItems = buildContextAdvisorItems({ intelligence, segments });
272
469
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
273
470
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid gap-x-4 gap-y-2 border-y border-border/60 py-2 text-xs sm:grid-cols-4", children: [
274
471
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0", children: [
@@ -350,17 +547,7 @@ function ContextIntelligenceStrip({
350
547
  ] })
351
548
  ] })
352
549
  ] }),
353
- visibleDiagnostics.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid gap-1.5 sm:grid-cols-2", children: visibleDiagnostics.map((diagnostic) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
354
- "div",
355
- {
356
- className: cn("rounded border px-2 py-1.5 text-xs", diagnosticTone(diagnostic)),
357
- children: [
358
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium", children: diagnostic.title }),
359
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-0.5 text-[11px] text-muted-foreground", children: diagnostic.detail })
360
- ]
361
- },
362
- `${diagnostic.kind}-${diagnostic.title}`
363
- )) })
550
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ContextAdvisorPanel, { items: advisorItems, onSegmentActivate })
364
551
  ] });
365
552
  }
366
553
  function resolveDuplicateSegment(duplicateSegment, segments) {
@@ -602,7 +789,14 @@ function RequestAnatomy({
602
789
  ] }),
603
790
  "Estimate differs from provider-reported input."
604
791
  ] }),
605
- intelligence !== null && /* @__PURE__ */ jsxRuntimeExports.jsx(ContextIntelligenceStrip, { intelligence }),
792
+ intelligence !== null && /* @__PURE__ */ jsxRuntimeExports.jsx(
793
+ ContextIntelligenceStrip,
794
+ {
795
+ intelligence,
796
+ segments,
797
+ onSegmentActivate
798
+ }
799
+ ),
606
800
  intelligence !== null && /* @__PURE__ */ jsxRuntimeExports.jsx(
607
801
  DuplicateContentPanel,
608
802
  {
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { g as getLogFormatAdapter, f as formatTokens, c as cn, s as getStatusCategory, B as Badge, t as Collapsible, v as CollapsibleTrigger, w as CollapsibleContent, x as ScrollArea, y as JsonViewer, z as safeJsonValue } from "./ProxyViewerContainer-C0YEoG8N.mjs";
3
- import "./router-D0yXVG0Q.mjs";
2
+ import { g as getLogFormatAdapter, f as formatTokens, c as cn, s as getStatusCategory, B as Badge, t as Collapsible, v as CollapsibleTrigger, w as CollapsibleContent, x as ScrollArea, y as JsonViewer, z as safeJsonValue } from "./ProxyViewerContainer-Co-WKq6u.mjs";
3
+ import "./router-RDBAF-Iu.mjs";
4
4
  import "../_libs/modelcontextprotocol__server.mjs";
5
5
  import "../_libs/jszip.mjs";
6
6
  import { Z as Zap, j as TriangleAlert, ad as CircleStop, B as Brain, b as ChevronDown, f as ChevronRight, T as Terminal } from "../_libs/lucide-react.mjs";
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { k as TooltipProvider, l as Tooltip, m as TooltipTrigger, B as Badge, n as TooltipContent, y as JsonViewer } from "./ProxyViewerContainer-C0YEoG8N.mjs";
3
- import "./router-D0yXVG0Q.mjs";
2
+ import { k as TooltipProvider, l as Tooltip, m as TooltipTrigger, B as Badge, n as TooltipContent, y as JsonViewer } from "./ProxyViewerContainer-Co-WKq6u.mjs";
3
+ import "./router-RDBAF-Iu.mjs";
4
4
  import "../_libs/modelcontextprotocol__server.mjs";
5
5
  import "../_libs/jszip.mjs";
6
6
  import { b as ChevronDown, f as ChevronRight, L as LoaderCircle } from "../_libs/lucide-react.mjs";
@@ -1,6 +1,6 @@
1
- import { P as ProxyViewerContainer } from "./ProxyViewerContainer-C0YEoG8N.mjs";
1
+ import { P as ProxyViewerContainer } from "./ProxyViewerContainer-Co-WKq6u.mjs";
2
2
  import "../_libs/react.mjs";
3
- import "./router-D0yXVG0Q.mjs";
3
+ import "./router-RDBAF-Iu.mjs";
4
4
  import "../_libs/modelcontextprotocol__server.mjs";
5
5
  import "../_libs/jszip.mjs";
6
6
  import "../_libs/swr.mjs";
@@ -198,7 +198,7 @@ function getResponse() {
198
198
  return event.res;
199
199
  }
200
200
  async function getStartManifest(matchedRoutes) {
201
- const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-pe0xJFuQ.mjs");
201
+ const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-DB9sseoH.mjs");
202
202
  const startManifest = tsrStartManifest();
203
203
  const rootRoute = startManifest.routes[rootRouteId] = startManifest.routes[rootRouteId] || {};
204
204
  rootRoute.assets = rootRoute.assets || [];
@@ -767,7 +767,7 @@ let entriesPromise;
767
767
  let baseManifestPromise;
768
768
  let cachedFinalManifestPromise;
769
769
  async function loadEntries() {
770
- const routerEntry = await import("./router-D0yXVG0Q.mjs").then((n) => n.m);
770
+ const routerEntry = await import("./router-RDBAF-Iu.mjs").then((n) => n.m);
771
771
  const startEntry = await import("./start-HYkvq4Ni.mjs");
772
772
  return { startEntry, routerEntry };
773
773
  }
@@ -92,7 +92,7 @@ function RootDocument({ children }) {
92
92
  ] })
93
93
  ] });
94
94
  }
95
- const $$splitComponentImporter$1 = () => import("./index-DveIUTm5.mjs");
95
+ const $$splitComponentImporter$1 = () => import("./index-D2fpJFP5.mjs");
96
96
  const Route$r = createFileRoute("/")({
97
97
  component: lazyRouteComponent($$splitComponentImporter$1, "component")
98
98
  });
@@ -135,7 +135,7 @@ function decodeSessionIdFromPath(encoded) {
135
135
  function getSessionPath(sessionId) {
136
136
  return `/session/${encodeSessionIdForPath(sessionId)}`;
137
137
  }
138
- const $$splitComponentImporter = () => import("../_sessionId-BDSgtrsI.mjs");
138
+ const $$splitComponentImporter = () => import("../_sessionId-DHYJxPb7.mjs");
139
139
  const Route$q = createFileRoute("/session/$sessionId")({
140
140
  component: lazyRouteComponent($$splitComponentImporter, "component"),
141
141
  parseParams: (params) => ({
@@ -1,4 +1,4 @@
1
- const tsrStartManifest = () => ({ "routes": { "__root__": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/__root.tsx", "children": ["/", "/api/config", "/api/health", "/api/logs", "/api/mcp", "/api/models", "/api/providers", "/api/sessions", "/proxy/$", "/session/$sessionId", "/api/knowledge/candidates", "/api/knowledge/project-context", "/api/knowledge/search", "/api/knowledge/sessions/$sessionId/candidates"], "preloads": ["/assets/main-FvIQopAy.js"], "assets": [] }, "/": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", "assets": [], "preloads": ["/assets/index-DGIIhZTn.js", "/assets/ProxyViewerContainer-CTNNzXSa.js"] }, "/api/config": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/config.ts", "children": ["/api/config/paths"] }, "/api/health": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/health.ts" }, "/api/logs": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.ts", "children": ["/api/logs/$id", "/api/logs/stream"] }, "/api/mcp": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/mcp.ts" }, "/api/models": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/models.ts" }, "/api/providers": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.ts", "children": ["/api/providers/$providerId", "/api/providers/export", "/api/providers/import", "/api/providers/scan"] }, "/api/sessions": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/sessions.ts" }, "/proxy/$": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/proxy/$.ts" }, "/session/$sessionId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/session/$sessionId.tsx", "assets": [], "preloads": ["/assets/_sessionId-DEWzDQ8-.js", "/assets/ProxyViewerContainer-CTNNzXSa.js"] }, "/api/config/paths": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/config.paths.ts" }, "/api/knowledge/candidates": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.candidates.ts", "children": ["/api/knowledge/candidates/$candidateId"] }, "/api/knowledge/project-context": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.project-context.ts" }, "/api/knowledge/search": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.search.ts" }, "/api/logs/$id": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.ts", "children": ["/api/logs/$id/chunks", "/api/logs/$id/replay"] }, "/api/logs/stream": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.stream.ts" }, "/api/providers/$providerId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.ts", "children": ["/api/providers/$providerId/model-metadata", "/api/providers/$providerId/test"] }, "/api/providers/export": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.export.ts" }, "/api/providers/import": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.import.ts" }, "/api/providers/scan": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.scan.ts" }, "/api/knowledge/candidates/$candidateId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.candidates.$candidateId.ts", "children": ["/api/knowledge/candidates/$candidateId/promote"] }, "/api/logs/$id/chunks": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.chunks.ts" }, "/api/logs/$id/replay": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.replay.ts" }, "/api/providers/$providerId/model-metadata": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.model-metadata.ts" }, "/api/providers/$providerId/test": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.test.ts", "children": ["/api/providers/$providerId/test/log"] }, "/api/knowledge/candidates/$candidateId/promote": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.candidates.$candidateId.promote.ts" }, "/api/knowledge/sessions/$sessionId/candidates": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.sessions.$sessionId.candidates.ts" }, "/api/providers/$providerId/test/log": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.test.log.ts" } }, "clientEntry": "/assets/main-FvIQopAy.js" });
1
+ const tsrStartManifest = () => ({ "routes": { "__root__": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/__root.tsx", "children": ["/", "/api/config", "/api/health", "/api/logs", "/api/mcp", "/api/models", "/api/providers", "/api/sessions", "/proxy/$", "/session/$sessionId", "/api/knowledge/candidates", "/api/knowledge/project-context", "/api/knowledge/search", "/api/knowledge/sessions/$sessionId/candidates"], "preloads": ["/assets/main-DvFSJlOd.js"], "assets": [] }, "/": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", "assets": [], "preloads": ["/assets/index-BUxIwHhC.js", "/assets/ProxyViewerContainer-BZuo0px3.js"] }, "/api/config": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/config.ts", "children": ["/api/config/paths"] }, "/api/health": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/health.ts" }, "/api/logs": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.ts", "children": ["/api/logs/$id", "/api/logs/stream"] }, "/api/mcp": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/mcp.ts" }, "/api/models": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/models.ts" }, "/api/providers": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.ts", "children": ["/api/providers/$providerId", "/api/providers/export", "/api/providers/import", "/api/providers/scan"] }, "/api/sessions": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/sessions.ts" }, "/proxy/$": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/proxy/$.ts" }, "/session/$sessionId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/session/$sessionId.tsx", "assets": [], "preloads": ["/assets/_sessionId-BNG_mnaH.js", "/assets/ProxyViewerContainer-BZuo0px3.js"] }, "/api/config/paths": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/config.paths.ts" }, "/api/knowledge/candidates": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.candidates.ts", "children": ["/api/knowledge/candidates/$candidateId"] }, "/api/knowledge/project-context": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.project-context.ts" }, "/api/knowledge/search": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.search.ts" }, "/api/logs/$id": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.ts", "children": ["/api/logs/$id/chunks", "/api/logs/$id/replay"] }, "/api/logs/stream": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.stream.ts" }, "/api/providers/$providerId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.ts", "children": ["/api/providers/$providerId/model-metadata", "/api/providers/$providerId/test"] }, "/api/providers/export": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.export.ts" }, "/api/providers/import": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.import.ts" }, "/api/providers/scan": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.scan.ts" }, "/api/knowledge/candidates/$candidateId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.candidates.$candidateId.ts", "children": ["/api/knowledge/candidates/$candidateId/promote"] }, "/api/logs/$id/chunks": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.chunks.ts" }, "/api/logs/$id/replay": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.replay.ts" }, "/api/providers/$providerId/model-metadata": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.model-metadata.ts" }, "/api/providers/$providerId/test": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.test.ts", "children": ["/api/providers/$providerId/test/log"] }, "/api/knowledge/candidates/$candidateId/promote": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.candidates.$candidateId.promote.ts" }, "/api/knowledge/sessions/$sessionId/candidates": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.sessions.$sessionId.candidates.ts" }, "/api/providers/$providerId/test/log": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.test.log.ts" } }, "clientEntry": "/assets/main-DvFSJlOd.js" });
2
2
  export {
3
3
  tsrStartManifest
4
4
  };
@@ -35,103 +35,103 @@ const headers = ((m) => function headersRouteRule(event) {
35
35
  }
36
36
  });
37
37
  const assets = {
38
- "/assets/CompareDrawer-ClM_uVRy.js": {
38
+ "/assets/index-BUxIwHhC.js": {
39
39
  "type": "text/javascript; charset=utf-8",
40
- "etag": '"49fe-SZ34GYuPl79DInUwwjhnDXXVMhI"',
41
- "mtime": "2026-06-24T06:20:41.552Z",
40
+ "etag": '"74-17MgHyFdaM/UiSxnr6bhUjd21oI"',
41
+ "mtime": "2026-06-24T07:40:51.239Z",
42
+ "size": 116,
43
+ "path": "../public/assets/index-BUxIwHhC.js"
44
+ },
45
+ "/assets/CompareDrawer-CrMyE23D.js": {
46
+ "type": "text/javascript; charset=utf-8",
47
+ "etag": '"49fe-VKyqLVtDPPevv5MdtQXjHACosNY"',
48
+ "mtime": "2026-06-24T07:40:51.239Z",
42
49
  "size": 18942,
43
- "path": "../public/assets/CompareDrawer-ClM_uVRy.js"
50
+ "path": "../public/assets/CompareDrawer-CrMyE23D.js"
44
51
  },
45
52
  "/assets/alibaba-TTwafVwX.svg": {
46
53
  "type": "image/svg+xml",
47
54
  "etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
48
- "mtime": "2026-06-24T06:20:41.552Z",
55
+ "mtime": "2026-06-24T07:40:51.239Z",
49
56
  "size": 5915,
50
57
  "path": "../public/assets/alibaba-TTwafVwX.svg"
51
58
  },
52
59
  "/assets/minimax-BPMzvuL-.jpeg": {
53
60
  "type": "image/jpeg",
54
61
  "etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
55
- "mtime": "2026-06-24T06:20:41.552Z",
62
+ "mtime": "2026-06-24T07:40:51.239Z",
56
63
  "size": 6918,
57
64
  "path": "../public/assets/minimax-BPMzvuL-.jpeg"
58
65
  },
59
- "/assets/ReplayDialog-7rp7N_KJ.js": {
66
+ "/assets/index-D_nZj9Vt.css": {
67
+ "type": "text/css; charset=utf-8",
68
+ "etag": '"1a275-7T1iSNG2p6BSsqLwdpfky+9evLw"',
69
+ "mtime": "2026-06-24T07:40:51.239Z",
70
+ "size": 107125,
71
+ "path": "../public/assets/index-D_nZj9Vt.css"
72
+ },
73
+ "/assets/ReplayDialog-TQGhDdTa.js": {
60
74
  "type": "text/javascript; charset=utf-8",
61
- "etag": '"2361-3PSK8yYyFJmDityfBTwVPCzjRSY"',
62
- "mtime": "2026-06-24T06:20:41.552Z",
75
+ "etag": '"2361-LKIYlHyDMFWSPaE5tA+urwEigM4"',
76
+ "mtime": "2026-06-24T07:40:51.240Z",
63
77
  "size": 9057,
64
- "path": "../public/assets/ReplayDialog-7rp7N_KJ.js"
78
+ "path": "../public/assets/ReplayDialog-TQGhDdTa.js"
65
79
  },
66
- "/assets/ResponseView-Cjlf3b6-.js": {
80
+ "/assets/RequestAnatomy-D6kQYtfa.js": {
67
81
  "type": "text/javascript; charset=utf-8",
68
- "etag": '"30cd-dnE/7Xs5a8yBdd/19x1oIzp25xo"',
69
- "mtime": "2026-06-24T06:20:41.552Z",
70
- "size": 12493,
71
- "path": "../public/assets/ResponseView-Cjlf3b6-.js"
72
- },
73
- "/assets/qwen-CONDcHqt.png": {
74
- "type": "image/png",
75
- "etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
76
- "mtime": "2026-06-24T06:20:41.552Z",
77
- "size": 357059,
78
- "path": "../public/assets/qwen-CONDcHqt.png"
82
+ "etag": '"4485-SeLhPPKNbkSlSU8qhLDXUEIxbqA"',
83
+ "mtime": "2026-06-24T07:40:51.240Z",
84
+ "size": 17541,
85
+ "path": "../public/assets/RequestAnatomy-D6kQYtfa.js"
79
86
  },
80
- "/assets/StreamingChunkSequence-Ctx3sT3r.js": {
87
+ "/assets/main-DvFSJlOd.js": {
81
88
  "type": "text/javascript; charset=utf-8",
82
- "etag": '"d5b-0ssVQEgzVEKXeVl8OBnr/0c5j/8"',
83
- "mtime": "2026-06-24T06:20:41.552Z",
84
- "size": 3419,
85
- "path": "../public/assets/StreamingChunkSequence-Ctx3sT3r.js"
89
+ "etag": '"51726-WWypDaz7SuLIAjw42+oExWguWy4"',
90
+ "mtime": "2026-06-24T07:40:51.239Z",
91
+ "size": 333606,
92
+ "path": "../public/assets/main-DvFSJlOd.js"
86
93
  },
87
- "/assets/RequestAnatomy-sL2FFo_N.js": {
94
+ "/assets/StreamingChunkSequence-Bvs59_-I.js": {
88
95
  "type": "text/javascript; charset=utf-8",
89
- "etag": '"33eb-T6aNFNvMnWyjzccn6H3t5vU/fkE"',
90
- "mtime": "2026-06-24T06:20:41.552Z",
91
- "size": 13291,
92
- "path": "../public/assets/RequestAnatomy-sL2FFo_N.js"
96
+ "etag": '"d5b-/mC3nluXu1Xzs7IG+LK7CUnJJ04"',
97
+ "mtime": "2026-06-24T07:40:51.240Z",
98
+ "size": 3419,
99
+ "path": "../public/assets/StreamingChunkSequence-Bvs59_-I.js"
93
100
  },
94
101
  "/assets/zhipuai-BPNAnxo-.svg": {
95
102
  "type": "image/svg+xml",
96
103
  "etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
97
- "mtime": "2026-06-24T06:20:41.552Z",
104
+ "mtime": "2026-06-24T07:40:51.239Z",
98
105
  "size": 11256,
99
106
  "path": "../public/assets/zhipuai-BPNAnxo-.svg"
100
107
  },
101
- "/assets/index-DGIIhZTn.js": {
102
- "type": "text/javascript; charset=utf-8",
103
- "etag": '"74-RrRblbF2q1u29lOAOi/P9cfzSS4"',
104
- "mtime": "2026-06-24T06:20:41.552Z",
105
- "size": 116,
106
- "path": "../public/assets/index-DGIIhZTn.js"
107
- },
108
- "/assets/main-FvIQopAy.js": {
108
+ "/assets/ResponseView-C6ybWuB8.js": {
109
109
  "type": "text/javascript; charset=utf-8",
110
- "etag": '"51726-DFNFb/Ckwew0+zUlseKJJYHiKQ8"',
111
- "mtime": "2026-06-24T06:20:41.552Z",
112
- "size": 333606,
113
- "path": "../public/assets/main-FvIQopAy.js"
110
+ "etag": '"30cd-AI0QumfeUay7yj5dk4oDjS+R0zE"',
111
+ "mtime": "2026-06-24T07:40:51.240Z",
112
+ "size": 12493,
113
+ "path": "../public/assets/ResponseView-C6ybWuB8.js"
114
114
  },
115
- "/assets/_sessionId-DEWzDQ8-.js": {
115
+ "/assets/_sessionId-BNG_mnaH.js": {
116
116
  "type": "text/javascript; charset=utf-8",
117
- "etag": '"d2-iMkEwYrKkBow2arO0sFX4nIYuOY"',
118
- "mtime": "2026-06-24T06:20:41.552Z",
117
+ "etag": '"d2-m65O5mRfepytM0wDdiFdE7OTuFg"',
118
+ "mtime": "2026-06-24T07:40:51.239Z",
119
119
  "size": 210,
120
- "path": "../public/assets/_sessionId-DEWzDQ8-.js"
120
+ "path": "../public/assets/_sessionId-BNG_mnaH.js"
121
121
  },
122
- "/assets/index-D_nZj9Vt.css": {
123
- "type": "text/css; charset=utf-8",
124
- "etag": '"1a275-7T1iSNG2p6BSsqLwdpfky+9evLw"',
125
- "mtime": "2026-06-24T06:20:41.552Z",
126
- "size": 107125,
127
- "path": "../public/assets/index-D_nZj9Vt.css"
122
+ "/assets/qwen-CONDcHqt.png": {
123
+ "type": "image/png",
124
+ "etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
125
+ "mtime": "2026-06-24T07:40:51.239Z",
126
+ "size": 357059,
127
+ "path": "../public/assets/qwen-CONDcHqt.png"
128
128
  },
129
- "/assets/ProxyViewerContainer-CTNNzXSa.js": {
129
+ "/assets/ProxyViewerContainer-BZuo0px3.js": {
130
130
  "type": "text/javascript; charset=utf-8",
131
- "etag": '"a9eef-lBcKUWi8akLXHGw0mBMzzJmE6ZE"',
132
- "mtime": "2026-06-24T06:20:41.552Z",
133
- "size": 696047,
134
- "path": "../public/assets/ProxyViewerContainer-CTNNzXSa.js"
131
+ "etag": '"a9ec5-9uO1k8xNHEMFtOjShApDRNn552Y"',
132
+ "mtime": "2026-06-24T07:40:51.240Z",
133
+ "size": 696005,
134
+ "path": "../public/assets/ProxyViewerContainer-BZuo0px3.js"
135
135
  }
136
136
  };
137
137
  function readAsset(id) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonyclaw/agent-inspector",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "type": "module",
5
5
  "description": "Agent observability and knowledge capture layer for AI coding tools.",
6
6
  "license": "MIT",
@@ -157,8 +157,12 @@ function sessionRiskBarClass(risk: ContextRiskLevel): string {
157
157
 
158
158
  function formatContextWindow(summary: SessionModelContextSummary): string {
159
159
  const tokens = summary.latest.contextWindow.tokens;
160
- if (tokens === null) return "Window unknown";
161
- return `Window ${formatContextWindowTokens(tokens)}`;
160
+ if (tokens === null) return "Context window unknown";
161
+ return `Context window ${formatContextWindowTokens(tokens)}`;
162
+ }
163
+
164
+ function formatRequestCount(count: number): string {
165
+ return `${count} ${count === 1 ? "request" : "requests"}`;
162
166
  }
163
167
 
164
168
  function formatLogReference(logId: number): string {
@@ -406,11 +410,8 @@ function SessionModelContextRow({ summary }: { summary: SessionModelContextSumma
406
410
  </span>
407
411
  </div>
408
412
  <div className="mt-1 flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 text-[11px] text-muted-foreground">
409
- <span>{summary.requestCount} req</span>
413
+ <span>{formatRequestCount(summary.requestCount)}</span>
410
414
  <span>{formatContextWindow(summary)}</span>
411
- <span className="truncate" title={summary.latest.contextWindow.label}>
412
- {summary.latest.contextWindow.label}
413
- </span>
414
415
  </div>
415
416
  </div>
416
417