@tonyclaw/agent-inspector 3.0.37 → 3.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/.output/cli.js +249 -84
  2. package/.output/nitro.json +1 -1
  3. package/.output/public/assets/{CompareDrawer-BvF04FAX.js → CompareDrawer-BjQ2HH8j.js} +1 -1
  4. package/.output/public/assets/{InspectorPet-CSCn4jWU.js → InspectorPet-DDScgJ7_.js} +1 -1
  5. package/.output/public/assets/ProxyViewerContainer-C3iHhtkc.js +126 -0
  6. package/.output/public/assets/{ReplayDialog-DWJkKTDB.js → ReplayDialog-BujXVTMJ.js} +1 -1
  7. package/.output/public/assets/{RequestAnatomy-CDFI55pJ.js → RequestAnatomy-iK2nOuCP.js} +1 -1
  8. package/.output/public/assets/{ResponseView-tlIj9vRr.js → ResponseView-iAuOJxem.js} +1 -1
  9. package/.output/public/assets/{StreamingChunkSequence-C7Ntivbf.js → StreamingChunkSequence-DiZ21icS.js} +1 -1
  10. package/.output/public/assets/{_sessionId-BbrBvkvn.js → _sessionId-CLTlZx8L.js} +1 -1
  11. package/.output/public/assets/{_sessionId-DUL-l56X.js → _sessionId-D3WwDIit.js} +1 -1
  12. package/.output/public/assets/{index-e-fWO2Du.js → index--ND7WRCU.js} +1 -1
  13. package/.output/public/assets/{index-By0CyDmk.js → index-DGuDxV-I.js} +1 -1
  14. package/.output/public/assets/{index-DCj1X8Qt.css → index-DKwrwHsI.css} +1 -1
  15. package/.output/public/assets/index-fXi7tXyH.js +76 -0
  16. package/.output/public/assets/{index-DF6bouqm.js → index-nN3UPNM0.js} +6 -6
  17. package/.output/public/assets/{json-viewer-0fOrL_Cz.js → json-viewer-CzcwNVJa.js} +1 -1
  18. package/.output/public/assets/{jszip.min-2Bsoez0Q.js → jszip.min-DAbOCDPI.js} +1 -1
  19. package/.output/server/_libs/lucide-react.mjs +13 -13
  20. package/.output/server/_libs/radix-ui__react-select.mjs +7 -7
  21. package/.output/server/{_sessionId-DzY1bB_L.mjs → _sessionId-DSetUDiv.mjs} +1 -1
  22. package/.output/server/{_sessionId-D-GcecKN.mjs → _sessionId-DtRKr8Jt.mjs} +2 -2
  23. package/.output/server/_ssr/{CompareDrawer-BXm8BitS.mjs → CompareDrawer-Cns26sqx.mjs} +3 -3
  24. package/.output/server/_ssr/{InspectorPet-CZUOr9sO.mjs → InspectorPet-CyWBvBuh.mjs} +1 -1
  25. package/.output/server/_ssr/{ProxyViewerContainer-BAQY5x_x.mjs → ProxyViewerContainer-CimBv5WL.mjs} +84 -48
  26. package/.output/server/_ssr/{ReplayDialog-BOODYnLb.mjs → ReplayDialog-DrM897xL.mjs} +4 -4
  27. package/.output/server/_ssr/{RequestAnatomy-Bd2OBiJP.mjs → RequestAnatomy-BRgezegq.mjs} +2 -2
  28. package/.output/server/_ssr/{ResponseView-ZSjpdHLG.mjs → ResponseView-D7u7r-lA.mjs} +3 -3
  29. package/.output/server/_ssr/{StreamingChunkSequence-BT-yQGLL.mjs → StreamingChunkSequence-DM26ZaVC.mjs} +2 -2
  30. package/.output/server/_ssr/{index-CXouA5fR.mjs → index-BeWedHzY.mjs} +2 -2
  31. package/.output/server/_ssr/{index-CSJlUfwz.mjs → index-C284XGkZ.mjs} +1 -1
  32. package/.output/server/_ssr/index.mjs +2 -2
  33. package/.output/server/_ssr/{json-viewer-DF2oLr4x.mjs → json-viewer-CD_GbR7V.mjs} +3 -3
  34. package/.output/server/_ssr/{router-75eycvXZ.mjs → router-DxPlMfLZ.mjs} +126 -59
  35. package/.output/server/{_tanstack-start-manifest_v-DjCobDeN.mjs → _tanstack-start-manifest_v-82w9tFI-.mjs} +1 -1
  36. package/.output/server/index.mjs +93 -93
  37. package/.output/workers/logFinalizer.worker.js +6 -1
  38. package/.output/workers/sessionWorkerEntry.js +6 -1
  39. package/README.md +42 -10
  40. package/package.json +1 -1
  41. package/src/cli/doctor.ts +17 -10
  42. package/src/cli/networkHints.ts +15 -8
  43. package/src/cli/onboard.ts +10 -3
  44. package/src/cli.ts +90 -56
  45. package/src/components/ProxyViewer.tsx +34 -21
  46. package/src/components/ProxyViewerContainer.tsx +2 -1
  47. package/src/components/pi-agent/PiAgentPanel.tsx +2 -1
  48. package/src/components/providers/SettingsDialog.tsx +24 -7
  49. package/src/lib/apiClient.ts +9 -2
  50. package/src/lib/basePath.ts +83 -0
  51. package/src/lib/sessionUrl.ts +4 -2
  52. package/src/mcp/loopback.ts +2 -1
  53. package/src/mcp/server.ts +6 -2
  54. package/src/proxy/identityProxy.ts +98 -6
  55. package/src/proxy/privateDataPath.ts +15 -1
  56. package/src/proxy/sessionInfo.ts +10 -3
  57. package/src/proxy/upstream.ts +3 -1
  58. package/src/router.tsx +7 -1
  59. package/src/routes/__root.tsx +9 -3
  60. package/.output/public/assets/ProxyViewerContainer-9mjL1YlZ.js +0 -126
  61. package/.output/public/assets/index-CEdulUJ3.js +0 -76
