@tonyclaw/agent-inspector 3.0.9 → 3.0.11
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/.output/nitro.json +1 -1
- package/.output/public/assets/{CompareDrawer-CJKL4LMm.js → CompareDrawer-gb4FHIDP.js} +1 -1
- package/.output/public/assets/ProxyViewerContainer-yqasBIbY.js +106 -0
- package/.output/public/assets/{ReplayDialog-BYanl-a_.js → ReplayDialog-uXfMIorn.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-DvPz1jqE.js → RequestAnatomy-NqGFn7lk.js} +1 -1
- package/.output/public/assets/{ResponseView-sZnxp9GN.js → ResponseView-BWSWdjPl.js} +2 -2
- package/.output/public/assets/{StreamingChunkSequence-G-tiYiBd.js → StreamingChunkSequence-qeCLglzr.js} +1 -1
- package/.output/public/assets/{_sessionId-_hDcsmXq.js → _sessionId-COT-xg31.js} +1 -1
- package/.output/public/assets/index-BIgsQvaF.css +1 -0
- package/.output/public/assets/{index-SuOSQb2_.js → index-CKVD6xzC.js} +1 -1
- package/.output/public/assets/index-swjqFLcG.js +1 -0
- package/.output/public/assets/{json-viewer-yQdhgjaw.js → json-viewer-ux5usy0f.js} +1 -1
- package/.output/public/assets/{main-CgjcDxjR.js → main-BM5Sp2nO.js} +2 -2
- package/.output/server/_libs/lucide-react.mjs +2 -2
- package/.output/server/{_sessionId-BGISf2En.mjs → _sessionId-8D0eTdRJ.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-s-UF9gW3.mjs → CompareDrawer-Hcs0aQWl.mjs} +3 -3
- package/.output/server/_ssr/{ProxyViewerContainer-C0Sbz9ED.mjs → ProxyViewerContainer-D2CkbvcS.mjs} +185 -246
- package/.output/server/_ssr/{ReplayDialog-DvS8gvJr.mjs → ReplayDialog-O2R9y9xD.mjs} +3 -3
- package/.output/server/_ssr/{RequestAnatomy-BwhWglJL.mjs → RequestAnatomy-DkvrjK-3.mjs} +2 -2
- package/.output/server/_ssr/{ResponseView-wBVreqQf.mjs → ResponseView-CPcMs3Um.mjs} +2 -2
- package/.output/server/_ssr/{StreamingChunkSequence-Dr6eg-MJ.mjs → StreamingChunkSequence-FlBdqDP3.mjs} +2 -2
- package/.output/server/_ssr/{index-B98Wia1X.mjs → index-ChG0L62e.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{json-viewer-D7L8y0FH.mjs → json-viewer-Bb1g2nec.mjs} +2 -2
- package/.output/server/_ssr/{router-g9mo0nWT.mjs → router-840N-dk9.mjs} +21 -12
- package/.output/server/{_tanstack-start-manifest_v-CbGc-o50.mjs → _tanstack-start-manifest_v-Qi0D1Tl0.mjs} +1 -1
- package/.output/server/index.mjs +70 -70
- package/package.json +1 -1
- package/src/components/ProxyViewerContainer.tsx +10 -2
- package/src/components/providers/ProviderCard.tsx +98 -136
- package/src/components/providers/ProvidersPanel.tsx +61 -106
- package/src/components/providers/SettingsDialog.tsx +17 -22
- package/src/components/proxy-viewer/LogEntryHeader.tsx +17 -43
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/routes/api/logs.ts +14 -5
- package/.output/public/assets/ProxyViewerContainer-DBUy29O-.js +0 -106
- package/.output/public/assets/index-DAPAWsAd.js +0 -1
- package/.output/public/assets/index-DspnLqUW.css +0 -1
|
@@ -74,13 +74,13 @@ export function SettingsDialog(): JSX.Element {
|
|
|
74
74
|
<span className="sr-only">Settings</span>
|
|
75
75
|
</Button>
|
|
76
76
|
</DialogTrigger>
|
|
77
|
-
<DialogContent className="
|
|
77
|
+
<DialogContent className="flex max-h-[80vh] max-w-2xl flex-col overflow-hidden">
|
|
78
78
|
<DialogHeader>
|
|
79
79
|
<DialogTitle>Settings</DialogTitle>
|
|
80
80
|
</DialogHeader>
|
|
81
81
|
|
|
82
82
|
<Tabs value={activeTab} onValueChange={setActiveTab} className="flex-1 overflow-hidden">
|
|
83
|
-
<TabsList>
|
|
83
|
+
<TabsList className="w-full justify-start bg-muted/35">
|
|
84
84
|
<TabsTrigger value="providers">Providers</TabsTrigger>
|
|
85
85
|
<TabsTrigger value="proxy">Proxy</TabsTrigger>
|
|
86
86
|
<TabsTrigger value="storage">Storage</TabsTrigger>
|
|
@@ -88,7 +88,7 @@ export function SettingsDialog(): JSX.Element {
|
|
|
88
88
|
<TabsTrigger value="onboarding">Onboarding</TabsTrigger>
|
|
89
89
|
</TabsList>
|
|
90
90
|
|
|
91
|
-
<div className="mt-4 flex-1 overflow-x-hidden overflow-y-auto pr-
|
|
91
|
+
<div className="mt-4 flex-1 overflow-x-hidden overflow-y-auto pr-2">
|
|
92
92
|
<TabsContent value="providers">
|
|
93
93
|
<ProvidersPanel
|
|
94
94
|
externalProviders={providers}
|
|
@@ -198,7 +198,7 @@ function StorageSettingsTab(): JSX.Element {
|
|
|
198
198
|
return (
|
|
199
199
|
<div className="space-y-4">
|
|
200
200
|
<div className="flex items-center justify-between gap-3">
|
|
201
|
-
<div>
|
|
201
|
+
<div className="min-w-0">
|
|
202
202
|
<h3 className="text-sm font-semibold">Log storage</h3>
|
|
203
203
|
<p className="text-xs text-muted-foreground">
|
|
204
204
|
Inspect local log and streaming chunk footprint before exporting or clearing sessions.
|
|
@@ -232,25 +232,25 @@ function StorageSettingsTab(): JSX.Element {
|
|
|
232
232
|
copiedId={copiedId}
|
|
233
233
|
onCopy={handleCopy}
|
|
234
234
|
/>
|
|
235
|
-
<div className="
|
|
235
|
+
<div className="rounded-md bg-muted/20 px-3 py-2">
|
|
236
236
|
<div className="font-medium">In-memory logs</div>
|
|
237
237
|
<div className="mt-1 font-mono text-muted-foreground">
|
|
238
238
|
{stats.memoryCount.toLocaleString()} loaded
|
|
239
239
|
</div>
|
|
240
240
|
</div>
|
|
241
|
-
<div className="
|
|
241
|
+
<div className="rounded-md bg-muted/20 px-3 py-2">
|
|
242
242
|
<div className="font-medium">Log files</div>
|
|
243
243
|
<div className="mt-1 font-mono text-muted-foreground">
|
|
244
244
|
{stats.logFileCount.toLocaleString()} files / {formatBytes(stats.logBytes)}
|
|
245
245
|
</div>
|
|
246
246
|
</div>
|
|
247
|
-
<div className="
|
|
247
|
+
<div className="rounded-md bg-muted/20 px-3 py-2">
|
|
248
248
|
<div className="font-medium">Streaming chunks</div>
|
|
249
249
|
<div className="mt-1 font-mono text-muted-foreground">
|
|
250
250
|
{stats.chunkFileCount.toLocaleString()} files / {formatBytes(stats.chunkBytes)}
|
|
251
251
|
</div>
|
|
252
252
|
</div>
|
|
253
|
-
<div className="
|
|
253
|
+
<div className="rounded-md bg-muted/20 px-3 py-2">
|
|
254
254
|
<div className="font-medium">Session archives</div>
|
|
255
255
|
<div className="mt-1 font-mono text-muted-foreground">
|
|
256
256
|
{stats.sessionArchiveFileCount.toLocaleString()} files /{" "}
|
|
@@ -280,7 +280,7 @@ function CopyableSetupValue({
|
|
|
280
280
|
}): JSX.Element {
|
|
281
281
|
const copied = copiedId === id;
|
|
282
282
|
return (
|
|
283
|
-
<div className="border border-border bg-muted/
|
|
283
|
+
<div className="min-w-0 rounded-md border border-border/45 bg-muted/15 px-3 py-2 transition-colors hover:bg-muted/25">
|
|
284
284
|
<div className="mb-1 text-xs font-medium text-muted-foreground">{label}</div>
|
|
285
285
|
<div className="flex min-w-0 items-center gap-2">
|
|
286
286
|
<code className="min-w-0 flex-1 truncate font-mono text-xs text-foreground">{value}</code>
|
|
@@ -383,7 +383,7 @@ function OnboardingSettingsTab(): JSX.Element {
|
|
|
383
383
|
/>
|
|
384
384
|
))}
|
|
385
385
|
</div>
|
|
386
|
-
<div className="grid gap-2 rounded-md
|
|
386
|
+
<div className="grid gap-2 rounded-md bg-muted/15 px-3 py-2 text-xs text-muted-foreground">
|
|
387
387
|
<div className="flex items-center gap-2">
|
|
388
388
|
<Check className="size-3.5 text-emerald-500" />
|
|
389
389
|
<span>Provider test creates a traceable memory probe session.</span>
|
|
@@ -574,7 +574,7 @@ function McpSettingsTab(): JSX.Element {
|
|
|
574
574
|
<Terminal className="size-4 text-muted-foreground" />
|
|
575
575
|
<h3 className="text-sm font-semibold">MCP access</h3>
|
|
576
576
|
</div>
|
|
577
|
-
<div className="grid gap-2 rounded-md
|
|
577
|
+
<div className="grid gap-2 rounded-md bg-muted/15 px-3 py-2 text-xs text-muted-foreground">
|
|
578
578
|
<div>
|
|
579
579
|
Use Streamable HTTP when the client supports URL-based MCP. Use the stdio bridge only for
|
|
580
580
|
stdio-only clients. Configure one entry for the same Inspector instance.
|
|
@@ -680,12 +680,8 @@ function ProxySettingsTab(): JSX.Element {
|
|
|
680
680
|
<div className="space-y-1">
|
|
681
681
|
<h3 className="text-sm font-semibold">Claude Code billing header</h3>
|
|
682
682
|
<p className="text-xs text-muted-foreground">
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
Improves prefix-cache hit rates against third-party upstreams. The default at startup is
|
|
686
|
-
controlled by the <code>AGENT_INSPECTOR_STRIP_CLAUDE_CODE_BILLING_HEADER</code>{" "}
|
|
687
|
-
environment variable; your choice is persisted to <code>config.json</code> and overrides
|
|
688
|
-
the env var for subsequent requests.
|
|
683
|
+
Strip Claude Code's synthetic billing block before upstream forwarding. This can improve
|
|
684
|
+
prefix-cache hits with third-party providers and is persisted to <code>config.json</code>.
|
|
689
685
|
</p>
|
|
690
686
|
</div>
|
|
691
687
|
|
|
@@ -710,8 +706,8 @@ function ProxySettingsTab(): JSX.Element {
|
|
|
710
706
|
Slow response threshold
|
|
711
707
|
</label>
|
|
712
708
|
<p className="text-xs text-muted-foreground">
|
|
713
|
-
|
|
714
|
-
|
|
709
|
+
Show a slow marker when elapsed time exceeds this many seconds. Use <code>0</code> to
|
|
710
|
+
disable it.
|
|
715
711
|
</p>
|
|
716
712
|
<div className="flex items-center gap-2">
|
|
717
713
|
<input
|
|
@@ -739,8 +735,7 @@ function ProxySettingsTab(): JSX.Element {
|
|
|
739
735
|
Provider test timeout
|
|
740
736
|
</label>
|
|
741
737
|
<p className="text-xs text-muted-foreground">
|
|
742
|
-
Provider Test
|
|
743
|
-
The full test window scales with model count.
|
|
738
|
+
Abort slow Provider Test probes after this many seconds per model.
|
|
744
739
|
</p>
|
|
745
740
|
<div className="flex items-center gap-2">
|
|
746
741
|
<input
|
|
@@ -768,7 +763,7 @@ function ProxySettingsTab(): JSX.Element {
|
|
|
768
763
|
Time display
|
|
769
764
|
</label>
|
|
770
765
|
<p className="text-xs text-muted-foreground">
|
|
771
|
-
Controls timestamps in session summaries,
|
|
766
|
+
Controls timestamps in session summaries, headers, and log rows.
|
|
772
767
|
</p>
|
|
773
768
|
<select
|
|
774
769
|
id="time-display-format"
|
|
@@ -335,26 +335,16 @@ export const LogEntryHeader = memo(function ({
|
|
|
335
335
|
|
|
336
336
|
{/* Streaming timing */}
|
|
337
337
|
{log.streaming && firstChunkLabel !== null && (
|
|
338
|
-
<
|
|
339
|
-
<
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
<span className="font-mono tabular-nums">first {firstChunkLabel}</span>
|
|
343
|
-
</span>
|
|
344
|
-
</TooltipTrigger>
|
|
345
|
-
<TooltipContent>Time to first streaming chunk</TooltipContent>
|
|
346
|
-
</Tooltip>
|
|
338
|
+
<span className={cn(TELEMETRY_CHIP_CLASS, "shrink-0 text-cyan-300")}>
|
|
339
|
+
<Radio className="size-3" />
|
|
340
|
+
<span className="font-mono tabular-nums">first {firstChunkLabel}</span>
|
|
341
|
+
</span>
|
|
347
342
|
)}
|
|
348
343
|
{log.streaming && tokenRateLabel !== null && (
|
|
349
|
-
<
|
|
350
|
-
<
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
<span className="font-mono tabular-nums">{tokenRateLabel}</span>
|
|
354
|
-
</span>
|
|
355
|
-
</TooltipTrigger>
|
|
356
|
-
<TooltipContent>Output token throughput after first chunk</TooltipContent>
|
|
357
|
-
</Tooltip>
|
|
344
|
+
<span className={cn(TELEMETRY_CHIP_CLASS, "shrink-0 text-cyan-300")}>
|
|
345
|
+
<Gauge className="size-3" />
|
|
346
|
+
<span className="font-mono tabular-nums">{tokenRateLabel}</span>
|
|
347
|
+
</span>
|
|
358
348
|
)}
|
|
359
349
|
|
|
360
350
|
{/* Token counts */}
|
|
@@ -431,35 +421,19 @@ export const LogEntryHeader = memo(function ({
|
|
|
431
421
|
|
|
432
422
|
{/* Client info (PID + project folder) */}
|
|
433
423
|
{showClientMetadata && (hasClientPid || hasClientProjectFolder) && (
|
|
434
|
-
<
|
|
435
|
-
<
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
) : (
|
|
443
|
-
<span className="font-mono tabular-nums">PID {log.clientPid}</span>
|
|
444
|
-
)}
|
|
445
|
-
</span>
|
|
446
|
-
</TooltipTrigger>
|
|
447
|
-
<TooltipContent>
|
|
448
|
-
{hasClientCwd
|
|
449
|
-
? `PID: ${log.clientPid ?? "?"} CWD: ${log.clientCwd}`
|
|
450
|
-
: `Process ID: ${log.clientPid ?? "?"}`}
|
|
451
|
-
</TooltipContent>
|
|
452
|
-
</Tooltip>
|
|
424
|
+
<span className={cn(TELEMETRY_CHIP_CLASS, "hidden shrink-0 text-purple-300 xl:flex")}>
|
|
425
|
+
<FileTerminal className="size-3" />
|
|
426
|
+
{hasClientProjectFolder ? (
|
|
427
|
+
<span className="font-mono tabular-nums">{log.clientProjectFolder}</span>
|
|
428
|
+
) : (
|
|
429
|
+
<span className="font-mono tabular-nums">PID {log.clientPid}</span>
|
|
430
|
+
)}
|
|
431
|
+
</span>
|
|
453
432
|
)}
|
|
454
433
|
|
|
455
434
|
{/* Streaming indicator */}
|
|
456
435
|
{showStandaloneStreamingIndicator && (
|
|
457
|
-
<
|
|
458
|
-
<TooltipTrigger asChild>
|
|
459
|
-
<Radio className="size-3 text-muted-foreground/60 shrink-0" />
|
|
460
|
-
</TooltipTrigger>
|
|
461
|
-
<TooltipContent>Request used SSE streaming</TooltipContent>
|
|
462
|
-
</Tooltip>
|
|
436
|
+
<Radio className="size-3 shrink-0 text-muted-foreground/60" />
|
|
463
437
|
)}
|
|
464
438
|
</span>
|
|
465
439
|
|
package/src/routes/api/logs.ts
CHANGED
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
searchLogsPage,
|
|
15
15
|
} from "../../proxy/logSearch";
|
|
16
16
|
|
|
17
|
-
const
|
|
17
|
+
export const DeleteLogsBodySchema = z
|
|
18
18
|
.object({
|
|
19
|
-
ids: z.array(z.number().int().
|
|
19
|
+
ids: z.array(z.number().int().nonnegative()).optional(),
|
|
20
20
|
})
|
|
21
21
|
.optional();
|
|
22
22
|
|
|
@@ -114,12 +114,12 @@ export const Route = createFileRoute("/api/logs")({
|
|
|
114
114
|
);
|
|
115
115
|
},
|
|
116
116
|
DELETE: async ({ request }: { request: Request }) => {
|
|
117
|
-
let body: z.infer<typeof
|
|
117
|
+
let body: z.infer<typeof DeleteLogsBodySchema> = undefined;
|
|
118
118
|
try {
|
|
119
119
|
const raw = await request.text();
|
|
120
120
|
if (raw !== "") {
|
|
121
121
|
const parsed: unknown = JSON.parse(raw);
|
|
122
|
-
const result =
|
|
122
|
+
const result = DeleteLogsBodySchema.safeParse(parsed);
|
|
123
123
|
if (!result.success) {
|
|
124
124
|
return Response.json(
|
|
125
125
|
{ error: "Invalid request body", details: result.error.format() },
|
|
@@ -132,7 +132,16 @@ export const Route = createFileRoute("/api/logs")({
|
|
|
132
132
|
return Response.json({ error: "Invalid JSON body" }, { status: 400 });
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
if (body?.ids !== undefined
|
|
135
|
+
if (body?.ids !== undefined) {
|
|
136
|
+
if (body.ids.length === 0) {
|
|
137
|
+
return Response.json({
|
|
138
|
+
success: true,
|
|
139
|
+
cleared: 0,
|
|
140
|
+
logFilesRewritten: 0,
|
|
141
|
+
chunkFilesDeleted: 0,
|
|
142
|
+
sessionArchiveLogsDeleted: 0,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
136
145
|
const result = await clearPersistedLogsByIds(body.ids);
|
|
137
146
|
return Response.json({
|
|
138
147
|
success: true,
|