@tonyclaw/agent-inspector 2.0.2 → 2.0.3
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-Bp7_x-5N.js → CompareDrawer-D5A4bTfV.js} +1 -1
- package/.output/public/assets/ProxyViewerContainer-Da0jpBkp.js +101 -0
- package/.output/public/assets/{ReplayDialog-DFHCd0yx.js → ReplayDialog-CxUk_TF0.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-ehyrskxt.js → RequestAnatomy-DIlzjgjJ.js} +1 -1
- package/.output/public/assets/ResponseView-DQCuKJ1G.js +1 -0
- package/.output/public/assets/{StreamingChunkSequence-Bjs4Lqwn.js → StreamingChunkSequence-DHk4SGGL.js} +1 -1
- package/.output/public/assets/_sessionId-dY1TTl7N.js +1 -0
- package/.output/public/assets/index-D7wwbwly.css +1 -0
- package/.output/public/assets/index-FqQZbfl2.js +1 -0
- package/.output/public/assets/{json-viewer-6uV_YXws.js → json-viewer-BbU0n8eM.js} +1 -1
- package/.output/public/assets/{main-FSGUGtEL.js → main-CZT_F-gu.js} +2 -2
- package/.output/server/_libs/lucide-react.mjs +8 -8
- package/.output/server/{_sessionId-_bf9vUww.mjs → _sessionId-B-s9P7fJ.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-DIth2DQM.mjs → CompareDrawer-C08L3UOO.mjs} +4 -4
- package/.output/server/_ssr/{ProxyViewerContainer-249bTH-T.mjs → ProxyViewerContainer-CMWl3Ijy.mjs} +399 -49
- package/.output/server/_ssr/{ReplayDialog-C1aGx0y1.mjs → ReplayDialog-CPDo9_G5.mjs} +4 -4
- package/.output/server/_ssr/{RequestAnatomy-D2bCiEJn.mjs → RequestAnatomy-D9wt_K1E.mjs} +3 -3
- package/.output/server/_ssr/{ResponseView-DP6k4Xs_.mjs → ResponseView-DXaL7nY3.mjs} +4 -4
- package/.output/server/_ssr/{StreamingChunkSequence-HyXZV-b5.mjs → StreamingChunkSequence-B_hudZyb.mjs} +3 -3
- package/.output/server/_ssr/{index-Bt47f9pn.mjs → index-CuE_BN86.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{json-viewer-Co-YRwUP.mjs → json-viewer-Ci6kkjde.mjs} +2 -2
- package/.output/server/_ssr/{router-to_OJirX.mjs → router-BemxgIg7.mjs} +24 -93
- package/.output/server/{_tanstack-start-manifest_v-Bd-2YRWo.mjs → _tanstack-start-manifest_v--L1_b4sd.mjs} +1 -1
- package/.output/server/index.mjs +67 -67
- package/README.md +5 -2
- package/package.json +1 -1
- package/src/components/proxy-viewer/AgentTraceSummary.tsx +218 -0
- package/src/components/proxy-viewer/ConversationGroup.tsx +6 -0
- package/src/components/proxy-viewer/ToolTraceEvents.tsx +33 -0
- package/src/components/proxy-viewer/TurnGroup.tsx +11 -1
- package/src/components/proxy-viewer/viewerState.ts +177 -0
- package/src/proxy/chunkStorage.ts +3 -4
- package/src/proxy/logger.ts +8 -15
- package/src/proxy/store.ts +8 -16
- package/src/routes/api/providers.$providerId.test.log.ts +0 -79
- package/.output/public/assets/ProxyViewerContainer-USuxPy-K.js +0 -101
- package/.output/public/assets/ResponseView-BNGyc8e_.js +0 -1
- package/.output/public/assets/_sessionId-D_SeK_qp.js +0 -1
- package/.output/public/assets/index-BGGOWR7A.js +0 -1
- package/.output/public/assets/index-CIL46Z2y.css +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
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 } from "./ProxyViewerContainer-
|
|
3
|
-
import { JsonViewer } from "./json-viewer-
|
|
4
|
-
import "./router-
|
|
2
|
+
import { k as TooltipProvider, l as Tooltip, m as TooltipTrigger, B as Badge, n as TooltipContent } from "./ProxyViewerContainer-CMWl3Ijy.mjs";
|
|
3
|
+
import { JsonViewer } from "./json-viewer-Ci6kkjde.mjs";
|
|
4
|
+
import "./router-BemxgIg7.mjs";
|
|
5
5
|
import "../_libs/modelcontextprotocol__server.mjs";
|
|
6
6
|
import "../_libs/jszip.mjs";
|
|
7
7
|
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-
|
|
1
|
+
import { P as ProxyViewerContainer } from "./ProxyViewerContainer-CMWl3Ijy.mjs";
|
|
2
2
|
import "../_libs/react.mjs";
|
|
3
|
-
import "./router-
|
|
3
|
+
import "./router-BemxgIg7.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--L1_b4sd.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-
|
|
770
|
+
const routerEntry = await import("./router-BemxgIg7.mjs").then((n) => n.h);
|
|
771
771
|
const startEntry = await import("./start-HYkvq4Ni.mjs");
|
|
772
772
|
return { startEntry, routerEntry };
|
|
773
773
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
|
-
import { q as parseJsonText, c as cn, k as TooltipProvider, l as Tooltip, m as TooltipTrigger, n as TooltipContent } from "./ProxyViewerContainer-
|
|
3
|
-
import "./router-
|
|
2
|
+
import { q as parseJsonText, c as cn, k as TooltipProvider, l as Tooltip, m as TooltipTrigger, n as TooltipContent } from "./ProxyViewerContainer-CMWl3Ijy.mjs";
|
|
3
|
+
import "./router-BemxgIg7.mjs";
|
|
4
4
|
import "../_libs/modelcontextprotocol__server.mjs";
|
|
5
5
|
import "../_libs/jszip.mjs";
|
|
6
6
|
import { C as Check, a as Copy, b as ChevronDown, f as ChevronRight, q as ChevronsDown } from "../_libs/lucide-react.mjs";
|
|
@@ -49,7 +49,7 @@ import "../_libs/mimic-function.mjs";
|
|
|
49
49
|
import "../_libs/semver.mjs";
|
|
50
50
|
import "../_libs/uint8array-extras.mjs";
|
|
51
51
|
const faviconSvg = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20role='img'%20aria-label='Agent%20Inspector'%3e%3crect%20width='64'%20height='64'%20rx='14'%20fill='%23111827'%20/%3e%3cg%20fill='none'%20stroke='%23f59e0b'%20stroke-width='4.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20fill='%23f59e0b'%20d='M15%2036c0-11%207-18%2017-18s17%207%2017%2018c0%208-7%2013-17%2013s-17-5-17-13z'%20/%3e%3cpath%20d='M16%2031c-6-5-12-3-12%204%200%205%206%206%2011%202'%20/%3e%3cpath%20d='M48%2031c6-5%2012-3%2012%204%200%205-6%206-11%202'%20/%3e%3cpath%20d='M27%2019l-3-7'%20/%3e%3cpath%20d='M37%2019l3-7'%20/%3e%3cpath%20d='M19%2045l-6%209'%20/%3e%3cpath%20d='M27%2048l-3%209'%20/%3e%3cpath%20d='M37%2048l3%209'%20/%3e%3cpath%20d='M45%2045l6%209'%20/%3e%3c/g%3e%3cpath%20d='M14%2047l9-8%208%209c-5%203.5-12%203-17-1z'%20fill='%232f6b3f'%20opacity='.95'%20/%3e%3cpath%20d='M18%2046l5-5%205%206c-3%201.6-7%201.4-10-1z'%20fill='%236fb36f'%20opacity='.95'%20/%3e%3cpath%20d='M23%2041v10'%20fill='none'%20stroke='%23d6b45f'%20stroke-width='1.6'%20stroke-linecap='round'%20/%3e%3ccircle%20cx='31'%20cy='48'%20r='1.8'%20fill='%23c2412d'%20/%3e%3cpath%20d='M24%2044l13-11%2014%2013c-8%205.8-18%205.3-27-2z'%20fill='%232f6b3f'%20opacity='.97'%20/%3e%3cpath%20d='M30%2043l7-7%209%209c-5%202.7-11%202.5-16-2z'%20fill='%236fb36f'%20opacity='.95'%20/%3e%3cpath%20d='M37%2036v14'%20fill='none'%20stroke='%23d6b45f'%20stroke-width='2'%20stroke-linecap='round'%20/%3e%3cpath%20d='M30%2043c5-2%2011-1.5%2016%202'%20fill='none'%20stroke='%239fca78'%20stroke-width='1.8'%20stroke-linecap='round'%20/%3e%3ccircle%20cx='51'%20cy='46'%20r='2'%20fill='%23c2412d'%20/%3e%3cpath%20d='M40%2050l8-8%207%208c-4.2%203.2-10%203-15%200z'%20fill='%232f6b3f'%20opacity='.95'%20/%3e%3cpath%20d='M43%2049l5-5%204.5%205.5c-3%201.5-6%201.2-9.5-.5z'%20fill='%236fb36f'%20opacity='.95'%20/%3e%3cpath%20d='M48%2044v9'%20fill='none'%20stroke='%23d6b45f'%20stroke-width='1.5'%20stroke-linecap='round'%20/%3e%3ccircle%20cx='55'%20cy='50'%20r='1.7'%20fill='%23c2412d'%20/%3e%3ccircle%20cx='24'%20cy='11'%20r='3.2'%20fill='%23f59e0b'%20/%3e%3ccircle%20cx='40'%20cy='11'%20r='3.2'%20fill='%23f59e0b'%20/%3e%3ccircle%20cx='25'%20cy='34'%20r='2.1'%20fill='%23111827'%20/%3e%3ccircle%20cx='39'%20cy='34'%20r='2.1'%20fill='%23111827'%20/%3e%3c/svg%3e";
|
|
52
|
-
const appCss = "/assets/index-
|
|
52
|
+
const appCss = "/assets/index-D7wwbwly.css";
|
|
53
53
|
const Route$q = createRootRoute({
|
|
54
54
|
head: () => ({
|
|
55
55
|
meta: [
|
|
@@ -76,7 +76,7 @@ function RootDocument({ children }) {
|
|
|
76
76
|
] })
|
|
77
77
|
] });
|
|
78
78
|
}
|
|
79
|
-
const $$splitComponentImporter$1 = () => import("./index-
|
|
79
|
+
const $$splitComponentImporter$1 = () => import("./index-CuE_BN86.mjs");
|
|
80
80
|
const Route$p = createFileRoute("/")({
|
|
81
81
|
component: lazyRouteComponent($$splitComponentImporter$1, "component")
|
|
82
82
|
});
|
|
@@ -119,7 +119,7 @@ function decodeSessionIdFromPath(encoded) {
|
|
|
119
119
|
function getSessionPath(sessionId) {
|
|
120
120
|
return `/session/${encodeSessionIdForPath(sessionId)}`;
|
|
121
121
|
}
|
|
122
|
-
const $$splitComponentImporter = () => import("../_sessionId-
|
|
122
|
+
const $$splitComponentImporter = () => import("../_sessionId-B-s9P7fJ.mjs");
|
|
123
123
|
const Route$o = createFileRoute("/session/$sessionId")({
|
|
124
124
|
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
125
125
|
parseParams: (params) => ({
|
|
@@ -155,18 +155,13 @@ function resolveDataDir(pathExists, env = process.env, platform = process.platfo
|
|
|
155
155
|
function hasExplicitDataDir() {
|
|
156
156
|
return process.env["AGENT_INSPECTOR_DATA_DIR"] !== void 0 && process.env["AGENT_INSPECTOR_DATA_DIR"] !== "" || process.env["AGENT_INSPECTOR_CONFIG_DIR"] !== void 0 && process.env["AGENT_INSPECTOR_CONFIG_DIR"] !== "";
|
|
157
157
|
}
|
|
158
|
-
const LOG_DIR_ENV = process.env["LOG_DIR"];
|
|
159
158
|
const RETENTION_DAYS = Number(process.env["LOG_RETENTION_DAYS"] ?? "7");
|
|
160
|
-
const LOG_FILE_ENV = process.env["AGENT_INSPECTOR_LOG_FILE"];
|
|
161
|
-
let resolvedLogDir = null;
|
|
162
159
|
function resolveLogDir() {
|
|
163
|
-
|
|
164
|
-
if (
|
|
165
|
-
|
|
166
|
-
} else {
|
|
167
|
-
resolvedLogDir = path.join(getDataDir(), "logs");
|
|
160
|
+
const logDirEnv = process.env["LOG_DIR"];
|
|
161
|
+
if (logDirEnv !== void 0 && logDirEnv !== "") {
|
|
162
|
+
return path.isAbsolute(logDirEnv) ? logDirEnv : path.join(getDataDir(), logDirEnv);
|
|
168
163
|
}
|
|
169
|
-
return
|
|
164
|
+
return path.join(getDataDir(), "logs");
|
|
170
165
|
}
|
|
171
166
|
function getLogFilePath() {
|
|
172
167
|
const date = /* @__PURE__ */ new Date();
|
|
@@ -176,8 +171,9 @@ function getLogFilePath() {
|
|
|
176
171
|
return path.join(resolveLogDir(), `${yyyy}-${mm}-${dd}.jsonl`);
|
|
177
172
|
}
|
|
178
173
|
function getInspectorLogPath() {
|
|
179
|
-
|
|
180
|
-
|
|
174
|
+
const logFileEnv = process.env["AGENT_INSPECTOR_LOG_FILE"];
|
|
175
|
+
if (logFileEnv !== void 0 && logFileEnv !== "") {
|
|
176
|
+
return logFileEnv;
|
|
181
177
|
}
|
|
182
178
|
return path.join(getDataDir(), "logs", "inspector.log");
|
|
183
179
|
}
|
|
@@ -186,6 +182,7 @@ async function initLogger() {
|
|
|
186
182
|
const retentionMs = RETENTION_DAYS * 24 * 60 * 60 * 1e3;
|
|
187
183
|
const cutoff = Date.now() - retentionMs;
|
|
188
184
|
try {
|
|
185
|
+
await mkdir(dir, { recursive: true });
|
|
189
186
|
const entries = await readdir(dir);
|
|
190
187
|
for (const entry of entries) {
|
|
191
188
|
if (!entry.endsWith(".jsonl")) continue;
|
|
@@ -852,10 +849,10 @@ const StreamingChunksDataSchema = object({
|
|
|
852
849
|
chunks: array(StreamingChunkSchema),
|
|
853
850
|
truncated: boolean().optional()
|
|
854
851
|
});
|
|
855
|
-
const CHUNKS_DIR_ENV = process.env["CHUNKS_DIR"];
|
|
856
852
|
function getChunksDir() {
|
|
857
|
-
|
|
858
|
-
|
|
853
|
+
const chunksDirEnv = process.env["CHUNKS_DIR"];
|
|
854
|
+
if (chunksDirEnv !== void 0 && chunksDirEnv !== "") {
|
|
855
|
+
return isAbsolute(chunksDirEnv) ? chunksDirEnv : join(getDataDir(), chunksDirEnv);
|
|
859
856
|
}
|
|
860
857
|
return join(getDataDir(), "chunks");
|
|
861
858
|
}
|
|
@@ -1228,11 +1225,6 @@ function removeFromCache(id) {
|
|
|
1228
1225
|
}
|
|
1229
1226
|
async function addTestLogEntry(entry) {
|
|
1230
1227
|
const id = await getNextLogId();
|
|
1231
|
-
const index = await loadIndex();
|
|
1232
|
-
if (id > index.maxId) {
|
|
1233
|
-
index.maxId = id;
|
|
1234
|
-
await saveIndex(index);
|
|
1235
|
-
}
|
|
1236
1228
|
let streamingChunksPath = null;
|
|
1237
1229
|
if (entry.streamingChunks !== void 0 && entry.streamingChunks.chunks.length > 0) {
|
|
1238
1230
|
streamingChunksPath = writeChunks(
|
|
@@ -1251,6 +1243,9 @@ async function addTestLogEntry(entry) {
|
|
|
1251
1243
|
sessionId: session.id,
|
|
1252
1244
|
streamingChunksPath
|
|
1253
1245
|
};
|
|
1246
|
+
const logFile = getCurrentLogFile();
|
|
1247
|
+
appendLogEntry(log);
|
|
1248
|
+
await addToIndex(id, logFile, -1, -1);
|
|
1254
1249
|
addToCache(log);
|
|
1255
1250
|
observeSessionLog(log, session.source);
|
|
1256
1251
|
emitLogUpdate(log);
|
|
@@ -4729,7 +4724,7 @@ const RedactionMetadataSchema = object({
|
|
|
4729
4724
|
redacted: boolean(),
|
|
4730
4725
|
patterns: array(string())
|
|
4731
4726
|
});
|
|
4732
|
-
object({
|
|
4727
|
+
const KnowledgeCandidateSchema = object({
|
|
4733
4728
|
id: string(),
|
|
4734
4729
|
type: KnowledgeCandidateTypeSchema,
|
|
4735
4730
|
title: string(),
|
|
@@ -6097,30 +6092,6 @@ function createFailedProviderTestResults(message, type) {
|
|
|
6097
6092
|
function hasSuccessField(result) {
|
|
6098
6093
|
return Object.prototype.hasOwnProperty.call(result, "success");
|
|
6099
6094
|
}
|
|
6100
|
-
function createTestLogEntry(providerName, path2, body, upstreamUrl, result, isTest) {
|
|
6101
|
-
return {
|
|
6102
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6103
|
-
id: `test-${Date.now()}`,
|
|
6104
|
-
method: "POST",
|
|
6105
|
-
path: path2,
|
|
6106
|
-
model: isTest ? result.model : void 0,
|
|
6107
|
-
sessionId: null,
|
|
6108
|
-
rawRequestBody: body,
|
|
6109
|
-
responseStatus: result.success ? 200 : 500,
|
|
6110
|
-
responseText: result.rawResponse ?? JSON.stringify(result),
|
|
6111
|
-
inputTokens: result.inputTokens ?? null,
|
|
6112
|
-
outputTokens: result.outputTokens ?? null,
|
|
6113
|
-
elapsedMs: result.latencyMs ?? 0,
|
|
6114
|
-
streaming: result.streaming ?? false,
|
|
6115
|
-
userAgent: "provider-test",
|
|
6116
|
-
origin: null,
|
|
6117
|
-
upstreamUrl,
|
|
6118
|
-
error: result.success ? null : result.error?.message ?? String(result.error),
|
|
6119
|
-
isTest: true,
|
|
6120
|
-
providerName,
|
|
6121
|
-
headers: result.requestHeaders ?? {}
|
|
6122
|
-
};
|
|
6123
|
-
}
|
|
6124
6095
|
async function logModelResults(displayName, providerName, anthropicUrl, openaiUrl, modelResults) {
|
|
6125
6096
|
const usageModel = getModelUsageName(displayName, providerName);
|
|
6126
6097
|
if (anthropicUrl !== void 0) {
|
|
@@ -6130,7 +6101,6 @@ async function logModelResults(displayName, providerName, anthropicUrl, openaiUr
|
|
|
6130
6101
|
const nonStreamingResult = nsResult;
|
|
6131
6102
|
const streamingResult = sResult;
|
|
6132
6103
|
const requestBody = JSON.stringify(buildProviderTestRequestBody(usageModel, "non-streaming"));
|
|
6133
|
-
const upstreamUrl = `${anthropicUrl}/v1/messages`;
|
|
6134
6104
|
await addTestLogEntry({
|
|
6135
6105
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6136
6106
|
method: "POST",
|
|
@@ -6153,16 +6123,6 @@ async function logModelResults(displayName, providerName, anthropicUrl, openaiUr
|
|
|
6153
6123
|
providerName,
|
|
6154
6124
|
headers: nonStreamingResult.requestHeaders ?? {}
|
|
6155
6125
|
});
|
|
6156
|
-
appendLogEntry(
|
|
6157
|
-
createTestLogEntry(
|
|
6158
|
-
providerName,
|
|
6159
|
-
"/v1/messages",
|
|
6160
|
-
requestBody,
|
|
6161
|
-
upstreamUrl,
|
|
6162
|
-
nonStreamingResult,
|
|
6163
|
-
true
|
|
6164
|
-
)
|
|
6165
|
-
);
|
|
6166
6126
|
const streamingRequestBody = JSON.stringify(
|
|
6167
6127
|
buildProviderTestRequestBody(usageModel, "streaming")
|
|
6168
6128
|
);
|
|
@@ -6189,16 +6149,6 @@ async function logModelResults(displayName, providerName, anthropicUrl, openaiUr
|
|
|
6189
6149
|
providerName,
|
|
6190
6150
|
headers: streamingResult.requestHeaders ?? {}
|
|
6191
6151
|
});
|
|
6192
|
-
appendLogEntry(
|
|
6193
|
-
createTestLogEntry(
|
|
6194
|
-
providerName,
|
|
6195
|
-
"/v1/messages",
|
|
6196
|
-
streamingRequestBody,
|
|
6197
|
-
upstreamUrl,
|
|
6198
|
-
streamingResult,
|
|
6199
|
-
true
|
|
6200
|
-
)
|
|
6201
|
-
);
|
|
6202
6152
|
}
|
|
6203
6153
|
}
|
|
6204
6154
|
if (openaiUrl !== void 0) {
|
|
@@ -6208,7 +6158,6 @@ async function logModelResults(displayName, providerName, anthropicUrl, openaiUr
|
|
|
6208
6158
|
const nonStreamingResult = nsResult;
|
|
6209
6159
|
const streamingResult = sResult;
|
|
6210
6160
|
const requestBody = JSON.stringify(buildProviderTestRequestBody(usageModel, "non-streaming"));
|
|
6211
|
-
const upstreamUrl = `${openaiUrl}/v1/chat/completions`;
|
|
6212
6161
|
await addTestLogEntry({
|
|
6213
6162
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6214
6163
|
method: "POST",
|
|
@@ -6231,16 +6180,6 @@ async function logModelResults(displayName, providerName, anthropicUrl, openaiUr
|
|
|
6231
6180
|
providerName,
|
|
6232
6181
|
headers: nonStreamingResult.requestHeaders ?? {}
|
|
6233
6182
|
});
|
|
6234
|
-
appendLogEntry(
|
|
6235
|
-
createTestLogEntry(
|
|
6236
|
-
providerName,
|
|
6237
|
-
"/v1/chat/completions",
|
|
6238
|
-
requestBody,
|
|
6239
|
-
upstreamUrl,
|
|
6240
|
-
nonStreamingResult,
|
|
6241
|
-
true
|
|
6242
|
-
)
|
|
6243
|
-
);
|
|
6244
6183
|
const streamingRequestBody = JSON.stringify(
|
|
6245
6184
|
buildProviderTestRequestBody(usageModel, "streaming")
|
|
6246
6185
|
);
|
|
@@ -6267,16 +6206,6 @@ async function logModelResults(displayName, providerName, anthropicUrl, openaiUr
|
|
|
6267
6206
|
providerName,
|
|
6268
6207
|
headers: streamingResult.requestHeaders ?? {}
|
|
6269
6208
|
});
|
|
6270
|
-
appendLogEntry(
|
|
6271
|
-
createTestLogEntry(
|
|
6272
|
-
providerName,
|
|
6273
|
-
"/v1/chat/completions",
|
|
6274
|
-
streamingRequestBody,
|
|
6275
|
-
upstreamUrl,
|
|
6276
|
-
streamingResult,
|
|
6277
|
-
true
|
|
6278
|
-
)
|
|
6279
|
-
);
|
|
6280
6209
|
}
|
|
6281
6210
|
}
|
|
6282
6211
|
}
|
|
@@ -6640,17 +6569,19 @@ export {
|
|
|
6640
6569
|
AnthropicResponseSchema$1 as A,
|
|
6641
6570
|
CapturedLogSchema as C,
|
|
6642
6571
|
DEFAULT_SLOW_RESPONSE_THRESHOLD_SECONDS as D,
|
|
6572
|
+
KnowledgeCandidateSchema as K,
|
|
6643
6573
|
MAX_SLOW_RESPONSE_THRESHOLD_SECONDS as M,
|
|
6644
6574
|
OpenAIRequestSchema as O,
|
|
6645
6575
|
ProviderTestResultsSchema as P,
|
|
6646
6576
|
Route$o as R,
|
|
6647
6577
|
RuntimeConfigSchema as a,
|
|
6648
6578
|
AnthropicRequestSchema as b,
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6579
|
+
safeGetOwnProperty as c,
|
|
6580
|
+
createPendingProviderTestResults as d,
|
|
6581
|
+
createFailedProviderTestResults as e,
|
|
6582
|
+
ProviderConfigSchema as f,
|
|
6653
6583
|
getSessionPath as g,
|
|
6584
|
+
router as h,
|
|
6654
6585
|
parseOpenAIResponse as p,
|
|
6655
6586
|
requestFormatForPath as r,
|
|
6656
6587
|
stripClaudeCodeBillingHeader as s
|
|
@@ -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-
|
|
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-CZT_F-gu.js"], "assets": [] }, "/": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", "assets": [], "preloads": ["/assets/index-FqQZbfl2.js", "/assets/ProxyViewerContainer-Da0jpBkp.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-dY1TTl7N.js", "/assets/ProxyViewerContainer-Da0jpBkp.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/promote"] }, "/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/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/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/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-CZT_F-gu.js" });
|
|
2
2
|
export {
|
|
3
3
|
tsrStartManifest
|
|
4
4
|
};
|
package/.output/server/index.mjs
CHANGED
|
@@ -38,107 +38,107 @@ const assets = {
|
|
|
38
38
|
"/assets/alibaba-TTwafVwX.svg": {
|
|
39
39
|
"type": "image/svg+xml",
|
|
40
40
|
"etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
|
|
41
|
-
"mtime": "2026-06-
|
|
41
|
+
"mtime": "2026-06-20T07:49:57.206Z",
|
|
42
42
|
"size": 5915,
|
|
43
43
|
"path": "../public/assets/alibaba-TTwafVwX.svg"
|
|
44
44
|
},
|
|
45
|
-
"/assets/CompareDrawer-
|
|
45
|
+
"/assets/CompareDrawer-D5A4bTfV.js": {
|
|
46
46
|
"type": "text/javascript; charset=utf-8",
|
|
47
|
-
"etag": '"4a1f-
|
|
48
|
-
"mtime": "2026-06-
|
|
47
|
+
"etag": '"4a1f-mEPVKgxEcmIrRzyfYSrf+TEFNes"',
|
|
48
|
+
"mtime": "2026-06-20T07:49:57.206Z",
|
|
49
49
|
"size": 18975,
|
|
50
|
-
"path": "../public/assets/CompareDrawer-
|
|
50
|
+
"path": "../public/assets/CompareDrawer-D5A4bTfV.js"
|
|
51
|
+
},
|
|
52
|
+
"/assets/index-FqQZbfl2.js": {
|
|
53
|
+
"type": "text/javascript; charset=utf-8",
|
|
54
|
+
"etag": '"74-el2/zDM0d+yANqsiilX18eIScpc"',
|
|
55
|
+
"mtime": "2026-06-20T07:49:57.206Z",
|
|
56
|
+
"size": 116,
|
|
57
|
+
"path": "../public/assets/index-FqQZbfl2.js"
|
|
58
|
+
},
|
|
59
|
+
"/assets/index-D7wwbwly.css": {
|
|
60
|
+
"type": "text/css; charset=utf-8",
|
|
61
|
+
"etag": '"17293-5C6kMCq9PaxOjrbr7Or2ITIT6Lo"',
|
|
62
|
+
"mtime": "2026-06-20T07:49:57.206Z",
|
|
63
|
+
"size": 94867,
|
|
64
|
+
"path": "../public/assets/index-D7wwbwly.css"
|
|
51
65
|
},
|
|
52
66
|
"/assets/minimax-BPMzvuL-.jpeg": {
|
|
53
67
|
"type": "image/jpeg",
|
|
54
68
|
"etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
|
|
55
|
-
"mtime": "2026-06-
|
|
69
|
+
"mtime": "2026-06-20T07:49:57.206Z",
|
|
56
70
|
"size": 6918,
|
|
57
71
|
"path": "../public/assets/minimax-BPMzvuL-.jpeg"
|
|
58
72
|
},
|
|
59
|
-
"/assets/json-viewer-
|
|
73
|
+
"/assets/json-viewer-BbU0n8eM.js": {
|
|
60
74
|
"type": "text/javascript; charset=utf-8",
|
|
61
|
-
"etag": '"
|
|
62
|
-
"mtime": "2026-06-
|
|
63
|
-
"size":
|
|
64
|
-
"path": "../public/assets/json-viewer-
|
|
65
|
-
},
|
|
66
|
-
"/assets/index-CIL46Z2y.css": {
|
|
67
|
-
"type": "text/css; charset=utf-8",
|
|
68
|
-
"etag": '"17078-OCA3ki0c0CZu1AhDXwlliM+a+qY"',
|
|
69
|
-
"mtime": "2026-06-20T06:54:35.499Z",
|
|
70
|
-
"size": 94328,
|
|
71
|
-
"path": "../public/assets/index-CIL46Z2y.css"
|
|
75
|
+
"etag": '"1e652-M43x58m2bH0hBJMNDpGZ/fDfT5s"',
|
|
76
|
+
"mtime": "2026-06-20T07:49:57.207Z",
|
|
77
|
+
"size": 124498,
|
|
78
|
+
"path": "../public/assets/json-viewer-BbU0n8eM.js"
|
|
72
79
|
},
|
|
73
|
-
"/assets/
|
|
80
|
+
"/assets/main-CZT_F-gu.js": {
|
|
74
81
|
"type": "text/javascript; charset=utf-8",
|
|
75
|
-
"etag": '"
|
|
76
|
-
"mtime": "2026-06-
|
|
77
|
-
"size":
|
|
78
|
-
"path": "../public/assets/
|
|
82
|
+
"etag": '"5138c-VrHslavJjlr9YgDZ13bVuWsHMqQ"',
|
|
83
|
+
"mtime": "2026-06-20T07:49:57.207Z",
|
|
84
|
+
"size": 332684,
|
|
85
|
+
"path": "../public/assets/main-CZT_F-gu.js"
|
|
79
86
|
},
|
|
80
|
-
"/assets/
|
|
87
|
+
"/assets/ReplayDialog-CxUk_TF0.js": {
|
|
81
88
|
"type": "text/javascript; charset=utf-8",
|
|
82
|
-
"etag": '"
|
|
83
|
-
"mtime": "2026-06-
|
|
84
|
-
"size":
|
|
85
|
-
"path": "../public/assets/
|
|
89
|
+
"etag": '"11c0-esa6w7Upc98DpnzYsJtOduS9W7w"',
|
|
90
|
+
"mtime": "2026-06-20T07:49:57.207Z",
|
|
91
|
+
"size": 4544,
|
|
92
|
+
"path": "../public/assets/ReplayDialog-CxUk_TF0.js"
|
|
86
93
|
},
|
|
87
|
-
"/assets/RequestAnatomy-
|
|
94
|
+
"/assets/RequestAnatomy-DIlzjgjJ.js": {
|
|
88
95
|
"type": "text/javascript; charset=utf-8",
|
|
89
|
-
"etag": '"142a-
|
|
90
|
-
"mtime": "2026-06-
|
|
96
|
+
"etag": '"142a-Say/U0wBSXeJXbMdzIFCiD2Yq8o"',
|
|
97
|
+
"mtime": "2026-06-20T07:49:57.207Z",
|
|
91
98
|
"size": 5162,
|
|
92
|
-
"path": "../public/assets/RequestAnatomy-
|
|
99
|
+
"path": "../public/assets/RequestAnatomy-DIlzjgjJ.js"
|
|
100
|
+
},
|
|
101
|
+
"/assets/ResponseView-DQCuKJ1G.js": {
|
|
102
|
+
"type": "text/javascript; charset=utf-8",
|
|
103
|
+
"etag": '"6c88-pdMfEcfub7CjHnge4PzxOHEcbPE"',
|
|
104
|
+
"mtime": "2026-06-20T07:49:57.207Z",
|
|
105
|
+
"size": 27784,
|
|
106
|
+
"path": "../public/assets/ResponseView-DQCuKJ1G.js"
|
|
93
107
|
},
|
|
94
108
|
"/assets/zhipuai-BPNAnxo-.svg": {
|
|
95
109
|
"type": "image/svg+xml",
|
|
96
110
|
"etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
|
|
97
|
-
"mtime": "2026-06-
|
|
111
|
+
"mtime": "2026-06-20T07:49:57.206Z",
|
|
98
112
|
"size": 11256,
|
|
99
113
|
"path": "../public/assets/zhipuai-BPNAnxo-.svg"
|
|
100
114
|
},
|
|
101
|
-
"/assets/main-FSGUGtEL.js": {
|
|
102
|
-
"type": "text/javascript; charset=utf-8",
|
|
103
|
-
"etag": '"5138c-aZy2XlKYAw/+FTrgYI1Iz4MHtww"',
|
|
104
|
-
"mtime": "2026-06-20T06:54:35.500Z",
|
|
105
|
-
"size": 332684,
|
|
106
|
-
"path": "../public/assets/main-FSGUGtEL.js"
|
|
107
|
-
},
|
|
108
|
-
"/assets/ProxyViewerContainer-USuxPy-K.js": {
|
|
109
|
-
"type": "text/javascript; charset=utf-8",
|
|
110
|
-
"etag": '"774b9-fxnez8ICkM1Nb7unXdv1GIz+RbA"',
|
|
111
|
-
"mtime": "2026-06-20T06:54:35.500Z",
|
|
112
|
-
"size": 488633,
|
|
113
|
-
"path": "../public/assets/ProxyViewerContainer-USuxPy-K.js"
|
|
114
|
-
},
|
|
115
|
-
"/assets/_sessionId-D_SeK_qp.js": {
|
|
116
|
-
"type": "text/javascript; charset=utf-8",
|
|
117
|
-
"etag": '"d2-pqW14/f9UjxfuYAzRgQmGaiZhbs"',
|
|
118
|
-
"mtime": "2026-06-20T06:54:35.500Z",
|
|
119
|
-
"size": 210,
|
|
120
|
-
"path": "../public/assets/_sessionId-D_SeK_qp.js"
|
|
121
|
-
},
|
|
122
|
-
"/assets/ResponseView-BNGyc8e_.js": {
|
|
123
|
-
"type": "text/javascript; charset=utf-8",
|
|
124
|
-
"etag": '"6e91-De46gQnfLBYdkbMBsXcKinAu7mE"',
|
|
125
|
-
"mtime": "2026-06-20T06:54:35.501Z",
|
|
126
|
-
"size": 28305,
|
|
127
|
-
"path": "../public/assets/ResponseView-BNGyc8e_.js"
|
|
128
|
-
},
|
|
129
115
|
"/assets/qwen-CONDcHqt.png": {
|
|
130
116
|
"type": "image/png",
|
|
131
117
|
"etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
|
|
132
|
-
"mtime": "2026-06-
|
|
118
|
+
"mtime": "2026-06-20T07:49:57.206Z",
|
|
133
119
|
"size": 357059,
|
|
134
120
|
"path": "../public/assets/qwen-CONDcHqt.png"
|
|
135
121
|
},
|
|
136
|
-
"/assets/
|
|
122
|
+
"/assets/_sessionId-dY1TTl7N.js": {
|
|
137
123
|
"type": "text/javascript; charset=utf-8",
|
|
138
|
-
"etag": '"
|
|
139
|
-
"mtime": "2026-06-
|
|
140
|
-
"size":
|
|
141
|
-
"path": "../public/assets/
|
|
124
|
+
"etag": '"d2-gUdCO5tW0loAHOM6KOFd73K/+Es"',
|
|
125
|
+
"mtime": "2026-06-20T07:49:57.206Z",
|
|
126
|
+
"size": 210,
|
|
127
|
+
"path": "../public/assets/_sessionId-dY1TTl7N.js"
|
|
128
|
+
},
|
|
129
|
+
"/assets/ProxyViewerContainer-Da0jpBkp.js": {
|
|
130
|
+
"type": "text/javascript; charset=utf-8",
|
|
131
|
+
"etag": '"79801-1JDGhvSsOIGys3Enbh6ed4oyMoE"',
|
|
132
|
+
"mtime": "2026-06-20T07:49:57.207Z",
|
|
133
|
+
"size": 497665,
|
|
134
|
+
"path": "../public/assets/ProxyViewerContainer-Da0jpBkp.js"
|
|
135
|
+
},
|
|
136
|
+
"/assets/StreamingChunkSequence-DHk4SGGL.js": {
|
|
137
|
+
"type": "text/javascript; charset=utf-8",
|
|
138
|
+
"etag": '"d81-q+WustPR2MRDE/q2wIQ/H/VHcAc"',
|
|
139
|
+
"mtime": "2026-06-20T07:49:57.207Z",
|
|
140
|
+
"size": 3457,
|
|
141
|
+
"path": "../public/assets/StreamingChunkSequence-DHk4SGGL.js"
|
|
142
142
|
}
|
|
143
143
|
};
|
|
144
144
|
function readAsset(id) {
|
package/README.md
CHANGED
|
@@ -28,7 +28,8 @@ therefore appears in Task Manager as **Agent Inspector <version>** with the
|
|
|
28
28
|
project icon. The executable also carries standard `FileVersion` and
|
|
29
29
|
`ProductVersion` metadata for the installed package version. If npm lifecycle
|
|
30
30
|
scripts are disabled, Agent Inspector falls back to `node.exe` and keeps
|
|
31
|
-
working normally.
|
|
31
|
+
working normally. Set `AGENT_INSPECTOR_SKIP_WINDOWS_RUNTIME=1` to skip the
|
|
32
|
+
Windows runtime metadata step explicitly.
|
|
32
33
|
|
|
33
34
|
For Linux containers, the Windows runtime setup is a no-op. To keep images lean,
|
|
34
35
|
install with optional dependencies omitted:
|
|
@@ -51,7 +52,9 @@ The onboarding command installs guided setup skills for local agents:
|
|
|
51
52
|
|
|
52
53
|
During npm global install, Agent Inspector also makes a best-effort Codex skill install when
|
|
53
54
|
`~/.codex` already exists. Set `AGENT_INSPECTOR_SKIP_CODEX_SKILL=1` to skip that postinstall step,
|
|
54
|
-
|
|
55
|
+
set `AGENT_INSPECTOR_INSTALL_CODEX_SKILL=1` to attempt it even before `~/.codex` exists, or run
|
|
56
|
+
`agent-inspector onboard --codex-only --force` later to refresh it. For a full refresh of all
|
|
57
|
+
generated onboarding files, run `agent-inspector onboard --force`.
|
|
55
58
|
|
|
56
59
|
For local development from source:
|
|
57
60
|
|