@@ -1,15 +1,15 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports, R as React } from "../_libs/react.mjs";
2
- import { C as CapturedLogSchema, M as DeleteInspectorGroupsResponseSchema, D as DEFAULT_CAPTURE_MODE, a as DEFAULT_SLOW_RESPONSE_THRESHOLD_SECONDS, b as DEFAULT_PROVIDER_TEST_TIMEOUT_SECONDS, c as DEFAULT_TIME_DISPLAY_FORMAT, m as cn, F as LazyFeatureBoundary, x as formatTokens, B as Button, d as RuntimeConfigSchema, g as readStoredUiScalePreference, h as persistUiScalePreference, j as applyUiScalePreference, ac as CrabLogo, p as packageJson, k as normalizeUiScalePreference, N as GroupEvidenceExportResultSchema, P as DeleteInspectorGroupResponseSchema, y as copyTextToClipboard, l as RedactedProviderDtoSchema, U as UI_SCALE_STORAGE_KEY, v as apiFormatForPath, i as isRecord, a2 as createPendingProviderTestResults, a3 as ProviderTestResultsSchema, a4 as createFailedProviderTestResults, a5 as MAX_SLOW_RESPONSE_THRESHOLD_SECONDS, a6 as MAX_PROVIDER_TEST_TIMEOUT_SECONDS, a7 as TimeDisplayFormatSchema, G as AlertSummarySchema, H as AlertListResponseSchema, r as readStoredThemeMode, e as applyThemeMode, f as persistThemeMode, af as formatUiScale, J as InspectorGroupsListResponseSchema, I as GroupEvidenceReadResponseSchema, a8 as EcosystemPackagesResponseSchema, a9 as EcosystemTaskResponseSchema, aa as EcosystemTasksResponseSchema, Y as PATH_V1_MESSAGES, Z as PATH_V1_CHAT_COMPLETIONS, _ as PATH_V1_RESPONSES, V as providerHasContextMetadata, Q as ProviderScanResponseSchema, s as safeGetOwnProperty, T as THEME_MODE_STORAGE_KEY, n as normalizeThemeMode, ab as EcosystemExecutionConfirmationResponseSchema, $ as formatContextWindowInput, W as findProviderModelMetadata, X as formatContextWindowTokens, w as getSessionPath, q as parseOpenAIResponse, t as parseOpenAIResponsesResponse, O as OpenAIRequestSchema, u as OpenAIResponsesRequestSchema, A as AnthropicResponseSchema$1, o as AnthropicRequestSchema, ad as resolveProviderContextWindow, a0 as parseContextWindowTokensInput, a1 as previewUpstreamUrl, K as KnowledgeCandidateSchema, ae as isPlainRecord, E as stripClaudeCodeBillingHeader, L as LogBodyChunkSchema, z as getStatusCategory } from "./router-75eycvXZ.mjs";
2
+ import { w as withBasePath, C as CapturedLogSchema, N as DeleteInspectorGroupsResponseSchema, D as DEFAULT_CAPTURE_MODE, a as DEFAULT_SLOW_RESPONSE_THRESHOLD_SECONDS, b as DEFAULT_PROVIDER_TEST_TIMEOUT_SECONDS, c as DEFAULT_TIME_DISPLAY_FORMAT, m as cn, G as LazyFeatureBoundary, y as formatTokens, B as Button, d as RuntimeConfigSchema, g as readStoredUiScalePreference, h as persistUiScalePreference, j as applyUiScalePreference, ad as CrabLogo, p as packageJson, k as normalizeUiScalePreference, P as GroupEvidenceExportResultSchema, Q as DeleteInspectorGroupResponseSchema, z as copyTextToClipboard, l as RedactedProviderDtoSchema, U as UI_SCALE_STORAGE_KEY, v as apiFormatForPath, i as isRecord, a3 as createPendingProviderTestResults, a4 as ProviderTestResultsSchema, a5 as createFailedProviderTestResults, a6 as MAX_SLOW_RESPONSE_THRESHOLD_SECONDS, a7 as MAX_PROVIDER_TEST_TIMEOUT_SECONDS, a8 as TimeDisplayFormatSchema, H as AlertSummarySchema, I as AlertListResponseSchema, r as readStoredThemeMode, e as applyThemeMode, f as persistThemeMode, ag as formatUiScale, M as InspectorGroupsListResponseSchema, J as GroupEvidenceReadResponseSchema, a9 as EcosystemPackagesResponseSchema, aa as EcosystemTaskResponseSchema, ab as EcosystemTasksResponseSchema, Z as PATH_V1_MESSAGES, _ as PATH_V1_CHAT_COMPLETIONS, $ as PATH_V1_RESPONSES, W as providerHasContextMetadata, V as ProviderScanResponseSchema, T as THEME_MODE_STORAGE_KEY, n as normalizeThemeMode, ac as EcosystemExecutionConfirmationResponseSchema, s as safeGetOwnProperty, a0 as formatContextWindowInput, X as findProviderModelMetadata, Y as formatContextWindowTokens, x as getSessionPath, q as parseOpenAIResponse, t as parseOpenAIResponsesResponse, O as OpenAIRequestSchema, u as OpenAIResponsesRequestSchema, A as AnthropicResponseSchema$1, o as AnthropicRequestSchema, ae as resolveProviderContextWindow, a1 as parseContextWindowTokensInput, a2 as previewUpstreamUrl, K as KnowledgeCandidateSchema, af as isPlainRecord, F as stripClaudeCodeBillingHeader, L as LogBodyChunkSchema, E as getStatusCategory } from "./router-DxPlMfLZ.mjs";
3
3
  import { u as useSWR, a as useSWRConfig } from "../_libs/swr.mjs";
