@tonyclaw/agent-inspector 2.0.35 → 2.0.37
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-Cin0_f71.js → CompareDrawer-nEHCEVP4.js} +1 -1
- package/.output/public/assets/{ProxyViewerContainer-BVlcRirf.js → ProxyViewerContainer-BstBIX2B.js} +35 -35
- package/.output/public/assets/{ReplayDialog-C6nOMhjx.js → ReplayDialog-CUnBdt1Q.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-DenWbdqV.js → RequestAnatomy-BU9VT2Sw.js} +1 -1
- package/.output/public/assets/{ResponseView-BsalZiZ5.js → ResponseView-amxuKPKY.js} +1 -1
- package/.output/public/assets/{StreamingChunkSequence-Cla2X13P.js → StreamingChunkSequence-DpscrQM2.js} +1 -1
- package/.output/public/assets/_sessionId-7c9bsOFT.js +1 -0
- package/.output/public/assets/index-B7a5OmIO.js +1 -0
- package/.output/public/assets/{main-eD8hEOHT.js → main-D56QvEyw.js} +4 -4
- package/.output/server/_libs/lucide-react.mjs +114 -94
- package/.output/server/{_sessionId-URSu2XsA.mjs → _sessionId-ChwEDyI4.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-BbBPKdVc.mjs → CompareDrawer-Ce2590rK.mjs} +3 -3
- package/.output/server/_ssr/{ProxyViewerContainer-DtQxtOpi.mjs → ProxyViewerContainer-D6xM8A0S.mjs} +797 -781
- package/.output/server/_ssr/{ReplayDialog-BU20cMGd.mjs → ReplayDialog-CB4KOlLe.mjs} +4 -4
- package/.output/server/_ssr/{RequestAnatomy-a5ySAAG1.mjs → RequestAnatomy-CsWV3W03.mjs} +3 -3
- package/.output/server/_ssr/{ResponseView-CA_QM1fM.mjs → ResponseView-BuCCV3LU.mjs} +3 -3
- package/.output/server/_ssr/{StreamingChunkSequence-DJjITqM7.mjs → StreamingChunkSequence-C5dE7V1d.mjs} +2 -2
- package/.output/server/_ssr/{index-DIFzLUAV.mjs → index-BeIi0CPv.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{router-aVeuM_1d.mjs → router-Ca2MCyUX.mjs} +91 -71
- package/.output/server/{_tanstack-start-manifest_v-BNlafGbl.mjs → _tanstack-start-manifest_v-CBAJfSAX.mjs} +1 -1
- package/.output/server/index.mjs +55 -55
- package/package.json +1 -1
- package/src/components/ProxyViewer.tsx +42 -8
- package/src/components/proxy-viewer/ConversationHeader.tsx +10 -6
- package/src/proxy/formats/registry.ts +7 -1
- package/src/proxy/store.ts +14 -11
- package/src/router.tsx +17 -0
- package/.output/public/assets/_sessionId-DkhHqlzB.js +0 -1
- package/.output/public/assets/index-AiQY20d7.js +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
|
-
import { u as useProviders, D as Dialog, b as DialogContent, d as DialogHeader, e as DialogTitle, T as Tabs, h as TabsList, i as TabsTrigger, j as TabsContent, k as Button, l as TooltipProvider, m as Tooltip, n as TooltipTrigger, o as TooltipContent, p as dispatchLogFocusRequest } from "./ProxyViewerContainer-
|
|
3
|
-
import { ResponseView } from "./ResponseView-
|
|
4
|
-
import { C as CapturedLogSchema } from "./router-
|
|
2
|
+
import { u as useProviders, D as Dialog, b as DialogContent, d as DialogHeader, e as DialogTitle, T as Tabs, h as TabsList, i as TabsTrigger, j as TabsContent, k as Button, l as TooltipProvider, m as Tooltip, n as TooltipTrigger, o as TooltipContent, p as dispatchLogFocusRequest } from "./ProxyViewerContainer-D6xM8A0S.mjs";
|
|
3
|
+
import { ResponseView } from "./ResponseView-BuCCV3LU.mjs";
|
|
4
|
+
import { C as CapturedLogSchema } from "./router-Ca2MCyUX.mjs";
|
|
5
5
|
import "../_libs/jszip.mjs";
|
|
6
6
|
import "../_libs/modelcontextprotocol__server.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { V as RotateCcw, ae as Braces, af as Minimize2 } from "../_libs/lucide-react.mjs";
|
|
8
8
|
import { d as object, n as number, a as array, c as boolean, b as string } from "../_libs/zod.mjs";
|
|
9
9
|
import "../_libs/swr.mjs";
|
|
10
10
|
import "../_libs/use-sync-external-store.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
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-D6xM8A0S.mjs";
|
|
3
|
+
import "./router-Ca2MCyUX.mjs";
|
|
4
4
|
import "../_libs/modelcontextprotocol__server.mjs";
|
|
5
5
|
import "../_libs/jszip.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { ag as Info, c as ChevronDown, l as ChevronRight } from "../_libs/lucide-react.mjs";
|
|
7
7
|
import "../_libs/swr.mjs";
|
|
8
8
|
import "../_libs/use-sync-external-store.mjs";
|
|
9
9
|
import "../_libs/dequal.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
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-D6xM8A0S.mjs";
|
|
3
|
+
import "./router-Ca2MCyUX.mjs";
|
|
4
4
|
import "../_libs/modelcontextprotocol__server.mjs";
|
|
5
5
|
import "../_libs/jszip.mjs";
|
|
6
|
-
import { Z as Zap, q as TriangleAlert,
|
|
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";
|
|
7
7
|
import { M as Markdown } from "../_libs/react-markdown.mjs";
|
|
8
8
|
import { R as Root } from "../_libs/radix-ui__react-separator.mjs";
|
|
9
9
|
import "../_libs/swr.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-D6xM8A0S.mjs";
|
|
3
|
+
import "./router-Ca2MCyUX.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-D6xM8A0S.mjs";
|
|
2
2
|
import "../_libs/react.mjs";
|
|
3
|
-
import "./router-
|
|
3
|
+
import "./router-Ca2MCyUX.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-CBAJfSAX.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-Ca2MCyUX.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-BeIi0CPv.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-ChwEDyI4.mjs");
|
|
140
140
|
const Route$x = createFileRoute("/session/$sessionId")({
|
|
141
141
|
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
142
142
|
parseParams: (params) => ({
|
|
@@ -1214,6 +1214,68 @@ function buildSessionInfo(input) {
|
|
|
1214
1214
|
latestLogs: summaries.slice(0, latestLogLimit)
|
|
1215
1215
|
};
|
|
1216
1216
|
}
|
|
1217
|
+
const DEFAULT_UPSTREAM$1 = "https://api.anthropic.com";
|
|
1218
|
+
const DEFAULT_OPENAI_UPSTREAM$1 = "https://api.openai.com/v1";
|
|
1219
|
+
const PROXY_IDENTITY = process.env["PROXY_IDENTITY"] ?? "inspector9527@Tony";
|
|
1220
|
+
const PATH_V1_CHAT_COMPLETIONS = "/v1/chat/completions";
|
|
1221
|
+
const PATH_CHAT_COMPLETIONS = "/chat/completions";
|
|
1222
|
+
const PATH_V1_MESSAGES = "/v1/messages";
|
|
1223
|
+
const HEADER_CONTENT_TYPE = "content-type";
|
|
1224
|
+
const HEADER_USER_AGENT = "user-agent";
|
|
1225
|
+
const HEADER_X_PROXY_IDENTITY = "x-proxy-identity";
|
|
1226
|
+
const HEADER_AUTHORIZATION = "authorization";
|
|
1227
|
+
const HEADER_X_API_KEY = "x-api-key";
|
|
1228
|
+
const HEADER_CONTENT_ENCODING = "content-encoding";
|
|
1229
|
+
const HEADER_CONTENT_LENGTH = "content-length";
|
|
1230
|
+
const HEADER_HOST = "host";
|
|
1231
|
+
const AUTH_HEADER_X_API_KEY = "x-api-key";
|
|
1232
|
+
const CONTENT_TYPE_EVENT_STREAM = "text/event-stream";
|
|
1233
|
+
const STATUS_FORBIDDEN = 403;
|
|
1234
|
+
const STATUS_BAD_GATEWAY = 502;
|
|
1235
|
+
const PRESERVE_HEADERS = /* @__PURE__ */ new Set([HEADER_CONTENT_TYPE]);
|
|
1236
|
+
class FormatRegistryImpl {
|
|
1237
|
+
handlers = /* @__PURE__ */ new Map();
|
|
1238
|
+
pathMap = /* @__PURE__ */ new Map();
|
|
1239
|
+
register(handler) {
|
|
1240
|
+
this.handlers.set(handler.format, handler);
|
|
1241
|
+
}
|
|
1242
|
+
registerPath(path2, format) {
|
|
1243
|
+
this.pathMap.set(path2, format);
|
|
1244
|
+
}
|
|
1245
|
+
/** Get handler by format identifier */
|
|
1246
|
+
get(format) {
|
|
1247
|
+
return this.handlers.get(format);
|
|
1248
|
+
}
|
|
1249
|
+
/** Get handler matching a request path */
|
|
1250
|
+
getByPath(path2) {
|
|
1251
|
+
const messagesPath = path2.split("?")[0] ?? "";
|
|
1252
|
+
const format = this.pathMap.get(messagesPath);
|
|
1253
|
+
return format === void 0 ? void 0 : this.handlers.get(format);
|
|
1254
|
+
}
|
|
1255
|
+
/** Get the wire format matching a request path without requiring handlers. */
|
|
1256
|
+
getFormatByPath(path2) {
|
|
1257
|
+
const messagesPath = path2.split("?")[0] ?? "";
|
|
1258
|
+
return this.pathMap.get(messagesPath);
|
|
1259
|
+
}
|
|
1260
|
+
/** Detect format from request body content */
|
|
1261
|
+
detectFormat(rawBody) {
|
|
1262
|
+
if (rawBody === null) return "unknown";
|
|
1263
|
+
for (const handler of this.handlers.values()) {
|
|
1264
|
+
if (handler.detectFormat(rawBody)) return handler.format;
|
|
1265
|
+
}
|
|
1266
|
+
return "unknown";
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
const formatRegistry = new FormatRegistryImpl();
|
|
1270
|
+
function formatForPath(path2) {
|
|
1271
|
+
return formatRegistry.getByPath(path2) ?? null;
|
|
1272
|
+
}
|
|
1273
|
+
function requestFormatForPath(path2) {
|
|
1274
|
+
return formatRegistry.getFormatByPath(path2) ?? "unknown";
|
|
1275
|
+
}
|
|
1276
|
+
formatRegistry.registerPath(PATH_V1_MESSAGES, "anthropic");
|
|
1277
|
+
formatRegistry.registerPath(PATH_V1_CHAT_COMPLETIONS, "openai");
|
|
1278
|
+
formatRegistry.registerPath(PATH_CHAT_COMPLETIONS, "openai");
|
|
1217
1279
|
const IDLE_TIMEOUT_MS = Number(process.env["SESSION_PROCESS_IDLE_MS"]) || 5 * 60 * 1e3;
|
|
1218
1280
|
const MAX_RESTARTS = 3;
|
|
1219
1281
|
const _processes = /* @__PURE__ */ new Map();
|
|
@@ -1519,13 +1581,15 @@ function evictOldestIfNeeded() {
|
|
|
1519
1581
|
memoryCache.delete(oldestKey);
|
|
1520
1582
|
}
|
|
1521
1583
|
}
|
|
1522
|
-
function
|
|
1584
|
+
function normalizeLog(log) {
|
|
1523
1585
|
const sessionId = getLogSessionId(log);
|
|
1524
|
-
|
|
1525
|
-
|
|
1586
|
+
const pathFormat = requestFormatForPath(log.path);
|
|
1587
|
+
const apiFormat = pathFormat === "unknown" ? log.apiFormat : pathFormat;
|
|
1588
|
+
if (sessionId === log.sessionId && apiFormat === log.apiFormat) return log;
|
|
1589
|
+
return { ...log, sessionId, apiFormat };
|
|
1526
1590
|
}
|
|
1527
1591
|
function addToCache(log) {
|
|
1528
|
-
const cachedLog =
|
|
1592
|
+
const cachedLog = normalizeLog(log);
|
|
1529
1593
|
if (memoryCache.has(cachedLog.id)) {
|
|
1530
1594
|
memoryCache.delete(cachedLog.id);
|
|
1531
1595
|
}
|
|
@@ -1569,12 +1633,12 @@ async function addTestLogEntry(entry) {
|
|
|
1569
1633
|
explicitSessionId: entry.sessionId,
|
|
1570
1634
|
isTest: entry.isTest
|
|
1571
1635
|
});
|
|
1572
|
-
const log = {
|
|
1636
|
+
const log = normalizeLog({
|
|
1573
1637
|
id,
|
|
1574
1638
|
...entry,
|
|
1575
1639
|
sessionId: session.id,
|
|
1576
1640
|
streamingChunksPath
|
|
1577
|
-
};
|
|
1641
|
+
});
|
|
1578
1642
|
await runWithLogWriteLock(async () => {
|
|
1579
1643
|
const logFile = getCurrentLogFile();
|
|
1580
1644
|
appendLogEntry(log);
|
|
@@ -1593,7 +1657,7 @@ async function createLog(method, path2, requestBody, headers, clientInfo, rawHea
|
|
|
1593
1657
|
explicitSessionId: sessionId,
|
|
1594
1658
|
clientInfo
|
|
1595
1659
|
});
|
|
1596
|
-
const log = {
|
|
1660
|
+
const log = normalizeLog({
|
|
1597
1661
|
id,
|
|
1598
1662
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1599
1663
|
method,
|
|
@@ -1624,7 +1688,7 @@ async function createLog(method, path2, requestBody, headers, clientInfo, rawHea
|
|
|
1624
1688
|
clientCwd: clientInfo?.cwd ?? null,
|
|
1625
1689
|
clientProjectFolder: clientInfo?.projectFolder ?? null,
|
|
1626
1690
|
streamingChunksPath: null
|
|
1627
|
-
};
|
|
1691
|
+
});
|
|
1628
1692
|
await runWithLogWriteLock(async () => {
|
|
1629
1693
|
const logFile = getCurrentLogFile();
|
|
1630
1694
|
appendLogEntry(log);
|
|
@@ -1665,7 +1729,7 @@ async function getLogById(id) {
|
|
|
1665
1729
|
const parsed = JSON.parse(line);
|
|
1666
1730
|
const result = CapturedLogSchema.safeParse(parsed);
|
|
1667
1731
|
if (result.success) {
|
|
1668
|
-
const log =
|
|
1732
|
+
const log = normalizeLog(result.data);
|
|
1669
1733
|
addToCache(log);
|
|
1670
1734
|
observeSessionLog(log);
|
|
1671
1735
|
return log;
|
|
@@ -1701,7 +1765,7 @@ async function scanLogFileForId(filePath, id) {
|
|
|
1701
1765
|
if (desc !== void 0 && typeof desc.value === "number" && desc.value === id) {
|
|
1702
1766
|
const result = CapturedLogSchema.safeParse(parsed);
|
|
1703
1767
|
if (result.success) {
|
|
1704
|
-
lastMatch =
|
|
1768
|
+
lastMatch = normalizeLog(result.data);
|
|
1705
1769
|
if (result.data.responseStatus !== null) {
|
|
1706
1770
|
return lastMatch;
|
|
1707
1771
|
}
|
|
@@ -1749,7 +1813,7 @@ async function visitPersistedLogFile(filePath, visitor) {
|
|
|
1749
1813
|
const parsed = JSON.parse(line);
|
|
1750
1814
|
const result = CapturedLogSchema.safeParse(parsed);
|
|
1751
1815
|
if (result.success) {
|
|
1752
|
-
const log =
|
|
1816
|
+
const log = normalizeLog(result.data);
|
|
1753
1817
|
visitor(log);
|
|
1754
1818
|
}
|
|
1755
1819
|
} catch {
|
|
@@ -2197,63 +2261,6 @@ function emitLogUpdate(log) {
|
|
|
2197
2261
|
sseHandlers.delete(handler);
|
|
2198
2262
|
}
|
|
2199
2263
|
}
|
|
2200
|
-
const DEFAULT_UPSTREAM$1 = "https://api.anthropic.com";
|
|
2201
|
-
const DEFAULT_OPENAI_UPSTREAM$1 = "https://api.openai.com/v1";
|
|
2202
|
-
const PROXY_IDENTITY = process.env["PROXY_IDENTITY"] ?? "inspector9527@Tony";
|
|
2203
|
-
const PATH_V1_CHAT_COMPLETIONS = "/v1/chat/completions";
|
|
2204
|
-
const PATH_CHAT_COMPLETIONS = "/chat/completions";
|
|
2205
|
-
const PATH_V1_MESSAGES = "/v1/messages";
|
|
2206
|
-
const HEADER_CONTENT_TYPE = "content-type";
|
|
2207
|
-
const HEADER_USER_AGENT = "user-agent";
|
|
2208
|
-
const HEADER_X_PROXY_IDENTITY = "x-proxy-identity";
|
|
2209
|
-
const HEADER_AUTHORIZATION = "authorization";
|
|
2210
|
-
const HEADER_X_API_KEY = "x-api-key";
|
|
2211
|
-
const HEADER_CONTENT_ENCODING = "content-encoding";
|
|
2212
|
-
const HEADER_CONTENT_LENGTH = "content-length";
|
|
2213
|
-
const HEADER_HOST = "host";
|
|
2214
|
-
const AUTH_HEADER_X_API_KEY = "x-api-key";
|
|
2215
|
-
const CONTENT_TYPE_EVENT_STREAM = "text/event-stream";
|
|
2216
|
-
const STATUS_FORBIDDEN = 403;
|
|
2217
|
-
const STATUS_BAD_GATEWAY = 502;
|
|
2218
|
-
const PRESERVE_HEADERS = /* @__PURE__ */ new Set([HEADER_CONTENT_TYPE]);
|
|
2219
|
-
class FormatRegistryImpl {
|
|
2220
|
-
handlers = /* @__PURE__ */ new Map();
|
|
2221
|
-
pathMap = /* @__PURE__ */ new Map();
|
|
2222
|
-
register(handler) {
|
|
2223
|
-
this.handlers.set(handler.format, handler);
|
|
2224
|
-
}
|
|
2225
|
-
registerPath(path2, format) {
|
|
2226
|
-
this.pathMap.set(path2, format);
|
|
2227
|
-
}
|
|
2228
|
-
/** Get handler by format identifier */
|
|
2229
|
-
get(format) {
|
|
2230
|
-
return this.handlers.get(format);
|
|
2231
|
-
}
|
|
2232
|
-
/** Get handler matching a request path */
|
|
2233
|
-
getByPath(path2) {
|
|
2234
|
-
const messagesPath = path2.split("?")[0] ?? "";
|
|
2235
|
-
const format = this.pathMap.get(messagesPath);
|
|
2236
|
-
return format === void 0 ? void 0 : this.handlers.get(format);
|
|
2237
|
-
}
|
|
2238
|
-
/** Detect format from request body content */
|
|
2239
|
-
detectFormat(rawBody) {
|
|
2240
|
-
if (rawBody === null) return "unknown";
|
|
2241
|
-
for (const handler of this.handlers.values()) {
|
|
2242
|
-
if (handler.detectFormat(rawBody)) return handler.format;
|
|
2243
|
-
}
|
|
2244
|
-
return "unknown";
|
|
2245
|
-
}
|
|
2246
|
-
}
|
|
2247
|
-
const formatRegistry = new FormatRegistryImpl();
|
|
2248
|
-
function formatForPath(path2) {
|
|
2249
|
-
return formatRegistry.getByPath(path2) ?? null;
|
|
2250
|
-
}
|
|
2251
|
-
function requestFormatForPath(path2) {
|
|
2252
|
-
return formatForPath(path2)?.format ?? "unknown";
|
|
2253
|
-
}
|
|
2254
|
-
formatRegistry.registerPath(PATH_V1_MESSAGES, "anthropic");
|
|
2255
|
-
formatRegistry.registerPath(PATH_V1_CHAT_COMPLETIONS, "openai");
|
|
2256
|
-
formatRegistry.registerPath(PATH_CHAT_COMPLETIONS, "openai");
|
|
2257
2264
|
function parseInputJson(json) {
|
|
2258
2265
|
if (json === "") return {};
|
|
2259
2266
|
try {
|
|
@@ -6096,7 +6103,7 @@ const Route$s = createFileRoute("/api/models")({
|
|
|
6096
6103
|
}
|
|
6097
6104
|
}
|
|
6098
6105
|
});
|
|
6099
|
-
const version = "2.0.
|
|
6106
|
+
const version = "2.0.37";
|
|
6100
6107
|
const packageJson = {
|
|
6101
6108
|
version
|
|
6102
6109
|
};
|
|
@@ -11695,8 +11702,21 @@ function getRouter() {
|
|
|
11695
11702
|
routeTree,
|
|
11696
11703
|
scrollRestoration: false
|
|
11697
11704
|
});
|
|
11705
|
+
attachServerSsrStoreCompatibility(router2);
|
|
11698
11706
|
return router2;
|
|
11699
11707
|
}
|
|
11708
|
+
function attachServerSsrStoreCompatibility(router2) {
|
|
11709
|
+
const existingStores = Object.getOwnPropertyDescriptor(router2, "stores");
|
|
11710
|
+
if (existingStores !== void 0) return;
|
|
11711
|
+
Object.defineProperty(router2, "stores", {
|
|
11712
|
+
configurable: true,
|
|
11713
|
+
value: {
|
|
11714
|
+
matches: {
|
|
11715
|
+
get: () => router2.state.matches
|
|
11716
|
+
}
|
|
11717
|
+
}
|
|
11718
|
+
});
|
|
11719
|
+
}
|
|
11700
11720
|
const router = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11701
11721
|
__proto__: null,
|
|
11702
11722
|
getRouter
|
|
@@ -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-D56QvEyw.js"], "assets": [] }, "/": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", "assets": [], "preloads": ["/assets/index-B7a5OmIO.js", "/assets/ProxyViewerContainer-BstBIX2B.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-7c9bsOFT.js", "/assets/ProxyViewerContainer-BstBIX2B.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-D56QvEyw.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": "image/svg+xml",
|
|
40
|
-
"etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
|
|
41
|
-
"mtime": "2026-07-01T04:41:43.991Z",
|
|
42
|
-
"size": 5915,
|
|
43
|
-
"path": "../public/assets/alibaba-TTwafVwX.svg"
|
|
44
|
-
},
|
|
45
|
-
"/assets/CompareDrawer-Cin0_f71.js": {
|
|
38
|
+
"/assets/CompareDrawer-nEHCEVP4.js": {
|
|
46
39
|
"type": "text/javascript; charset=utf-8",
|
|
47
|
-
"etag": '"49fe-
|
|
48
|
-
"mtime": "2026-07-
|
|
40
|
+
"etag": '"49fe-1WPgHKOPq0ddXIWvSE/vtMZLaDQ"',
|
|
41
|
+
"mtime": "2026-07-01T06:30:10.266Z",
|
|
49
42
|
"size": 18942,
|
|
50
|
-
"path": "../public/assets/CompareDrawer-
|
|
51
|
-
},
|
|
52
|
-
"/assets/index-AiQY20d7.js": {
|
|
53
|
-
"type": "text/javascript; charset=utf-8",
|
|
54
|
-
"etag": '"74-rfFHE/No9yqZRRcPoLF42xPy938"',
|
|
55
|
-
"mtime": "2026-07-01T04:41:43.992Z",
|
|
56
|
-
"size": 116,
|
|
57
|
-
"path": "../public/assets/index-AiQY20d7.js"
|
|
43
|
+
"path": "../public/assets/CompareDrawer-nEHCEVP4.js"
|
|
58
44
|
},
|
|
59
45
|
"/assets/minimax-BPMzvuL-.jpeg": {
|
|
60
46
|
"type": "image/jpeg",
|
|
61
47
|
"etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
|
|
62
|
-
"mtime": "2026-07-
|
|
48
|
+
"mtime": "2026-07-01T06:30:10.264Z",
|
|
63
49
|
"size": 6918,
|
|
64
50
|
"path": "../public/assets/minimax-BPMzvuL-.jpeg"
|
|
65
51
|
},
|
|
66
|
-
"/assets/
|
|
52
|
+
"/assets/index-B7a5OmIO.js": {
|
|
67
53
|
"type": "text/javascript; charset=utf-8",
|
|
68
|
-
"etag": '"
|
|
69
|
-
"mtime": "2026-07-
|
|
70
|
-
"size":
|
|
71
|
-
"path": "../public/assets/
|
|
54
|
+
"etag": '"74-2tmqYa6JYQCoz24PRr5/e9l3IEU"',
|
|
55
|
+
"mtime": "2026-07-01T06:30:10.264Z",
|
|
56
|
+
"size": 116,
|
|
57
|
+
"path": "../public/assets/index-B7a5OmIO.js"
|
|
72
58
|
},
|
|
73
59
|
"/assets/index-BfGJEb-2.css": {
|
|
74
60
|
"type": "text/css; charset=utf-8",
|
|
75
61
|
"etag": '"1acc9-JrjZs7fIRGuBr66cqP9miLHcLKk"',
|
|
76
|
-
"mtime": "2026-07-
|
|
62
|
+
"mtime": "2026-07-01T06:30:10.264Z",
|
|
77
63
|
"size": 109769,
|
|
78
64
|
"path": "../public/assets/index-BfGJEb-2.css"
|
|
79
65
|
},
|
|
80
|
-
"/assets/
|
|
81
|
-
"type": "
|
|
82
|
-
"etag": '"
|
|
83
|
-
"mtime": "2026-07-
|
|
84
|
-
"size":
|
|
85
|
-
"path": "../public/assets/
|
|
66
|
+
"/assets/alibaba-TTwafVwX.svg": {
|
|
67
|
+
"type": "image/svg+xml",
|
|
68
|
+
"etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
|
|
69
|
+
"mtime": "2026-07-01T06:30:10.264Z",
|
|
70
|
+
"size": 5915,
|
|
71
|
+
"path": "../public/assets/alibaba-TTwafVwX.svg"
|
|
86
72
|
},
|
|
87
|
-
"/assets/
|
|
73
|
+
"/assets/ReplayDialog-CUnBdt1Q.js": {
|
|
88
74
|
"type": "text/javascript; charset=utf-8",
|
|
89
|
-
"etag": '"
|
|
90
|
-
"mtime": "2026-07-
|
|
91
|
-
"size":
|
|
92
|
-
"path": "../public/assets/
|
|
75
|
+
"etag": '"318c-mANbJzYXI0pIcc5jzrFrUuqiMwc"',
|
|
76
|
+
"mtime": "2026-07-01T06:30:10.266Z",
|
|
77
|
+
"size": 12684,
|
|
78
|
+
"path": "../public/assets/ReplayDialog-CUnBdt1Q.js"
|
|
93
79
|
},
|
|
94
|
-
"/assets/ResponseView-
|
|
80
|
+
"/assets/ResponseView-amxuKPKY.js": {
|
|
95
81
|
"type": "text/javascript; charset=utf-8",
|
|
96
|
-
"etag": '"30d0-
|
|
97
|
-
"mtime": "2026-07-
|
|
82
|
+
"etag": '"30d0-bu5y6cqBhqxvCaAnThTTl2zDf04"',
|
|
83
|
+
"mtime": "2026-07-01T06:30:10.266Z",
|
|
98
84
|
"size": 12496,
|
|
99
|
-
"path": "../public/assets/ResponseView-
|
|
85
|
+
"path": "../public/assets/ResponseView-amxuKPKY.js"
|
|
100
86
|
},
|
|
101
|
-
"/assets/StreamingChunkSequence-
|
|
87
|
+
"/assets/StreamingChunkSequence-DpscrQM2.js": {
|
|
102
88
|
"type": "text/javascript; charset=utf-8",
|
|
103
|
-
"etag": '"d57-
|
|
104
|
-
"mtime": "2026-07-
|
|
89
|
+
"etag": '"d57-OC5EYm/6GsS9Oxo54ALIugTyOjI"',
|
|
90
|
+
"mtime": "2026-07-01T06:30:10.266Z",
|
|
105
91
|
"size": 3415,
|
|
106
|
-
"path": "../public/assets/StreamingChunkSequence-
|
|
92
|
+
"path": "../public/assets/StreamingChunkSequence-DpscrQM2.js"
|
|
93
|
+
},
|
|
94
|
+
"/assets/main-D56QvEyw.js": {
|
|
95
|
+
"type": "text/javascript; charset=utf-8",
|
|
96
|
+
"etag": '"517d9-nZ39KCP9uiOY2kWYxTAU9TcHQ/Y"',
|
|
97
|
+
"mtime": "2026-07-01T06:30:10.264Z",
|
|
98
|
+
"size": 333785,
|
|
99
|
+
"path": "../public/assets/main-D56QvEyw.js"
|
|
107
100
|
},
|
|
108
|
-
"/assets/_sessionId-
|
|
101
|
+
"/assets/_sessionId-7c9bsOFT.js": {
|
|
109
102
|
"type": "text/javascript; charset=utf-8",
|
|
110
|
-
"etag": '"d2-
|
|
111
|
-
"mtime": "2026-07-
|
|
103
|
+
"etag": '"d2-PXCfOJpgg3Ks7hrg95OEj0HlduI"',
|
|
104
|
+
"mtime": "2026-07-01T06:30:10.264Z",
|
|
112
105
|
"size": 210,
|
|
113
|
-
"path": "../public/assets/_sessionId-
|
|
106
|
+
"path": "../public/assets/_sessionId-7c9bsOFT.js"
|
|
107
|
+
},
|
|
108
|
+
"/assets/RequestAnatomy-BU9VT2Sw.js": {
|
|
109
|
+
"type": "text/javascript; charset=utf-8",
|
|
110
|
+
"etag": '"4485-wbw3sIZ8wpySXN4TtsN05mU2t6E"',
|
|
111
|
+
"mtime": "2026-07-01T06:30:10.266Z",
|
|
112
|
+
"size": 17541,
|
|
113
|
+
"path": "../public/assets/RequestAnatomy-BU9VT2Sw.js"
|
|
114
114
|
},
|
|
115
115
|
"/assets/zhipuai-BPNAnxo-.svg": {
|
|
116
116
|
"type": "image/svg+xml",
|
|
117
117
|
"etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
|
|
118
|
-
"mtime": "2026-07-
|
|
118
|
+
"mtime": "2026-07-01T06:30:10.264Z",
|
|
119
119
|
"size": 11256,
|
|
120
120
|
"path": "../public/assets/zhipuai-BPNAnxo-.svg"
|
|
121
121
|
},
|
|
122
122
|
"/assets/qwen-CONDcHqt.png": {
|
|
123
123
|
"type": "image/png",
|
|
124
124
|
"etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
|
|
125
|
-
"mtime": "2026-07-
|
|
125
|
+
"mtime": "2026-07-01T06:30:10.264Z",
|
|
126
126
|
"size": 357059,
|
|
127
127
|
"path": "../public/assets/qwen-CONDcHqt.png"
|
|
128
128
|
},
|
|
129
|
-
"/assets/ProxyViewerContainer-
|
|
129
|
+
"/assets/ProxyViewerContainer-BstBIX2B.js": {
|
|
130
130
|
"type": "text/javascript; charset=utf-8",
|
|
131
|
-
"etag": '"
|
|
132
|
-
"mtime": "2026-07-
|
|
133
|
-
"size":
|
|
134
|
-
"path": "../public/assets/ProxyViewerContainer-
|
|
131
|
+
"etag": '"b5aeb-NVYP8P0JeiMfeh1ogEwxQvpdbUc"',
|
|
132
|
+
"mtime": "2026-07-01T06:30:10.266Z",
|
|
133
|
+
"size": 744171,
|
|
134
|
+
"path": "../public/assets/ProxyViewerContainer-BstBIX2B.js"
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
137
|
function readAsset(id) {
|