@tonyclaw/agent-inspector 2.0.40 → 2.0.42

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-Cfqxlo-U.js +1 -0
  3. package/.output/public/assets/ProxyViewerContainer-CE9pAX4c.js +117 -0
  4. package/.output/public/assets/{ReplayDialog-TTTVCMe9.js → ReplayDialog-daRidZo_.js} +1 -1
  5. package/.output/public/assets/{RequestAnatomy-c8ru0pS-.js → RequestAnatomy-CJ7EPQGQ.js} +1 -1
  6. package/.output/public/assets/ResponseView-xBmr54hB.js +1 -0
  7. package/.output/public/assets/StreamingChunkSequence-nK-0LpbM.js +1 -0
  8. package/.output/public/assets/_sessionId-CbWEG5ej.js +1 -0
  9. package/.output/public/assets/index-D1MkoT4l.js +1 -0
  10. package/.output/public/assets/{main-CKYe6UUv.js → main-DOy_Q96H.js} +2 -2
  11. package/.output/server/{_sessionId-CkwhOzdS.mjs → _sessionId-DtYRZHlM.mjs} +2 -2
  12. package/.output/server/_ssr/{CompareDrawer-BHDiuYMw.mjs → CompareDrawer-fy1ARwtx.mjs} +4 -3
  13. package/.output/server/_ssr/{ProxyViewerContainer-0c2_DBMX.mjs → ProxyViewerContainer-9GJtCWCq.mjs} +242 -45
  14. package/.output/server/_ssr/{ReplayDialog-CTjwzDDH.mjs → ReplayDialog-BrS7syOE.mjs} +3 -3
  15. package/.output/server/_ssr/{RequestAnatomy-D36oujv2.mjs → RequestAnatomy-BtWt1cWY.mjs} +2 -2
  16. package/.output/server/_ssr/{ResponseView-ClZ3oODE.mjs → ResponseView-CkKGYE6m.mjs} +2 -2
  17. package/.output/server/_ssr/{StreamingChunkSequence-Ck5l4p1m.mjs → StreamingChunkSequence-C7rB3osr.mjs} +2 -2
  18. package/.output/server/_ssr/{index-DKBYH0TC.mjs → index-D24WforP.mjs} +2 -2
  19. package/.output/server/_ssr/index.mjs +2 -2
  20. package/.output/server/_ssr/{router-D4I3ZyVS.mjs → router-CVqVjBzJ.mjs} +1312 -467
  21. package/.output/server/{_tanstack-start-manifest_v-D4vSn_wD.mjs → _tanstack-start-manifest_v-DSikvwru.mjs} +1 -1
  22. package/.output/server/index.mjs +59 -59
  23. package/README.md +36 -12
  24. package/package.json +1 -1
  25. package/src/components/ProxyViewer.tsx +5 -2
  26. package/src/components/providers/ProviderCard.tsx +6 -3
  27. package/src/components/providers/ProviderForm.tsx +6 -3
  28. package/src/components/providers/ProvidersPanel.tsx +6 -1
  29. package/src/components/providers/SettingsDialog.tsx +142 -2
  30. package/src/components/proxy-viewer/CompareDrawer.tsx +3 -1
  31. package/src/components/proxy-viewer/LogEntry.tsx +8 -5
  32. package/src/components/proxy-viewer/useCopyFeedback.ts +3 -1
  33. package/src/components/ui/json-viewer.tsx +7 -2
  34. package/src/lib/clipboard.ts +67 -0
  35. package/src/lib/runContract.ts +3 -0
  36. package/src/mcp/currentContext.ts +65 -0
  37. package/src/mcp/mode.ts +56 -0
  38. package/src/mcp/server.ts +466 -15
  39. package/src/mcp/toolHandlers.ts +372 -0
  40. package/src/proxy/evidenceExporter.ts +1 -0
  41. package/src/proxy/runStore.ts +74 -22
  42. package/.output/public/assets/CompareDrawer-p0uYxW7_.js +0 -1
  43. package/.output/public/assets/ProxyViewerContainer-BGqeiYKD.js +0 -115
  44. package/.output/public/assets/ResponseView-D59jTMy4.js +0 -1
  45. package/.output/public/assets/StreamingChunkSequence-UlAMVF9j.js +0 -1
  46. package/.output/public/assets/_sessionId-EHPexdPl.js +0 -1
  47. package/.output/public/assets/index-CZP-XfpB.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports, a as React } from "../_libs/react.mjs";