4
4
  import { u as useWindowVirtualizer, a as useVirtualizer } from "../_libs/tanstack__react-virtual.mjs";
5
5
  import { c as cva } from "../_libs/class-variance-authority.mjs";
6
6
  import { d as diffJson, a as diffLines } from "../_libs/diff.mjs";
7
- import { T as TriangleAlert, C as CircleCheck, X, P as PanelRightOpen, a as PanelRightClose, U as Upload, D as Download, F as FileBraces, R as RefreshCw, b as Trash2, I as Info, c as ChevronDown, d as Check, S as Settings, e as Siren, L as LoaderCircle, B as BrainCircuit, f as RotateCcw, g as Sparkles, h as Send, i as Sun, E as Eye, M as Moon, A as ALargeSmall, j as Layers, k as FlaskConical, l as Activity, m as Beaker, N as Network, n as Copy, o as Terminal, p as ArrowLeft, q as ChevronUp, r as ChevronsLeft, s as ChevronLeft, t as ChevronRight, u as ChevronsRight, v as CircleStop, w as Clapperboard, x as Flag, y as Timer, G as Gauge, z as Minimize2, H as Maximize2, J as Scan, K as Plus, O as CircleAlert, Q as Rocket, V as PackageCheck, W as History, Y as Monitor, Z as EyeOff, _ as ExternalLink, $ as Clock, a0 as RotateCw, a1 as CircleCheckBig, a2 as Pencil, a3 as Bell, a4 as Clock3, a5 as ShieldAlert, a6 as ArrowUpRight, a7 as ArrowDownRight, a8 as CodeXml, a9 as Cpu, aa as FolderOpen, ab as MessageSquare, ac as Zap, ad as Wrench, ae as Brain, af as Minus, ag as CircleQuestionMark, ah as Server, ai as Lock, aj as Wifi, ak as WifiOff, al as CircleX, am as ShieldCheck, an as Save, ao as FileSearch, ap as CloudUpload, aq as OctagonAlert, ar as Radio, as as Globe, at as FileTerminal, au as ChevronsUp, av as ChevronsDown, aw as FileDiff, ax as Search, ay as GitCompareArrows, az as ArrowUp, aA as ArrowDown, aB as Ellipsis, aC as Blocks, aD as MousePointerClick, aE as FileText, aF as Rows3, aG as Columns2 } from "../_libs/lucide-react.mjs";
7
+ import { T as TriangleAlert, C as CircleCheck, X, P as PanelRightOpen, a as PanelRightClose, U as Upload, D as Download, F as FileBraces, R as RefreshCw, b as Trash2, I as Info, c as ChevronDown, d as Check, S as Settings, e as Siren, L as LoaderCircle, f as Sun, E as Eye, M as Moon, A as ALargeSmall, g as Layers, h as FlaskConical, i as Sparkles, j as Activity, B as Beaker, N as Network, k as Copy, l as Terminal, m as ArrowLeft, n as ChevronUp, o as BrainCircuit, p as RotateCcw, q as Send, r as ChevronsLeft, s as ChevronLeft, t as ChevronRight, u as ChevronsRight, v as CircleStop, w as Clapperboard, x as Flag, y as Timer, G as Gauge, z as Minimize2, H as Maximize2, J as Scan, K as Plus, O as CircleAlert, Q as Rocket, V as PackageCheck, W as History, Y as Monitor, Z as EyeOff, _ as ExternalLink, $ as Clock, a0 as RotateCw, a1 as CircleCheckBig, a2 as Pencil, a3 as Bell, a4 as Clock3, a5 as ShieldAlert, a6 as ArrowUpRight, a7 as ArrowDownRight, a8 as CodeXml, a9 as Cpu, aa as FolderOpen, ab as MessageSquare, ac as Zap, ad as Wrench, ae as Brain, af as Minus, ag as CircleQuestionMark, ah as Server, ai as Lock, aj as Wifi, ak as WifiOff, al as CircleX, am as ShieldCheck, an as Save, ao as FileSearch, ap as CloudUpload, aq as OctagonAlert, ar as Radio, as as Globe, at as FileTerminal, au as ChevronsUp, av as ChevronsDown, aw as FileDiff, ax as Search, ay as GitCompareArrows, az as ArrowUp, aA as ArrowDown, aB as Ellipsis, aC as Blocks, aD as MousePointerClick, aE as FileText, aF as Rows3, aG as Columns2 } from "../_libs/lucide-react.mjs";
8
8
  import { u as union, o as object, e as array, l as literal, n as number, d as boolean, b as string } from "../_libs/zod.mjs";
