@tonyclaw/agent-inspector 2.0.37 → 2.0.39
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/cli.js +528 -24
- package/.output/nitro.json +1 -1
- package/.output/public/assets/{CompareDrawer-nEHCEVP4.js → CompareDrawer-Jfe6M6DQ.js} +1 -1
- package/.output/public/assets/{ProxyViewerContainer-BstBIX2B.js → ProxyViewerContainer-CQKV0Bqq.js} +15 -15
- package/.output/public/assets/{ReplayDialog-CUnBdt1Q.js → ReplayDialog-B58TbTtY.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-BU9VT2Sw.js → RequestAnatomy-d4P6JNiP.js} +1 -1
- package/.output/public/assets/{ResponseView-amxuKPKY.js → ResponseView-Bum1a3tG.js} +1 -1
- package/.output/public/assets/{StreamingChunkSequence-DpscrQM2.js → StreamingChunkSequence-CjBDp5E9.js} +1 -1
- package/.output/public/assets/_sessionId-BupV2gtf.js +1 -0
- package/.output/public/assets/index-DHSww5em.js +1 -0
- package/.output/public/assets/{main-D56QvEyw.js → main-DK9PoBjx.js} +2 -2
- package/.output/server/{_sessionId-ChwEDyI4.mjs → _sessionId-DjarbXpT.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-Ce2590rK.mjs → CompareDrawer-C5Z6AlUk.mjs} +2 -2
- package/.output/server/_ssr/{ProxyViewerContainer-D6xM8A0S.mjs → ProxyViewerContainer-4pXsBywn.mjs} +37 -9
- package/.output/server/_ssr/{ReplayDialog-CB4KOlLe.mjs → ReplayDialog-w1vc1p5e.mjs} +3 -3
- package/.output/server/_ssr/{RequestAnatomy-CsWV3W03.mjs → RequestAnatomy-2HaBhsNV.mjs} +2 -2
- package/.output/server/_ssr/{ResponseView-BuCCV3LU.mjs → ResponseView-SO_Y_W85.mjs} +2 -2
- package/.output/server/_ssr/{StreamingChunkSequence-C5dE7V1d.mjs → StreamingChunkSequence-CXEa2DkO.mjs} +2 -2
- package/.output/server/_ssr/{index-BeIi0CPv.mjs → index-DuCGt4a2.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{router-Ca2MCyUX.mjs → router-D0BaSzkZ.mjs} +69 -76
- package/.output/server/{_tanstack-start-manifest_v-CBAJfSAX.mjs → _tanstack-start-manifest_v-6N4SODyd.mjs} +1 -1
- package/.output/server/index.mjs +62 -62
- package/README.md +8 -1
- package/package.json +1 -1
- package/src/cli/onboard.ts +629 -21
- package/src/components/ProxyViewer.tsx +1 -1
- package/src/components/ProxyViewerContainer.tsx +1 -1
- package/src/components/providers/ProviderForm.tsx +2 -2
- package/src/components/providers/SettingsDialog.tsx +30 -0
- package/src/components/proxy-viewer/AgentTraceSummary.tsx +1 -1
- package/src/components/proxy-viewer/CompareDrawer.tsx +1 -1
- package/src/components/proxy-viewer/ConversationGroup.tsx +1 -1
- package/src/components/proxy-viewer/ConversationGroupList.tsx +1 -1
- package/src/components/proxy-viewer/ConversationHeader.tsx +1 -1
- package/src/components/proxy-viewer/LogEntry.tsx +1 -1
- package/src/components/proxy-viewer/LogEntryHeader.tsx +1 -1
- package/src/components/proxy-viewer/ReplayDialog.tsx +1 -1
- package/src/components/proxy-viewer/ResponseView.tsx +2 -2
- package/src/components/proxy-viewer/StreamingChunkSequence.tsx +1 -1
- package/src/components/proxy-viewer/TurnGroup.tsx +1 -1
- package/src/components/proxy-viewer/anatomy/sessionContextSummary.ts +1 -1
- package/src/components/proxy-viewer/formats/anthropic/ContentBlocks.tsx +1 -1
- package/src/components/proxy-viewer/formats/anthropic/ResponseView.tsx +2 -2
- package/src/components/proxy-viewer/formats/index.tsx +5 -3
- package/src/components/proxy-viewer/formats/openai/ResponseView.tsx +1 -1
- package/src/components/proxy-viewer/log-formats/anthropic.ts +1 -4
- package/src/components/proxy-viewer/log-formats/index.ts +6 -6
- package/src/components/proxy-viewer/log-formats/openai.ts +1 -1
- package/src/components/proxy-viewer/log-formats/types.ts +2 -2
- package/src/components/proxy-viewer/viewerState.ts +1 -1
- package/src/contracts/anthropic.ts +235 -0
- package/src/contracts/index.ts +27 -0
- package/src/contracts/json.ts +32 -0
- package/src/contracts/log.ts +72 -0
- package/src/contracts/openai.ts +176 -0
- package/src/knowledge/distiller.ts +1 -1
- package/src/lib/export-logs.ts +1 -1
- package/src/lib/groupContract.ts +1 -1
- package/src/lib/objectUtils.ts +3 -3
- package/src/lib/providerTestContract.ts +1 -1
- package/src/lib/runContract.ts +1 -1
- package/src/lib/stopReason.ts +1 -1
- package/src/mcp/previewExtractor.ts +4 -7
- package/src/mcp/server.ts +1 -1
- package/src/mcp/toolHandlers.ts +1 -1
- package/src/proxy/formats/anthropic/anthropicProvider.ts +2 -2
- package/src/proxy/formats/anthropic/schemas.ts +12 -235
- package/src/proxy/formats/handler.ts +2 -2
- package/src/proxy/formats/index.ts +1 -1
- package/src/proxy/formats/jsonSchema.ts +2 -36
- package/src/proxy/formats/openai/alibabaProvider.ts +2 -2
- package/src/proxy/formats/openai/provider.ts +2 -2
- package/src/proxy/formats/openai/schemas.ts +14 -187
- package/src/proxy/formats/openai/zhipuProvider.ts +2 -2
- package/src/proxy/formats/{protocol.ts → providerAdapter.ts} +5 -5
- package/src/proxy/formats/providerRegistry.ts +7 -7
- package/src/proxy/formats/providers/index.ts +1 -1
- package/src/proxy/formats/registry.ts +16 -13
- package/src/proxy/handler.ts +1 -1
- package/src/proxy/openaiOrphanToolStrip.ts +1 -1
- package/src/proxy/providers.ts +1 -1
- package/src/proxy/schemas.ts +18 -80
- package/src/proxy/store.ts +2 -2
- package/src/proxy/upstream.ts +1 -1
- package/src/routes/api/logs.stream.ts +1 -1
- package/.output/public/assets/_sessionId-7c9bsOFT.js +0 -1
- package/.output/public/assets/index-B7a5OmIO.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, q as analyzeContextIntelligence, f as formatTokens, l as TooltipProvider, c as cn, m as Tooltip, n as TooltipTrigger, o as TooltipContent, S as SegmentBar, R as ROLE_COLOR_CLASSES, A as ANATOMY_ROLE_LABELS, s as formatContextWindowTokens, C as CONTEXT_USAGE_THRESHOLDS } from "./ProxyViewerContainer-
|
|
3
|
-
import "./router-
|
|
2
|
+
import { u as useProviders, q as analyzeContextIntelligence, f as formatTokens, l as TooltipProvider, c as cn, m as Tooltip, n as TooltipTrigger, o as TooltipContent, S as SegmentBar, R as ROLE_COLOR_CLASSES, A as ANATOMY_ROLE_LABELS, s as formatContextWindowTokens, C as CONTEXT_USAGE_THRESHOLDS } from "./ProxyViewerContainer-4pXsBywn.mjs";
|
|
3
|
+
import "./router-D0BaSzkZ.mjs";
|
|
4
4
|
import "../_libs/modelcontextprotocol__server.mjs";
|
|
5
5
|
import "../_libs/jszip.mjs";
|
|
6
6
|
import { ag as Info, c as ChevronDown, l as ChevronRight } from "../_libs/lucide-react.mjs";
|
|
@@ -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, t as getStatusCategory, B as Badge, v as Collapsible, w as CollapsibleTrigger, x as CollapsibleContent, y as ScrollArea, z as JsonViewer, E as safeJsonValue } from "./ProxyViewerContainer-
|
|
3
|
-
import "./router-
|
|
2
|
+
import { g as getLogFormatAdapter, f as formatTokens, c as cn, t as getStatusCategory, B as Badge, v as Collapsible, w as CollapsibleTrigger, x as CollapsibleContent, y as ScrollArea, z as JsonViewer, E as safeJsonValue } from "./ProxyViewerContainer-4pXsBywn.mjs";
|
|
3
|
+
import "./router-D0BaSzkZ.mjs";
|
|
4
4
|
import "../_libs/modelcontextprotocol__server.mjs";
|
|
5
5
|
import "../_libs/jszip.mjs";
|
|
6
6
|
import { Z as Zap, q as TriangleAlert, ah as CircleStop, B as Brain, c as ChevronDown, l as ChevronRight, f 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 { l as TooltipProvider, m as Tooltip, n as TooltipTrigger, B as Badge, o as TooltipContent, z as JsonViewer } from "./ProxyViewerContainer-
|
|
3
|
-
import "./router-
|
|
2
|
+
import { l as TooltipProvider, m as Tooltip, n as TooltipTrigger, B as Badge, o as TooltipContent, z as JsonViewer } from "./ProxyViewerContainer-4pXsBywn.mjs";
|
|
3
|
+
import "./router-D0BaSzkZ.mjs";
|
|
4
4
|
import "../_libs/modelcontextprotocol__server.mjs";
|
|
5
5
|
import "../_libs/jszip.mjs";
|
|
6
6
|
import { c as ChevronDown, l as ChevronRight, a as LoaderCircle } from "../_libs/lucide-react.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as ProxyViewerContainer } from "./ProxyViewerContainer-
|
|
1
|
+
import { P as ProxyViewerContainer } from "./ProxyViewerContainer-4pXsBywn.mjs";
|
|
2
2
|
import "../_libs/react.mjs";
|
|
3
|
-
import "./router-
|
|
3
|
+
import "./router-D0BaSzkZ.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-
|
|
201
|
+
const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-6N4SODyd.mjs");
|
|
202
202
|
const startManifest = tsrStartManifest();
|
|
203
203
|
const rootRoute = startManifest.routes[rootRouteId] = startManifest.routes[rootRouteId] || {};
|
|
204
204
|
rootRoute.assets = rootRoute.assets || [];
|
|
@@ -776,7 +776,7 @@ let entriesPromise;
|
|
|
776
776
|
let baseManifestPromise;
|
|
777
777
|
let cachedFinalManifestPromise;
|
|
778
778
|
async function loadEntries() {
|
|
779
|
-
const routerEntry = await import("./router-
|
|
779
|
+
const routerEntry = await import("./router-D0BaSzkZ.mjs").then((n) => n.w);
|
|
780
780
|
const startEntry = await import("./start-HYkvq4Ni.mjs");
|
|
781
781
|
return { startEntry, routerEntry };
|
|
782
782
|
}
|
|
@@ -93,7 +93,7 @@ function RootDocument({ children }) {
|
|
|
93
93
|
] })
|
|
94
94
|
] });
|
|
95
95
|
}
|
|
96
|
-
const $$splitComponentImporter$1 = () => import("./index-
|
|
96
|
+
const $$splitComponentImporter$1 = () => import("./index-DuCGt4a2.mjs");
|
|
97
97
|
const Route$y = createFileRoute("/")({
|
|
98
98
|
component: lazyRouteComponent($$splitComponentImporter$1, "component")
|
|
99
99
|
});
|
|
@@ -136,7 +136,7 @@ function decodeSessionIdFromPath(encoded) {
|
|
|
136
136
|
function getSessionPath(sessionId) {
|
|
137
137
|
return `/session/${encodeSessionIdForPath(sessionId)}`;
|
|
138
138
|
}
|
|
139
|
-
const $$splitComponentImporter = () => import("../_sessionId-
|
|
139
|
+
const $$splitComponentImporter = () => import("../_sessionId-DjarbXpT.mjs");
|
|
140
140
|
const Route$x = createFileRoute("/session/$sessionId")({
|
|
141
141
|
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
142
142
|
parseParams: (params) => ({
|
|
@@ -360,6 +360,56 @@ const JsonValueSchema = lazy(
|
|
|
360
360
|
function trustAsJsonValue(value) {
|
|
361
361
|
return value;
|
|
362
362
|
}
|
|
363
|
+
const StreamingChunkSchema$1 = object({
|
|
364
|
+
index: number(),
|
|
365
|
+
timestamp: number(),
|
|
366
|
+
type: string(),
|
|
367
|
+
data: JsonValueSchema
|
|
368
|
+
});
|
|
369
|
+
const StreamingChunksArraySchema = object({
|
|
370
|
+
chunks: array(StreamingChunkSchema$1),
|
|
371
|
+
truncated: boolean().optional().default(false)
|
|
372
|
+
});
|
|
373
|
+
const CapturedLogSchema = object({
|
|
374
|
+
id: number(),
|
|
375
|
+
timestamp: string(),
|
|
376
|
+
method: string(),
|
|
377
|
+
path: string(),
|
|
378
|
+
model: string().nullable(),
|
|
379
|
+
sessionId: string().nullable(),
|
|
380
|
+
rawRequestBody: string().nullable(),
|
|
381
|
+
responseStatus: number().nullable(),
|
|
382
|
+
responseText: string().nullable(),
|
|
383
|
+
inputTokens: number().nullable(),
|
|
384
|
+
outputTokens: number().nullable(),
|
|
385
|
+
cacheCreationInputTokens: number().nullable(),
|
|
386
|
+
cacheReadInputTokens: number().nullable(),
|
|
387
|
+
elapsedMs: number().nullable(),
|
|
388
|
+
firstChunkMs: number().nullable().optional(),
|
|
389
|
+
totalStreamMs: number().nullable().optional(),
|
|
390
|
+
tokensPerSecond: number().nullable().optional(),
|
|
391
|
+
streaming: boolean(),
|
|
392
|
+
userAgent: string().nullable(),
|
|
393
|
+
origin: string().nullable(),
|
|
394
|
+
rawHeaders: record(string(), string()).optional(),
|
|
395
|
+
/** Headers sent to the upstream LLM */
|
|
396
|
+
headers: record(string(), string()).optional(),
|
|
397
|
+
apiFormat: _enum(["anthropic", "openai", "unknown"]).default("unknown"),
|
|
398
|
+
isTest: boolean().optional().default(false),
|
|
399
|
+
replayOfLogId: number().nullable().optional(),
|
|
400
|
+
providerName: string().nullable().optional(),
|
|
401
|
+
clientPort: number().nullable().optional(),
|
|
402
|
+
clientPid: number().nullable().optional(),
|
|
403
|
+
clientCwd: string().nullable().optional(),
|
|
404
|
+
clientProjectFolder: string().nullable().optional(),
|
|
405
|
+
streamingChunks: StreamingChunksArraySchema.optional(),
|
|
406
|
+
streamingChunksPath: string().nullable().optional(),
|
|
407
|
+
rawRequestBodyBytes: number().int().nonnegative().nullable().optional(),
|
|
408
|
+
responseTextBytes: number().int().nonnegative().nullable().optional(),
|
|
409
|
+
bodyContentMode: _enum(["full", "compact", "truncated"]).optional(),
|
|
410
|
+
/** Error message from streaming response (e.g., SSE error event) */
|
|
411
|
+
error: string().nullable().optional()
|
|
412
|
+
});
|
|
363
413
|
const CacheControl = object({
|
|
364
414
|
type: string(),
|
|
365
415
|
ttl: string().optional(),
|
|
@@ -563,9 +613,7 @@ const OpenAIMessage = object({
|
|
|
563
613
|
name: string().optional(),
|
|
564
614
|
reasoning_content: string().optional(),
|
|
565
615
|
thinking: string().optional(),
|
|
566
|
-
// Some providers use 'thinking' field
|
|
567
616
|
think: string().optional()
|
|
568
|
-
// MiniMax uses 'think' field
|
|
569
617
|
});
|
|
570
618
|
const OpenAIFunctionCall = object({
|
|
571
619
|
name: string(),
|
|
@@ -613,9 +661,7 @@ const OpenAIChoiceDelta = object({
|
|
|
613
661
|
content: string().nullable().optional(),
|
|
614
662
|
reasoning_content: string().nullable().optional(),
|
|
615
663
|
thinking: string().nullable().optional(),
|
|
616
|
-
// Some providers use 'thinking' field
|
|
617
664
|
think: string().nullable().optional(),
|
|
618
|
-
// MiniMax uses 'think' field
|
|
619
665
|
function_call: object({ name: string().optional(), arguments: string().optional() }).nullable().optional(),
|
|
620
666
|
tool_calls: array(
|
|
621
667
|
object({
|
|
@@ -636,9 +682,7 @@ const OpenAIChoice = object({
|
|
|
636
682
|
content: string().nullable(),
|
|
637
683
|
reasoning_content: string().optional(),
|
|
638
684
|
thinking: string().optional(),
|
|
639
|
-
// Some providers use 'thinking' field in message
|
|
640
685
|
think: string().optional(),
|
|
641
|
-
// MiniMax uses 'think' field in message
|
|
642
686
|
function_call: object({ name: string(), arguments: string() }).nullable().optional(),
|
|
643
687
|
tool_calls: array(OpenAIToolCallSchema).optional()
|
|
644
688
|
}).optional(),
|
|
@@ -656,7 +700,6 @@ const OpenAIResponseSchema$1 = object({
|
|
|
656
700
|
completion_tokens: number().nullable().optional(),
|
|
657
701
|
total_tokens: number().nullable().optional()
|
|
658
702
|
}).passthrough(),
|
|
659
|
-
// Allow extra fields like prompt_tokens_details, completion_tokens_details
|
|
660
703
|
service_tier: string().nullable().optional(),
|
|
661
704
|
system_fingerprint: string().nullable().optional()
|
|
662
705
|
}).passthrough();
|
|
@@ -688,56 +731,6 @@ function parseOpenAIResponse(rawBody) {
|
|
|
688
731
|
return null;
|
|
689
732
|
}
|
|
690
733
|
}
|
|
691
|
-
const StreamingChunkSchema$1 = object({
|
|
692
|
-
index: number(),
|
|
693
|
-
timestamp: number(),
|
|
694
|
-
type: string(),
|
|
695
|
-
data: JsonValueSchema
|
|
696
|
-
});
|
|
697
|
-
const StreamingChunksArraySchema = object({
|
|
698
|
-
chunks: array(StreamingChunkSchema$1),
|
|
699
|
-
truncated: boolean().optional().default(false)
|
|
700
|
-
});
|
|
701
|
-
const CapturedLogSchema = object({
|
|
702
|
-
id: number(),
|
|
703
|
-
timestamp: string(),
|
|
704
|
-
method: string(),
|
|
705
|
-
path: string(),
|
|
706
|
-
model: string().nullable(),
|
|
707
|
-
sessionId: string().nullable(),
|
|
708
|
-
rawRequestBody: string().nullable(),
|
|
709
|
-
responseStatus: number().nullable(),
|
|
710
|
-
responseText: string().nullable(),
|
|
711
|
-
inputTokens: number().nullable(),
|
|
712
|
-
outputTokens: number().nullable(),
|
|
713
|
-
cacheCreationInputTokens: number().nullable(),
|
|
714
|
-
cacheReadInputTokens: number().nullable(),
|
|
715
|
-
elapsedMs: number().nullable(),
|
|
716
|
-
firstChunkMs: number().nullable().optional(),
|
|
717
|
-
totalStreamMs: number().nullable().optional(),
|
|
718
|
-
tokensPerSecond: number().nullable().optional(),
|
|
719
|
-
streaming: boolean(),
|
|
720
|
-
userAgent: string().nullable(),
|
|
721
|
-
origin: string().nullable(),
|
|
722
|
-
rawHeaders: record(string(), string()).optional(),
|
|
723
|
-
/** Headers sent to the upstream LLM */
|
|
724
|
-
headers: record(string(), string()).optional(),
|
|
725
|
-
apiFormat: _enum(["anthropic", "openai", "unknown"]).default("unknown"),
|
|
726
|
-
isTest: boolean().optional().default(false),
|
|
727
|
-
replayOfLogId: number().nullable().optional(),
|
|
728
|
-
providerName: string().nullable().optional(),
|
|
729
|
-
clientPort: number().nullable().optional(),
|
|
730
|
-
clientPid: number().nullable().optional(),
|
|
731
|
-
clientCwd: string().nullable().optional(),
|
|
732
|
-
clientProjectFolder: string().nullable().optional(),
|
|
733
|
-
streamingChunks: StreamingChunksArraySchema.optional(),
|
|
734
|
-
streamingChunksPath: string().nullable().optional(),
|
|
735
|
-
rawRequestBodyBytes: number().int().nonnegative().nullable().optional(),
|
|
736
|
-
responseTextBytes: number().int().nonnegative().nullable().optional(),
|
|
737
|
-
bodyContentMode: _enum(["full", "compact", "truncated"]).optional(),
|
|
738
|
-
/** Error message from streaming response (e.g., SSE error event) */
|
|
739
|
-
error: string().nullable().optional()
|
|
740
|
-
});
|
|
741
734
|
const RequestModelSchema = object({
|
|
742
735
|
model: string()
|
|
743
736
|
});
|
|
@@ -1252,12 +1245,12 @@ class FormatRegistryImpl {
|
|
|
1252
1245
|
const format = this.pathMap.get(messagesPath);
|
|
1253
1246
|
return format === void 0 ? void 0 : this.handlers.get(format);
|
|
1254
1247
|
}
|
|
1255
|
-
/** Get the
|
|
1256
|
-
|
|
1248
|
+
/** Get the API format matching a request path without requiring handlers. */
|
|
1249
|
+
getApiFormatByPath(path2) {
|
|
1257
1250
|
const messagesPath = path2.split("?")[0] ?? "";
|
|
1258
1251
|
return this.pathMap.get(messagesPath);
|
|
1259
1252
|
}
|
|
1260
|
-
/** Detect format from request body content */
|
|
1253
|
+
/** Detect API format from request body content */
|
|
1261
1254
|
detectFormat(rawBody) {
|
|
1262
1255
|
if (rawBody === null) return "unknown";
|
|
1263
1256
|
for (const handler of this.handlers.values()) {
|
|
@@ -1270,8 +1263,8 @@ const formatRegistry = new FormatRegistryImpl();
|
|
|
1270
1263
|
function formatForPath(path2) {
|
|
1271
1264
|
return formatRegistry.getByPath(path2) ?? null;
|
|
1272
1265
|
}
|
|
1273
|
-
function
|
|
1274
|
-
return formatRegistry.
|
|
1266
|
+
function apiFormatForPath(path2) {
|
|
1267
|
+
return formatRegistry.getApiFormatByPath(path2) ?? "unknown";
|
|
1275
1268
|
}
|
|
1276
1269
|
formatRegistry.registerPath(PATH_V1_MESSAGES, "anthropic");
|
|
1277
1270
|
formatRegistry.registerPath(PATH_V1_CHAT_COMPLETIONS, "openai");
|
|
@@ -1583,7 +1576,7 @@ function evictOldestIfNeeded() {
|
|
|
1583
1576
|
}
|
|
1584
1577
|
function normalizeLog(log) {
|
|
1585
1578
|
const sessionId = getLogSessionId(log);
|
|
1586
|
-
const pathFormat =
|
|
1579
|
+
const pathFormat = apiFormatForPath(log.path);
|
|
1587
1580
|
const apiFormat = pathFormat === "unknown" ? log.apiFormat : pathFormat;
|
|
1588
1581
|
if (sessionId === log.sessionId && apiFormat === log.apiFormat) return log;
|
|
1589
1582
|
return { ...log, sessionId, apiFormat };
|
|
@@ -6103,7 +6096,7 @@ const Route$s = createFileRoute("/api/models")({
|
|
|
6103
6096
|
}
|
|
6104
6097
|
}
|
|
6105
6098
|
});
|
|
6106
|
-
const version = "2.0.
|
|
6099
|
+
const version = "2.0.39";
|
|
6107
6100
|
const packageJson = {
|
|
6108
6101
|
version
|
|
6109
6102
|
};
|
|
@@ -11738,19 +11731,19 @@ export {
|
|
|
11738
11731
|
DEFAULT_TIME_DISPLAY_FORMAT as c,
|
|
11739
11732
|
RuntimeConfigSchema as d,
|
|
11740
11733
|
AnthropicRequestSchema as e,
|
|
11741
|
-
|
|
11734
|
+
apiFormatForPath as f,
|
|
11742
11735
|
getSessionPath as g,
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11736
|
+
stripClaudeCodeBillingHeader as h,
|
|
11737
|
+
GroupEvidenceExportResultSchema as i,
|
|
11738
|
+
DeleteInspectorGroupResponseSchema as j,
|
|
11739
|
+
providerHasContextMetadata as k,
|
|
11740
|
+
findProviderModelMetadata as l,
|
|
11748
11741
|
maskApiKey as m,
|
|
11749
|
-
|
|
11750
|
-
|
|
11742
|
+
createPendingProviderTestResults as n,
|
|
11743
|
+
ProviderTestResultsSchema as o,
|
|
11751
11744
|
parseOpenAIResponse as p,
|
|
11752
|
-
|
|
11753
|
-
|
|
11745
|
+
createFailedProviderTestResults as q,
|
|
11746
|
+
MAX_PROVIDER_TEST_TIMEOUT_SECONDS as r,
|
|
11754
11747
|
safeGetOwnProperty as s,
|
|
11755
11748
|
resolveProviderContextWindow as t,
|
|
11756
11749
|
isPlainRecord as u,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const tsrStartManifest = () => ({ "routes": { "__root__": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/__root.tsx", "children": ["/", "/api/config", "/api/groups", "/api/health", "/api/logs", "/api/mcp", "/api/models", "/api/providers", "/api/runs", "/api/sessions", "/proxy/$", "/session/$sessionId", "/api/knowledge/candidates", "/api/knowledge/project-context", "/api/knowledge/search", "/api/knowledge/sessions/$sessionId/candidates"], "preloads": ["/assets/main-
|
|
1
|
+
const tsrStartManifest = () => ({ "routes": { "__root__": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/__root.tsx", "children": ["/", "/api/config", "/api/groups", "/api/health", "/api/logs", "/api/mcp", "/api/models", "/api/providers", "/api/runs", "/api/sessions", "/proxy/$", "/session/$sessionId", "/api/knowledge/candidates", "/api/knowledge/project-context", "/api/knowledge/search", "/api/knowledge/sessions/$sessionId/candidates"], "preloads": ["/assets/main-DK9PoBjx.js"], "assets": [] }, "/": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", "assets": [], "preloads": ["/assets/index-DHSww5em.js", "/assets/ProxyViewerContainer-CQKV0Bqq.js"] }, "/api/config": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/config.ts", "children": ["/api/config/paths"] }, "/api/groups": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.ts", "children": ["/api/groups/$groupId"] }, "/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/runs": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/runs.ts", "children": ["/api/runs/$runId"] }, "/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-BupV2gtf.js", "/assets/ProxyViewerContainer-CQKV0Bqq.js"] }, "/api/config/paths": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/config.paths.ts" }, "/api/groups/$groupId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.$groupId.ts", "children": ["/api/groups/$groupId/evidence", "/api/groups/$groupId/sessions"] }, "/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/runs/$runId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/runs.$runId.ts", "children": ["/api/runs/$runId/evidence"] }, "/api/groups/$groupId/evidence": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.$groupId.evidence.ts" }, "/api/groups/$groupId/sessions": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.$groupId.sessions.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/runs/$runId/evidence": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/runs.$runId.evidence.ts" }, "/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-DK9PoBjx.js" });
|
|
2
2
|
export {
|
|
3
3
|
tsrStartManifest
|
|
4
4
|
};
|
package/.output/server/index.mjs
CHANGED
|
@@ -35,103 +35,103 @@ const headers = ((m) => function headersRouteRule(event) {
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
const assets = {
|
|
38
|
-
"/assets/
|
|
39
|
-
"type": "
|
|
40
|
-
"etag": '"
|
|
41
|
-
"mtime": "2026-07-
|
|
42
|
-
"size":
|
|
43
|
-
"path": "../public/assets/
|
|
44
|
-
},
|
|
45
|
-
"/assets/minimax-BPMzvuL-.jpeg": {
|
|
46
|
-
"type": "image/jpeg",
|
|
47
|
-
"etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
|
|
48
|
-
"mtime": "2026-07-01T06:30:10.264Z",
|
|
49
|
-
"size": 6918,
|
|
50
|
-
"path": "../public/assets/minimax-BPMzvuL-.jpeg"
|
|
51
|
-
},
|
|
52
|
-
"/assets/index-B7a5OmIO.js": {
|
|
53
|
-
"type": "text/javascript; charset=utf-8",
|
|
54
|
-
"etag": '"74-2tmqYa6JYQCoz24PRr5/e9l3IEU"',
|
|
55
|
-
"mtime": "2026-07-01T06:30:10.264Z",
|
|
56
|
-
"size": 116,
|
|
57
|
-
"path": "../public/assets/index-B7a5OmIO.js"
|
|
38
|
+
"/assets/alibaba-TTwafVwX.svg": {
|
|
39
|
+
"type": "image/svg+xml",
|
|
40
|
+
"etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
|
|
41
|
+
"mtime": "2026-07-01T08:15:03.700Z",
|
|
42
|
+
"size": 5915,
|
|
43
|
+
"path": "../public/assets/alibaba-TTwafVwX.svg"
|
|
58
44
|
},
|
|
59
45
|
"/assets/index-BfGJEb-2.css": {
|
|
60
46
|
"type": "text/css; charset=utf-8",
|
|
61
47
|
"etag": '"1acc9-JrjZs7fIRGuBr66cqP9miLHcLKk"',
|
|
62
|
-
"mtime": "2026-07-
|
|
48
|
+
"mtime": "2026-07-01T08:15:03.700Z",
|
|
63
49
|
"size": 109769,
|
|
64
50
|
"path": "../public/assets/index-BfGJEb-2.css"
|
|
65
51
|
},
|
|
66
|
-
"/assets/
|
|
67
|
-
"type": "
|
|
68
|
-
"etag": '"
|
|
69
|
-
"mtime": "2026-07-
|
|
70
|
-
"size":
|
|
71
|
-
"path": "../public/assets/
|
|
52
|
+
"/assets/CompareDrawer-Jfe6M6DQ.js": {
|
|
53
|
+
"type": "text/javascript; charset=utf-8",
|
|
54
|
+
"etag": '"49fe-cZOHUuR1k4rWdDq/tpP3ItQh8XQ"',
|
|
55
|
+
"mtime": "2026-07-01T08:15:03.700Z",
|
|
56
|
+
"size": 18942,
|
|
57
|
+
"path": "../public/assets/CompareDrawer-Jfe6M6DQ.js"
|
|
72
58
|
},
|
|
73
|
-
"/assets/ReplayDialog-
|
|
59
|
+
"/assets/ReplayDialog-B58TbTtY.js": {
|
|
74
60
|
"type": "text/javascript; charset=utf-8",
|
|
75
|
-
"etag": '"318c-
|
|
76
|
-
"mtime": "2026-07-
|
|
61
|
+
"etag": '"318c-bhy3YBiteXvsEiEFJJ5jKXid1do"',
|
|
62
|
+
"mtime": "2026-07-01T08:15:03.700Z",
|
|
77
63
|
"size": 12684,
|
|
78
|
-
"path": "../public/assets/ReplayDialog-
|
|
64
|
+
"path": "../public/assets/ReplayDialog-B58TbTtY.js"
|
|
79
65
|
},
|
|
80
|
-
"/assets/
|
|
66
|
+
"/assets/index-DHSww5em.js": {
|
|
81
67
|
"type": "text/javascript; charset=utf-8",
|
|
82
|
-
"etag": '"
|
|
83
|
-
"mtime": "2026-07-
|
|
84
|
-
"size":
|
|
85
|
-
"path": "../public/assets/
|
|
68
|
+
"etag": '"74-XnA+tuBqoE04/VDIU5skdKnqMeo"',
|
|
69
|
+
"mtime": "2026-07-01T08:15:03.700Z",
|
|
70
|
+
"size": 116,
|
|
71
|
+
"path": "../public/assets/index-DHSww5em.js"
|
|
86
72
|
},
|
|
87
|
-
"/assets/
|
|
88
|
-
"type": "
|
|
89
|
-
"etag": '"
|
|
90
|
-
"mtime": "2026-07-
|
|
91
|
-
"size":
|
|
92
|
-
"path": "../public/assets/
|
|
73
|
+
"/assets/minimax-BPMzvuL-.jpeg": {
|
|
74
|
+
"type": "image/jpeg",
|
|
75
|
+
"etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
|
|
76
|
+
"mtime": "2026-07-01T08:15:03.700Z",
|
|
77
|
+
"size": 6918,
|
|
78
|
+
"path": "../public/assets/minimax-BPMzvuL-.jpeg"
|
|
93
79
|
},
|
|
94
|
-
"/assets/main-
|
|
80
|
+
"/assets/main-DK9PoBjx.js": {
|
|
95
81
|
"type": "text/javascript; charset=utf-8",
|
|
96
|
-
"etag": '"517d9-
|
|
97
|
-
"mtime": "2026-07-
|
|
82
|
+
"etag": '"517d9-Rb3G8Owiwv/6jNymVmF2TN5klug"',
|
|
83
|
+
"mtime": "2026-07-01T08:15:03.700Z",
|
|
98
84
|
"size": 333785,
|
|
99
|
-
"path": "../public/assets/main-
|
|
85
|
+
"path": "../public/assets/main-DK9PoBjx.js"
|
|
100
86
|
},
|
|
101
|
-
"/assets/
|
|
87
|
+
"/assets/ResponseView-Bum1a3tG.js": {
|
|
102
88
|
"type": "text/javascript; charset=utf-8",
|
|
103
|
-
"etag": '"
|
|
104
|
-
"mtime": "2026-07-
|
|
105
|
-
"size":
|
|
106
|
-
"path": "../public/assets/
|
|
89
|
+
"etag": '"30d0-nm7943Zf3wkOX8Qkx5tFeTPBdhs"',
|
|
90
|
+
"mtime": "2026-07-01T08:15:03.702Z",
|
|
91
|
+
"size": 12496,
|
|
92
|
+
"path": "../public/assets/ResponseView-Bum1a3tG.js"
|
|
107
93
|
},
|
|
108
|
-
"/assets/RequestAnatomy-
|
|
94
|
+
"/assets/RequestAnatomy-d4P6JNiP.js": {
|
|
109
95
|
"type": "text/javascript; charset=utf-8",
|
|
110
|
-
"etag": '"4485-
|
|
111
|
-
"mtime": "2026-07-
|
|
96
|
+
"etag": '"4485-R6aSqQKKsXZ9KJifvk5uB/aAP/w"',
|
|
97
|
+
"mtime": "2026-07-01T08:15:03.700Z",
|
|
112
98
|
"size": 17541,
|
|
113
|
-
"path": "../public/assets/RequestAnatomy-
|
|
99
|
+
"path": "../public/assets/RequestAnatomy-d4P6JNiP.js"
|
|
114
100
|
},
|
|
115
101
|
"/assets/zhipuai-BPNAnxo-.svg": {
|
|
116
102
|
"type": "image/svg+xml",
|
|
117
103
|
"etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
|
|
118
|
-
"mtime": "2026-07-
|
|
104
|
+
"mtime": "2026-07-01T08:15:03.700Z",
|
|
119
105
|
"size": 11256,
|
|
120
106
|
"path": "../public/assets/zhipuai-BPNAnxo-.svg"
|
|
121
107
|
},
|
|
108
|
+
"/assets/StreamingChunkSequence-CjBDp5E9.js": {
|
|
109
|
+
"type": "text/javascript; charset=utf-8",
|
|
110
|
+
"etag": '"d57-japFPQBd84wFo2PfIzD3rpUCwE0"',
|
|
111
|
+
"mtime": "2026-07-01T08:15:03.700Z",
|
|
112
|
+
"size": 3415,
|
|
113
|
+
"path": "../public/assets/StreamingChunkSequence-CjBDp5E9.js"
|
|
114
|
+
},
|
|
122
115
|
"/assets/qwen-CONDcHqt.png": {
|
|
123
116
|
"type": "image/png",
|
|
124
117
|
"etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
|
|
125
|
-
"mtime": "2026-07-
|
|
118
|
+
"mtime": "2026-07-01T08:15:03.700Z",
|
|
126
119
|
"size": 357059,
|
|
127
120
|
"path": "../public/assets/qwen-CONDcHqt.png"
|
|
128
121
|
},
|
|
129
|
-
"/assets/
|
|
122
|
+
"/assets/_sessionId-BupV2gtf.js": {
|
|
123
|
+
"type": "text/javascript; charset=utf-8",
|
|
124
|
+
"etag": '"d2-yDl+GeqeLZbuzelLqReyuecyYVA"',
|
|
125
|
+
"mtime": "2026-07-01T08:15:03.700Z",
|
|
126
|
+
"size": 210,
|
|
127
|
+
"path": "../public/assets/_sessionId-BupV2gtf.js"
|
|
128
|
+
},
|
|
129
|
+
"/assets/ProxyViewerContainer-CQKV0Bqq.js": {
|
|
130
130
|
"type": "text/javascript; charset=utf-8",
|
|
131
|
-
"etag": '"
|
|
132
|
-
"mtime": "2026-07-
|
|
133
|
-
"size":
|
|
134
|
-
"path": "../public/assets/ProxyViewerContainer-
|
|
131
|
+
"etag": '"b5e33-yXZRXjn1n1qIfzezs39GrqNlfhg"',
|
|
132
|
+
"mtime": "2026-07-01T08:15:03.702Z",
|
|
133
|
+
"size": 745011,
|
|
134
|
+
"path": "../public/assets/ProxyViewerContainer-CQKV0Bqq.js"
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
137
|
function readAsset(id) {
|
package/README.md
CHANGED
|
@@ -62,6 +62,9 @@ The onboarding command installs guided setup skills for local agents:
|
|
|
62
62
|
- Claude Code: `~/.claude/skills/agent-inspector-onboard/SKILL.md` plus a slash command.
|
|
63
63
|
- Codex: `~/.codex/skills/agent-inspector-onboard/SKILL.md`, focused on connecting
|
|
64
64
|
`http://localhost:25947/api/mcp` through Codex `mcp_servers.agent-inspector`.
|
|
65
|
+
- OpenCode: run `agent-inspector onboard --opencode-only` to merge
|
|
66
|
+
`mcp.agent-inspector` into `~/.config/opencode/opencode.json` or `opencode.jsonc`, then verify
|
|
67
|
+
with `opencode mcp list`.
|
|
65
68
|
|
|
66
69
|
During npm global install, Agent Inspector also makes a best-effort onboarding skill install for
|
|
67
70
|
detected local agents. If `~/.claude` exists, it installs the Claude Code skill and slash command.
|
|
@@ -80,6 +83,10 @@ To check what is installed, run `agent-inspector onboard --status`. It reports e
|
|
|
80
83
|
its stamped version, whether it is current/outdated/custom, and the suggested next command. For
|
|
81
84
|
scripts and CI checks, use `agent-inspector onboard --status --json`.
|
|
82
85
|
|
|
86
|
+
OpenCode config is explicit rather than installed during npm postinstall, because it edits a real
|
|
87
|
+
tool config file instead of adding an Agent Inspector generated skill. Use
|
|
88
|
+
`agent-inspector onboard --status --opencode-only --json` to inspect the OpenCode MCP entry.
|
|
89
|
+
|
|
83
90
|
Before uninstalling the npm package, run `agent-inspector onboard --uninstall` to remove matching
|
|
84
91
|
generated onboarding files. The uninstall command only removes Agent Inspector generated files whose
|
|
85
92
|
metadata version matches the currently installed npm package. npm v7+ does not run package uninstall
|
|
@@ -139,7 +146,7 @@ needed for the session timeline, request/response views, token usage, provider
|
|
|
139
146
|
routing, errors, and knowledge workflows, but it does not retain raw request
|
|
140
147
|
headers, upstream headers, or detailed streaming chunk artifacts.
|
|
141
148
|
|
|
142
|
-
Use `full` mode when you need
|
|
149
|
+
Use `full` mode when you need API-format-level diagnostics:
|
|
143
150
|
|
|
144
151
|
```bash
|
|
145
152
|
agent-inspector --mode full
|