@tonyclaw/agent-inspector 3.0.22 → 3.0.24

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.
Files changed (47) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{CompareDrawer-CaDAbX9q.js → CompareDrawer-BC52FYwn.js} +1 -1
  3. package/.output/public/assets/ProxyViewerContainer-WuChOrSS.js +127 -0
  4. package/.output/public/assets/{ReplayDialog-C5kb1Bj4.js → ReplayDialog-BcKsarKt.js} +1 -1
  5. package/.output/public/assets/{RequestAnatomy-CbPNLnlL.js → RequestAnatomy-DR0uGpCj.js} +1 -1
  6. package/.output/public/assets/{ResponseView-DyzW0Zfo.js → ResponseView-kxAAPfmn.js} +2 -2
  7. package/.output/public/assets/{StreamingChunkSequence-Cl8zJu0w.js → StreamingChunkSequence-YQR0PjQj.js} +1 -1
  8. package/.output/public/assets/{_sessionId-BeN8-5Ho.js → _sessionId-DRl-Y9om.js} +1 -1
  9. package/.output/public/assets/{index-BCHWOmF2.js → index-CQbrc-hi.js} +71 -7
  10. package/.output/public/assets/{index-DcFtdKF3.js → index-CcSIBI4L.js} +1 -1
  11. package/.output/public/assets/index-DQeXi4Rv.css +1 -0
  12. package/.output/public/assets/{index-Pz9T7cS9.js → index-ZrMgyEZV.js} +1 -1
  13. package/.output/public/assets/{json-viewer-PNvFrOUw.js → json-viewer-CS5pwnEA.js} +1 -1
  14. package/.output/server/_libs/lucide-react.mjs +266 -234
  15. package/.output/server/{_sessionId-CIvbZsmt.mjs → _sessionId-BLk2xPkR.mjs} +2 -2
  16. package/.output/server/_ssr/{CompareDrawer-CtWPZP5T.mjs → CompareDrawer-Cw7Dseo3.mjs} +3 -3
  17. package/.output/server/_ssr/{ProxyViewerContainer-Dnm-Hup3.mjs → ProxyViewerContainer-D8SB0zyQ.mjs} +1124 -877
  18. package/.output/server/_ssr/{ReplayDialog-BYii7Q2m.mjs → ReplayDialog-B-YMhZkE.mjs} +4 -4
  19. package/.output/server/_ssr/{RequestAnatomy-CC6brPZr.mjs → RequestAnatomy-a9d8UTYZ.mjs} +2 -2
  20. package/.output/server/_ssr/{ResponseView-CwwkL_0d.mjs → ResponseView-PzaZS4CN.mjs} +3 -3
  21. package/.output/server/_ssr/{StreamingChunkSequence-CFsJzBLS.mjs → StreamingChunkSequence-C21_TCXk.mjs} +2 -2
  22. package/.output/server/_ssr/{index-B-Mm06YB.mjs → index-CrCeNP7H.mjs} +2 -2
  23. package/.output/server/_ssr/index.mjs +2 -2
  24. package/.output/server/_ssr/{json-viewer-D2MGmYZ0.mjs → json-viewer-Di2gxs9H.mjs} +3 -3
  25. package/.output/server/_ssr/{router-BwvN4eYE.mjs → router-BJzdUbcH.mjs} +296 -91
  26. package/.output/server/{_tanstack-start-manifest_v-Dpk8cafb.mjs → _tanstack-start-manifest_v-CGBTdAYC.mjs} +1 -1
  27. package/.output/server/index.mjs +64 -64
  28. package/package.json +6 -2
  29. package/src/components/ProxyViewer.tsx +136 -460
  30. package/src/components/ProxyViewerContainer.tsx +5 -47
  31. package/src/components/alerts/AlertsDialog.tsx +6 -2
  32. package/src/components/providers/ProviderCard.tsx +20 -579
  33. package/src/components/providers/ProviderTestResultsView.tsx +732 -0
  34. package/src/components/proxy-viewer/LogEntry.tsx +5 -0
  35. package/src/components/proxy-viewer/LogEntryHeader.tsx +7 -0
  36. package/src/components/proxy-viewer/ToolTraceEvents.tsx +33 -36
  37. package/src/components/proxy-viewer/TurnGroup.tsx +1 -5
  38. package/src/components/proxy-viewer/proxyViewerContainerLogic.ts +46 -0
  39. package/src/components/proxy-viewer/proxyViewerLogic.ts +469 -0
  40. package/src/lib/themeMode.ts +45 -0
  41. package/src/lib/uiScale.ts +112 -0
  42. package/src/lib/useThemeMode.ts +40 -0
  43. package/src/lib/useUiScale.ts +52 -0
  44. package/src/routes/__root.tsx +78 -1
  45. package/styles/globals.css +305 -23
  46. package/.output/public/assets/ProxyViewerContainer-7ugZIMW0.js +0 -127
  47. package/.output/public/assets/index-SqCROi0s.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-SqCROi0s.css";