9
9
  import { D as Dialog$1, a as DialogContent$1, b as DialogClose, c as DialogTitle$1, d as DialogDescription$1, e as DialogTrigger$1, f as DialogPortal$1, g as DialogOverlay$1 } from "../_libs/radix-ui__react-dialog.mjs";
10
10
  import { R as Root2, C as Content, L as List, T as Trigger } from "../_libs/radix-ui__react-tabs.mjs";
11
11
  import { S as Slot } from "../_libs/radix-ui__react-slot.mjs";
12
- import { S as Select$1, a as SelectTrigger$1, b as SelectIcon, c as SelectValue$1, d as SelectPortal, e as SelectContent$1, f as SelectViewport, g as SelectItem$1, h as SelectItemIndicator, i as SelectItemText, j as SelectScrollUpButton$1, k as SelectScrollDownButton$1 } from "../_libs/radix-ui__react-select.mjs";
12
+ import { S as Select$1, a as SelectTrigger$1, b as SelectIcon, c as SelectPortal, d as SelectContent$1, e as SelectViewport, f as SelectItem$1, g as SelectItemIndicator, h as SelectItemText, i as SelectValue$1, j as SelectScrollUpButton$1, k as SelectScrollDownButton$1 } from "../_libs/radix-ui__react-select.mjs";
13
13
  import { P as Provider, R as Root3, T as Trigger$1, a as Portal, C as Content2, A as Arrow2 } from "../_libs/radix-ui__react-tooltip.mjs";
14
14
  import { R as Root, C as CollapsibleContent$1, a as CollapsibleTrigger$1 } from "../_libs/radix-ui__react-collapsible.mjs";
15
15
  import { R as Root$1, V as Viewport, C as Corner, S as ScrollAreaScrollbar, a as ScrollAreaThumb } from "../_libs/radix-ui__react-scroll-area.mjs";
@@ -17,6 +17,11 @@ const ApiErrorSchema = object({
17
17
  error: string()
18
18
  });
19
19
  const MUTATION_METHODS = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
20
+ function withInspectorBasePath(input) {
21
+ if (typeof input !== "string") return input;
22
+ if (!input.startsWith("/") || input.startsWith("//")) return input;
23
+ return withBasePath(input);
24
+ }
20
25
  function withBrowserMutationProof(init) {
21
26
  const method = init?.method?.toUpperCase();
22
27
  if (method === void 0 || !MUTATION_METHODS.has(method)) return init;
@@ -40,7 +45,7 @@ async function readApiError(response, fallback) {
40
45
  }
41
46
  }