2
- import { C as CapturedLogSchema, 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, v as packageJson, i as GroupEvidenceExportResultSchema, j as DeleteInspectorGroupResponseSchema, d as RuntimeConfigSchema, P as ProviderConfigSchema, f as apiFormatForPath, n as createPendingProviderTestResults, o as ProviderTestResultsSchema, q as createFailedProviderTestResults, M as MAX_SLOW_RESPONSE_THRESHOLD_SECONDS, r as MAX_PROVIDER_TEST_TIMEOUT_SECONDS, T as TimeDisplayFormatSchema, m as maskApiKey, k as providerHasContextMetadata, l as findProviderModelMetadata, g as getSessionPath, p as parseOpenAIResponse, O as OpenAIRequestSchema, A as AnthropicResponseSchema$1, e as AnthropicRequestSchema, s as safeGetOwnProperty, t as resolveProviderContextWindow, K as KnowledgeCandidateSchema, h as stripClaudeCodeBillingHeader, u as isPlainRecord, G as GroupEvidenceReadResponseSchema, I as InspectorGroupsListResponseSchema } from "./router-D4I3ZyVS.mjs";
2
+ import { C as CapturedLogSchema, 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, v as packageJson, i as GroupEvidenceExportResultSchema, j as DeleteInspectorGroupResponseSchema, d as RuntimeConfigSchema, P as ProviderConfigSchema, f as apiFormatForPath, n as createPendingProviderTestResults, o as ProviderTestResultsSchema, q as createFailedProviderTestResults, M as MAX_SLOW_RESPONSE_THRESHOLD_SECONDS, r as MAX_PROVIDER_TEST_TIMEOUT_SECONDS, T as TimeDisplayFormatSchema, m as maskApiKey, k as providerHasContextMetadata, l as findProviderModelMetadata, g as getSessionPath, p as parseOpenAIResponse, O as OpenAIRequestSchema, A as AnthropicResponseSchema$1, e as AnthropicRequestSchema, s as safeGetOwnProperty, t as resolveProviderContextWindow, K as KnowledgeCandidateSchema, h as stripClaudeCodeBillingHeader, u as isPlainRecord, G as GroupEvidenceReadResponseSchema, I as InspectorGroupsListResponseSchema } from "./router-CVqVjBzJ.mjs";
3
3
  import { u as useSWR, a as useSWRConfig } from "../_libs/swr.mjs";
4
4
  import { J as JSZip } from "../_libs/jszip.mjs";
5
5
  import { c as clsx } from "../_libs/clsx.mjs";
@@ -414,6 +414,61 @@ async function exportLogsAsZip(logs, mode = "redacted") {
414
414
  URL.revokeObjectURL(url);
415
415
  return { ok: true };
416
416
  }
