@tonyclaw/agent-inspector 3.0.23 → 3.0.25
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-CFedvZHU.js → CompareDrawer-BnvOPwpe.js} +1 -1
- package/.output/public/assets/ProxyViewerContainer-DcqFqo1m.js +127 -0
- package/.output/public/assets/{ReplayDialog-X-fRSKAu.js → ReplayDialog-BJgoQWdW.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-S8qB5nVg.js → RequestAnatomy-CpBZEHnM.js} +1 -1
- package/.output/public/assets/{ResponseView-_rcOWSwJ.js → ResponseView-CWmyRb2M.js} +2 -2
- package/.output/public/assets/{StreamingChunkSequence-Bc15AVpN.js → StreamingChunkSequence-BWhC8bwx.js} +1 -1
- package/.output/public/assets/{_sessionId-Cz-HW2Wf.js → _sessionId-Cq-2OqUU.js} +1 -1
- package/.output/public/assets/{index-CEgwWY3E.js → index-BKi9IRtV.js} +71 -7
- package/.output/public/assets/index-BMYuDL5X.css +1 -0
- package/.output/public/assets/{index-CXYBU0j8.js → index-Cf8O0Oos.js} +1 -1
- package/.output/public/assets/{index-ClKXooQd.js → index-DdgTJ4QJ.js} +1 -1
- package/.output/public/assets/{json-viewer-QfU4qGdd.js → json-viewer-Bqu_4hmm.js} +1 -1
- package/.output/server/_libs/lucide-react.mjs +306 -246
- package/.output/server/{_sessionId-9FAmYZVf.mjs → _sessionId-Ba7H3Gjw.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-BLKjOzwD.mjs → CompareDrawer-aH59Ab6x.mjs} +3 -3
- package/.output/server/_ssr/{ProxyViewerContainer-Dcs2Mq8l.mjs → ProxyViewerContainer-By-I0tJv.mjs} +1791 -1259
- package/.output/server/_ssr/{ReplayDialog-oyiF4LIo.mjs → ReplayDialog-BO4Vy0et.mjs} +4 -4
- package/.output/server/_ssr/{RequestAnatomy-DkyQXSuj.mjs → RequestAnatomy-FtOr7vSS.mjs} +3 -3
- package/.output/server/_ssr/{ResponseView-3NTDEiDh.mjs → ResponseView-cvw6ajue.mjs} +3 -3
- package/.output/server/_ssr/{StreamingChunkSequence-DRq-5Bgn.mjs → StreamingChunkSequence-Oc8S2kD6.mjs} +3 -3
- package/.output/server/_ssr/{index-dtMiNUa1.mjs → index-BDRlQheR.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{json-viewer-BhUwicvp.mjs → json-viewer-Cd6trhQr.mjs} +3 -3
- package/.output/server/_ssr/{router-DO0OntUK.mjs → router-bofP-Ekl.mjs} +296 -91
- package/.output/server/{_tanstack-start-manifest_v-DO5v3BHY.mjs → _tanstack-start-manifest_v-BPuf86qB.mjs} +1 -1
- package/.output/server/index.mjs +76 -76
- package/package.json +3 -2
- package/src/components/ProxyViewer.tsx +138 -740
- package/src/components/ProxyViewerContainer.tsx +5 -47
- package/src/components/alerts/AlertsDialog.tsx +6 -2
- package/src/components/inspector-pet/InspectorPet.tsx +390 -0
- package/src/components/inspector-pet/inspectorPetLogic.ts +273 -0
- package/src/components/providers/ProviderCard.tsx +20 -579
- package/src/components/providers/ProviderTestResultsView.tsx +732 -0
- package/src/components/proxy-viewer/LogEntry.tsx +5 -0
- package/src/components/proxy-viewer/LogEntryHeader.tsx +7 -0
- package/src/components/proxy-viewer/ToolTraceEvents.tsx +33 -36
- package/src/components/proxy-viewer/TurnGroup.tsx +1 -5
- package/src/components/proxy-viewer/proxyViewerContainerLogic.ts +46 -0
- package/src/components/proxy-viewer/proxyViewerLogic.ts +469 -0
- package/src/lib/themeMode.ts +45 -0
- package/src/lib/uiScale.ts +112 -0
- package/src/lib/useThemeMode.ts +40 -0
- package/src/lib/useUiScale.ts +52 -0
- package/src/routes/__root.tsx +78 -1
- package/styles/globals.css +403 -24
- package/.output/public/assets/ProxyViewerContainer-BlCrBvdm.js +0 -127
- package/.output/public/assets/index-B_SIQ47i.css +0 -1
|
@@ -64,7 +64,7 @@ import "../_libs/immediate.mjs";
|
|
|
64
64
|
import "../_libs/setimmediate.mjs";
|
|
65
65
|
import "../_libs/pako.mjs";
|
|
66
66
|
const faviconSvg = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20role='img'%20aria-label='Agent%20Inspector'%3e%3cg%20fill='none'%20stroke='%23f59e0b'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'%20%3e%3cpath%20d='M5%2013%20C5%209%208%207%2012%207%20C16%207%2019%209%2019%2013%20C19%2016%2016%2018%2012%2018%20C8%2018%205%2016%205%2013%20Z'%20/%3e%3cpath%20d='M5%2011%20C3.5%209.5%201.5%2010%202%2012.5%20C2.5%2014%204%2013.5%205%2012.5'%20/%3e%3cpath%20d='M19%2011%20C20.5%209.5%2022.5%2010%2022%2012.5%20C21.5%2014%2020%2013.5%2019%2012.5'%20/%3e%3cline%20x1='10'%20y1='7'%20x2='9.5'%20y2='5'%20/%3e%3cline%20x1='14'%20y1='7'%20x2='14.5'%20y2='5'%20/%3e%3cline%20x1='6.5'%20y1='16'%20x2='4.5'%20y2='19.5'%20/%3e%3cline%20x1='9'%20y1='17.5'%20x2='8'%20y2='20.5'%20/%3e%3cline%20x1='15'%20y1='17.5'%20x2='16'%20y2='20.5'%20/%3e%3cline%20x1='17.5'%20y1='16'%20x2='19.5'%20y2='19.5'%20/%3e%3c/g%3e%3ccircle%20cx='9.5'%20cy='4.5'%20r='0.9'%20fill='%23f59e0b'%20/%3e%3ccircle%20cx='14.5'%20cy='4.5'%20r='0.9'%20fill='%23f59e0b'%20/%3e%3c/svg%3e";
|
|
67
|
-
const appCss = "/assets/index-
|
|
67
|
+
const appCss = "/assets/index-BMYuDL5X.css";
|
|
68
68
|
const CHUNK_LOAD_RELOAD_AT_KEY = "agent-inspector.chunkLoadReloadAt";
|
|
69
69
|
const CHUNK_LOAD_RELOAD_WINDOW_MS = 15e3;
|
|
70
70
|
const CHUNK_LOAD_FAILURE_PATTERNS = [
|
|
@@ -133,6 +133,196 @@ function installChunkLoadRecovery() {
|
|
|
133
133
|
window.removeEventListener("error", handleError);
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
+
const THEME_MODE_STORAGE_KEY = "agent-inspector.theme";
|
|
137
|
+
function normalizeThemeMode(value) {
|
|
138
|
+
switch (value) {
|
|
139
|
+
case "light":
|
|
140
|
+
return "light";
|
|
141
|
+
case "dark":
|
|
142
|
+
return "dark";
|
|
143
|
+
case "eye-care":
|
|
144
|
+
return "eye-care";
|
|
145
|
+
case null:
|
|
146
|
+
return "dark";
|
|
147
|
+
default:
|
|
148
|
+
return "dark";
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function applyThemeMode(themeMode) {
|
|
152
|
+
if (typeof document === "undefined") return;
|
|
153
|
+
const root = document.documentElement;
|
|
154
|
+
root.classList.toggle("dark", themeMode === "dark");
|
|
155
|
+
root.classList.toggle("eye-care", themeMode === "eye-care");
|
|
156
|
+
root.dataset.theme = themeMode;
|
|
157
|
+
root.style.colorScheme = themeMode === "dark" ? "dark" : "light";
|
|
158
|
+
}
|
|
159
|
+
function readStoredThemeMode() {
|
|
160
|
+
if (typeof window === "undefined") return "dark";
|
|
161
|
+
try {
|
|
162
|
+
return normalizeThemeMode(window.localStorage.getItem(THEME_MODE_STORAGE_KEY));
|
|
163
|
+
} catch {
|
|
164
|
+
return "dark";
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function persistThemeMode(themeMode) {
|
|
168
|
+
if (typeof window === "undefined") return;
|
|
169
|
+
try {
|
|
170
|
+
window.localStorage.setItem(THEME_MODE_STORAGE_KEY, themeMode);
|
|
171
|
+
} catch {
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
const UI_SCALE_STORAGE_KEY = "agent-inspector.uiScale";
|
|
175
|
+
const UI_SCALE_AUTO_MAX_DPR = 1.25;
|
|
176
|
+
const UI_SCALE_AUTO_MEDIUM_WIDTH = 2200;
|
|
177
|
+
const UI_SCALE_AUTO_LARGE_WIDTH = 3e3;
|
|
178
|
+
function positiveFinite(value, fallback) {
|
|
179
|
+
return Number.isFinite(value) && value > 0 ? value : fallback;
|
|
180
|
+
}
|
|
181
|
+
function normalizeUiScalePreference(value) {
|
|
182
|
+
switch (value) {
|
|
183
|
+
case "auto":
|
|
184
|
+
return "auto";
|
|
185
|
+
case "100":
|
|
186
|
+
return "100";
|
|
187
|
+
case "125":
|
|
188
|
+
return "125";
|
|
189
|
+
case "150":
|
|
190
|
+
return "150";
|
|
191
|
+
case null:
|
|
192
|
+
return "auto";
|
|
193
|
+
default:
|
|
194
|
+
return "auto";
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
function resolveUiScale(preference, environment) {
|
|
198
|
+
switch (preference) {
|
|
199
|
+
case "100":
|
|
200
|
+
return 1;
|
|
201
|
+
case "125":
|
|
202
|
+
return 1.25;
|
|
203
|
+
case "150":
|
|
204
|
+
return 1.5;
|
|
205
|
+
case "auto": {
|
|
206
|
+
const viewportWidth = positiveFinite(environment.viewportWidth, 1280);
|
|
207
|
+
const screenWidth = positiveFinite(environment.screenWidth, viewportWidth);
|
|
208
|
+
const devicePixelRatio = positiveFinite(environment.devicePixelRatio, 1);
|
|
209
|
+
const availableWidth = Math.min(viewportWidth, screenWidth);
|
|
210
|
+
if (devicePixelRatio > UI_SCALE_AUTO_MAX_DPR) return 1;
|
|
211
|
+
if (availableWidth >= UI_SCALE_AUTO_LARGE_WIDTH) return 1.25;
|
|
212
|
+
if (availableWidth >= UI_SCALE_AUTO_MEDIUM_WIDTH) return 1.125;
|
|
213
|
+
return 1;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
function formatUiScale(scale) {
|
|
218
|
+
return `${Math.round(scale * 100)}%`;
|
|
219
|
+
}
|
|
220
|
+
function readUiScaleEnvironment() {
|
|
221
|
+
if (typeof window === "undefined") {
|
|
222
|
+
return { viewportWidth: 1280, screenWidth: 1280, devicePixelRatio: 1 };
|
|
223
|
+
}
|
|
224
|
+
const screenWidth = typeof window.screen === "undefined" ? window.innerWidth : window.screen.availWidth;
|
|
225
|
+
return {
|
|
226
|
+
viewportWidth: window.innerWidth,
|
|
227
|
+
screenWidth,
|
|
228
|
+
devicePixelRatio: window.devicePixelRatio
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
function applyUiScalePreference(preference) {
|
|
232
|
+
const scale = resolveUiScale(preference, readUiScaleEnvironment());
|
|
233
|
+
if (typeof document === "undefined") return scale;
|
|
234
|
+
const root = document.documentElement;
|
|
235
|
+
root.dataset.uiScale = preference;
|
|
236
|
+
root.dataset.uiScaleResolved = String(Math.round(scale * 100));
|
|
237
|
+
root.style.setProperty("--inspector-ui-scale", String(scale));
|
|
238
|
+
root.style.setProperty("--inspector-root-font-size", `${String(16 * scale)}px`);
|
|
239
|
+
root.style.setProperty("--inspector-font-9", `${String(9 * scale)}px`);
|
|
240
|
+
root.style.setProperty("--inspector-font-10", `${String(10 * scale)}px`);
|
|
241
|
+
root.style.setProperty("--inspector-font-11", `${String(11 * scale)}px`);
|
|
242
|
+
root.style.setProperty("--inspector-font-13", `${String(13 * scale)}px`);
|
|
243
|
+
return scale;
|
|
244
|
+
}
|
|
245
|
+
function readStoredUiScalePreference() {
|
|
246
|
+
if (typeof window === "undefined") return "auto";
|
|
247
|
+
try {
|
|
248
|
+
return normalizeUiScalePreference(window.localStorage.getItem(UI_SCALE_STORAGE_KEY));
|
|
249
|
+
} catch {
|
|
250
|
+
return "auto";
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
function persistUiScalePreference(preference) {
|
|
254
|
+
if (typeof window === "undefined") return;
|
|
255
|
+
try {
|
|
256
|
+
window.localStorage.setItem(UI_SCALE_STORAGE_KEY, preference);
|
|
257
|
+
} catch {
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
const themeModeBootstrapScript = `
|
|
261
|
+
(function () {
|
|
262
|
+
try {
|
|
263
|
+
var storedThemeMode = window.localStorage.getItem("${THEME_MODE_STORAGE_KEY}");
|
|
264
|
+
var themeMode = storedThemeMode === "light" || storedThemeMode === "eye-care"
|
|
265
|
+
? storedThemeMode
|
|
266
|
+
: "dark";
|
|
267
|
+
var root = document.documentElement;
|
|
268
|
+
root.classList.toggle("dark", themeMode === "dark");
|
|
269
|
+
root.classList.toggle("eye-care", themeMode === "eye-care");
|
|
270
|
+
root.dataset.theme = themeMode;
|
|
271
|
+
root.style.colorScheme = themeMode === "dark" ? "dark" : "light";
|
|
272
|
+
} catch (error) {
|
|
273
|
+
document.documentElement.classList.add("dark");
|
|
274
|
+
document.documentElement.classList.remove("eye-care");
|
|
275
|
+
document.documentElement.dataset.theme = "dark";
|
|
276
|
+
document.documentElement.style.colorScheme = "dark";
|
|
277
|
+
}
|
|
278
|
+
})();
|
|
279
|
+
`;
|
|
280
|
+
const uiScaleBootstrapScript = `
|
|
281
|
+
(function () {
|
|
282
|
+
try {
|
|
283
|
+
var storedUiScale = window.localStorage.getItem("${UI_SCALE_STORAGE_KEY}");
|
|
284
|
+
var uiScalePreference = storedUiScale === "100" || storedUiScale === "125" || storedUiScale === "150"
|
|
285
|
+
? storedUiScale
|
|
286
|
+
: "auto";
|
|
287
|
+
var resolvedUiScale = 1;
|
|
288
|
+
if (uiScalePreference === "125") resolvedUiScale = 1.25;
|
|
289
|
+
if (uiScalePreference === "150") resolvedUiScale = 1.5;
|
|
290
|
+
if (uiScalePreference === "auto") {
|
|
291
|
+
var viewportWidth = Number.isFinite(window.innerWidth) && window.innerWidth > 0
|
|
292
|
+
? window.innerWidth
|
|
293
|
+
: 1280;
|
|
294
|
+
var rawScreenWidth = typeof window.screen === "undefined"
|
|
295
|
+
? viewportWidth
|
|
296
|
+
: window.screen.availWidth;
|
|
297
|
+
var screenWidth = Number.isFinite(rawScreenWidth) && rawScreenWidth > 0
|
|
298
|
+
? rawScreenWidth
|
|
299
|
+
: viewportWidth;
|
|
300
|
+
var rawDevicePixelRatio = window.devicePixelRatio;
|
|
301
|
+
var devicePixelRatio = Number.isFinite(rawDevicePixelRatio) && rawDevicePixelRatio > 0
|
|
302
|
+
? rawDevicePixelRatio
|
|
303
|
+
: 1;
|
|
304
|
+
var availableWidth = Math.min(viewportWidth, screenWidth);
|
|
305
|
+
if (devicePixelRatio <= ${String(UI_SCALE_AUTO_MAX_DPR)} && availableWidth >= ${String(UI_SCALE_AUTO_LARGE_WIDTH)}) {
|
|
306
|
+
resolvedUiScale = 1.25;
|
|
307
|
+
} else if (devicePixelRatio <= ${String(UI_SCALE_AUTO_MAX_DPR)} && availableWidth >= ${String(UI_SCALE_AUTO_MEDIUM_WIDTH)}) {
|
|
308
|
+
resolvedUiScale = 1.125;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
var root = document.documentElement;
|
|
312
|
+
root.dataset.uiScale = uiScalePreference;
|
|
313
|
+
root.dataset.uiScaleResolved = String(Math.round(resolvedUiScale * 100));
|
|
314
|
+
root.style.setProperty("--inspector-ui-scale", String(resolvedUiScale));
|
|
315
|
+
root.style.setProperty("--inspector-root-font-size", String(16 * resolvedUiScale) + "px");
|
|
316
|
+
root.style.setProperty("--inspector-font-9", String(9 * resolvedUiScale) + "px");
|
|
317
|
+
root.style.setProperty("--inspector-font-10", String(10 * resolvedUiScale) + "px");
|
|
318
|
+
root.style.setProperty("--inspector-font-11", String(11 * resolvedUiScale) + "px");
|
|
319
|
+
root.style.setProperty("--inspector-font-13", String(13 * resolvedUiScale) + "px");
|
|
320
|
+
} catch (error) {
|
|
321
|
+
document.documentElement.dataset.uiScale = "auto";
|
|
322
|
+
document.documentElement.dataset.uiScaleResolved = "100";
|
|
323
|
+
}
|
|
324
|
+
})();
|
|
325
|
+
`;
|
|
136
326
|
const Route$M = createRootRoute({
|
|
137
327
|
head: () => ({
|
|
138
328
|
meta: [
|
|
@@ -168,15 +358,19 @@ function RootNotFoundComponent() {
|
|
|
168
358
|
] }) }) }) });
|
|
169
359
|
}
|
|
170
360
|
function RootDocument({ children }) {
|
|
171
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("html", { lang: "en", className: "dark", suppressHydrationWarning: true, children: [
|
|
172
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
361
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("html", { lang: "en", className: "dark", "data-theme": "dark", suppressHydrationWarning: true, children: [
|
|
362
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("head", { children: [
|
|
363
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("script", { dangerouslySetInnerHTML: { __html: themeModeBootstrapScript } }),
|
|
364
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("script", { dangerouslySetInnerHTML: { __html: uiScaleBootstrapScript } }),
|
|
365
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(HeadContent, {})
|
|
366
|
+
] }),
|
|
173
367
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("body", { suppressHydrationWarning: true, children: [
|
|
174
368
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SWRConfig, { value: { revalidateOnFocus: false, revalidateIfStale: false }, children }),
|
|
175
369
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Scripts, {})
|
|
176
370
|
] })
|
|
177
371
|
] });
|
|
178
372
|
}
|
|
179
|
-
const $$splitComponentImporter$1 = () => import("./index-
|
|
373
|
+
const $$splitComponentImporter$1 = () => import("./index-BDRlQheR.mjs");
|
|
180
374
|
const Route$L = createFileRoute("/")({
|
|
181
375
|
ssr: false,
|
|
182
376
|
component: lazyRouteComponent($$splitComponentImporter$1, "component")
|
|
@@ -220,7 +414,7 @@ function decodeSessionIdFromPath(encoded) {
|
|
|
220
414
|
function getSessionPath(sessionId) {
|
|
221
415
|
return `/session/${encodeSessionIdForPath(sessionId)}`;
|
|
222
416
|
}
|
|
223
|
-
const $$splitComponentImporter = () => import("../_sessionId-
|
|
417
|
+
const $$splitComponentImporter = () => import("../_sessionId-Ba7H3Gjw.mjs");
|
|
224
418
|
const Route$K = createFileRoute("/session/$sessionId")({
|
|
225
419
|
ssr: false,
|
|
226
420
|
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
@@ -9003,28 +9197,28 @@ function formatList$1(values) {
|
|
|
9003
9197
|
function escapeHtml$1(value) {
|
|
9004
9198
|
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
9005
9199
|
}
|
|
9006
|
-
function buildMarkdown$1(
|
|
9007
|
-
const session =
|
|
9200
|
+
function buildMarkdown$1(document2) {
|
|
9201
|
+
const session = document2.session;
|
|
9008
9202
|
const lines = [
|
|
9009
|
-
`# ${
|
|
9203
|
+
`# ${document2.run.title}`,
|
|
9010
9204
|
"",
|
|
9011
|
-
`- Run ID: ${
|
|
9012
|
-
`- Session ID: ${
|
|
9013
|
-
`- Group ID: ${
|
|
9014
|
-
`- Status: ${
|
|
9015
|
-
`- Project: ${
|
|
9016
|
-
`- Agent: ${
|
|
9017
|
-
`- Created: ${
|
|
9205
|
+
`- Run ID: ${document2.run.id}`,
|
|
9206
|
+
`- Session ID: ${document2.run.sessionId}`,
|
|
9207
|
+
`- Group ID: ${document2.run.groupId ?? "n/a"}`,
|
|
9208
|
+
`- Status: ${document2.run.status}`,
|
|
9209
|
+
`- Project: ${document2.run.project ?? "n/a"}`,
|
|
9210
|
+
`- Agent: ${document2.run.agent ?? "n/a"}`,
|
|
9211
|
+
`- Created: ${document2.run.createdAt}`,
|
|
9018
9212
|
"",
|
|
9019
|
-
`- Outcome: ${
|
|
9020
|
-
`- Failure Category: ${
|
|
9021
|
-
`- Severity: ${
|
|
9022
|
-
`- Evidence JSON: ${
|
|
9023
|
-
`- Evidence HTML: ${
|
|
9213
|
+
`- Outcome: ${document2.classification.outcome}`,
|
|
9214
|
+
`- Failure Category: ${document2.classification.category}`,
|
|
9215
|
+
`- Severity: ${document2.classification.severity}`,
|
|
9216
|
+
`- Evidence JSON: ${document2.evidence.jsonPath}`,
|
|
9217
|
+
`- Evidence HTML: ${document2.evidence.htmlPath}`,
|
|
9024
9218
|
""
|
|
9025
9219
|
];
|
|
9026
|
-
if (
|
|
9027
|
-
lines.push("## Task", "",
|
|
9220
|
+
if (document2.run.task !== null) {
|
|
9221
|
+
lines.push("## Task", "", document2.run.task, "");
|
|
9028
9222
|
}
|
|
9029
9223
|
if (session === null) {
|
|
9030
9224
|
lines.push("## Session", "", "No Inspector session data was available for this run.", "");
|
|
@@ -9044,21 +9238,21 @@ function buildMarkdown$1(document) {
|
|
|
9044
9238
|
"",
|
|
9045
9239
|
"## Failure Classification",
|
|
9046
9240
|
"",
|
|
9047
|
-
|
|
9241
|
+
document2.classification.summary,
|
|
9048
9242
|
"",
|
|
9049
9243
|
"### Evidence Logs",
|
|
9050
9244
|
"",
|
|
9051
|
-
|
|
9245
|
+
document2.classification.evidenceLogIds.length > 0 ? document2.classification.evidenceLogIds.map((id) => `- #${id}`).join("\n") : "No failing log ids were identified.",
|
|
9052
9246
|
"",
|
|
9053
9247
|
"### Suggested Next Actions",
|
|
9054
9248
|
"",
|
|
9055
|
-
...
|
|
9249
|
+
...document2.classification.hints.map((hint) => `- ${hint}`),
|
|
9056
9250
|
"",
|
|
9057
9251
|
"## Run Timeline",
|
|
9058
9252
|
"",
|
|
9059
9253
|
"| Time | Event | Severity | Evidence |",
|
|
9060
9254
|
"| --- | --- | --- | --- |",
|
|
9061
|
-
...
|
|
9255
|
+
...document2.timeline.map((event) => {
|
|
9062
9256
|
const evidence = event.logId === null ? "n/a" : `log ${event.logId}`;
|
|
9063
9257
|
return `| ${event.timestamp} | ${event.title} | ${event.severity} | ${evidence} |`;
|
|
9064
9258
|
}),
|
|
@@ -9082,7 +9276,7 @@ function buildMarkdown$1(document) {
|
|
|
9082
9276
|
lines.push("");
|
|
9083
9277
|
}
|
|
9084
9278
|
}
|
|
9085
|
-
lines.push("## Jenkins Report", "",
|
|
9279
|
+
lines.push("## Jenkins Report", "", document2.jenkinsReport.markdown, "");
|
|
9086
9280
|
return `${lines.join("\n")}
|
|
9087
9281
|
`;
|
|
9088
9282
|
}
|
|
@@ -9131,7 +9325,7 @@ async function exportRunEvidence(run, options, baseUrl) {
|
|
|
9131
9325
|
htmlPath: evidence.htmlPath
|
|
9132
9326
|
}
|
|
9133
9327
|
});
|
|
9134
|
-
const
|
|
9328
|
+
const document2 = {
|
|
9135
9329
|
run: documentRun,
|
|
9136
9330
|
evidence,
|
|
9137
9331
|
session,
|
|
@@ -9139,18 +9333,18 @@ async function exportRunEvidence(run, options, baseUrl) {
|
|
|
9139
9333
|
classification: analysis.classification,
|
|
9140
9334
|
jenkinsReport: analysis.jenkinsReport
|
|
9141
9335
|
};
|
|
9142
|
-
const markdown = buildMarkdown$1(
|
|
9336
|
+
const markdown = buildMarkdown$1(document2);
|
|
9143
9337
|
mkdirSync(evidenceDir(run.id), { recursive: true });
|
|
9144
9338
|
writeFileSync(
|
|
9145
9339
|
evidence.jsonPath,
|
|
9146
|
-
`${JSON.stringify({ ...
|
|
9340
|
+
`${JSON.stringify({ ...document2, evidence }, null, 2)}
|
|
9147
9341
|
`,
|
|
9148
9342
|
"utf8"
|
|
9149
9343
|
);
|
|
9150
9344
|
writeFileSync(evidence.markdownPath, markdown, "utf8");
|
|
9151
9345
|
writeFileSync(evidence.htmlPath, buildHtml$1(markdown, run.title), "utf8");
|
|
9152
9346
|
const updatedRun = updateRunEvidence(run.id, evidence) ?? documentRun;
|
|
9153
|
-
return { ...
|
|
9347
|
+
return { ...document2, run: updatedRun };
|
|
9154
9348
|
}
|
|
9155
9349
|
function readEvidenceMarkdown(run) {
|
|
9156
9350
|
const path2 = run.evidence?.markdownPath;
|
|
@@ -9191,29 +9385,29 @@ function syntheticFailedClassification(run) {
|
|
|
9191
9385
|
]
|
|
9192
9386
|
};
|
|
9193
9387
|
}
|
|
9194
|
-
function shouldIncludeRun(run,
|
|
9388
|
+
function shouldIncludeRun(run, document2, classification) {
|
|
9195
9389
|
if (run.status === "failed" || run.status === "cancelled") return true;
|
|
9196
|
-
if (
|
|
9390
|
+
if (document2 === null) return false;
|
|
9197
9391
|
return classification.outcome !== "success";
|
|
9198
9392
|
}
|
|
9199
|
-
function evidenceFor(run,
|
|
9200
|
-
return
|
|
9393
|
+
function evidenceFor(run, document2) {
|
|
9394
|
+
return document2?.evidence ?? run.evidence;
|
|
9201
9395
|
}
|
|
9202
|
-
function jenkinsReportFor(
|
|
9203
|
-
return
|
|
9396
|
+
function jenkinsReportFor(document2) {
|
|
9397
|
+
return document2?.jenkinsReport ?? null;
|
|
9204
9398
|
}
|
|
9205
9399
|
function failureFromRun(run) {
|
|
9206
|
-
const
|
|
9207
|
-
const classification =
|
|
9208
|
-
if (!shouldIncludeRun(run,
|
|
9209
|
-
const evidence = evidenceFor(run,
|
|
9400
|
+
const document2 = readEvidenceDocument(run);
|
|
9401
|
+
const classification = document2 === null ? syntheticFailedClassification(run) : document2.classification;
|
|
9402
|
+
if (!shouldIncludeRun(run, document2, classification)) return null;
|
|
9403
|
+
const evidence = evidenceFor(run, document2);
|
|
9210
9404
|
return {
|
|
9211
9405
|
run,
|
|
9212
9406
|
classification,
|
|
9213
9407
|
evidence,
|
|
9214
|
-
jenkinsReport: jenkinsReportFor(
|
|
9408
|
+
jenkinsReport: jenkinsReportFor(document2),
|
|
9215
9409
|
sessionId: run.sessionId,
|
|
9216
|
-
inspectorUrl:
|
|
9410
|
+
inspectorUrl: document2?.session?.inspectorUrl ?? null,
|
|
9217
9411
|
evidenceMarkdownPath: evidence?.markdownPath ?? null,
|
|
9218
9412
|
updatedAt: evidence?.exportedAt ?? run.updatedAt
|
|
9219
9413
|
};
|
|
@@ -9786,7 +9980,7 @@ const Route$E = createFileRoute("/api/models")({
|
|
|
9786
9980
|
}
|
|
9787
9981
|
});
|
|
9788
9982
|
const name = "@tonyclaw/agent-inspector";
|
|
9789
|
-
const version = "3.0.
|
|
9983
|
+
const version = "3.0.25";
|
|
9790
9984
|
const packageJson = {
|
|
9791
9985
|
name,
|
|
9792
9986
|
version
|
|
@@ -10058,9 +10252,9 @@ function buildMemberRows(members) {
|
|
|
10058
10252
|
rows.push("");
|
|
10059
10253
|
return rows;
|
|
10060
10254
|
}
|
|
10061
|
-
function buildMarkdown(
|
|
10062
|
-
const group =
|
|
10063
|
-
const summary =
|
|
10255
|
+
function buildMarkdown(document2) {
|
|
10256
|
+
const group = document2.group;
|
|
10257
|
+
const summary = document2.summary;
|
|
10064
10258
|
const lines = [
|
|
10065
10259
|
`# ${group.title}`,
|
|
10066
10260
|
"",
|
|
@@ -10077,15 +10271,15 @@ function buildMarkdown(document) {
|
|
|
10077
10271
|
`- Tokens: ${summary.tokenUsage.total}`,
|
|
10078
10272
|
`- Models: ${summary.models.length > 0 ? summary.models.join(", ") : "n/a"}`,
|
|
10079
10273
|
`- Providers: ${summary.providers.length > 0 ? summary.providers.join(", ") : "n/a"}`,
|
|
10080
|
-
`- Evidence JSON: ${
|
|
10081
|
-
`- Evidence HTML: ${
|
|
10274
|
+
`- Evidence JSON: ${document2.evidence.jsonPath}`,
|
|
10275
|
+
`- Evidence HTML: ${document2.evidence.htmlPath}`,
|
|
10082
10276
|
""
|
|
10083
10277
|
];
|
|
10084
10278
|
if (group.task !== null) {
|
|
10085
10279
|
lines.push("## Task", "", group.task, "");
|
|
10086
10280
|
}
|
|
10087
|
-
lines.push("## Evaluation Matrix", "", ...buildMemberRows(
|
|
10088
|
-
lines.push("## Jenkins Report", "",
|
|
10281
|
+
lines.push("## Evaluation Matrix", "", ...buildMemberRows(document2.members));
|
|
10282
|
+
lines.push("## Jenkins Report", "", document2.jenkinsReport.markdown, "");
|
|
10089
10283
|
return `${lines.join("\n")}
|
|
10090
10284
|
`;
|
|
10091
10285
|
}
|
|
@@ -10135,21 +10329,21 @@ async function exportGroupEvidence(group, options, baseUrl) {
|
|
|
10135
10329
|
};
|
|
10136
10330
|
const summary = buildSummary(members);
|
|
10137
10331
|
const jenkinsReport = buildJenkinsReport(documentGroup, summary);
|
|
10138
|
-
const
|
|
10332
|
+
const document2 = {
|
|
10139
10333
|
group: documentGroup,
|
|
10140
10334
|
evidence,
|
|
10141
10335
|
members,
|
|
10142
10336
|
summary,
|
|
10143
10337
|
jenkinsReport
|
|
10144
10338
|
};
|
|
10145
|
-
const markdown = buildMarkdown(
|
|
10339
|
+
const markdown = buildMarkdown(document2);
|
|
10146
10340
|
mkdirSync(groupEvidenceDir(group.id), { recursive: true });
|
|
10147
|
-
writeFileSync(evidence.jsonPath, `${JSON.stringify(
|
|
10341
|
+
writeFileSync(evidence.jsonPath, `${JSON.stringify(document2, null, 2)}
|
|
10148
10342
|
`, "utf8");
|
|
10149
10343
|
writeFileSync(evidence.markdownPath, markdown, "utf8");
|
|
10150
10344
|
writeFileSync(evidence.htmlPath, buildHtml(markdown, group.title), "utf8");
|
|
10151
10345
|
const updatedGroup = updateGroupEvidence(group.id, evidence) ?? documentGroup;
|
|
10152
|
-
return { ...
|
|
10346
|
+
return { ...document2, group: updatedGroup };
|
|
10153
10347
|
}
|
|
10154
10348
|
function readGroupEvidenceMarkdown(group) {
|
|
10155
10349
|
const path2 = group.evidence?.markdownPath;
|
|
@@ -10217,14 +10411,14 @@ function readInspectorGroupEvidence(groupId) {
|
|
|
10217
10411
|
if (group.evidence === null || markdown === null) {
|
|
10218
10412
|
return serviceError("not-exported", 404, "Evidence has not been exported for this group");
|
|
10219
10413
|
}
|
|
10220
|
-
const
|
|
10414
|
+
const document2 = readGroupEvidenceDocument(group);
|
|
10221
10415
|
return serviceOk({
|
|
10222
10416
|
group,
|
|
10223
10417
|
evidence: group.evidence,
|
|
10224
|
-
members:
|
|
10418
|
+
members: document2?.members ?? null,
|
|
10225
10419
|
markdown,
|
|
10226
|
-
summary:
|
|
10227
|
-
report:
|
|
10420
|
+
summary: document2?.summary ?? null,
|
|
10421
|
+
report: document2?.jenkinsReport ?? null
|
|
10228
10422
|
});
|
|
10229
10423
|
}
|
|
10230
10424
|
const DEFAULT_TIMEOUT_MS = 3e4;
|
|
@@ -18582,52 +18776,63 @@ const router = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
18582
18776
|
getRouter
|
|
18583
18777
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
18584
18778
|
export {
|
|
18779
|
+
PiAgentResponseSchema as $,
|
|
18585
18780
|
AnthropicResponseSchema$1 as A,
|
|
18586
|
-
|
|
18781
|
+
GroupEvidenceExportResultSchema as B,
|
|
18587
18782
|
CapturedLogSchema as C,
|
|
18588
18783
|
DEFAULT_CAPTURE_MODE as D,
|
|
18589
|
-
|
|
18590
|
-
|
|
18784
|
+
DeleteInspectorGroupResponseSchema as E,
|
|
18785
|
+
providerHasContextMetadata as F,
|
|
18591
18786
|
GroupEvidenceReadResponseSchema as G,
|
|
18592
|
-
|
|
18787
|
+
maskApiKey as H,
|
|
18593
18788
|
InspectorGroupsListResponseSchema as I,
|
|
18594
|
-
|
|
18789
|
+
findProviderModelMetadata as J,
|
|
18595
18790
|
KnowledgeCandidateSchema as K,
|
|
18596
18791
|
LogBodyChunkSchema as L,
|
|
18597
|
-
|
|
18598
|
-
|
|
18792
|
+
PATH_V1_MESSAGES as M,
|
|
18793
|
+
PATH_V1_CHAT_COMPLETIONS as N,
|
|
18599
18794
|
OpenAIRequestSchema as O,
|
|
18600
18795
|
ProviderConfigSchema as P,
|
|
18601
|
-
|
|
18796
|
+
PATH_V1_RESPONSES as Q,
|
|
18602
18797
|
Route$K as R,
|
|
18603
|
-
|
|
18604
|
-
|
|
18605
|
-
|
|
18606
|
-
|
|
18798
|
+
previewUpstreamUrl as S,
|
|
18799
|
+
THEME_MODE_STORAGE_KEY as T,
|
|
18800
|
+
UI_SCALE_STORAGE_KEY as U,
|
|
18801
|
+
createPendingProviderTestResults as V,
|
|
18802
|
+
ProviderTestResultsSchema as W,
|
|
18803
|
+
createFailedProviderTestResults as X,
|
|
18804
|
+
MAX_SLOW_RESPONSE_THRESHOLD_SECONDS as Y,
|
|
18805
|
+
MAX_PROVIDER_TEST_TIMEOUT_SECONDS as Z,
|
|
18806
|
+
TimeDisplayFormatSchema as _,
|
|
18607
18807
|
DEFAULT_SLOW_RESPONSE_THRESHOLD_SECONDS as a,
|
|
18808
|
+
resolveProviderContextWindow as a0,
|
|
18809
|
+
isPlainRecord as a1,
|
|
18810
|
+
formatUiScale as a2,
|
|
18811
|
+
StreamingChunkSchema$1 as a3,
|
|
18812
|
+
router as a4,
|
|
18608
18813
|
DEFAULT_PROVIDER_TEST_TIMEOUT_SECONDS as b,
|
|
18609
18814
|
DEFAULT_TIME_DISPLAY_FORMAT as c,
|
|
18610
18815
|
RuntimeConfigSchema as d,
|
|
18611
|
-
|
|
18612
|
-
|
|
18613
|
-
|
|
18614
|
-
|
|
18615
|
-
|
|
18616
|
-
|
|
18617
|
-
|
|
18618
|
-
|
|
18619
|
-
|
|
18620
|
-
|
|
18621
|
-
|
|
18816
|
+
applyThemeMode as e,
|
|
18817
|
+
persistThemeMode as f,
|
|
18818
|
+
readStoredUiScalePreference as g,
|
|
18819
|
+
persistUiScalePreference as h,
|
|
18820
|
+
applyUiScalePreference as i,
|
|
18821
|
+
normalizeUiScalePreference as j,
|
|
18822
|
+
AnthropicRequestSchema as k,
|
|
18823
|
+
parseOpenAIResponse as l,
|
|
18824
|
+
parseOpenAIResponsesResponse as m,
|
|
18825
|
+
normalizeThemeMode as n,
|
|
18826
|
+
OpenAIResponsesRequestSchema as o,
|
|
18622
18827
|
packageJson as p,
|
|
18623
|
-
|
|
18624
|
-
|
|
18828
|
+
apiFormatForPath as q,
|
|
18829
|
+
readStoredThemeMode as r,
|
|
18625
18830
|
safeGetOwnProperty as s,
|
|
18626
|
-
|
|
18627
|
-
|
|
18628
|
-
|
|
18629
|
-
|
|
18630
|
-
|
|
18631
|
-
|
|
18632
|
-
|
|
18831
|
+
getSessionPath as t,
|
|
18832
|
+
stripClaudeCodeBillingHeader as u,
|
|
18833
|
+
isTurnBoundary as v,
|
|
18834
|
+
extractStopReason as w,
|
|
18835
|
+
AlertSummarySchema as x,
|
|
18836
|
+
AlertListResponseSchema as y,
|
|
18837
|
+
DeleteInspectorGroupsResponseSchema as z
|
|
18633
18838
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const tsrStartManifest = () => ({ routes: { __root__: { filePath: "C:/Users/claw/workspace/agent-inspector/src/routes/__root.tsx", children: ["/", "/api/alerts", "/api/config", "/api/groups", "/api/health", "/api/logs", "/api/mcp", "/api/models", "/api/pi-agent", "/api/providers", "/api/runs", "/api/sessions", "/proxy/$", "/session/$sessionId", "/api/ecosystem/packages", "/api/ecosystem/tasks", "/api/knowledge/candidates", "/api/knowledge/project-context", "/api/knowledge/search", "/api/ecosystem/recipes/$recipeId/run", "/api/knowledge/sessions/$sessionId/candidates"], preloads: ["/assets/index-
|
|
1
|
+
const tsrStartManifest = () => ({ routes: { __root__: { filePath: "C:/Users/claw/workspace/agent-inspector/src/routes/__root.tsx", children: ["/", "/api/alerts", "/api/config", "/api/groups", "/api/health", "/api/logs", "/api/mcp", "/api/models", "/api/pi-agent", "/api/providers", "/api/runs", "/api/sessions", "/proxy/$", "/session/$sessionId", "/api/ecosystem/packages", "/api/ecosystem/tasks", "/api/knowledge/candidates", "/api/knowledge/project-context", "/api/knowledge/search", "/api/ecosystem/recipes/$recipeId/run", "/api/knowledge/sessions/$sessionId/candidates"], preloads: ["/assets/index-BKi9IRtV.js"], scripts: [{ attrs: { type: "module", async: true, src: "/assets/index-BKi9IRtV.js" } }] }, "/": { filePath: "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", children: void 0, preloads: ["/assets/index-DdgTJ4QJ.js", "/assets/ProxyViewerContainer-DcqFqo1m.js"] }, "/session/$sessionId": { filePath: "C:/Users/claw/workspace/agent-inspector/src/routes/session/$sessionId.tsx", children: void 0, preloads: ["/assets/_sessionId-Cq-2OqUU.js", "/assets/ProxyViewerContainer-DcqFqo1m.js"] } } });
|
|
2
2
|
export {
|
|
3
3
|
tsrStartManifest
|
|
4
4
|
};
|