42
47
  async function fetchJson(input, schema, init, errorFallback) {
43
- const response = await fetch(input, withBrowserMutationProof(init));
48
+ const response = await fetch(withInspectorBasePath(input), withBrowserMutationProof(init));
44
49
  if (!response.ok) {
45
50
  const fallback = errorFallback?.(response) ?? `Request failed with status ${response.status}`;
46
51
  throw new Error(await readApiError(response, fallback));
@@ -74,7 +79,7 @@ async function fetchWithTimeout(input, timeoutMs, init) {
74
79
  }
75
80
  }
76
81
  try {
77
- return await fetch(input, {
82
+ return await fetch(withInspectorBasePath(input), {
78
83
  ...withBrowserMutationProof(init),
79
84
  signal: controller.signal
80
85
  });
@@ -2504,30 +2509,30 @@ function useCopyFeedback(text) {
2504
2509
  return { copied, copy };
2505
2510
  }
2506
2511
  const LazyCompareDrawer = reactExports.lazy(
2507
- () => import("./CompareDrawer-BXm8BitS.mjs").then((m) => ({ default: m.CompareDrawer }))
2512
+ () => import("./CompareDrawer-Cns26sqx.mjs").then((m) => ({ default: m.CompareDrawer }))
2508
2513
  );
2509
2514
  const LazyInspectorPet = reactExports.lazy(
2510
- () => import("./InspectorPet-CZUOr9sO.mjs").then((m) => ({ default: m.InspectorPet }))
2515
+ () => import("./InspectorPet-CyWBvBuh.mjs").then((m) => ({ default: m.InspectorPet }))
2511
2516
  );
2512
2517
  const LazyReplayDialog = reactExports.lazy(
2513
- () => import("./ReplayDialog-BOODYnLb.mjs").then((m) => ({ default: m.ReplayDialog }))
2518
+ () => import("./ReplayDialog-DrM897xL.mjs").then((m) => ({ default: m.ReplayDialog }))
2514
2519
  );
2515
2520
  const LazyRequestAnatomy = reactExports.lazy(
2516
- () => import("./RequestAnatomy-Bd2OBiJP.mjs").then((m) => ({ default: m.RequestAnatomy }))
2521
+ () => import("./RequestAnatomy-BRgezegq.mjs").then((m) => ({ default: m.RequestAnatomy }))
2517
2522
  );
2518
2523
  const LazyResponseView = reactExports.lazy(
2519
- () => import("./ResponseView-ZSjpdHLG.mjs").then((m) => ({ default: m.ResponseView }))
2524
+ () => import("./ResponseView-D7u7r-lA.mjs").then((m) => ({ default: m.ResponseView }))
2520
2525
  );
2521
2526
  const LazyStreamingChunkSequence = reactExports.lazy(
2522
- () => import("./StreamingChunkSequence-BT-yQGLL.mjs").then((m) => ({
2527
+ () => import("./StreamingChunkSequence-DM26ZaVC.mjs").then((m) => ({
2523
2528
  default: m.StreamingChunkSequence
2524
2529
  }))
2525
2530
  );
2526
2531
  const LazyJsonViewer = reactExports.lazy(
2527
- () => import("./json-viewer-DF2oLr4x.mjs").then((m) => ({ default: m.JsonViewer }))
2532
+ () => import("./json-viewer-CD_GbR7V.mjs").then((m) => ({ default: m.JsonViewer }))
2528
2533
  );
2529
2534
  const LazyJsonViewerFromString = reactExports.lazy(
2530
- () => import("./json-viewer-DF2oLr4x.mjs").then((m) => ({ default: m.JsonViewerFromString }))
2535
+ () => import("./json-viewer-CD_GbR7V.mjs").then((m) => ({ default: m.JsonViewerFromString }))
2531
2536
  );
2532
2537
  const HIGHLIGHT_DURATION_MS = 1200;
2533
2538
  const MAX_HIGHLIGHT_ATTEMPTS = 12;
@@ -7317,7 +7322,7 @@ function groupDeletePath(groupId, deleteEvidence) {
7317
7322
  return deleteEvidence ? `${path}?deleteEvidence=1` : path;
7318
7323
  }
7319
7324
  function groupsClearPath(deleteEvidence) {
7320
- return "/api/groups";
7325
+ return deleteEvidence ? "/api/groups?deleteEvidence=1" : "/api/groups";
7321
7326
  }
7322
7327
  function summarizeGroup(group) {
7323
7328
  let completedMembers = 0;
@@ -11117,7 +11122,11 @@ function OnboardingSettingsTab() {
11117
11122
  value: "agent-inspector onboard --status --opencode-only"
11118
11123
  },
11119
11124
  { id: "opencode-verify", label: "OpenCode verify", value: "opencode mcp list" },
11120
- { id: "opencode-proxy", label: "OpenCode proxy", value: `LLM_BASE_URL=${origin}/proxy` },
11125
+ {
11126
+ id: "opencode-proxy",
11127
+ label: "OpenCode proxy",
11128
+ value: `LLM_BASE_URL=${origin}${withBasePath("/proxy")}`
11129
+ },
11121
11130
  {
11122
11131
  id: "mimo-config",
11123
11132
  label: "MiMo Code config",
@@ -11129,11 +11138,23 @@ function OnboardingSettingsTab() {
11129
11138
  value: "agent-inspector onboard --status --mimo-only"
11130
11139
  },
11131
11140
  { id: "mimo-verify", label: "MiMo Code verify", value: "mimo mcp list" },
11132
- { id: "mimo-proxy", label: "MiMo Code proxy", value: `OPENAI_BASE_URL=${origin}/proxy` },
11133
- { id: "mcp", label: "MCP URL", value: `${origin}/api/mcp` },
11134
- { id: "proxy", label: "Proxy URL", value: `${origin}/proxy` },
11135
- { id: "anthropic", label: "Anthropic base", value: `ANTHROPIC_BASE_URL=${origin}/proxy` },
11136
- { id: "openai", label: "OpenAI base", value: `OPENAI_BASE_URL=${origin}/proxy` }
11141
+ {
11142
+ id: "mimo-proxy",
11143
+ label: "MiMo Code proxy",
11144
+ value: `OPENAI_BASE_URL=${origin}${withBasePath("/proxy")}`
11145
+ },
11146
+ { id: "mcp", label: "MCP URL", value: `${origin}${withBasePath("/api/mcp")}` },
11147
+ { id: "proxy", label: "Proxy URL", value: `${origin}${withBasePath("/proxy")}` },
11148
+ {
11149
+ id: "anthropic",
11150
+ label: "Anthropic base",
11151
+ value: `ANTHROPIC_BASE_URL=${origin}${withBasePath("/proxy")}`
11152
+ },
11153
+ {
11154
+ id: "openai",
11155
+ label: "OpenAI base",
11156
+ value: `OPENAI_BASE_URL=${origin}${withBasePath("/proxy")}`
11157
+ }
11137
11158
  ],
11138
11159
  [origin]
11139
11160
  );
@@ -11222,7 +11243,7 @@ function McpSettingsTab() {
11222
11243
  if (typeof window === "undefined") return "http://localhost:9527";
11223
11244
  return window.location.origin;
11224
11245
  }, []);
11225
- const endpoint = `${origin}/api/mcp`;
11246
+ const endpoint = `${origin}${withBasePath("/api/mcp")}`;
11226
11247
  const values = reactExports.useMemo(
11227
11248
  () => [
11228
11249
  { id: "mcp-url", label: "Streamable HTTP MCP URL", value: endpoint },
@@ -12653,7 +12674,7 @@ function PiAgentPanel({
12653
12674
  ...model !== "__auto__" ? { model } : {},
12654
12675
  logLimit: 16
12655
12676
  };
12656
- void fetch("/api/pi-agent", {
12677
+ void fetch(withBasePath("/api/pi-agent"), {
12657
12678
  method: "POST",
12658
12679
  headers: {
12659
12680
  "content-type": "application/json",
@@ -15881,6 +15902,10 @@ function ProxyViewer({
15881
15902
  const exportAbortRef = reactExports.useRef(null);
15882
15903
  const exportRequestIdRef = reactExports.useRef(0);
15883
15904
  useKeyboardNavigation(logListRef, logListWrapperRef, { pageWide: true });
15905
+ const proxyEndpoint = reactExports.useMemo(() => {
15906
+ const origin = typeof window === "undefined" ? "http://localhost:9527" : window.location.origin;
15907
+ return `${origin}${withBasePath("/proxy")}`;
15908
+ }, []);
15884
15909
  const cancelTransientTasks = reactExports.useCallback(() => {
15885
15910
  exportRequestIdRef.current += 1;
15886
15911
  exportAbortRef.current?.abort();
@@ -16146,15 +16171,20 @@ function ProxyViewer({
16146
16171
  detailsPanelCollapsed ? "lg:grid-cols-[minmax(0,1fr)]" : "lg:grid-cols-[minmax(0,1fr)_21.25rem] xl:grid-cols-[minmax(0,1fr)_22.5rem]"
16147
16172
  ),
16148
16173
  children: [
16149
- !detailsPanelCollapsed && /* @__PURE__ */ jsxRuntimeExports.jsx("aside", { className: "bg-background/95 order-1 border-b border-white/[0.045] lg:order-2 lg:h-full lg:overflow-y-auto lg:border-b-0 lg:border-l lg:border-white/[0.055] inspector-scrollbar", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4 p-4", children: [
16150
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16151
- PiAgentPanel,
16152
- {
16153
- currentSessionId: labSessionId,
16154
- logCount: logs.length,
16155
- onResultChange: setAssistantSearchResult
16156
- }
16157
- ),
16174
+ !detailsPanelCollapsed && /* @__PURE__ */ jsxRuntimeExports.jsx("aside", { className: "bg-background/95 order-1 border-b border-white/[0.045] lg:order-2 lg:h-full lg:overflow-y-auto lg:border-b-0 lg:border-l lg:border-white/[0.055] inspector-scrollbar", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex min-h-full flex-col gap-4 p-4", children: [
16175
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-background/95 sticky top-0 z-20 -mx-4 -mt-4 px-4 pt-4 pb-3 shadow-[0_12px_24px_rgba(0,0,0,0.18),inset_0_-1px_0_rgba(255,255,255,0.045)] backdrop-blur", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarPanel, { label: "Tools", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
16176
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeModeToggle, {}),
16177
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16178
+ UiScaleControl,
16179
+ {
16180
+ preference: uiScalePreference,
16181
+ resolvedScale: resolvedUiScale,
16182
+ onChange: setUiScalePreference
16183
+ }
16184
+ ),
16185
+ /* @__PURE__ */ jsxRuntimeExports.jsx(GroupsDialog, {}),
16186
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AgentLabDialog, { currentSessionId: labSessionId, logCount: logs.length })
16187
+ ] }) }) }),
16158
16188
  /* @__PURE__ */ jsxRuntimeExports.jsxs(SidebarPanel, { label: "Current scope", children: [
16159
16189
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-2 rounded-md bg-black/20 px-3 py-2 shadow-[inset_0_1px_0_rgba(255,255,255,0.035)]", children: [
16160
16190
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -16193,19 +16223,6 @@ function ProxyViewer({
16193
16223
  ] }),
16194
16224
  sessionLoadProgress !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2 rounded-md bg-black/20 px-2 py-2 shadow-[inset_0_0_0_1px_rgba(255,255,255,0.045)]", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SessionLoadProgressBar, { progress: sessionLoadProgress }) })
16195
16225
  ] }),
16196
- /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarPanel, { label: "Tools", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
16197
- /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeModeToggle, {}),
16198
- /* @__PURE__ */ jsxRuntimeExports.jsx(
16199
- UiScaleControl,
16200
- {
16201
- preference: uiScalePreference,
16202
- resolvedScale: resolvedUiScale,
16203
- onChange: setUiScalePreference
16204
- }
16205
- ),
16206
- /* @__PURE__ */ jsxRuntimeExports.jsx(GroupsDialog, {}),
16207
- /* @__PURE__ */ jsxRuntimeExports.jsx(AgentLabDialog, { currentSessionId: labSessionId, logCount: logs.length })
16208
- ] }) }),
16209
16226
  hasSessionContext && sessionContextScope !== null && /* @__PURE__ */ jsxRuntimeExports.jsx(
16210
16227
  SessionContextBar,
16211
16228
  {
@@ -16218,7 +16235,16 @@ function ProxyViewer({
16218
16235
  showBackLink: sessionContextScope.showBackLink
16219
16236
  }
16220
16237
  ),
16221
- hasSessionContext && pinnedSessionId !== void 0 && sessionMemberships.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(SessionMembershipPanel, { memberships: sessionMemberships })
16238
+ hasSessionContext && pinnedSessionId !== void 0 && sessionMemberships.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(SessionMembershipPanel, { memberships: sessionMemberships }),
16239
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1" }),
16240
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16241
+ PiAgentPanel,
16242
+ {
16243
+ currentSessionId: labSessionId,
16244
+ logCount: logs.length,
16245
+ onResultChange: setAssistantSearchResult
16246
+ }
16247
+ )
16222
16248
  ] }) }),
16223
16249
  /* @__PURE__ */ jsxRuntimeExports.jsxs("main", { className: "order-2 min-w-0 lg:order-1 lg:h-full lg:overflow-y-auto inspector-scrollbar", children: [
16224
16250
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-background/95 shadow-[0_12px_36px_rgba(0,0,0,0.18),inset_0_-1px_0_rgba(255,255,255,0.045)] sticky top-0 z-30 px-4 py-3 lg:px-5", children: [
@@ -16461,8 +16487,18 @@ function ProxyViewer({
16461
16487
  liveEmptyState === "empty" && sessions.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mx-auto max-w-xl text-xs leading-relaxed text-muted-foreground", children: "Pick a session from the filter panel to load stored logs on demand." }),
16462
16488
  liveEmptyStateCopy.showConnectionCommands && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
16463
16489
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
16464
- /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableCommand, { command: "ANTHROPIC_BASE_URL=http://localhost:9527/proxy <your-tool>" }),
16465
- /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableCommand, { command: "OPENAI_BASE_URL=http://localhost:9527/proxy <your-tool>" })
16490
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16491
+ CopyableCommand,
16492
+ {
16493
+ command: `ANTHROPIC_BASE_URL=${proxyEndpoint} <your-tool>`
16494
+ }
16495
+ ),
16496
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16497
+ CopyableCommand,
16498
+ {
16499
+ command: `OPENAI_BASE_URL=${proxyEndpoint} <your-tool>`
16500
+ }
16501
+ )
16466
16502
  ] }),
16467
16503
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mx-auto max-w-xl text-xs leading-relaxed text-muted-foreground", children: "Container note: if your AI tool runs in a different container or host than Agent Inspector, replace localhost with an address reachable from that tool and verify the network/firewall path." })
16468
16504
  ] })