67
+ const appCss = "/assets/index-DQeXi4Rv.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.jsx("head", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(HeadContent, {}) }),
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-B-Mm06YB.mjs");
373
+ const $$splitComponentImporter$1 = () => import("./index-CrCeNP7H.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-CIvbZsmt.mjs");
417
+ const $$splitComponentImporter = () => import("../_sessionId-BLk2xPkR.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, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
9005
9199
  }
9006
- function buildMarkdown$1(document) {
9007
- const session = document.session;
9200
+ function buildMarkdown$1(document2) {
9201
+ const session = document2.session;
9008
9202
  const lines = [
9009
- `# ${document.run.title}`,
9203
+ `# ${document2.run.title}`,
9010
9204
  "",
9011
- `- Run ID: ${document.run.id}`,
9012
- `- Session ID: ${document.run.sessionId}`,
9013
- `- Group ID: ${document.run.groupId ?? "n/a"}`,
9014
- `- Status: ${document.run.status}`,
9015
- `- Project: ${document.run.project ?? "n/a"}`,
9016
- `- Agent: ${document.run.agent ?? "n/a"}`,
9017
- `- Created: ${document.run.createdAt}`,
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: ${document.classification.outcome}`,
9020
- `- Failure Category: ${document.classification.category}`,
9021
- `- Severity: ${document.classification.severity}`,
9022
- `- Evidence JSON: ${document.evidence.jsonPath}`,
9023
- `- Evidence HTML: ${document.evidence.htmlPath}`,
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 (document.run.task !== null) {
9027
- lines.push("## Task", "", document.run.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
- document.classification.summary,
9241
+ document2.classification.summary,
9048
9242
  "",
9049
9243
  "### Evidence Logs",
9050
9244
  "",
9051
- document.classification.evidenceLogIds.length > 0 ? document.classification.evidenceLogIds.map((id) => `- #${id}`).join("\n") : "No failing log ids were identified.",
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
- ...document.classification.hints.map((hint) => `- ${hint}`),
9249
+ ...document2.classification.hints.map((hint) => `- ${hint}`),
9056
9250
  "",
9057
9251
  "## Run Timeline",
9058
9252
  "",
9059
9253
  "| Time | Event | Severity | Evidence |",
9060
9254
  "| --- | --- | --- | --- |",
9061
- ...document.timeline.map((event) => {
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", "", document.jenkinsReport.markdown, "");
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 document = {
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(document);
9336
+ const markdown = buildMarkdown$1(document2);
9143
9337
  mkdirSync(evidenceDir(run.id), { recursive: true });
9144
9338
  writeFileSync(
9145
9339
  evidence.jsonPath,
9146
- `${JSON.stringify({ ...document, evidence }, null, 2)}
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 { ...document, run: updatedRun };
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, document, classification) {
9388
+ function shouldIncludeRun(run, document2, classification) {
9195
9389
  if (run.status === "failed" || run.status === "cancelled") return true;
9196
- if (document === null) return false;
9390
+ if (document2 === null) return false;
9197
9391
  return classification.outcome !== "success";
9198
9392
  }
9199
- function evidenceFor(run, document) {
9200
- return document?.evidence ?? run.evidence;
9393
+ function evidenceFor(run, document2) {
9394
+ return document2?.evidence ?? run.evidence;
9201
9395
  }
9202
- function jenkinsReportFor(document) {
9203
- return document?.jenkinsReport ?? null;
9396
+ function jenkinsReportFor(document2) {
9397
+ return document2?.jenkinsReport ?? null;
9204
9398
  }
9205
9399
  function failureFromRun(run) {
9206
- const document = readEvidenceDocument(run);
9207
- const classification = document === null ? syntheticFailedClassification(run) : document.classification;
9208
- if (!shouldIncludeRun(run, document, classification)) return null;
9209
- const evidence = evidenceFor(run, document);
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(document),
9408
+ jenkinsReport: jenkinsReportFor(document2),
9215
9409
  sessionId: run.sessionId,
9216
- inspectorUrl: document?.session?.inspectorUrl ?? null,
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.22";
9983
+ const version = "3.0.24";
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(document) {
10062
- const group = document.group;
10063
- const summary = document.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: ${document.evidence.jsonPath}`,
10081
- `- Evidence HTML: ${document.evidence.htmlPath}`,
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(document.members));
10088
- lines.push("## Jenkins Report", "", document.jenkinsReport.markdown, "");
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 document = {
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(document);
10339
+ const markdown = buildMarkdown(document2);
10146
10340
  mkdirSync(groupEvidenceDir(group.id), { recursive: true });
10147
- writeFileSync(evidence.jsonPath, `${JSON.stringify(document, null, 2)}
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 { ...document, group: updatedGroup };
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 document = readGroupEvidenceDocument(group);
10414
+ const document2 = readGroupEvidenceDocument(group);
10221
10415
  return serviceOk({
10222
10416
  group,
10223
10417
  evidence: group.evidence,
10224
- members: document?.members ?? null,
10418
+ members: document2?.members ?? null,
10225
10419
  markdown,
10226
- summary: document?.summary ?? null,
10227
- report: document?.jenkinsReport ?? null
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
- previewUpstreamUrl as B,
18781
+ GroupEvidenceExportResultSchema as B,
18587
18782
  CapturedLogSchema as C,
18588
18783
  DEFAULT_CAPTURE_MODE as D,
18589
- createPendingProviderTestResults as E,
18590
- ProviderTestResultsSchema as F,
18784
+ DeleteInspectorGroupResponseSchema as E,
18785
+ providerHasContextMetadata as F,
18591
18786
  GroupEvidenceReadResponseSchema as G,
18592
- createFailedProviderTestResults as H,
18787
+ maskApiKey as H,
18593
18788
  InspectorGroupsListResponseSchema as I,
18594
- MAX_PROVIDER_TEST_TIMEOUT_SECONDS as J,
18789
+ findProviderModelMetadata as J,
18595
18790
  KnowledgeCandidateSchema as K,
18596
18791
  LogBodyChunkSchema as L,
18597
- MAX_SLOW_RESPONSE_THRESHOLD_SECONDS as M,
18598
- PiAgentResponseSchema as N,
18792
+ PATH_V1_MESSAGES as M,
18793
+ PATH_V1_CHAT_COMPLETIONS as N,
18599
18794
  OpenAIRequestSchema as O,
18600
18795
  ProviderConfigSchema as P,
18601
- resolveProviderContextWindow as Q,
18796
+ PATH_V1_RESPONSES as Q,
18602
18797
  Route$K as R,
18603
- isPlainRecord as S,
18604
- TimeDisplayFormatSchema as T,
18605
- StreamingChunkSchema$1 as U,
18606
- router as V,
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
- AnthropicRequestSchema as e,
18612
- parseOpenAIResponse as f,
18613
- parseOpenAIResponsesResponse as g,
18614
- OpenAIResponsesRequestSchema as h,
18615
- apiFormatForPath as i,
18616
- getSessionPath as j,
18617
- stripClaudeCodeBillingHeader as k,
18618
- isTurnBoundary as l,
18619
- extractStopReason as m,
18620
- AlertSummarySchema as n,
18621
- AlertListResponseSchema as o,
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
- DeleteInspectorGroupsResponseSchema as q,
18624
- GroupEvidenceExportResultSchema as r,
18828
+ apiFormatForPath as q,
18829
+ readStoredThemeMode as r,
18625
18830
  safeGetOwnProperty as s,
18626
- DeleteInspectorGroupResponseSchema as t,
18627
- providerHasContextMetadata as u,
18628
- maskApiKey as v,
18629
- findProviderModelMetadata as w,
18630
- PATH_V1_MESSAGES as x,
18631
- PATH_V1_CHAT_COMPLETIONS as y,
18632
- PATH_V1_RESPONSES as z
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-BCHWOmF2.js"], scripts: [{ attrs: { type: "module", async: true, src: "/assets/index-BCHWOmF2.js" } }] }, "/": { filePath: "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", children: void 0, preloads: ["/assets/index-Pz9T7cS9.js", "/assets/ProxyViewerContainer-7ugZIMW0.js"] }, "/session/$sessionId": { filePath: "C:/Users/claw/workspace/agent-inspector/src/routes/session/$sessionId.tsx", children: void 0, preloads: ["/assets/_sessionId-BeN8-5Ho.js", "/assets/ProxyViewerContainer-7ugZIMW0.js"] } } });
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-CQbrc-hi.js"], scripts: [{ attrs: { type: "module", async: true, src: "/assets/index-CQbrc-hi.js" } }] }, "/": { filePath: "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", children: void 0, preloads: ["/assets/index-ZrMgyEZV.js", "/assets/ProxyViewerContainer-WuChOrSS.js"] }, "/session/$sessionId": { filePath: "C:/Users/claw/workspace/agent-inspector/src/routes/session/$sessionId.tsx", children: void 0, preloads: ["/assets/_sessionId-DRl-Y9om.js", "/assets/ProxyViewerContainer-WuChOrSS.js"] } } });
2
2
  export {
3
3
  tsrStartManifest
4
4
  };