417
+ function restoreSelection(selection, ranges) {
418
+ if (selection === null) return;
419
+ selection.removeAllRanges();
420
+ for (const range of ranges) {
421
+ selection.addRange(range);
422
+ }
423
+ }
424
+ function readSelectionRanges(selection) {
425
+ if (selection === null) return [];
426
+ const ranges = [];
427
+ for (let index = 0; index < selection.rangeCount; index++) {
428
+ ranges.push(selection.getRangeAt(index));
429
+ }
430
+ return ranges;
431
+ }
432
+ function copyWithTextareaFallback(text) {
433
+ if (typeof document === "undefined") return false;
434
+ const activeElement = document.activeElement;
435
+ const selection = document.getSelection();
436
+ const ranges = readSelectionRanges(selection);
437
+ const textarea = document.createElement("textarea");
438
+ textarea.value = text;
439
+ textarea.setAttribute("readonly", "");
440
+ textarea.style.position = "fixed";
441
+ textarea.style.top = "0";
442
+ textarea.style.left = "-9999px";
443
+ textarea.style.opacity = "0";
444
+ document.body.appendChild(textarea);
445
+ textarea.focus();
446
+ textarea.select();
447
+ textarea.setSelectionRange(0, text.length);
448
+ let copied = false;
449
+ try {
450
+ copied = document.execCommand("copy");
451
+ } catch {
452
+ } finally {
453
+ document.body.removeChild(textarea);
454
+ restoreSelection(selection, ranges);
455
+ if (typeof HTMLElement !== "undefined" && activeElement instanceof HTMLElement) {
456
+ activeElement.focus({ preventScroll: true });
457
+ }
458
+ }
459
+ return copied;
460
+ }
461
+ async function copyTextToClipboard(text) {
462
+ const clipboard = globalThis.navigator?.clipboard;
463
+ if (clipboard !== void 0) {
464
+ try {
465
+ await clipboard.writeText(text);
466
+ return true;
467
+ } catch {
468
+ }
469
+ }
470
+ return copyWithTextareaFallback(text);
471
+ }
417
472
  function formatTimestamp$1(iso, format) {
418
473
  switch (format) {
419
474
  case "full":
@@ -1870,7 +1925,8 @@ function useCopyFeedback(text) {
1870
1925
  (event) => {
1871
1926
  event.stopPropagation();
1872
1927
  if (text === null) return;
1873
- void window.navigator.clipboard.writeText(text).then(() => {
1928
+ void copyTextToClipboard(text).then((success) => {
1929
+ if (!success) return;
1874
1930
  setCopied(true);
1875
1931
  if (timerRef.current !== null) clearTimeout(timerRef.current);
1876
1932
  timerRef.current = setTimeout(() => setCopied(false), 2e3);
@@ -1881,19 +1937,19 @@ function useCopyFeedback(text) {
1881
1937
  return { copied, copy };
1882
1938
  }
1883
1939
  const LazyCompareDrawer = reactExports.lazy(
1884
- () => import("./CompareDrawer-BHDiuYMw.mjs").then((m) => ({ default: m.CompareDrawer }))
1940
+ () => import("./CompareDrawer-fy1ARwtx.mjs").then((m) => ({ default: m.CompareDrawer }))
1885
1941
  );
1886
1942
  const LazyReplayDialog = reactExports.lazy(
1887
- () => import("./ReplayDialog-CTjwzDDH.mjs").then((m) => ({ default: m.ReplayDialog }))
1943
+ () => import("./ReplayDialog-BrS7syOE.mjs").then((m) => ({ default: m.ReplayDialog }))
1888
1944
  );
1889
1945
  const LazyRequestAnatomy = reactExports.lazy(
1890
- () => import("./RequestAnatomy-D36oujv2.mjs").then((m) => ({ default: m.RequestAnatomy }))
1946
+ () => import("./RequestAnatomy-BtWt1cWY.mjs").then((m) => ({ default: m.RequestAnatomy }))
1891
1947
  );
1892
1948
  const LazyResponseView = reactExports.lazy(
1893
- () => import("./ResponseView-ClZ3oODE.mjs").then((m) => ({ default: m.ResponseView }))
1949
+ () => import("./ResponseView-CkKGYE6m.mjs").then((m) => ({ default: m.ResponseView }))
1894
1950
  );
1895
1951
  const LazyStreamingChunkSequence = reactExports.lazy(
1896
- () => import("./StreamingChunkSequence-Ck5l4p1m.mjs").then((m) => ({
1952
+ () => import("./StreamingChunkSequence-C7rB3osr.mjs").then((m) => ({
1897
1953
  default: m.StreamingChunkSequence
1898
1954
  }))
1899
1955
  );
@@ -2736,7 +2792,8 @@ function CopyValueButton({ value }) {
2736
2792
  const [copied, setCopied] = reactExports.useState(false);
2737
2793
  function handleCopy(e) {
2738
2794
  e.stopPropagation();
2739
- void window.navigator.clipboard.writeText(JSON.stringify(value, null, 2)).then(() => {
2795
+ void copyTextToClipboard(JSON.stringify(value, null, 2)).then((success) => {
2796
+ if (!success) return;
2740
2797
  setCopied(true);
2741
2798
  setTimeout(() => {
2742
2799
  setCopied(false);
@@ -2749,6 +2806,7 @@ function CopyValueButton({ value }) {
2749
2806
  type: "button",
2750
2807
  onClick: handleCopy,
2751
2808
  className: "inline-flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground transition-colors",
2809
+ "aria-label": copied ? "Copied JSON" : "Copy JSON",
2752
2810
  title: "Copy JSON",
2753
2811
  children: copied ? /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3 text-green-500" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "size-3" })
2754
2812
  }
@@ -2758,7 +2816,8 @@ function CopyButton({ value }) {
2758
2816
  const [copied, setCopied] = reactExports.useState(false);
2759
2817
  function handleCopy(e) {
2760
2818
  e.stopPropagation();
2761
- void window.navigator.clipboard.writeText(JSON.stringify(value, null, 2)).then(() => {
2819
+ void copyTextToClipboard(JSON.stringify(value, null, 2)).then((success) => {
2820
+ if (!success) return;
2762
2821
  setCopied(true);
2763
2822
  setTimeout(() => {
2764
2823
  setCopied(false);
@@ -2771,6 +2830,7 @@ function CopyButton({ value }) {
2771
2830
  type: "button",
2772
2831
  onClick: handleCopy,
2773
2832
  className: "opacity-0 group-hover/row:opacity-100 hover:bg-muted p-0.5 rounded transition-opacity shrink-0",
2833
+ "aria-label": copied ? "Copied JSON value" : "Copy JSON value",
2774
2834
  title: "Copy to clipboard",
2775
2835
  children: copied ? /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3 text-green-500" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "size-3 text-muted-foreground" })
2776
2836
  }
@@ -3639,9 +3699,12 @@ const LogEntry = reactExports.memo(function({
3639
3699
  if (activeTab !== "request") setActiveTab("request");
3640
3700
  }
3641
3701
  });
3642
- reactExports.useEffect(() => {
3643
- if (!expanded) return;
3644
- setActiveTab(anatomySegments !== null ? "anatomy" : "request");
3702
+ const handleToggleExpanded = reactExports.useCallback(() => {
3703
+ const nextExpanded = !expanded;
3704
+ if (nextExpanded) {
3705
+ setActiveTab(anatomySegments !== null ? "anatomy" : "request");
3706
+ }
3707
+ setExpanded(nextExpanded);
3645
3708
  }, [anatomySegments, expanded]);
3646
3709
  reactExports.useEffect(() => {
3647
3710
  const handleLogFocusRequest = (event) => {
@@ -3665,7 +3728,7 @@ const LogEntry = reactExports.memo(function({
3665
3728
  messageCount: requestAnalysis.messageCount,
3666
3729
  toolCount: requestAnalysis.toolCount,
3667
3730
  expanded,
3668
- onToggle: () => setExpanded(!expanded),
3731
+ onToggle: handleToggleExpanded,
3669
3732
  cacheTrend,
3670
3733
  slowResponseThresholdSeconds,
3671
3734
  timeDisplayFormat,
@@ -6732,10 +6795,11 @@ function ProviderCard({
6732
6795
  const [copied, setCopied] = reactExports.useState(false);
6733
6796
  const [showModelResults, setShowModelResults] = reactExports.useState(false);
6734
6797
  function handleCopy() {
6735
- navigator.clipboard.writeText(provider.apiKey).catch(() => {
6798
+ void copyTextToClipboard(provider.apiKey).then((success) => {
6799
+ if (!success) return;
6800
+ setCopied(true);
6801
+ setTimeout(() => setCopied(false), 2e3);
6736
6802
  });
6737
- setCopied(true);
6738
- setTimeout(() => setCopied(false), 2e3);
6739
6803
  }
6740
6804
  const docsUrl = provider.apiDocsUrl ?? Object.entries(KNOWN_PROVIDER_DOCS).find(
6741
6805
  ([keyword]) => provider.name.toLowerCase().includes(keyword)
@@ -7192,10 +7256,11 @@ function ProviderForm({ provider, onSubmit, onCancel }) {
7192
7256
  const suggestedModels = isMiniMax ? MINIMAX_MODELS : isZhipu ? ZHIPU_MODELS : isAlibaba ? ALIBABA_MODELS : [];
7193
7257
  const hasContextMetadata = provider?.modelMetadata?.some((metadata) => metadata.contextWindow !== void 0) ?? false;
7194
7258
  function handleCopy() {
7195
- navigator.clipboard.writeText(apiKey).catch(() => {
7259
+ void copyTextToClipboard(apiKey).then((success) => {
7260
+ if (!success) return;
7261
+ setCopied(true);
7262
+ setTimeout(() => setCopied(false), 2e3);
7196
7263
  });
7197
- setCopied(true);
7198
- setTimeout(() => setCopied(false), 2e3);
7199
7264
  }
7200
7265
  reactExports.useEffect(() => {
7201
7266
  if (provider) {
@@ -8252,12 +8317,14 @@ function ProvidersPanel({
8252
8317
  {
8253
8318
  type: "button",
8254
8319
  onClick: () => {
8255
- void window.navigator.clipboard.writeText(configPath).then(() => {
8320
+ void copyTextToClipboard(configPath).then((success) => {
8321
+ if (!success) return;
8256
8322
  setConfigPathCopied(true);
8257
8323
  setTimeout(() => setConfigPathCopied(false), 2e3);
8258
8324
  });
8259
8325
  },
8260
8326
  className: "shrink-0 ml-auto text-muted-foreground hover:text-foreground transition-colors",
8327
+ "aria-label": configPathCopied ? "Copied config file path" : "Copy config file path",
8261
8328
  children: configPathCopied ? /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3 text-green-500" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "size-3" })
8262
8329
  }
8263
8330
  ) }),
@@ -8383,6 +8450,7 @@ function SettingsDialog() {
8383
8450
  /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "providers", children: "Providers" }),
8384
8451
  /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "proxy", children: "Proxy" }),
8385
8452
  /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "storage", children: "Storage" }),
8453
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "mcp", children: "MCP" }),
8386
8454
  /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTrigger, { value: "onboarding", children: "Onboarding" })
8387
8455
  ] }),
8388
8456
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 flex-1 overflow-x-hidden overflow-y-auto pr-3", children: [
@@ -8404,6 +8472,7 @@ function SettingsDialog() {
8404
8472
  ) }),
8405
8473
  /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "proxy", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ProxySettingsTab, {}) }),
8406
8474
  /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "storage", children: /* @__PURE__ */ jsxRuntimeExports.jsx(StorageSettingsTab, {}) }),
8475
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "mcp", children: /* @__PURE__ */ jsxRuntimeExports.jsx(McpSettingsTab, {}) }),
8407
8476
  /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "onboarding", children: /* @__PURE__ */ jsxRuntimeExports.jsx(OnboardingSettingsTab, {}) })
8408
8477
  ] })
8409
8478
  ] })
@@ -8456,7 +8525,8 @@ function StorageSettingsTab() {
8456
8525
  void refresh();
8457
8526
  }, [refresh]);
8458
8527
  const handleCopy = reactExports.useCallback((id, value) => {
8459
- void window.navigator.clipboard.writeText(value).then(() => {
8528
+ void copyTextToClipboard(value).then((success) => {
8529
+ if (!success) return;
8460
8530
  setCopiedId(id);
8461
8531
  setTimeout(() => setCopiedId(null), 1600);
8462
8532
  });
@@ -8590,7 +8660,8 @@ function OnboardingSettingsTab() {
8590
8660
  [origin]
8591
8661
  );
8592
8662
  const handleCopy = reactExports.useCallback((id, value) => {
8593
- void window.navigator.clipboard.writeText(value).then(() => {
8663
+ void copyTextToClipboard(value).then((success) => {
8664
+ if (!success) return;
8594
8665
  setCopiedId(id);
8595
8666
  setTimeout(() => setCopiedId(null), 1600);
8596
8667
  });
@@ -8651,6 +8722,129 @@ function OnboardingSettingsTab() {
8651
8722
  ] })
8652
8723
  ] });
8653
8724
  }
8725
+ function McpSettingsTab() {
8726
+ const [copiedId, setCopiedId] = reactExports.useState(null);
8727
+ const origin = reactExports.useMemo(() => {
8728
+ if (typeof window === "undefined") return "http://localhost:25947";
8729
+ return window.location.origin;
8730
+ }, []);
8731
+ const endpoint = `${origin}/api/mcp`;
8732
+ const values = reactExports.useMemo(
8733
+ () => [
8734
+ { id: "mcp-url", label: "Streamable HTTP MCP URL", value: endpoint },
8735
+ {
8736
+ id: "stdio",
8737
+ label: "Stdio bridge command",
8738
+ value: `agent-inspector-mcp stdio --url ${endpoint}`
8739
+ },
8740
+ {
8741
+ id: "doctor",
8742
+ label: "Bridge doctor",
8743
+ value: `agent-inspector-mcp doctor --url ${endpoint}`
8744
+ },
8745
+ {
8746
+ id: "readonly",
8747
+ label: "Readonly mode",
8748
+ value: "AGENT_INSPECTOR_MCP_READONLY=1 agent-inspector"
8749
+ },
8750
+ {
8751
+ id: "capabilities",
8752
+ label: "Capabilities resource",
8753
+ value: "inspector://mcp/capabilities"
8754
+ },
8755
+ {
8756
+ id: "context",
8757
+ label: "Current context resource",
8758
+ value: "inspector://context/current"
8759
+ },
8760
+ {
8761
+ id: "streamable-json",
8762
+ label: "Streamable HTTP JSON",
8763
+ value: JSON.stringify(
8764
+ {
8765
+ mcpServers: {
8766
+ "agent-inspector": {
8767
+ type: "streamableHttp",
8768
+ url: endpoint
8769
+ }
8770
+ }
8771
+ },
8772
+ null,
8773
+ 2
8774
+ )
8775
+ },
8776
+ {
8777
+ id: "stdio-json",
8778
+ label: "Stdio MCP JSON",
8779
+ value: JSON.stringify(
8780
+ {
8781
+ mcpServers: {
8782
+ "agent-inspector": {
8783
+ command: "agent-inspector-mcp",
8784
+ args: ["stdio", "--url", endpoint]
8785
+ }
8786
+ }
8787
+ },
8788
+ null,
8789
+ 2
8790
+ )
8791
+ },
8792
+ {
8793
+ id: "opencode-local",
8794
+ label: "OpenCode local MCP",
8795
+ value: JSON.stringify(
8796
+ {
8797
+ mcp: {
8798
+ "agent-inspector": {
8799
+ type: "local",
8800
+ command: ["agent-inspector-mcp", "stdio", "--url", endpoint],
8801
+ enabled: true
8802
+ }
8803
+ }
8804
+ },
8805
+ null,
8806
+ 2
8807
+ )
8808
+ },
8809
+ {
8810
+ id: "codex-toml",
8811
+ label: "Codex TOML",
8812
+ value: `[mcp_servers.agent-inspector]
8813
+ command = "agent-inspector-mcp"
8814
+ args = ["stdio", "--url", "${endpoint}"]`
8815
+ }
8816
+ ],
8817
+ [endpoint]
8818
+ );
8819
+ const handleCopy = reactExports.useCallback((id, value) => {
8820
+ void copyTextToClipboard(value).then((success) => {
8821
+ if (!success) return;
8822
+ setCopiedId(id);
8823
+ setTimeout(() => setCopiedId(null), 1600);
8824
+ });
8825
+ }, []);
8826
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 space-y-4", children: [
8827
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
8828
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Terminal, { className: "size-4 text-muted-foreground" }),
8829
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-sm font-semibold", children: "MCP access" })
8830
+ ] }),
8831
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid gap-2 rounded-md border border-border bg-background px-3 py-2 text-xs text-muted-foreground", children: [
8832
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Use Streamable HTTP when the client supports URL-based MCP. Use the stdio bridge only for stdio-only clients. Configure one entry for the same Inspector instance." }),
8833
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "If the MCP client runs in another container or host, replace localhost with a reachable host/IP and verify the network path." })
8834
+ ] }),
8835
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid gap-2", children: values.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(
8836
+ CopyableSetupValue,
8837
+ {
8838
+ id: item.id,
8839
+ label: item.label,
8840
+ value: item.value,
8841
+ copiedId,
8842
+ onCopy: handleCopy
8843
+ },
8844
+ item.id
8845
+ )) })
8846
+ ] });
8847
+ }
8654
8848
  function ProxySettingsTab() {
8655
8849
  const {
8656
8850
  strip,
@@ -10174,7 +10368,8 @@ function openLogContext(logId) {
10174
10368
  function CopyableCommand({ command }) {
10175
10369
  const [copied, setCopied] = reactExports.useState(false);
10176
10370
  const handleCopy = reactExports.useCallback(() => {
10177
- void window.navigator.clipboard.writeText(command).then(() => {
10371
+ void copyTextToClipboard(command).then((success) => {
10372
+ if (!success) return;
10178
10373
  setCopied(true);
10179
10374
  setTimeout(() => setCopied(false), 2e3);
10180
10375
  });
@@ -10432,7 +10627,8 @@ function SessionContextBar({
10432
10627
  );
10433
10628
  const userAgent = reactExports.useMemo(() => getFirstUserAgent(logs), [logs]);
10434
10629
  const handleCopyLink = reactExports.useCallback(() => {
10435
- void window.navigator.clipboard.writeText(window.location.href).then(() => {
10630
+ void copyTextToClipboard(window.location.href).then((success) => {
10631
+ if (!success) return;
10436
10632
  setCopied(true);
10437
10633
  setTimeout(() => setCopied(false), 2e3);
10438
10634
  });
@@ -11093,36 +11289,37 @@ export {
11093
11289
  Badge as B,
11094
11290
  CONTEXT_USAGE_THRESHOLDS as C,
11095
11291
  Dialog as D,
11096
- safeJsonValue as E,
11292
+ JsonViewer as E,
11293
+ safeJsonValue as F,
11097
11294
  JsonViewerFromString as J,
11098
11295
  ProxyViewerContainer as P,
11099
11296
  ROLE_COLOR_CLASSES as R,
11100
11297
  SegmentBar as S,
11101
11298
  Tabs as T,
11102
11299
  getConversationId as a,
11103
- DialogContent as b,
11300
+ copyTextToClipboard as b,
11104
11301
  cn as c,
11105
- DialogHeader as d,
11106
- DialogTitle as e,
11302
+ DialogContent as d,
11303
+ DialogHeader as e,
11107
11304
  formatTokens as f,
11108
11305
  getLogFormatAdapter as g,
11109
- TabsList as h,
11110
- TabsTrigger as i,
11111
- TabsContent as j,
11112
- Button as k,
11113
- TooltipProvider as l,
11114
- Tooltip as m,
11115
- TooltipTrigger as n,
11116
- TooltipContent as o,
11117
- dispatchLogFocusRequest as p,
11118
- analyzeContextIntelligence as q,
11306
+ DialogTitle as h,
11307
+ TabsList as i,
11308
+ TabsTrigger as j,
11309
+ TabsContent as k,
11310
+ Button as l,
11311
+ TooltipProvider as m,
11312
+ Tooltip as n,
11313
+ TooltipTrigger as o,
11314
+ TooltipContent as p,
11315
+ dispatchLogFocusRequest as q,
11119
11316
  resolveLogFormat as r,
11120
- formatContextWindowTokens as s,
11121
- getStatusCategory as t,
11317
+ analyzeContextIntelligence as s,
11318
+ formatContextWindowTokens as t,
11122
11319
  useProviders as u,
11123
- Collapsible as v,
11124
- CollapsibleTrigger as w,
11125
- CollapsibleContent as x,
11126
- ScrollArea as y,
11127
- JsonViewer as z
11320
+ getStatusCategory as v,
11321
+ Collapsible as w,
11322
+ CollapsibleTrigger as x,
11323
+ CollapsibleContent as y,
11324
+ ScrollArea as z
11128
11325
  };
@@ -1,7 +1,7 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { u as useProviders, D as Dialog, b as DialogContent, d as DialogHeader, e as DialogTitle, T as Tabs, h as TabsList, i as TabsTrigger, j as TabsContent, k as Button, l as TooltipProvider, m as Tooltip, n as TooltipTrigger, o as TooltipContent, p as dispatchLogFocusRequest } from "./ProxyViewerContainer-0c2_DBMX.mjs";
3
- import { ResponseView } from "./ResponseView-ClZ3oODE.mjs";
4
- import { C as CapturedLogSchema } from "./router-D4I3ZyVS.mjs";
2
+ import { u as useProviders, D as Dialog, d as DialogContent, e as DialogHeader, h as DialogTitle, T as Tabs, i as TabsList, j as TabsTrigger, k as TabsContent, l as Button, m as TooltipProvider, n as Tooltip, o as TooltipTrigger, p as TooltipContent, q as dispatchLogFocusRequest } from "./ProxyViewerContainer-9GJtCWCq.mjs";
3
+ import { ResponseView } from "./ResponseView-CkKGYE6m.mjs";
4
+ import { C as CapturedLogSchema } from "./router-CVqVjBzJ.mjs";
5
5
  import "../_libs/jszip.mjs";
6
6
  import "../_libs/modelcontextprotocol__server.mjs";
7
7
  import { V as RotateCcw, ae as Braces, af as Minimize2 } from "../_libs/lucide-react.mjs";
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { u as useProviders, q as analyzeContextIntelligence, f as formatTokens, l as TooltipProvider, c as cn, m as Tooltip, n as TooltipTrigger, o as TooltipContent, S as SegmentBar, R as ROLE_COLOR_CLASSES, A as ANATOMY_ROLE_LABELS, s as formatContextWindowTokens, C as CONTEXT_USAGE_THRESHOLDS } from "./ProxyViewerContainer-0c2_DBMX.mjs";
3
- import "./router-D4I3ZyVS.mjs";
2
+ import { u as useProviders, s as analyzeContextIntelligence, f as formatTokens, m as TooltipProvider, c as cn, n as Tooltip, o as TooltipTrigger, p as TooltipContent, S as SegmentBar, R as ROLE_COLOR_CLASSES, A as ANATOMY_ROLE_LABELS, t as formatContextWindowTokens, C as CONTEXT_USAGE_THRESHOLDS } from "./ProxyViewerContainer-9GJtCWCq.mjs";
3
+ import "./router-CVqVjBzJ.mjs";
4
4
  import "../_libs/modelcontextprotocol__server.mjs";
5
5
  import "../_libs/jszip.mjs";
6
6
  import { ag as Info, c as ChevronDown, l as ChevronRight } from "../_libs/lucide-react.mjs";
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { g as getLogFormatAdapter, f as formatTokens, c as cn, t as getStatusCategory, B as Badge, v as Collapsible, w as CollapsibleTrigger, x as CollapsibleContent, y as ScrollArea, z as JsonViewer, E as safeJsonValue } from "./ProxyViewerContainer-0c2_DBMX.mjs";
3
- import "./router-D4I3ZyVS.mjs";
2
+ import { g as getLogFormatAdapter, f as formatTokens, c as cn, v as getStatusCategory, B as Badge, w as Collapsible, x as CollapsibleTrigger, y as CollapsibleContent, z as ScrollArea, E as JsonViewer, F as safeJsonValue } from "./ProxyViewerContainer-9GJtCWCq.mjs";
3
+ import "./router-CVqVjBzJ.mjs";
4
4
  import "../_libs/modelcontextprotocol__server.mjs";
5
5
  import "../_libs/jszip.mjs";
6
6
  import { Z as Zap, q as TriangleAlert, ah as CircleStop, B as Brain, c as ChevronDown, l as ChevronRight, f as Terminal } from "../_libs/lucide-react.mjs";
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { l as TooltipProvider, m as Tooltip, n as TooltipTrigger, B as Badge, o as TooltipContent, z as JsonViewer } from "./ProxyViewerContainer-0c2_DBMX.mjs";
3
- import "./router-D4I3ZyVS.mjs";
2
+ import { m as TooltipProvider, n as Tooltip, o as TooltipTrigger, B as Badge, p as TooltipContent, E as JsonViewer } from "./ProxyViewerContainer-9GJtCWCq.mjs";
3
+ import "./router-CVqVjBzJ.mjs";
4
4
  import "../_libs/modelcontextprotocol__server.mjs";
5
5
  import "../_libs/jszip.mjs";
6
6
  import { c as ChevronDown, l as ChevronRight, a as LoaderCircle } from "../_libs/lucide-react.mjs";
@@ -1,6 +1,6 @@
1
- import { P as ProxyViewerContainer } from "./ProxyViewerContainer-0c2_DBMX.mjs";
1
+ import { P as ProxyViewerContainer } from "./ProxyViewerContainer-9GJtCWCq.mjs";
2
2
  import "../_libs/react.mjs";
3
- import "./router-D4I3ZyVS.mjs";
3
+ import "./router-CVqVjBzJ.mjs";
4
4
  import "../_libs/modelcontextprotocol__server.mjs";
5
5
  import "../_libs/jszip.mjs";
6
6
  import "../_libs/swr.mjs";
@@ -198,7 +198,7 @@ function getResponse() {
198
198
  return event.res;
199
199
  }
200
200
  async function getStartManifest(matchedRoutes) {
201
- const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-D4vSn_wD.mjs");
201
+ const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-DSikvwru.mjs");
202
202
  const startManifest = tsrStartManifest();
203
203
  const rootRoute = startManifest.routes[rootRouteId] = startManifest.routes[rootRouteId] || {};
204
204
  rootRoute.assets = rootRoute.assets || [];
@@ -776,7 +776,7 @@ let entriesPromise;
776
776
  let baseManifestPromise;
777
777
  let cachedFinalManifestPromise;
778
778
  async function loadEntries() {
779
- const routerEntry = await import("./router-D4I3ZyVS.mjs").then((n) => n.w);
779
+ const routerEntry = await import("./router-CVqVjBzJ.mjs").then((n) => n.w);
780
780
  const startEntry = await import("./start-HYkvq4Ni.mjs");
781
781
  return { startEntry, routerEntry };
782
782
  }