@@ -16658,7 +16694,7 @@ function buildLogsStreamUrl(sessionId) {
16658
16694
  params.set("sessionId", sessionId);
16659
16695
  }
16660
16696
  const query = params.toString();
16661
- return query.length > 0 ? `/api/logs/stream?${query}` : "/api/logs/stream";
16697
+ return withBasePath(query.length > 0 ? `/api/logs/stream?${query}` : "/api/logs/stream");
16662
16698
  }
16663
16699
  function buildSessionLogsPageUrl(sessionId, request, limit = SESSION_PAGE_LIMIT) {
16664
16700
  const params = new URLSearchParams({
@@ -1,7 +1,7 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { u as useProviders, f as fetchJsonWithTimeout, D as Dialog, b as DialogContent, c as DialogHeader, d as DialogTitle, T as Tabs, e as TabsList, h as TabsTrigger, i as TabsContent, j as TooltipProvider, k as Tooltip, l as TooltipTrigger, m as TooltipContent, n as dispatchLogFocusRequest, A as ApiTimeoutError } from "./ProxyViewerContainer-BAQY5x_x.mjs";
3
- import { B as Button, C as CapturedLogSchema } from "./router-75eycvXZ.mjs";
4
- import { ResponseView } from "./ResponseView-ZSjpdHLG.mjs";
2
+ import { u as useProviders, f as fetchJsonWithTimeout, D as Dialog, b as DialogContent, c as DialogHeader, d as DialogTitle, T as Tabs, e as TabsList, h as TabsTrigger, i as TabsContent, j as TooltipProvider, k as Tooltip, l as TooltipTrigger, m as TooltipContent, n as dispatchLogFocusRequest, A as ApiTimeoutError } from "./ProxyViewerContainer-CimBv5WL.mjs";
3
+ import { B as Button, C as CapturedLogSchema } from "./router-DxPlMfLZ.mjs";
4
+ import { ResponseView } from "./ResponseView-D7u7r-lA.mjs";
5
5
  import "node:crypto";
6
6
  import "node:path";
7
7
  import "node:fs";
@@ -14,7 +14,7 @@ import "node:net";
14
14
  import "../_libs/modelcontextprotocol__server.mjs";
15
15
  import "../_libs/jszip.mjs";
16
16
  import "node:os";
17
- import { f as RotateCcw, aL as Braces, z as Minimize2 } from "../_libs/lucide-react.mjs";
17
+ import { p as RotateCcw, aL as Braces, z as Minimize2 } from "../_libs/lucide-react.mjs";
18
18
  import { o as object, n as number, e as array, d as boolean, b as string } from "../_libs/zod.mjs";
19
19
  import "../_libs/swr.mjs";
20
20
  import "../_libs/use-sync-external-store.mjs";
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { x as formatTokens, m as cn, X as formatContextWindowTokens } from "./router-75eycvXZ.mjs";
3
- import { u as useProviders, o as analyzeContextIntelligence, j as TooltipProvider, k as Tooltip, l as TooltipTrigger, m as TooltipContent, S as SegmentBar, R as ROLE_COLOR_CLASSES, p as ANATOMY_ROLE_LABELS, C as CONTEXT_USAGE_THRESHOLDS } from "./ProxyViewerContainer-BAQY5x_x.mjs";
2
+ import { y as formatTokens, m as cn, Y as formatContextWindowTokens } from "./router-DxPlMfLZ.mjs";
3
+ import { u as useProviders, o as analyzeContextIntelligence, j as TooltipProvider, k as Tooltip, l as TooltipTrigger, m as TooltipContent, S as SegmentBar, R as ROLE_COLOR_CLASSES, p as ANATOMY_ROLE_LABELS, C as CONTEXT_USAGE_THRESHOLDS } from "./ProxyViewerContainer-CimBv5WL.mjs";
4
4
  import "node:crypto";
5
5
  import "node:path";
6
6
  import "node:fs";
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { x as formatTokens, m as cn, z as getStatusCategory, s as safeGetOwnProperty } from "./router-75eycvXZ.mjs";
3
- import { g as getLogFormatAdapter, q as AnswerMarkdown, B as Badge, s as Collapsible, t as CollapsibleTrigger, v as CollapsibleContent, w as ScrollArea, x as LazyJsonViewer, y as safeJsonValue } from "./ProxyViewerContainer-BAQY5x_x.mjs";
2
+ import { y as formatTokens, m as cn, E as getStatusCategory, s as safeGetOwnProperty } from "./router-DxPlMfLZ.mjs";
3
+ import { g as getLogFormatAdapter, q as AnswerMarkdown, B as Badge, s as Collapsible, t as CollapsibleTrigger, v as CollapsibleContent, w as ScrollArea, x as LazyJsonViewer, y as safeJsonValue } from "./ProxyViewerContainer-CimBv5WL.mjs";
4
4
  import "node:crypto";
5
5
  import "node:path";
6
6
  import "node:fs";
@@ -13,7 +13,7 @@ import "node:net";
13
13
  import "../_libs/modelcontextprotocol__server.mjs";
14
14
  import "../_libs/jszip.mjs";
15
15
  import "node:os";
16
- import { ac as Zap, T as TriangleAlert, v as CircleStop, ae as Brain, c as ChevronDown, t as ChevronRight, o as Terminal } from "../_libs/lucide-react.mjs";
16
+ import { ac as Zap, T as TriangleAlert, v as CircleStop, ae as Brain, c as ChevronDown, t as ChevronRight, l as Terminal } from "../_libs/lucide-react.mjs";
17
17
  import { R as Root } from "../_libs/radix-ui__react-separator.mjs";
18
18
  import "../_libs/tanstack__react-router.mjs";
19
19
  import "../_libs/tanstack__router-core.mjs";
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { f as fetchJsonWithTimeout, j as TooltipProvider, k as Tooltip, l as TooltipTrigger, B as Badge, m as TooltipContent, x as LazyJsonViewer } from "./ProxyViewerContainer-BAQY5x_x.mjs";
3
- import { ag as StreamingChunkSchema$1 } from "./router-75eycvXZ.mjs";
2
+ import { f as fetchJsonWithTimeout, j as TooltipProvider, k as Tooltip, l as TooltipTrigger, B as Badge, m as TooltipContent, x as LazyJsonViewer } from "./ProxyViewerContainer-CimBv5WL.mjs";
3
+ import { ah as StreamingChunkSchema$1 } from "./router-DxPlMfLZ.mjs";
4
4
  import "node:crypto";
5
5
  import "node:path";
6
6
  import "node:fs";
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { P as ProxyViewerContainer } from "./ProxyViewerContainer-BAQY5x_x.mjs";
3
- import "./router-75eycvXZ.mjs";
2
+ import { P as ProxyViewerContainer } from "./ProxyViewerContainer-CimBv5WL.mjs";
3
+ import "./router-DxPlMfLZ.mjs";
4
4
  import "node:crypto";
5
5
  import "node:path";
6
6
  import "node:fs";
@@ -1,5 +1,5 @@
1
1
  import { j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { S as SafeRouteError } from "./router-75eycvXZ.mjs";
2
+ import { S as SafeRouteError } from "./router-DxPlMfLZ.mjs";
3
3
  import "node:crypto";
4
4
  import "node:path";
5
5
  import "node:fs";
@@ -85,7 +85,7 @@ function getResponse() {
85
85
  }
86
86
  var HEADERS = { TSS_SHELL: "X-TSS_SHELL" };
87
87
  async function getStartManifest(matchedRoutes) {
88
- const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-DjCobDeN.mjs");
88
+ const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-82w9tFI-.mjs");
89
89
  const startManifest = tsrStartManifest();
90
90
  let routes = startManifest.routes;
91
91
  routes[rootRouteId];
@@ -1162,7 +1162,7 @@ var getBaseManifest = getProdBaseManifest;
1162
1162
  var createEarlyHintsForRequest = createEarlyHintsCollector;
1163
1163
  async function loadEntries() {
1164
1164
  const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
1165
- import("./router-75eycvXZ.mjs").then((n) => n.ah),
1165
+ import("./router-DxPlMfLZ.mjs").then((n) => n.ai),
1166
1166
  import("./start-HYkvq4Ni.mjs"),
1167
1167
  import("./empty-plugin-adapters-BFgPZ6_d.mjs")
1168
1168
  ]);
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { m as cn, y as copyTextToClipboard } from "./router-75eycvXZ.mjs";
3
- import { z as parseJsonText, j as TooltipProvider, k as Tooltip, l as TooltipTrigger, m as TooltipContent } from "./ProxyViewerContainer-BAQY5x_x.mjs";
2
+ import { m as cn, z as copyTextToClipboard } from "./router-DxPlMfLZ.mjs";
3
+ import { z as parseJsonText, j as TooltipProvider, k as Tooltip, l as TooltipTrigger, m as TooltipContent } from "./ProxyViewerContainer-CimBv5WL.mjs";
4
4
  import "node:crypto";
5
5
  import "node:path";
6
6
  import "node:fs";
@@ -13,7 +13,7 @@ import "node:net";
13
13
  import "../_libs/modelcontextprotocol__server.mjs";
14
14
  import "../_libs/jszip.mjs";
15
15
  import "node:os";
16
- import { d as Check, n as Copy, c as ChevronDown, t as ChevronRight, av as ChevronsDown } from "../_libs/lucide-react.mjs";
16
+ import { d as Check, k as Copy, c as ChevronDown, t as ChevronRight, av as ChevronsDown } from "../_libs/lucide-react.mjs";
17
17
  import "../_libs/tanstack__react-router.mjs";
18
18
  import "../_libs/tanstack__router-core.mjs";
19
19
  import "../_libs/cookie-es.mjs";